[PATCH] D105432: [Analysis] Add simple cost model for strict (in-order) reductions
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 22 04:01:35 PDT 2021
david-arm marked an inline comment as done.
david-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7262
+ InstructionCost BaseCost = TTI.getArithmeticReductionCost(
+ RdxDesc.getOpcode(), VectorTy, RdxDesc.getFastMathFlags(), CostKind);
----------------
RKSimon wrote:
> Aren't the calls to TTI.getArithmeticReductionCost the same?
> ```
> InstructionCost BaseCost = TTI.getArithmeticReductionCost(
> RdxDesc.getOpcode(), VectorTy, RdxDesc.getFastMathFlags(), CostKind);
>
> if (useOrderedReductions(RdxDesc))
> return BaseCost;
> ```
Good point! That's just a leftover from the initial version that used an enum.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105432/new/
https://reviews.llvm.org/D105432
More information about the llvm-commits
mailing list