<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 2, 2015 at 4:21 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@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"><div class="gmail_quote"><span class="">On Thu, Apr 2, 2015 at 10:15 AM Sanjay Patel <<a href="mailto:spatel@rotateright.com" target="_blank">spatel@rotateright.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Chandler, <br><br>This change adds code size (1-2 bytes per blend instruction) and doesn't improve performance for chips other than Sandybridge and Haswell AFAICT, but it was enabled for all conditions and targets.</div></div></div></blockquote></span></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div></div><div>I'm really suspicious about how much sense it makes to micro-optimize for code size in this way. It will be a lot of complexity for very little gain IMO.</div></div></div>
</blockquote></div><br></div><div class="gmail_extra">Turn that around to see from a non-Haswell perspective: your patch added a lot of complexity for a perf micro-optimization that applies to exactly 2 micro-architectures while costing the rest of the world a couple of bytes [1] and providing no gain in throughput. I view SB and Haswell as the anomalies here. I don't have any special knowledge, but I wonder if Intel's follow-ons will have the movs* handicap...because there's really no excuse from the hardware side to have that limitation. FWIW, icc 15 doesn't appear to do this blend optimization when targeting SB or Haswell.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">[1] Please also consider that the target systems that you care about may have more *cache* than I have available system memory to play with. That kind of limit will change your world view. Space is time after all.<br></div></div>