Hi,<br><br>I found a problem in CodeExtractor::severSplitPHINodes() <CodeExtractor.cpp>.<br><br>The algorithm first separates the header block into two, one containing only PHI nodes and the other containing the remaining non-PHI nodes. The variable NewBB holds the pointer to the latter half block. Later, it tries to update DT information.<br>
<br>if (DT)<br>    DT->splitBlock(NewBB);<br><br>In splitBlock, it checks if the NewBB has only one successor. I'm not sure why this is required, but it will fail on cases where NewBB has multiple successors, which are pretty common. For example, a switch or a conditional branch in NewBB can break this check.<br>
<br>Could anyone tell me how to fix this please?<br><br>Thanks a lot.<br><br>Jack<br><br>