mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-13 23:25:06 +00:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user