There might be a misuse of DominatorTree::splitBasicBlock in CodeExtractor.cpp, line 145.<br>Header is splited into two (OldPred->NewBB).<br><br>Line 145 updates the dominator tree by calling DT->splitBasicBlock(NewBB).<br>
I think it should be DT->splitBasicBlock(OldPred).<br><br>When I tried to extract a code region whose header has 2 successors, my pass crashed.<br>It was because header (or OldPred) is the block that was splited, not NewBB.<br>
DominatorTree::splitBasicBlock(BB) requires BB to have one successor.<br><br>Vu<br>