[LLVMdev] Vectorization of pointer PHI nodes

Nadav Rotem nrotem at apple.com
Mon Oct 14 10:15:52 PDT 2013


This is almost ideal for SLP vectorization, except for two problems:

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. 

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).  

Do you know if the GCC SLP Vectorizer vectorizes this, or is it their Loop Vectorizer ? 

Thanks,
Nadav 
  


On Oct 14, 2013, at 10:09 AM, Renato Golin <renato.golin at linaro.org> wrote:

> On 14 October 2013 18:03, Nadav Rotem <nrotem at apple.com> wrote:
> This also looks like a form of SLP vectorization.
> 
> 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.
> 
> 
> I assume that you meant to write (*read++). Basically, we have a wide load and a wide store and some operations on ABC.
> 
> yes.
> 
> 
> Can you send the IR for this code ?
> 
> 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).
> 
> cheers,
> --renato
> 
> 
> <vect-pointer-test.zip>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131014/3197e878/attachment.html>


More information about the llvm-dev mailing list