[PATCH] D30086: Add generic IR vector reductions
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 20 10:25:36 PST 2017
mehdi_amini added inline comments.
================
Comment at: docs/LangRef.rst:11655
+reduction of a vector, returning the result as a scalar. The return type matches
+the element-type of the vector input.
+
----------------
aemerson wrote:
> mehdi_amini wrote:
> > mkuper wrote:
> > > mehdi_amini wrote:
> > > > delena wrote:
> > > > > mehdi_amini wrote:
> > > > > > I think it'd be important to clarify the ordering: do we require a "fast" FMF to change it? If not, why?
> > > > > I think that in the case of FP operations we need two intrinsics - "ordered" and "fast".
> > > > Why don't reusing the existing FMF? The intrinsic without FMF would be equivalent to "ordered" and the "fast" FMF flag would allow any ordering.
> > > I don't think we can currently attach FMF to CallInsts.
> > We do actually: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151214/319516.html
> Thanks, I hadn't realised CallInsts supported FMFs, it makes some sense to use for the ordered/unordered distinction but what are your thoughts on the extra scalar accumulator operand for ordered reductions? An undef scalar value could be given for fast reductions but it my view it clutters the intrinsic for the vast majority of reductions, though not a deal breaker.
I'm not sure about the pros/cons of the undef scalar thing.
Repository:
rL LLVM
https://reviews.llvm.org/D30086
More information about the llvm-commits
mailing list