When rotating loops, put the original header at the bottom of the
authorDan Gohman <gohman@apple.com>
Tue, 17 Aug 2010 17:39:21 +0000 (17:39 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 17 Aug 2010 17:39:21 +0000 (17:39 +0000)
commitfc8042a1225790b3a6de434546623babea08496f
treebb782c7be300cfbfc1d5a8d82b003fb4f7460271
parent37e59c059c604d99c8714592813e3aed4ec65f94
When rotating loops, put the original header at the bottom of the
loop, making the resulting loop significantly less ugly.  Also, zap
its trivial PHI nodes, since it's easy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111255 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopRotation.cpp
test/Transforms/LoopRotate/phi-duplicate.ll