]> granicus.if.org Git - llvm/commitdiff
[GlobalISel] Slightly clean up DBG_VALUE FP build code.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Tue, 7 Mar 2017 20:52:57 +0000 (20:52 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Tue, 7 Mar 2017 20:52:57 +0000 (20:52 +0000)
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

lib/CodeGen/GlobalISel/MachineIRBuilder.cpp

index 8630ef842b4a8e92c7f4cf2ac1c36158d048bc30..ce84bb94dcf585106a0971460ec74317255378f5 100644 (file)
@@ -138,8 +138,7 @@ MachineInstrBuilder MachineIRBuilder::buildConstDbgValue(const Constant &C,
     else
       MIB.addImm(CI->getZExtValue());
   } else if (auto *CFP = dyn_cast<ConstantFP>(&C)) {
-    assert(isa<ConstantFP>(C) && "Unexpected constant dbg value");
-    MIB.addFPImm(&cast<ConstantFP>(C));
+    MIB.addFPImm(CFP);
   } else {
     // Insert %noreg if we didn't find a usable constant and had to drop it.
     MIB.addReg(0U);