[llvm-dev] RFC: Generic IR reductions
Renato Golin via llvm-dev
llvm-dev at lists.llvm.org
Wed Feb 1 06:54:48 PST 2017
On 1 February 2017 at 14:36, Amara Emerson <amara.emerson at gmail.com> wrote:
> I think you mean take a single vector operand, not two vector
> operands. If the intrinsic took two vectors then we would naturally
> expect the result to be a vector, where each element is the result of
> a scalar operation between each respective element in the vector
> operands. Just like a normal binary operator.
%vec = @llvm.maxnum(<N x float> %a, <N x float> %b)
%scalar = @llvm.maxnum(<N x floag> %c)
In NEON, the former is a simple VMAX (VADD, etc), while the latter can
be a combination of VPMAX (VPADD etc).
More information about the llvm-dev