[LLVMdev] loop vectorizer and storing to uniform addresses
Nadav Rotem
nrotem at apple.com
Thu Nov 7 21:49:12 PST 2013
Can you attach the incoming IR ?
Yes, we support reductions: http://llvm.org/docs/Vectorizers.html
On Nov 7, 2013, at 5:18 PM, Frank Winter <fwinter at jlab.org> wrote:
> I am trying my luck on this global reduction kernel:
>
> float foo( int start , int end , float * A )
> {
> float sum[4] = {0.,0.,0.,0.};
> for (int i = start ; i < end ; ++i ) {
> for (int q = 0 ; q < 4 ; ++q )
> sum[q] += A[i*4+q];
> }
> return sum[0]+sum[1]+sum[2]+sum[3];
> }
>
>
> LV: Checking a loop in "foo"
> LV: Found a loop: for.cond1
> LV: Found an induction variable.
> LV: We don't allow storing to uniform addresses
> LV: Can't vectorize due to memory conflicts
> LV: Not vectorizing.
>
>
> My interpretation would be that the loop vectorizer does not support loops which implement a reduction. Is this correct?
>
> Frank
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list