diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-06 19:29:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-06 19:29:36 +0000 |
commit | 7b92de1e7d98164e3952b25aa7f3ea248c54551c (patch) | |
tree | 9e3323868494f18123e9b991c9375792ad6718b6 /lib/Target/X86 | |
parent | 43ab3a8f45fe16a4c3c0e87dd4cc93c85b2f9763 (diff) | |
download | external_llvm-7b92de1e7d98164e3952b25aa7f3ea248c54551c.zip external_llvm-7b92de1e7d98164e3952b25aa7f3ea248c54551c.tar.gz external_llvm-7b92de1e7d98164e3952b25aa7f3ea248c54551c.tar.bz2 |
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
Diffstat (limited to 'lib/Target/X86')
-rw-r--r-- | lib/Target/X86/InstSelectSimple.cpp | 3 | ||||
-rw-r--r-- | lib/Target/X86/X86ISelSimple.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index 05d2d88..4a04b29 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -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; diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp index 05d2d88..4a04b29 100644 --- a/lib/Target/X86/X86ISelSimple.cpp +++ b/lib/Target/X86/X86ISelSimple.cpp @@ -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; |