Fix a subtle bug involving constant expr casts from int to fp
authorChris Lattner <sabre@nondot.org>
Sun, 9 Jan 2005 01:49:29 +0000 (01:49 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 9 Jan 2005 01:49:29 +0000 (01:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19410 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelSimple.cpp

index bf47cb6342a3864682575d51bd66f81ad5adb4a6..9c9dac30c5bb4fc07bd005b109a52d708888e0b5 100644 (file)
@@ -3576,13 +3576,13 @@ void X86ISel::emitCastOperation(MachineBasicBlock *BB,
 
       // Compute whether the sign bit is set by shifting the reg right 31 bits.
       unsigned IsNeg = makeAnotherReg(Type::IntTy);
-      BuildMI(BB, X86::SHR32ri, 2, IsNeg).addReg(SrcReg).addImm(31);
+      BuildMI(*BB, IP, X86::SHR32ri, 2, IsNeg).addReg(SrcReg).addImm(31);
 
       // Create a CP value that has the offset in one word and 0 in the other.
       static ConstantInt *TheOffset = ConstantUInt::get(Type::ULongTy,
                                                         0x4f80000000000000ULL);
       unsigned CPI = F->getConstantPool()->getConstantPoolIndex(TheOffset);
-      BuildMI(BB, X86::FADD32m, 5, RealDestReg).addReg(DestReg)
+      BuildMI(*BB, IP, X86::FADD32m, 5, RealDestReg).addReg(DestReg)
         .addConstantPoolIndex(CPI).addZImm(4).addReg(IsNeg).addSImm(0);
 
     } else if (SrcTy == Type::ULongTy) {