summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ImplicitNullChecks.cpp
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2019-11-19 13:15:12 +0100
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2019-12-03 11:02:53 +0100
commitf8c0cfc24eab0f23e3ebc65b10ee4276b1f15eeb (patch)
tree4c4d5b9f95f10dc82fb700c1db106a52a5c7d2ed /llvm/lib/CodeGen/ImplicitNullChecks.cpp
parent4cfceb910692f9e894622da1b394324503667e46 (diff)
downloadbcm5719-llvm-f8c0cfc24eab0f23e3ebc65b10ee4276b1f15eeb.tar.gz
bcm5719-llvm-f8c0cfc24eab0f23e3ebc65b10ee4276b1f15eeb.zip
ImplicitNullChecks: Don't add a dead definition of DepMI as live-in
This is one of the fixes needed to reapply D68267 which improves verification of live-in lists. Review: craig.topper https://reviews.llvm.org/D70434
Diffstat (limited to 'llvm/lib/CodeGen/ImplicitNullChecks.cpp')
-rw-r--r--llvm/lib/CodeGen/ImplicitNullChecks.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ImplicitNullChecks.cpp b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
index 4e54437947f..b3ca4c1d802 100644
--- a/llvm/lib/CodeGen/ImplicitNullChecks.cpp
+++ b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
@@ -698,7 +698,7 @@ void ImplicitNullChecks::rewriteNullChecks(
if (auto *DepMI = NC.getOnlyDependency()) {
for (auto &MO : DepMI->operands()) {
- if (!MO.isReg() || !MO.getReg() || !MO.isDef())
+ if (!MO.isReg() || !MO.getReg() || !MO.isDef() || MO.isDead())
continue;
if (!NC.getNotNullSucc()->isLiveIn(MO.getReg()))
NC.getNotNullSucc()->addLiveIn(MO.getReg());
OpenPOWER on IntegriCloud