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; }