From: Ahmed Bougacha Date: Tue, 7 Mar 2017 20:52:57 +0000 (+0000) Subject: [GlobalISel] Slightly clean up DBG_VALUE FP build code. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=027104480a81c3580c0c0887f58a10fed3cb4114;p=llvm [GlobalISel] Slightly clean up DBG_VALUE FP build code. I messed up my rebases leading to r297200, and ended up with stale (but working) code. Fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297205 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp b/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp index 8630ef842b4..ce84bb94dcf 100644 --- a/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp +++ b/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp @@ -138,8 +138,7 @@ MachineInstrBuilder MachineIRBuilder::buildConstDbgValue(const Constant &C, else MIB.addImm(CI->getZExtValue()); } else if (auto *CFP = dyn_cast(&C)) { - assert(isa(C) && "Unexpected constant dbg value"); - MIB.addFPImm(&cast(C)); + MIB.addFPImm(CFP); } else { // Insert %noreg if we didn't find a usable constant and had to drop it. MIB.addReg(0U);