<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 7, 2016, at 8:17 AM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org" class="">dberlin@dberlin.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">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></blockquote><div class=""><br class=""></div><div class="">"if we do, we should fix that"": isn't it what the code actually does a few lines below?</div><div class=""><br class=""></div><div class="">I don't mind at all this patch going in, the motivation for it is just unclear to me (it is NFC right?).</div><div class=""><br class=""></div><div class="">-- </div><div class="">Mehdi</div><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Apr 7, 2016 at 7:46 AM, Aditya Kumar <span dir="ltr" class=""><<a href="mailto:hiraditya@msn.com" target="_blank" class="">hiraditya@msn.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hiraditya added a comment.<br class="">
<span class=""><br class="">
In <a href="http://reviews.llvm.org/D18830#394173" rel="noreferrer" target="_blank" class="">http://reviews.llvm.org/D18830#394173</a>, @chandlerc wrote:<br class="">
<br class="">
</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 class="">
><br class="">
> 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 class="">
><br class="">
</span><span class="">> My two cents. If Danny, Chad, or others working more on GVN disagree, they can happily override me. =D<br class="">
<br class="">
<br class="">
</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 class="">
<div class="HOEnZb"><div class="h5"><br class="">
<br class="">
Repository:<br class="">
  rL LLVM<br class="">
<br class="">
<a href="http://reviews.llvm.org/D18830" rel="noreferrer" target="_blank" class="">http://reviews.llvm.org/D18830</a><br class="">
<br class="">
<br class="">
<br class="">
</div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>