<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Yes, I saw her reply too (Hi Alina!). No rush, unless MemorySSA is forced on for loop passes (-enable-mssa-loop-dependency=true) it doesn’t break anything I’m aware of.<div class="">I noticed the problem because I’m working on a change to LoopRotate, which is also supposed to preserve MemorySSA, so while testing that part I hit a few failures not related to my changes.</div><div class="">I can just ignore them for time being or force -enable-loop-simplifycfg-term-folding off for testing.</div><div class=""><br class=""></div><div class="">Also, I’m not going to be available for at least 10 hours (time zones).</div><div class=""><br class=""></div><div class="">Thank you,</div><div class="">Roman</div><div class=""><br class=""></div><div class="">P.S. I’m also having difficulties with updating MemorySSA properly. Looks like MemorySSAUpdater contains rather per-case high level APIs, which can for instance handle a BB being split or merged into its necessarily unique predecessor.</div><div class="">What I’m doing is more like SplitBlockAndInsertIfThen, which creates a new BB with 2 predecessors. MemorySSAUpdater::applyUpdates crashes with assert(AddedBlockSet.size() == 1 && "Can only handle adding one predecessor to a new block.”)</div><div class="">if I try updating all edges in one call, or seemingly finishes fine if I do them one by one, but then MemorySSA verifier complains on an incomplete MemoryPhi, which makes me think applyUpdates didn’t really do the right thing anyway.</div><div class=""><br class=""></div><div class="">What surprised me the most is that MemorySSA::createMemoryPhi is a private member function. After some running in circles I think I found a way to update MemorySSA properly, but I had to make MemorySSA::createMemoryPhi</div><div class="">and MemorySSA::getWritableBlockDefs public for that for a time being (locally).</div><div class=""><br class=""></div><div class="">Not sure if I’m missing something, or there is a valid problem with APIs here. Maybe <b class="">Alina</b> could give us some insight about that?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Roman</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 21, 2019, at 12:23 AM, Maxim Kazantsev <<a href="mailto:max.kazantsev@azul.com" class="">max.kazantsev@azul.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Hi Roman,<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">As Alina has pointed out, we do MSSA update wrong in general in this patch. I’m going to prepare a fix in ~3 hours from now. I’ll send it to you for review when it’s ready.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">--Max<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span lang="EN-US" class="">From:</span></b><span lang="EN-US" class=""><span class="Apple-converted-space"> </span><a href="mailto:rtereshin@apple.com" class="">rtereshin@apple.com</a> <<a href="mailto:rtereshin@apple.com" class="">rtereshin@apple.com</a>><span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Thursday, February 21, 2019 2:41 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Maxim Kazantsev <<a href="mailto:max.kazantsev@azul.com" class="">max.kazantsev@azul.com</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>Alina Sbirlea <<a href="mailto:alina.sbirlea@gmail.com" class="">alina.sbirlea@gmail.com</a>>; <a href="mailto:dberlin@dberlin.org" class="">dberlin@dberlin.org</a>; llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>>; <a href="mailto:asbirlea@google.com" class="">asbirlea@google.com</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [llvm] r353911 - [LoopSimplifyCFG] Re-enable const branch folding by default<o:p class=""></o:p></span></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hi Max,<span class="Apple-converted-space"> </span><o:p class=""></o:p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thank you for replying so quickly!<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I’ve applied the change locally and the original IR module I used to bugpoint the reproducer I’ve sent you earlier failed anyway, this time for a different reason.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I can’t send the module as it is for IP reasons, but here’s another bugpoint from the same source (with some manual tidying up):<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">define void @main(i32* %a, i32* %b) {<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">entry:<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  br label %for.body<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">for.body:<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  %i = phi i32 [ 0, %entry ], [ %i.inc, %latch ]<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  br label %switch.bb<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">switch.bb:<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  switch i2 1, label %default [<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    i2 1, label %case<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  ]<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">case:<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  br label %latch<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">default:<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  unreachable<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">latch:<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  store i32 %i, i32* %a<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  store i32 %i, i32* %b<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  %i.inc = add nsw i32 %i, 1<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  %exitcond = icmp eq i32 %i.inc, 4<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  br i1 %exitcond, label %exit, label %for.body<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">exit:<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  ret void<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">}<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">./bin/opt -loop-simplifycfg loop-simplifycfg-term-folding-AND-mssa-loop-dependency-2.ll -enable-mssa-loop-dependency=true -verify-memoryssa=true -enable-loop-simplifycfg-term-folding=true -S -o -<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Assertion failed: (dominates(MD, U) && "Memory Def does not dominate it's uses"), function verifyDomination, file ../lib/Analysis/MemorySSA.cpp, line 1912.<o:p class=""></o:p></div></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">If I don’t apply <a href="https://reviews.llvm.org/rL354547" style="color: purple; text-decoration: underline;" class="">https://reviews.llvm.org/rL354547</a> it fails the same way the previous reproducer did, so I guess this test is strictly better. Sorry for overbugpointing the first time around!<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks,<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Roman<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div></div></div><div class=""><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Feb 20, 2019, at 10:12 PM, Alina Sbirlea <<a href="mailto:alina.sbirlea@gmail.com" style="color: purple; text-decoration: underline;" class="">alina.sbirlea@gmail.com</a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Are you sure your update is complete?<br class="">It should theoretically match the DT update, i.e. include insert edges not just the delete. All updates should be done together using the same list of updates used for DT, and an up to date DT (see MSSAU->applyUpdates(DTUpdates, DT)).<o:p class=""></o:p></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Wed, Feb 20, 2019 at 9:53 PM Maxim Kazantsev via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" style="color: purple; text-decoration: underline;" class="">llvm-commits@lists.llvm.org</a>> wrote:<o:p class=""></o:p></div></div><blockquote style="border-style: none none none solid; border-left-width: 1pt; border-left-color: rgb(204, 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;" class=""><div class=""><div class=""><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" class="">Should be fixed by<span class="Apple-converted-space"> </span><a href="https://reviews.llvm.org/rL354547" target="_blank" style="color: purple; text-decoration: underline;" class="">https://reviews.llvm.org/rL354547</a></span><o:p class=""></o:p></p><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" class=""> </span><o:p class=""></o:p></p><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><b class=""><span lang="EN-US" class="">From:</span></b><span lang="EN-US" class=""><span class="Apple-converted-space"> </span>Maxim Kazantsev<span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Thursday, February 21, 2019 11:49 AM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>'<a href="mailto:rtereshin@apple.com" target="_blank" style="color: purple; text-decoration: underline;" class="">rtereshin@apple.com</a>' <<a href="mailto:rtereshin@apple.com" target="_blank" style="color: purple; text-decoration: underline;" class="">rtereshin@apple.com</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" style="color: purple; text-decoration: underline;" class="">llvm-commits@lists.llvm.org</a>>;<span class="Apple-converted-space"> </span><a href="mailto:dberlin@dberlin.org" target="_blank" style="color: purple; text-decoration: underline;" class="">dberlin@dberlin.org</a>;<span class="Apple-converted-space"> </span><a href="mailto:asbirlea@google.com" target="_blank" style="color: purple; text-decoration: underline;" class="">asbirlea@google.com</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>RE: [llvm] r353911 - [LoopSimplifyCFG] Re-enable const branch folding by default</span><o:p class=""></o:p></p></div></div><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p class=""></o:p></p><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" class="">Hi Roman,</span><o:p class=""></o:p></p><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" class=""> </span><o:p class=""></o:p></p><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" class="">Thanks for notification! I’ll fix it asap.</span><o:p class=""></o:p></p><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" class=""> </span><o:p class=""></o:p></p><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" class="">--Max</span><o:p class=""></o:p></p><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" class=""> </span><o:p class=""></o:p></p><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><b class=""><span lang="EN-US" class="">From:</span></b><span lang="EN-US" class=""><span class="Apple-converted-space"> </span><a href="mailto:rtereshin@apple.com" target="_blank" style="color: purple; text-decoration: underline;" class="">rtereshin@apple.com</a><span class="Apple-converted-space"> </span><<a href="mailto:rtereshin@apple.com" target="_blank" style="color: purple; text-decoration: underline;" class="">rtereshin@apple.com</a>><span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Thursday, February 21, 2019 10:25 AM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Maxim Kazantsev <<a href="mailto:max.kazantsev@azul.com" target="_blank" style="color: purple; text-decoration: underline;" class="">max.kazantsev@azul.com</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" style="color: purple; text-decoration: underline;" class="">llvm-commits@lists.llvm.org</a>>;<span class="Apple-converted-space"> </span><a href="mailto:dberlin@dberlin.org" target="_blank" style="color: purple; text-decoration: underline;" class="">dberlin@dberlin.org</a>;<span class="Apple-converted-space"> </span><a href="mailto:asbirlea@google.com" target="_blank" style="color: purple; text-decoration: underline;" class="">asbirlea@google.com</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [llvm] r353911 - [LoopSimplifyCFG] Re-enable const branch folding by default</span><o:p class=""></o:p></p></div></div><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p class=""></o:p></p><div class=""><div class=""><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; margin-bottom: 12pt;"><span style="font-size: 10pt;" class="">Hi Max,<br class=""><br class="">Looks like this doesn’t collaborate with MemorySSA very well:<br class=""><br class="">./bin/opt -loop-simplifycfg loop-simplifycfg-term-folding-AND-mssa-loop-dependency.ll -enable-mssa-loop-dependency=true -verify-memoryssa=true -enable-loop-simplifycfg-term-folding=true -S -o -<br class="">Assertion failed: (find(predecessors(&B), Phi->getIncomingBlock(I)) != pred_end(&B) && "Incoming phi block not a block predecessor"), function verifyDefUses, file ../lib/Analysis/MemorySSA.cpp, line 1947.<br class=""><br class="">The IR is:<br class=""><br class="">define void @main() {<br class="">entry:<br class="">  br label %for.body<br class=""><br class="">for.body:                                         ; preds = %exit, %entry<br class="">  br label %<a href="http://switch.bb/" target="_blank" style="color: purple; text-decoration: underline;" class="">switch.bb</a><br class=""><br class=""><a href="http://switch.bb/" target="_blank" style="color: purple; text-decoration: underline;" class="">switch.bb</a>:                                        ; preds = %for.body<br class="">  switch i2 1, label %<a href="http://default.bb/" target="_blank" style="color: purple; text-decoration: underline;" class="">default.bb</a><span class="Apple-converted-space"> </span>[<br class="">    i2 1, label %<a href="http://case.bb/" target="_blank" style="color: purple; text-decoration: underline;" class="">case.bb</a><br class="">  ]<br class=""><br class=""><a href="http://case.bb/" target="_blank" style="color: purple; text-decoration: underline;" class="">case.bb</a>:                                          ; preds = %switch<br class="">  br label %exit<br class=""><br class=""><a href="http://default.bb/" target="_blank" style="color: purple; text-decoration: underline;" class="">default.bb</a>:                                       ; preds = %switch<br class="">  unreachable<br class=""><br class="">exit:                                             ; preds = %<a href="http://case.bb/" target="_blank" style="color: purple; text-decoration: underline;" class="">case.bb</a><br class="">  call void @foo()<br class="">  br label %for.body<br class="">}<br class=""><br class="">declare void @foo()<br class=""><br class=""><br class="">Thanks,<br class="">Roman</span><o:p class=""></o:p></p></div></div><div class=""><div class=""><p class="xmsonormal" style="margin-right: 0cm; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; margin-bottom: 12pt;"><span style="font-size: 10pt;" class=""><br class=""><br class="">> On Feb 12, 2019, at 10:12 PM, Max Kazantsev via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" style="color: purple; text-decoration: underline;" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class="">><span class="Apple-converted-space"> </span><br class="">> Author: mkazantsev<br class="">> Date: Tue Feb 12 22:12:48 2019<br class="">> New Revision: 353911<br class="">><span class="Apple-converted-space"> </span><br class="">> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=353911&view=rev" target="_blank" style="color: purple; text-decoration: underline;" class="">http://llvm.org/viewvc/llvm-project?rev=353911&view=rev</a><br class="">> Log:<br class="">> [LoopSimplifyCFG] Re-enable const branch folding by default<br class="">><span class="Apple-converted-space"> </span><br class="">> Known underlying bugs have been fixed, intensive fuzz testing did not<br class="">> find any new problems. Re-enabling by default. Feel free to revert if<br class="">> it causes any functional failures.<br class="">><span class="Apple-converted-space"> </span><br class="">> Modified:<br class="">>    llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp<br class="">><span class="Apple-converted-space"> </span><br class="">> Modified: llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp<br class="">> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp?rev=353911&r1=353910&r2=353911&view=diff" target="_blank" style="color: purple; text-decoration: underline;" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp?rev=353911&r1=353910&r2=353911&view=diff</a><br class="">> ==============================================================================<br class="">> --- llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp (original)<br class="">> +++ llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp Tue Feb 12 22:12:48 2019<br class="">> @@ -41,7 +41,7 @@ using namespace llvm;<br class="">> #define DEBUG_TYPE "loop-simplifycfg"<br class="">><span class="Apple-converted-space"> </span><br class="">> static cl::opt<bool> EnableTermFolding("enable-loop-simplifycfg-term-folding",<br class="">> -                                       cl::init(false));<br class="">> +                                       cl::init(true));<br class="">><span class="Apple-converted-space"> </span><br class="">> STATISTIC(NumTerminatorsFolded,<br class="">>           "Number of terminators folded to unconditional branches");<br class="">><span class="Apple-converted-space"> </span><br class="">><span class="Apple-converted-space"> </span><br class="">> _______________________________________________<br class="">> llvm-commits mailing list<br class="">><span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@lists.llvm.org" target="_blank" style="color: purple; text-decoration: underline;" class="">llvm-commits@lists.llvm.org</a><br class="">><span class="Apple-converted-space"> </span><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank" style="color: purple; text-decoration: underline;" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a></span><o:p class=""></o:p></p></div></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" target="_blank" style="color: purple; text-decoration: underline;" class="">llvm-commits@lists.llvm.org</a><br class=""><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank" style="color: purple; text-decoration: underline;" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a></div></blockquote></div></div></blockquote></div></div></div></div></div></blockquote></div><br class=""></div></body></html>