llvm-project/llvm/test/Transforms/LoopInterchange
Florian Hahn e8a5c17211 [LoopInterchange] Improve inner exit loop safety checks.
The PHI node checks for inner loop exits are too permissive currently.
As indicated by an existing comment, we should only allow LCSSA PHI
nodes that are part of reductions or are only used outside of the loop
nest. We ensure this by checking the users of the LCSSA PHIs.
Specifically, it is not safe to use an exiting value from the inner loop in the latch of the outer
loop.

It also moves the inner loop exit check before the outer loop exit
check.

Fixes PR43473.

Reviewers: efriedma, mcrosier

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D68144
2019-12-04 17:46:01 +00:00
..
call-instructions.ll
currentLimitation.ll
debuginfo.ll
inner-only-reductions.ll
interchange-flow-dep-outer.ll
interchange-insts-between-indvar.ll
interchange-no-deps.ll
interchangeable.ll [LoopInterchange] Properly move condition, induction increment and ops to latch. 2019-09-11 08:23:23 +00:00
lcssa.ll
loop-interchange-optimization-remarks.ll
not-interchanged-dependencies-1.ll
not-interchanged-loop-nest-3.ll
not-interchanged-tightly-nested.ll
outer-only-reductions.ll
perserve-lcssa.ll [LoopInterchange] Properly move condition, induction increment and ops to latch. 2019-09-11 08:23:23 +00:00
phi-ordering.ll [LoopInterchange] Properly move condition, induction increment and ops to latch. 2019-09-11 08:23:23 +00:00
pr43176-move-to-new-latch.ll [LoopInterchange] Properly move condition, induction increment and ops to latch. 2019-09-11 08:23:23 +00:00
pr43473-invalid-lcssa-phis-in-inner-exit.ll [LoopInterchange] Improve inner exit loop safety checks. 2019-12-04 17:46:01 +00:00
pr43797-lcssa-for-multiple-outer-loop-blocks.ll [LoopInterchange] Only skip PHIs with incoming values from the inner loop. 2019-11-12 10:30:51 +00:00
profitability.ll
reductions-across-inner-and-outer-loop.ll [LoopInterchange] Properly move condition, induction increment and ops to latch. 2019-09-11 08:23:23 +00:00
update-condbranch-duplicate-successors.ll [LoopInterchange] Adjust assertions when updating successors. 2019-11-24 19:37:16 +00:00