[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelSimple.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Nov 13 12:04:50 PST 2004
Changes in directory llvm/lib/Target/X86:
X86ISelSimple.cpp updated: 1.292 -> 1.293
---
Log message:
Add missing check
---
Diffs of the changes: (+1 -1)
Index: llvm/lib/Target/X86/X86ISelSimple.cpp
diff -u llvm/lib/Target/X86/X86ISelSimple.cpp:1.292 llvm/lib/Target/X86/X86ISelSimple.cpp:1.293
--- llvm/lib/Target/X86/X86ISelSimple.cpp:1.292 Sat Nov 13 14:03:48 2004
+++ llvm/lib/Target/X86/X86ISelSimple.cpp Sat Nov 13 14:04:38 2004
@@ -2925,7 +2925,7 @@
//
if (ConstantUInt *CUI = dyn_cast<ConstantUInt>(ShiftAmount)) {
unsigned Amount = CUI->getValue();
- if (Amount == 1) { // X << 1 == X+X
+ if (Amount == 1 && isLeftShift) { // X << 1 == X+X
BuildMI(*MBB, IP, X86::ADD32rr, 2,
DestReg).addReg(SrcReg).addReg(SrcReg);
BuildMI(*MBB, IP, X86::ADC32rr, 2,
More information about the llvm-commits
mailing list