llvm-6502/test/Transforms/LoopStrengthReduce
Sanjoy Das a0a0b40aa3 Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap
(The change was landed in r230280 and caused the regression PR22674.
This version contains a fix and a test-case for PR22674).
    
When emitting the increment operation, SCEVExpander marks the
operation as nuw or nsw based on the flags on the preincrement SCEV.
This is incorrect because, for instance, it is possible that {-6,+,1}
is <nuw> while {-6,+,1}+1 = {-5,+,1} is not.
    
This change teaches SCEV to mark the increment as nuw/nsw only if it
can explicitly prove that the increment operation won't overflow.
    
Apart from the attached test case, another (more realistic)
manifestation of the bug can be seen in
Transforms/IndVarSimplify/pr20680.ll.

Differential Revision: http://reviews.llvm.org/D7778



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230533 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 20:02:59 +00:00
..
AArch64 IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
ARM [ARM] Re-re-apply VLD1/VST1 base-update combine. 2015-02-19 23:52:41 +00:00
X86 [X86] Reduce some 32-bit imuls into lea + shl 2015-01-28 14:08:22 +00:00
2005-08-15-AddRecIV.ll
2005-08-17-OutOfLoopVariant.ll
2005-09-12-UsesOutOutsideOfLoop.ll
2007-04-23-UseIterator.ll
2008-08-13-CmpStride.ll
2008-09-09-Overflow.ll
2009-01-13-nonconstant-stride-outside-loop.ll
2009-04-28-no-reduce-mul.ll
2011-07-19-CritEdgeBreakCrash.ll
2011-10-03-CritEdgeMerge.ll
2011-10-06-ReusePhi.ll
2011-10-13-SCEVChain.ll
2011-10-14-IntPtr.ll
2011-12-19-PostincQuadratic.ll
2012-01-02-nopreheader.ll
2012-01-16-nopreheader.ll
2012-03-15-nopreheader.ll
2012-03-26-constexpr.ll
2012-07-13-ExpandUDiv.ll
2012-07-18-LimitReassociate.ll
2013-01-05-IndBr.ll
2013-01-14-ReuseCast.ll
addrec-gep-address-space.ll
addrec-gep.ll
address-space-loop.ll
count-to-zero.ll Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap 2015-02-25 20:02:59 +00:00
dead-phi.ll
different-type-ivs.ll
dominate-assert.ll
dont_insert_redundant_ops.ll
dont_reduce_bytes.ll
dont_reverse.ll
dont-hoist-simple-loop-constants.ll
exit_compare_live_range.ll
hoist-parent-preheader.ll
invariant_value_first_arg.ll
invariant_value_first.ll
ivchain.ll
lsr-expand-quadratic.ll
nested-reduce.ll
nonlinear-postinc.ll
ops_after_indvar.ll
phi_node_update_multiple_preds.ll
post-inc-icmpzero.ll
pr2537.ll
pr2570.ll
pr3086.ll
pr3399.ll
pr3571.ll
pr12018.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
pr12048.ll
pr12691.ll
pr18165.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
preserve-gep-loop-variant.ll
quadradic-exit-value.ll
related_indvars.ll
remove_indvar.ll
scaling_factor_cost_crash.ll
share_code_in_preheader.ll
share_ivs.ll
uglygep-address-space.ll
uglygep.ll Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap 2015-02-25 20:02:59 +00:00
use_postinc_value_outside_loop.ll
var_stride_used_by_compare.ll
variable_stride.ll