<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 14 November 2013 15:03, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank">nrotem@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 style="word-wrap:break-word"><div>I think that the best way to move forward with the vectorization of this loop is to make progress on the vectorization pragmas. The LoopVectorizer is already prepared for handling pragmas and we just need to add the clang-side support. Is anyone planning to work on this ?</div>
</div></blockquote><div></div></div><br></div><div class="gmail_extra">I'm not. :(</div><div class="gmail_extra"><br></div><div class="gmail_extra">What kind of pragmas would work for this loop? Something telling that it's safe to speculatively read from m[] at any position? In this reduction case it might be enough. But if this would be an induction store like:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">for () {</div><div class="gmail_extra"> if (a[i] > 0)</div><div class="gmail_extra"> x[i] = ... + m[i];</div><div class="gmail_extra"><br></div><div class="gmail_extra">
then, the store would be a more complicated way to write to memory and you'd need the read-pragma to not affect such cases.</div><div class="gmail_extra"><br></div><div class="gmail_extra">cheers,</div><div class="gmail_extra">
--renato</div></div>