<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Aug 19, 2013 at 8:50 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Thanks. Please file a bug for this on <a href="http://llvm.org/bugs" target="_blank">llvm.org/bugs</a> .</div></div></div></div></blockquote><div>Done (PR16938).<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<div>The crux of the problem is that machine CSE runs before register allocation and is consequently extremely conservative when doing CSE to avoid potentially increasing register pressure. Of course, with such a small testcase, register pressure isn't a problem. MachineCSE might be able to do a better job here.</div>


<div><br></div><div>Nick</div></div></div></div></blockquote></div>I figured it was trying to avoid adding register pressure, but shouldn't it be more aggressive with constants? Isn't register allocator smart enough to spill constants when it runs out of registers?<br>
<br></div><div class="gmail_extra">Also, what do you think on commuting addps in the second example?<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks,<br></div><div class="gmail_extra">Eugene<br>
</div></div>