[LoopRotate] Rotate loops with loop exiting latches
authorDavid Green <david.green@arm.com>
Sun, 1 Apr 2018 12:48:24 +0000 (12:48 +0000)
committerDavid Green <david.green@arm.com>
Sun, 1 Apr 2018 12:48:24 +0000 (12:48 +0000)
commitf80ebc8d214115c1887854aa37965fb799c8b6ef
tree43c781ebdf68b4c02a0fe2a4526454a5b6be15a2
parentc16815ca8abc496778d34e7acb6aa25bb0f29176
[LoopRotate] Rotate loops with loop exiting latches

If a loop has a loop exiting latch, it can be profitable
to rotate the loop if it leads to the simplification of
a phi node. Perform rotation in these cases even if loop
rotate itself didnt simplify the loop to get there.

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

llvm-svn: 328933
llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
llvm/test/Transforms/LoopRotate/loopexitinglatch.ll [new file with mode: 0644]