From c531e090dbf4e31c066cd8c92012c2954c61c93a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 13 Nov 2004 20:04:38 +0000 Subject: [PATCH] Add missing check llvm-svn: 17706 --- lib/Target/X86/X86ISelSimple.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp index e5cf618fc10..37572aaefd4 100644 --- a/lib/Target/X86/X86ISelSimple.cpp +++ b/lib/Target/X86/X86ISelSimple.cpp @@ -2925,7 +2925,7 @@ void X86ISel::emitShiftOperation(MachineBasicBlock *MBB, // if (ConstantUInt *CUI = dyn_cast(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,