<div dir="ltr">I think his point is more the same one i made: "we shouldn't have to swap at all, and if we do, we should fix that"</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 7, 2016 at 7:46 AM, Aditya Kumar <span dir="ltr"><<a href="mailto:hiraditya@msn.com" target="_blank">hiraditya@msn.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hiraditya added a comment.<br>
<span class=""><br>
In <a href="http://reviews.llvm.org/D18830#394173" rel="noreferrer" target="_blank">http://reviews.llvm.org/D18830#394173</a>, @chandlerc wrote:<br>
<br>
</span><span class="">> Please don't avoid extra work in this way IMO, unless you have a very significant compile time hit due to this.<br>
><br>
> We have a pervasive reliance on canonicalizing constants to the RHS of binary operations so those should be exceedingly rare anyways. We shouldn't fight that, we should run with it.<br>
><br>
</span><span class="">> My two cents. If Danny, Chad, or others working more on GVN disagree, they can happily override me. =D<br>
<br>
<br>
</span>Thanks for the feedback. This patch will not change the order of preference (RHS should keep Constants/Arguments). it only prevents swap when both LHS and RHS are Arguments.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D18830" rel="noreferrer" target="_blank">http://reviews.llvm.org/D18830</a><br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>