diff options
| author | Dan Gohman <gohman@apple.com> | 2010-05-20 19:26:52 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-05-20 19:26:52 +0000 |
| commit | 0c21d014bd96ece5d614b6be392a47e30f6c8ba8 (patch) | |
| tree | cf0f383571573e272d91e492ab4447c8e63b17ed /lib/Transforms | |
| parent | f6209816ffc20a9854425c8ccce011f1200640ec (diff) | |
| download | external_llvm-0c21d014bd96ece5d614b6be392a47e30f6c8ba8.zip external_llvm-0c21d014bd96ece5d614b6be392a47e30f6c8ba8.tar.gz external_llvm-0c21d014bd96ece5d614b6be392a47e30f6c8ba8.tar.bz2 | |
When canonicalizing icmp operand order to put the loop invariant
operand on the left, the interesting operand is on the right. This
fixes a bug where LSR was failing to recognize ICmpZero uses,
which led it to be unable to reverse the induction variable in the
attached testcase.
Delete test/CodeGen/X86/stack-color-with-reg-2.ll, because its test
is extremely fragile and hard to meaningfully update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
| -rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index f5e9d9f..6645ee6 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -1997,6 +1997,7 @@ void LSRInstance::CollectFixupsAndInitialFormulae() { if (NV == LF.OperandValToReplace) { CI->setOperand(1, CI->getOperand(0)); CI->setOperand(0, NV); + NV = CI->getOperand(1); Changed = true; } |
