[llvm-commits] CVS: llvm/lib/Target/X86/PeepholeOptimizer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 17 00:03:02 PST 2004
Changes in directory llvm/lib/Target/X86:
PeepholeOptimizer.cpp updated: 1.18 -> 1.19
---
Log message:
Whoops, got my cases swapped.
---
Diffs of the changes: (+6 -6)
Index: llvm/lib/Target/X86/PeepholeOptimizer.cpp
diff -u llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.18 llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.19
--- llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.18 Mon Feb 16 23:25:50 2004
+++ llvm/lib/Target/X86/PeepholeOptimizer.cpp Tue Feb 17 00:02:15 2004
@@ -146,12 +146,8 @@
case X86::XORri32: Opcode = X86::XORri32b; break;
}
unsigned R0 = MI->getOperand(0).getReg();
- unsigned Scale = MI->getOperand(1).getImmedValue();
- unsigned R1 = MI->getOperand(2).getReg();
- unsigned Offset = MI->getOperand(3).getImmedValue();
I = MBB.insert(MBB.erase(I),
- BuildMI(Opcode, 5).addReg(R0).addZImm(Scale).
- addReg(R1).addSImm(Offset).addZImm((char)Val));
+ BuildMI(Opcode, 1, R0, MOTy::UseAndDef).addZImm((char)Val));
return true;
}
}
@@ -171,8 +167,12 @@
case X86::ANDmi32: Opcode = X86::ANDmi32b; break;
}
unsigned R0 = MI->getOperand(0).getReg();
+ unsigned Scale = MI->getOperand(1).getImmedValue();
+ unsigned R1 = MI->getOperand(2).getReg();
+ unsigned Offset = MI->getOperand(3).getImmedValue();
I = MBB.insert(MBB.erase(I),
- BuildMI(Opcode, 1, R0, MOTy::UseAndDef).addZImm((char)Val));
+ BuildMI(Opcode, 5).addReg(R0).addZImm(Scale).
+ addReg(R1).addSImm(Offset).addZImm((char)Val));
return true;
}
}
More information about the llvm-commits
mailing list