Add simplifyLoopLatch to LoopRotate pass.
authorAndrew Trick <atrick@apple.com>
Tue, 14 Feb 2012 00:00:23 +0000 (00:00 +0000)
committerAndrew Trick <atrick@apple.com>
Tue, 14 Feb 2012 00:00:23 +0000 (00:00 +0000)
commitf6629ab84785ff5e7db4cbb9e2d1cbd4ab3b5d34
tree8199164f0ff2ee6bb74a2af7339e38b42e330f69
parentc3a825b76cbaea3dcde02e9fa53d8f2d1311fe43
Add simplifyLoopLatch to LoopRotate pass.

This folds a simple loop tail into a loop latch. It covers the common (in fortran) case of postincrement loops. It's a "free" way to expose this type of loop to downstream loop optimizations that bail out on non-canonical loops (getLoopLatch is a heavily used check).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150439 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopRotation.cpp
test/Transforms/LoopRotate/simplifylatch.ll [new file with mode: 0644]