1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/test/Transforms/LoopStrengthReduce
Max Kazantsev 4e5297ed76 [LSR] Fix Shadow IV in case of integer overflow
When LSR processes code like

  int accumulator = 0;
  for (int i = 0; i < N; i++) {
    accummulator += i;
    use((double) accummulator);
  }

It may decide to replace integer `accumulator` with a double Shadow IV to get rid
of casts.  The problem with that is that the `accumulator`'s value may overflow.
Starting from this moment, the behavior of integer and double accumulators
will differ.

This patch strenghtens up the conditions of Shadow IV mechanism applicability.
We only allow it for IVs that are proved to be `AddRec`s with `nsw`/`nuw` flag.

Differential Revision: https://reviews.llvm.org/D37209

llvm-svn: 311986
2017-08-29 07:32:20 +00:00
..
AArch64
AMDGPU AMDGPU: Mark all unspecified CC functions in tests as amdgpu_kernel 2017-03-21 21:39:51 +00:00
ARM ARM: handle post-indexed NEON ops where the offset isn't the access width. 2017-04-20 19:54:02 +00:00
NVPTX
X86 [LSR] Fix Shadow IV in case of integer overflow 2017-08-29 07:32:20 +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 [LSR] Narrow search space by filtering non-optimal formulae with the same ScaledReg and Scale. 2017-07-06 15:52:14 +00:00
addrec-gep-address-space.ll
addrec-gep.ll
address-space-loop.ll
count-to-zero.ll
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
ephemeral.ll
exit_compare_live_range.ll
funclet.ll
hoist-parent-preheader.ll
illegal-addr-modes.ll [ARM, Thumb1] Prevent ARMTargetLowering::isLegalAddressingMode from accepting illegal modes 2017-08-24 10:00:25 +00:00
invariant_value_first_arg.ll
invariant_value_first.ll
ivchain.ll
negative-scale.ll
nested-reduce.ll
nonintegral.ll [SCEVExpander] Try harder to avoid introducing inttoptr 2017-05-27 03:22:55 +00:00
nonlinear-postinc.ll
ops_after_indvar.ll
phi_node_update_multiple_preds.ll
post-inc-icmpzero.ll Re-enable "[SCEV] Do not fold dominated SCEVUnknown into AddRecExpr start" 2017-05-26 06:47:04 +00:00
post-inc-optsize.ll
pr2537.ll
pr2570.ll
pr3086.ll
pr3399.ll
pr3571.ll
pr12018.ll Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
pr12048.ll
pr12691.ll
pr18165.ll
pr25541.ll
pr27056.ll Fix PR33514 2017-08-04 18:46:13 +00:00
pr31627.ll [LoopStrengthReduce] Don't bother rewriting PHIs in catchswitch blocks 2017-01-13 22:24:27 +00:00
preserve-gep-loop-variant.ll
related_indvars.ll
remove_indvar.ll
scaling_factor_cost_crash.ll
scev-insertpt-bug.ll
sext-ind-var.ll [SCEV] Preserve NSW information for sext(subtract). 2017-08-04 20:19:46 +00:00
share_code_in_preheader.ll
share_ivs.ll
shl.ll
uglygep-address-space.ll
uglygep.ll
use_postinc_value_outside_loop.ll
var_stride_used_by_compare.ll
variable_stride.ll