Displaying 2 results from an estimated 2 matches for "r_red_next".
Did you mean:
a_red_next
2013 Oct 23
0
[LLVMdev] First attempt at recognizing pointer reduction
..._ind, 6
The horizontal reduction i mention above is not needed if you have no use inside the loop like in the case of:
r=0
for (i = …) {
r += a[i];
}
return r;
This is simply (i am leaving out the induction variable for “i”):
%r_red = phi <2 x i32> [preheader, <%r, 0>] , [loop, %r_red_next]
%a_ptr = gep %a, %i
%val_of_a_sub_i = load <2 x i32> * %a_ptr
%r_red_next = add %r_red, %val_of_a_sub_i
Outside of the loop we reduce the vectorized reduction to the final value of “r”
%r= horizontal_add %r_red_next
ret %r
> In my example, I'm aggregating a computation i...
2013 Oct 23
2
[LLVMdev] First attempt at recognizing pointer reduction
On 23 October 2013 16:05, Arnold Schwaighofer <aschwaighofer at apple.com>wrote:
> In the examples you gave there are no reduction variables in the loop
> vectorizer’s sense. But, they all have memory accesses that are strided.
>
This is what I don't get. As far as I understood, a reduction variable is
the one that aggregates the computation done by the loop, and is used