[LLVMdev] Vectorization of loops with conditional dereferencing

Renato Golin renato.golin at linaro.org
Thu Nov 14 07:09:07 PST 2013


On 14 November 2013 15:03, Nadav Rotem <nrotem at apple.com> wrote:

> 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 ?
>

I'm not. :(

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:

for () {
  if (a[i] > 0)
    x[i] = ... + m[i];

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.

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131114/93d3c2a5/attachment.html>


More information about the llvm-dev mailing list