So I have a loop with two blocks, a header (which points to return and latch) and a latch (which points to return and header). I have inserted a few new blocks, called H and F. <br><br>Header now points to H and latch. Latch now points to F. H points to F. F points to Header and return.<br>
<br>The PHI Nodes have been updated in Header accordingly, now coming from the preheader and F (instead of latch).<br><br>My issue is this: The values in the PHI instruction in the Header for F are actually defined in Latch and so if you follow the path: Header->H->F, there becomes an issue with "Instruction does not dominate all uses" (since the Header PHI is getting values defined in Latch coming from F but never going to Latch) since they haven't been defined in that path.<br>
<br>My question is: Is there some call where I can rearrange the basic blocks and call some functions/utils that solve this issue? Or do I have to manually solve this myself?<br><br>Thanks again.<br>