mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-26 14:25:18 +00:00
Add missing check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
44205cadba
commit
62f5a9402c
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user