Fix PR313: [x86] JIT miscompiles unsigned short to floating point

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12711 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-04-06 19:29:36 +00:00
parent 43ab3a8f45
commit 7b92de1e7d
2 changed files with 2 additions and 4 deletions

View File

@ -2640,8 +2640,7 @@ void ISel::emitCastOperation(MachineBasicBlock *BB,
if (PromoteType) {
unsigned TmpReg = makeAnotherReg(PromoteType);
unsigned Opc = SrcTy->isSigned() ? X86::MOVSX16rr8 : X86::MOVZX16rr8;
BuildMI(*BB, IP, Opc, 1, TmpReg).addReg(SrcReg);
BuildMI(*BB, IP, PromoteOpcode, 1, TmpReg).addReg(SrcReg);
SrcTy = PromoteType;
SrcClass = getClass(PromoteType);
SrcReg = TmpReg;

View File

@ -2640,8 +2640,7 @@ void ISel::emitCastOperation(MachineBasicBlock *BB,
if (PromoteType) {
unsigned TmpReg = makeAnotherReg(PromoteType);
unsigned Opc = SrcTy->isSigned() ? X86::MOVSX16rr8 : X86::MOVZX16rr8;
BuildMI(*BB, IP, Opc, 1, TmpReg).addReg(SrcReg);
BuildMI(*BB, IP, PromoteOpcode, 1, TmpReg).addReg(SrcReg);
SrcTy = PromoteType;
SrcClass = getClass(PromoteType);
SrcReg = TmpReg;