Fix PR2355: bug in ChangeCompareStride. When the loop termination compare is the...
authorEvan Cheng <evan.cheng@apple.com>
Wed, 6 Aug 2008 18:04:43 +0000 (18:04 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 6 Aug 2008 18:04:43 +0000 (18:04 +0000)
commitf5e25f32c7605569390f5e81ebb582c96d74a1d2
treeda00954f0f92c3e584df514c8d9d33f86fded86c
parent165660e417db0f42f9afb1a37f50310a166e5a93
Fix PR2355: bug in ChangeCompareStride. When the loop termination compare is the only use of its iv stride, the stride can be eliminated by moving it to another stride. If the scale is negative, swap the predicate instead of using a inverse predicate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54415 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/Transforms/LoopStrengthReduce/2008-08-06-CmpStride.ll [new file with mode: 0644]