[llvm] r297205 - [GlobalISel] Slightly clean up DBG_VALUE FP build code.
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 12:52:58 PST 2017
Author: ab
Date: Tue Mar 7 14:52:57 2017
New Revision: 297205
URL: http://llvm.org/viewvc/llvm-project?rev=297205&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp?rev=297205&r1=297204&r2=297205&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp Tue Mar 7 14:52:57 2017
@@ -138,8 +138,7 @@ MachineInstrBuilder MachineIRBuilder::bu
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);
More information about the llvm-commits
mailing list