[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Apr 6 14:30:01 PDT 2004


Changes in directory llvm/lib/Target/X86:

InstSelectSimple.cpp updated: 1.217 -> 1.218

---
Log message:

Fix PR313: http://llvm.cs.uiuc.edu/PR313 : [x86] JIT miscompiles unsigned short to floating point


---
Diffs of the changes:  (+1 -2)

Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.217 llvm/lib/Target/X86/InstSelectSimple.cpp:1.218
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.217	Tue Apr  6 12:34:50 2004
+++ llvm/lib/Target/X86/InstSelectSimple.cpp	Tue Apr  6 14:29:36 2004
@@ -2640,8 +2640,7 @@
     
     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;





More information about the llvm-commits mailing list