<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>This is almost ideal for SLP vectorization, except for two problems:</div><div><br></div><div>1. We have 4 stores to consecutive locations, but the last element is the constant zero, and not an additional SUB.   At the moment we don’t have support for idempotence operations, but this is something that we should add. </div><div><br></div><div>2. The values that we are subtracting come from 3 loads.  We usually load 4 elements from memory, or scalarize the inputs (we don’t support masked loads on AVX512).  </div><div><br></div><div>Do you know if the GCC SLP Vectorizer vectorizes this, or is it their Loop Vectorizer ? </div><div><br></div><div>Thanks,</div><div>Nadav </div><div>  </div><div><br></div><br><div><div>On Oct 14, 2013, at 10:09 AM, Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra">On 14 October 2013 18:03, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank">nrotem@apple.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word">This also looks like a form of SLP vectorization.</div></blockquote><div><br></div><div>Yes. Would it be more beneficial to make it a BB-only pass? It seems that, independent of that, it would be beneficial to have pointer reduction variables.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">
<div>I assume that you meant to write (*read++). Basically, we have a wide load and a wide store and some operations on ABC.</div></div></blockquote><div><br></div><div>yes.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word">Can you send the IR for this code ?</div></blockquote><div><br></div>Unoptimized and optimized version, with the latter being exactly what the vectorizer will see at O3 (I dumped from inside the debugger and it was identical).<div>
<br></div><div>cheers,</div><div>--renato</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div></div></div>
<span><vect-pointer-test.zip></span></blockquote></div><br></body></html>