aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-13 20:04:38 +0000
committerChris Lattner <sabre@nondot.org>2004-11-13 20:04:38 +0000
commit62f5a9402cfca63abab005dbb6e7d96ce6655b05 (patch)
tree03adbaa2d38369162b3d53b769a7c9c4ec4c5de4
parent44205cadba047b1322a235b8cd1be5f4423a8f93 (diff)
Add missing check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17706 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86ISelSimple.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp
index e5cf618fc1..37572aaefd 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<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,