Index: lib/CodeGen/CFIInstrInserter.cpp =================================================================== --- lib/CodeGen/CFIInstrInserter.cpp +++ lib/CodeGen/CFIInstrInserter.cpp @@ -293,6 +293,8 @@ unsigned ErrorNum = 0; for (MachineBasicBlock &CurrMBB : MF) { const MBBCFAInfo &CurrMBBInfo = MBBVector[CurrMBB.getNumber()]; + if (CurrMBB.getNumber() != MF.front().getNumber() && !CurrMBB.pred_size()) + continue; for (MachineBasicBlock *Succ : CurrMBB.successors()) { const MBBCFAInfo &SuccMBBInfo = MBBVector[Succ->getNumber()]; // Check that incoming offset and register values of successors match the