Ver Fonte

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

Bob Wilson há 15 anos atrás
pai
commit
fde18e5eff
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      lib/CodeGen/MachineSSAUpdater.cpp

+ 1 - 1
lib/CodeGen/MachineSSAUpdater.cpp

@@ -329,7 +329,7 @@ public:
   /// InstrIsPHI - Check if an instruction is a PHI.
   /// InstrIsPHI - Check if an instruction is a PHI.
   ///
   ///
   static MachineInstr *InstrIsPHI(MachineInstr *I) {
   static MachineInstr *InstrIsPHI(MachineInstr *I) {
-    if (I->isPHI())
+    if (I && I->isPHI())
       return I;
       return I;
     return 0;
     return 0;
   }
   }