llvm-project/llvm/test/Transforms/LoopInterchange
Florian Hahn e4961218fd [LoopInterchange] Properly move condition, induction increment and ops to latch.
Currently we only rely on the induction increment to come before the
condition to ensure the required instructions get moved to the new
latch.

This patch duplicates and moves the required instructions to the
newly created latch. We move the condition to the end of the new block,
then process its operands. We stop at operands that are defined
outside the loop, or are the induction PHI.

We duplicate the instructions and update the uses in the moved
instructions, to ensure other users remain intact. See the added
test2 for such an example.

Reviewers: efriedma, mcrosier

Reviewed By: efriedma

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

llvm-svn: 371595
2019-09-11 08:23:23 +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
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