[PATCH] D30086: Add generic IR vector reductions
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 05:37:57 PDT 2017
aemerson marked an inline comment as done.
aemerson added inline comments.
================
Comment at: docs/LangRef.rst:12011
+
+The '``llvm.vector.reduce.fmin.*``' intrinsics do a floating point ``MIN``
+reduction of a vector, returning the result as a scalar. The return type matches
----------------
RKSimon wrote:
> llvm.experimental.vector.reduce.fmin.*
Thanks, will fix in final commit.
================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:1273
+ return getSimpleRdx(Instruction::Xor);
+ case RecurrenceDescriptor::RK_IntegerMinMax: {
+ switch (Desc.getMinMaxRecurrenceKind()) {
----------------
rengolin wrote:
> I may be wrong, but I think the LLVM style could be to put this curly brackets on a new line.
>
> clang-format would know better. :)
This is the LLVM style according to clang-format.
================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:1293
+ case RecurrenceDescriptor::RK_FloatMinMax: {
+ Flags.IsMaxOp =
+ Desc.getMinMaxRecurrenceKind() == RecurrenceDescriptor::MRK_FloatMax;
----------------
rengolin wrote:
> Isn't this `Flags` a local variable? Where is this being used after the call to `createSimpleTargetReduction`?
It's captured by reference by the `getSimpleRdx` lambda.
Repository:
rL LLVM
https://reviews.llvm.org/D30086
More information about the llvm-commits
mailing list