[LLVMdev] loop vectorizer

Hal Finkel hfinkel at anl.gov
Wed Oct 30 10:52:49 PDT 2013


----- Original Message -----
> 
> 
> 
> On 30 October 2013 09:25, Nadav Rotem < nrotem at apple.com > wrote:
> 
> 
> The access pattern to arrays a and b is non-linear. Unrolled loops
> are usually handled by the SLP-vectorizer. Are ir0 and ir1
> consecutive for all values for i ?

On problem that you might run into currently is that the loop vectorizer, which is the only pass that, by default, will do partial unrolling, is run after SLP vectorization. The regular unroller can do partial unrolling, but unless the target overrides the relevant TTI interface and changes the default, the -unroll-allow-partial or -unroll-runtime flags would need to be specified.

 -Hal

> 
> 
> 
> Based on his list of values, it seems that the induction stride is
> linear within each block of 4 iterations, but it's not a clear
> relationship.
> 
> 
> As you say, it should be possible to spot that once the loop is
> unrolled, and get the SLP to vectorize if the relationship becomes
> clear.
> 
> 
> Maybe I'm wrong, but this looks like a problem of missed
> opportunities, not technically hard to implement.
> 
> 
> --renato
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-dev mailing list