Suppress the IV reversal transformation in the case that the RHS
authorDan Gohman <gohman@apple.com>
Wed, 20 May 2009 00:34:08 +0000 (00:34 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 20 May 2009 00:34:08 +0000 (00:34 +0000)
commit513fae2db51c7d22ec1253e89939d27732b21a5e
tree25cd0e30047437ef0512bc27f93bdb32e9ab2816
parent81e4e9f7cb8bff4f164c415c062a216774445c47
Suppress the IV reversal transformation in the case that the RHS
of the comparison is defined inside the loop. This fixes a
use-before-def problem, because the transformation puts a use
of the RHS outside the loop.

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