<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 16, 2015 at 3:44 PM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="adM"><div class=""><blockquote type="cite"><div>On Jan 16, 2015, at 3:04 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>> wrote:</div><br><div><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 16, 2015 at 2:40 PM, Quentin Colombet <span dir="ltr"><<a href="mailto:qcolombet@apple.com" target="_blank">qcolombet@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Well, that may be the conclusion: The performance impact may be within the noise.</div><div>Since this kind of patterns are very specific, this is not surprising.</div><div>For the record, I tend to ignore the tests that run for less than 1 second (too noisy). Then, the noise level is usually around 1% on a quiet computer with fixed frequency, which is not too bad. </div></blockquote></div><br>Numbers would mostly be nice because I don't know if other targets have the thing that makes this such a huge win on <span class="il">x86</span> -- implicit concat with undef to form 2x-wide vectors.</div><div class="gmail_extra"><br></div><div class="gmail_extra">This may be an <span class="il">x86</span>-specific win, in which case it should just be added as a target-specific combine.</div></div></div></blockquote><div><br></div><div><br></div></div></div><div>We are filling half of a vector (v8), and we have to choose between concat two v4 to v8 and then shuffle, or shuffle in v4 and then concat with undef to have a v8.</div><div>I’m not sure I necessarily see the “target specific part” here, isn’t it a sort of canonicalization in the DAG? </div></blockquote></div><br>I mean, I said "may". =]</div><div class="gmail_extra"><br></div><div class="gmail_extra">It is possible that a target has very anemic support for v4 shuffles, but excellent support for v8 shuffles, and it is always better to promote to v8 early, and shuffle there. Seems unlikely, but possible.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Anyways, I'm fine if we're confident all the targets want it to work that way. Makes it easier. But we should check first, either by looking at their generated code and making sure it's good, and/or by running benchmarks.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I'll let Quentin decide if there are specific benchmarks he things need to be run before this goes in; I think the code as-is LGTM.</div></div>