LoopRotate: Don't walk the uses of a Constant
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 27 Jan 2015 06:21:43 +0000 (06:21 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 27 Jan 2015 06:21:43 +0000 (06:21 +0000)
commit90c42ddc62d0ad4affe7b8b943cb80ea7eb03a70
tree779f6cc316a08dda3f62a73c7b2a439a8cf81b9f
parentd70090ce244084787721d58bcc65ab280991d009
LoopRotate: Don't walk the uses of a Constant

LoopRotate wanted to avoid live range interference by looking at the
uses of a Value in the loop latch and seeing if any lied outside of the
loop.  We would wrongly perform this operation on Constants.

This fixes PR22337.

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