diff options
-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 05d2d887d1..4a04b2910f 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 05d2d887d1..4a04b2910f 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; |