Index: llvm/lib/CodeGen/GlobalISel/Legalizer.cpp =================================================================== --- llvm/lib/CodeGen/GlobalISel/Legalizer.cpp +++ llvm/lib/CodeGen/GlobalISel/Legalizer.cpp @@ -355,16 +355,6 @@ "unable to legalize instruction", *Result.FailedOn); return false; } - // For now don't support if new blocks are inserted - we would need to fix the - // outer loop for that. - if (MF.size() != NumBlocks) { - MachineOptimizationRemarkMissed R("gisel-legalize", "GISelFailure", - MF.getFunction().getSubprogram(), - /*MBB=*/nullptr); - R << "inserting blocks is not supported yet"; - reportGISelFailure(MF, TPC, MORE, R); - return false; - } if (LocObserver.getNumLostDebugLocs()) { MachineOptimizationRemarkMissed R("gisel-legalize", "LostDebugLoc",