From: Bill Wendling Date: Tue, 20 Sep 2011 22:28:17 +0000 (+0000) Subject: Relax this condition. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=f0dc257a8fe1325f2226d1c274c4d10c614b9e8b;p=oota-llvm.git Relax this condition. Some passes require breaking critical edges before they're called. Don't segfault because of that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140196 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp index 03770cc1daa..4fbb9875fb0 100644 --- a/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -178,8 +178,7 @@ BasicBlock *llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, // Splitting the critical edge to a landing pad block is non-trivial. Don't do // it in this generic function. - assert(!DestBB->isLandingPad() && - "Cannot split critical edge to a landing pad block!"); + if (DestBB->isLandingPad()) return 0; // Create a new basic block, linking it into the CFG. BasicBlock *NewBB = BasicBlock::Create(TI->getContext(),