<div dir="ltr">Opened a bug with a minimum reproducing example:<div><br></div><div><a href="https://llvm.org/bugs/show_bug.cgi?id=23055">https://llvm.org/bugs/show_bug.cgi?id=23055</a><br></div><div><br></div><div>It seems to me the issue is that <span style="color:rgb(0,0,0);white-space:pre-wrap">InstCombiner successfully simplifies return values when they can be proven constant, but misses the same optimization opportunity for store values.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">v/r,</span></div><div><font color="#000000"><span style="white-space:pre-wrap">Josh</span></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 27, 2015 at 11:29 AM, Josh Klontz <span dir="ltr"><<a href="mailto:josh.klontz@gmail.com" target="_blank">josh.klontz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">As of ToT it seems that even the simplest cases of assumes involving equality between an instruction and a constant don't cause an instruction RAUW constant.<div><br></div><div>In the attached example, %channels is assumed to be 3, leading to a missed optimization opportunity with %src_c.</div><div><br></div><div>Am I overlooking something that would cause this optimization to be invalid?</div><div><br></div><div>v/r,</div><div>Josh</div><div><br></div><div><br></div></div>
</blockquote></div><br></div>