Fix SingleSource/Regression/C/2005-05-06-LongLongSignedShift.c, we were not

properly sign extending the top of the result of a 64-bit shift right by
a constant > 32.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-04-06 20:59:35 +00:00
parent 3a46221d0b
commit 6d027f2e6f

View File

@ -3074,7 +3074,11 @@ void X86ISel::emitShiftOperation(MachineBasicBlock *MBB,
} else {
BuildMI(*MBB, IP, isSigned ? X86::SAR32ri : X86::SHR32ri, 2,
DestReg).addReg(SrcReg+1).addImm(Amount);
BuildMI(*MBB, IP, X86::MOV32ri, 1, DestReg+1).addImm(0);
if (isSigned)
BuildMI(*MBB, IP, X86::SAR32ri, 2,
DestReg+1).addReg(SrcReg+1).addImm(31);
else
BuildMI(*MBB, IP, X86::MOV32ri, 1, DestReg+1).addImm(0);
}
}
} else {