llvm-project/llvm/test/Transforms/LoopStrengthReduce
eopXD 10da9844d0 [LSR] Drop LSR solution if it is less profitable than baseline
The LSR may suggest less profitable transformation to the loop. This
patch adds check to prevent LSR from generating worse code than what
we already have.

Since LSR affects nearly all targets, the patch is guarded by the
option 'lsr-drop-solution' and default as disable for now.

The next step should be extending an TTI interface to allow target(s)
to enable this enhancememnt.

Debug log is added to remind user of such choice to skip the LSR
solution.

Reviewed By: Meinersbur, #loopoptwg

Differential Revision: https://reviews.llvm.org/D126043
2022-10-27 10:13:57 -07:00
..
AArch64 [LSR] Add test for LoopStrenghtReduce for Ldp; NFC 2022-06-15 14:51:39 +08:00
AMDGPU [AMDGPU] Do not generate ELF symbols for the local branch target labels 2021-11-20 10:32:41 +05:30
ARM [ARM] Use v2i1 for MVE and CDE intrinsics 2021-12-03 15:27:58 +00:00
NVPTX
Power
RISCV [LSR] Drop LSR solution if it is less profitable than baseline 2022-10-27 10:13:57 -07:00
X86 X86: Stop assigning register costs for longer encodings. 2022-09-30 16:01:33 -07: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 Reland [SCEV] Improve modelling for (null) pointer constants 2021-03-13 16:05:34 +03:00
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
callbr-critical-edge-splitting.ll [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
callbr-critical-edge-splitting2.ll [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
canonical-form.ll [LSR] Fixup canonicalization formula and its checker. 2022-03-29 14:05:04 +07:00
count-to-zero.ll
dbg-preserve-0.ll [DebugInfo][LSR] Emit shorter expressions from scev-based salvaging 2021-09-19 21:41:44 +01:00
dbg-preserve-1.ll
dbg-preserve-2.ll [DebugInfo][LoopStrengthReduction] SCEV-based salvaging for LSR 2021-07-28 23:04:59 +01:00
dead-phi.ll
debuginfo-scev-salvage-0.ll [DebugInfo][LoopStrengthReduction] SCEV-based salvaging for LSR 2021-07-28 23:04:59 +01:00
debuginfo-scev-salvage-1.ll [DebugInfo][LoopStrengthReduction] SCEV-based salvaging for LSR 2021-07-28 23:04:59 +01:00
debuginfo-scev-salvage-2.ll [DebugInfo][LoopStrengthReduction] SCEV-based salvaging for LSR 2021-07-28 23:04:59 +01:00
debuginfo-scev-salvage-3.ll [DebugInfo][LoopStrengthReduction] SCEV-based salvaging for LSR 2021-07-28 23:04:59 +01:00
debuginfo-scev-salvage-4.ll [DebugInfo][LoopStrengthReduction] SCEV-based salvaging for LSR 2021-07-28 23:04:59 +01:00
debuginfo-scev-salvage-5.ll [Debuginfo][LSR] Add salvaging variadic dbg.value intrinsics [2/2] 2022-04-28 14:21:56 +01:00
depth-limit-overrun.ll [LSR] Move transform test from test/Analysis to test/Transforms. 2022-06-23 16:04:45 +02:00
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 Recommit "[SCEV] Look through single value PHIs." (take 3) 2022-06-09 15:20:10 +01:00
gnarly-setupcost.ll
hoist-parent-preheader.ll
illegal-addr-modes.ll
invariant_value_first.ll
invariant_value_first_arg.ll
ivchain.ll
lsr-comp-time.ll
lsr-overflow.ll
lsr-term-fold-negative-testcase.ll [LSR] Fold terminating condition to other IV when possible 2022-09-20 01:38:47 -07:00
lsr-term-fold.ll [LSR] Fold terminating condition to other IV when possible 2022-09-20 01:38:47 -07:00
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
opaque-ptr.ll [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02:00
ops_after_indvar.ll
optimizemax_debugloc.ll [LSR][DebugInfo] Don't unnecessarily drop DebugLocs 2021-04-26 13:14:42 +01:00
phi_ehpad_ignore_sameval.ll [LSR] Fix crash in Phi node with EHPad block 2022-01-14 18:53:18 -08:00
phi_node_update_multiple_preds.ll
post-inc-icmpzero.ll
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
pr3086.ll [opt] Don't translate legacy -analysis flag to require<analysis> 2022-10-07 14:54:34 -07:00
pr3399.ll
pr3571.ll
pr12018.ll
pr12048.ll
pr12691.ll
pr18165.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
pr25541.ll
pr27056.ll Recommit [ScalarEvolution] Make getMinusSCEV() fail for unrelated pointers. 2021-07-06 12:16:05 -07: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
pr50765.ll [LSR] Filter out zero factors. PR50765 2021-06-23 10:43:06 +07:00
pr50918.ll [LSR] Handle case 1*reg => reg. PR50918 2021-07-16 11:33:59 +07:00
pr51329.ll {DebugInfo][LSR] Don't cache dbg.value that are already undef 2021-08-05 19:16:43 +01:00
pr51656.ll [NFC] Switch a few uses of undef to poison as placeholders for unreachable code 2022-07-23 21:50:11 +01:00
pr52161.ll [NFC] Switch a few uses of undef to poison as placeholders for unreachable code 2022-07-23 21:50:11 +01:00
pr56160.ll [LSR] Don't allow zero quotient as scale ref. PR56160 2022-06-22 23:33:57 +07:00
preserve-gep-loop-variant.ll
related_indvars.ll
remove_indvar.ll
remove_scev_indvars.ll [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
scaling-factor-incompat-type.ll [NFCI] Fixed missing colon in CHECK directives 2022-04-03 11:52:38 +02:00
scaling_factor_cost_crash.ll
scev-after-loopinstsimplify.ll
scev-expander-lcssa.ll [LSR] Preserve LCSSA in expander when rewriting loop exit values. 2022-09-27 09:58:48 +01:00
scev-insertpt-bug.ll
sext-ind-var.ll
share_code_in_preheader.ll
share_ivs.ll
shl.ll
two-combinations-bug.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
uglygep-address-space.ll [LSR] Use pointer args instead of undef for uglygep*.ll tests. 2022-01-11 12:35:55 +00:00
uglygep.ll [LSR] Use pointer args instead of undef for uglygep*.ll tests. 2022-01-11 12:35:55 +00:00
use_postinc_value_outside_loop.ll
var_stride_used_by_compare.ll
variable_stride.ll
wrong-hoisting-iv.ll [SCEVExpander] Stop hoisting IR when reusing phis 2021-08-17 09:38:32 -07:00