summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-09 01:49:29 +0000
committerChris Lattner <sabre@nondot.org>2005-01-09 01:49:29 +0000
commitfb217c6b9416f86cbf760a8b81dff444cbf8bcb1 (patch)
treea383f957b38ba056f09d44a15898e7e5407b3c4f
parenta2c5d9168cb022ff5f20cc80f173812892a75c57 (diff)
downloadbcm5719-llvm-fb217c6b9416f86cbf760a8b81dff444cbf8bcb1.tar.gz
bcm5719-llvm-fb217c6b9416f86cbf760a8b81dff444cbf8bcb1.zip
Fix a subtle bug involving constant expr casts from int to fp
llvm-svn: 19410
-rw-r--r--llvm/lib/Target/X86/X86ISelSimple.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelSimple.cpp b/llvm/lib/Target/X86/X86ISelSimple.cpp
index bf47cb6342a..9c9dac30c5b 100644
--- a/llvm/lib/Target/X86/X86ISelSimple.cpp
+++ b/llvm/lib/Target/X86/X86ISelSimple.cpp
@@ -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) {
OpenPOWER on IntegriCloud