summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
index e4baa3322ba..b51c23c6a74 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
@@ -749,6 +749,9 @@ InstrEmitter::EmitDbgValue(SDDbgValue *SD,
MIB.addImm(CI->getSExtValue());
} else if (const ConstantFP *CF = dyn_cast<ConstantFP>(V)) {
MIB.addFPImm(CF);
+ } else if (isa<ConstantPointerNull>(V)) {
+ // Note: This assumes that all nullptr constants are zero-valued.
+ MIB.addImm(0);
} else {
// Could be an Undef. In any case insert an Undef so we can see what we
// dropped.
OpenPOWER on IntegriCloud