<div dir="ltr">Hi,<div><br></div><div>I am writing a loop pass to replace the backedge with an edge from latch to exit. </div><div>Now I just replace the terminator of latch with another BranchInst, and the loop will not be a loop after my pass. However, it turns out a failure of loopverify after executing my pass:</div>
<div><br></div><div>opt: ~/llvm/llvm-trunk/include/llvm/Analysis/LoopInfoImpl.h:297: void llvm::LoopBase<N, M>::verifyLoop() const [with BlockT = llvm::BasicBlock, LoopT = llvm::Loop]: Assertion `HasInsideLoopPreds && "Loop block has no in-loop predecessors!"' failed.<br>
</div><div><div><br></div><div style>Does this mean I should keep it still a loop after my pass? If so, how could I bypass it?</div>-- <br><div dir="ltr"><p style="line-height:23px;color:rgb(0,0,0);font-size:14px;font-family:'lucida Grande',Verdana">
<b><i><span style="font-size:10pt;color:blue">Thank you && Best Regards,</span></i></b></p><p style="line-height:23px;color:rgb(0,0,0);font-size:14px;font-family:'lucida Grande',Verdana"><font color="#0000ff" style="line-height:1.5"><b><i>Zhiyuan Yang</i></b></font></p>
</div>
</div></div>