aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
index 1561fb4..294f5f6 100644
--- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -2111,7 +2111,8 @@ bool AssignmentTrackingLowering::emitPromotedVarLocs(
// operand is nullptr. We also can't handle variadic DIExpressions yet.
// Some of those conditions don't have a type we can pick for
// undef. Use i32.
- if (DVI->isUndef() || DVI->getValue() == nullptr || DVI->hasArgList())
+ if (DVI->isKillLocation() || DVI->getValue() == nullptr ||
+ DVI->hasArgList())
return UndefValue::get(Type::getInt32Ty(DVI->getContext()));
return DVI->getValue();
};