llvm-project/llvm/test/Transforms/LoopStrengthReduce
Philip Reames 805115655e [LSR] Unify scheduling of existing and inserted addrecs
LSR goes to some lengths to schedule IV increments such that %iv and %iv.next never need to overlap. This is fairly fundamental to LSRs cost model. LSR assumes that an addrec can be represented with a single register. If %iv and %iv.next have to overlap, then that assumption does not hold.

The bug - which this patch is fixing - is that LSR only does this scheduling for IVs which it inserts, but it's cost model assumes the same for existing IVs that it reuses. It will rewrite existing IV users such that the no-overlap property holds, but will not actually reschedule said IV increment.

As you can see from the relatively lack of test updates, this doesn't actually impact codegen much. The main reason for doing it is to make a follow up patch series which improves post-increment use and scheduling easier to follow.

Differential Revision: https://reviews.llvm.org/D97219
2021-03-03 12:07:55 -08:00
..
AArch64 Mark FMOV constant materialization as being as cheap as a move. 2020-09-10 16:38:59 +00:00
AMDGPU Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
ARM Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
NVPTX
Power [PowerPC] implement target hook getTgtMemIntrinsic 2020-10-07 00:02:44 -04:00
X86 [LSR] Drop potentially invalid nowrap flags when switching to post-inc IV (PR46943) 2021-01-25 23:13:48 +01: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 [NFC][LSR] Autogenerate check lines in tests being affected by upcoming patch 2020-10-15 23:15:04 +03:00
2011-10-06-ReusePhi.ll [SCEV] Use NoWrapFlags when expanding a simple mul 2019-06-17 10:05:18 +00:00
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 [SCEV] Add explicit representations of umin/smin 2019-05-07 15:28:47 +00:00
addrec-gep-address-space.ll
addrec-gep.ll
address-space-loop.ll
callbr-critical-edge-splitting.ll BreakCriticalEdges: do not split the critical edge from a CallBr indirect successor 2021-01-15 13:51:47 -08:00
callbr-critical-edge-splitting2.ll BreakCriticalEdges: do not split the critical edge from a CallBr indirect successor 2021-01-15 13:51:47 -08:00
count-to-zero.ll
dbg-preserve-0.ll Reland [DebugInfo] Improve dbg preservation in LSR. 2020-12-14 16:15:18 +01:00
dbg-preserve-1.ll [DebugInfo] Avoid LSR crash on large integer inputs 2021-01-05 10:25:37 +00:00
dead-phi.ll
different-type-ivs.ll
dominate-assert.ll
dont-hoist-simple-loop-constants.ll
dont_insert_redundant_ops.ll
dont_reduce_bytes.ll
dont_reverse.ll
ephemeral.ll
exit_compare_live_range.ll
funclet.ll Revert D71539 "Recommit "[SCEV] Look through single value PHIs."" 2020-09-21 17:21:43 -07:00
gnarly-setupcost.ll [LSR] Limit the recursion for setup cost 2019-04-23 08:52:21 +00:00
hoist-parent-preheader.ll
illegal-addr-modes.ll
invariant_value_first.ll
invariant_value_first_arg.ll
ivchain.ll [NewPM][LSR] Rename strength-reduce -> loop-reduce 2020-07-02 11:15:29 -07:00
lsr-comp-time.ll
lsr-overflow.ll
missing-phi-operand-update.ll
multi-edge-latch.ll [LSR] Add test for multi-edge latch (NFC) 2021-02-06 18:31:45 +01:00
negative-scale.ll
nested-reduce.ll
nonintegral.ll
nonlinear-postinc.ll
ops_after_indvar.ll
phi_node_update_multiple_preds.ll
post-inc-icmpzero.ll Revert "Return "[SCEV] Use isBasicBlockEntryGuardedByCond in isLoopBackedgeGuardedByCond", 2nd try" 2020-11-26 18:12:51 +07:00
post-inc-optsize.ll
post-increment-insertion.ll [LSR] Unify scheduling of existing and inserted addrecs 2021-03-03 12:07:55 -08:00
pr2537.ll
pr2570.ll [NFC][LSR] Avoid undefined grep in pr2570.ll 2019-06-19 16:02:54 +00:00
pr3086.ll [test] Fix tests using -analyze that fail under NPM 2020-10-21 21:54:30 -07:00
pr3399.ll
pr3571.ll
pr12018.ll
pr12048.ll
pr12691.ll
pr18165.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
pr25541.ll
pr27056.ll [SCEVExpander] Avoid re-using existing casts if it means updating users. 2020-08-09 13:25:17 +01:00
pr31627.ll
pr48725.ll [SCEV] Do not cache comparison result upon reached max depth as "equivalence". PR48725 2021-01-29 12:08:34 +07:00
preserve-gep-loop-variant.ll
related_indvars.ll
remove_indvar.ll
scaling_factor_cost_crash.ll
scev-after-loopinstsimplify.ll
scev-expander-lcssa.ll [SCEV] Add additional tests. 2020-07-28 16:15:57 +01:00
scev-insertpt-bug.ll
sext-ind-var.ll
share_code_in_preheader.ll
share_ivs.ll
shl.ll
two-combinations-bug.ll Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
uglygep-address-space.ll
uglygep.ll
use_postinc_value_outside_loop.ll
var_stride_used_by_compare.ll
variable_stride.ll