From fde18e5eff86b5055d7ed541fa87cde5aa1ab31c Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Mon, 10 May 2010 17:14:26 +0000 Subject: [PATCH] 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 --- lib/CodeGen/MachineSSAUpdater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/MachineSSAUpdater.cpp b/lib/CodeGen/MachineSSAUpdater.cpp index 99fb99ac3c7..84d6df25397 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; } -- 2.34.1