aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-05-10 17:14:26 +0000
committerBob Wilson <bob.wilson@apple.com>2010-05-10 17:14:26 +0000
commitfde18e5eff86b5055d7ed541fa87cde5aa1ab31c (patch)
treeed6755002d31b46b3b6d0f52067bcb8c9b7db377
parent26c4cf4c6fedb3439d4a9f8f7375ff1c61e0acd5 (diff)
Fix PR7096. When a block containing multiple defs is tail duplicated, the
SSAUpdater for the value from the first def may see uses of undefined values, because the later defs will not have been updated yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103407 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/MachineSSAUpdater.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineSSAUpdater.cpp b/lib/CodeGen/MachineSSAUpdater.cpp
index 99fb99ac3c..84d6df2539 100644
--- a/lib/CodeGen/MachineSSAUpdater.cpp
+++ b/lib/CodeGen/MachineSSAUpdater.cpp
@@ -329,7 +329,7 @@ public:
/// InstrIsPHI - Check if an instruction is a PHI.
///
static MachineInstr *InstrIsPHI(MachineInstr *I) {
- if (I->isPHI())
+ if (I && I->isPHI())
return I;
return 0;
}