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 | ee2fea3cd7d877bdc33db3d3e01429698aa44718 (patch) | |
| tree | 6c8cf6b99db8a01cf2fcdfd3c059e7efa990a98f /llvm/lib/Transforms | |
| parent | 3e69aa03993d6b282331e1810f9f63ef345676bb (diff) | |
| download | bcm5719-llvm-ee2fea3cd7d877bdc33db3d3e01429698aa44718.tar.gz bcm5719-llvm-ee2fea3cd7d877bdc33db3d3e01429698aa44718.zip | |
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.
llvm-svn: 104262
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index f5e9d9fb33e..6645ee625cb 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/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; } |

