[PATCH] D45336: Apply accumulator to fadd/fmul experimental vector reductions (PR36734)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 6 06:29:59 PDT 2018
RKSimon added inline comments.
================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:1545
+ if (Op != Instruction::ICmp && Op != Instruction::FCmp) {
+ // Floating point operations had to be 'fast' to enable the reduction.
+ Result = addFastMathFlag(
----------------
gnzlbg wrote:
> Could you add a note explaining why this is the case?
>
> If this isn't the case adding fast math flags is going to have a lot of unexpected side-effects for the users. Is there a way to verify this or assert this?
This is a cut and paste from the code below so I didn't introduce this - but for shuffle reduction you do have to assume fast math (see the equivalent comments further down in the createSimpleTargetReduction calling function).
Repository:
rL LLVM
https://reviews.llvm.org/D45336
More information about the llvm-commits
mailing list