<div dir="ltr">If you do discover testcases where these passes are actually *missing* optimization, we'd love to see them.<div>(as you surmise, there's little we can do about the ones that come after ;P).</div><div><br></div><div>Otherwise, it would be pretty easy to build a predicateinfo based pass to clean up here if it's valuable.</div><div>Predicateinfo takes < 600ms on > 1 million blocks/conditionals (where even constructing the dominator tree takes 700-800ms), so it's unlikely to affect compile time in any real way.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 4, 2017 at 9:41 AM, Chad Rosier via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">mcrosier added a comment.<br>
<span class=""><br>
In <a href="https://reviews.llvm.org/D36287#831132" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D36287#831132</a>, @efriedma wrote:<br>
<br>
> We already have a couple other passes which can do optimize your testcase (JumpThreading and GVN); what do we gain from doing this analysis here specifically?<br>
<br>
<br>
</span>Just to follow up on your question, Eli. I suspect the fact that SimplifyCFG runs more frequently than JT and GVN result in a few additional cases being captured (perhaps cases exposed after JT/GVN). However, I honestly haven't done the full investigation to get a definitive answer. Again, this is just derivative work and I'm not particularly set on getting this committed.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D36287" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D36287</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>