<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On May 7, 2013, at 8:26 PM, zhiyuan yang <<a href="mailto:sjtu.yzy@gmail.com">sjtu.yzy@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><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>Does this mean I should keep it still a loop after my pass? If so, how could I bypass it?</div></div></div></div></blockquote><div><br></div><div>You might need to call LPPassManager::deleteLoopFromQueue().</div><div><br></div><div>-Andy</div></div><div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div>--<span class="Apple-converted-space"> </span><br><div dir="ltr"><p style="line-height: 23px; 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; 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>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a><span class="Apple-converted-space"> </span>        <a href="http://llvm.cs.uiuc.edu/">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></div></blockquote></div><br></body></html>