[PATCH] D153547: [CostModel] Use min/max intrinsics for vecreduce.min/max costs
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 07:08:14 PDT 2023
nikic added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1397
InstructionCost getMinMaxReductionCost(
- VectorType *Ty, VectorType *CondTy, bool IsUnsigned,
- FastMathFlags FMF = FastMathFlags(),
+ unsigned Opcode, VectorType *Ty, FastMathFlags FMF = FastMathFlags(),
TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput) const;
----------------
Opcode -> IntrinsicID? We don't usually use the term opcode for intrinsics. Could also use `Intrinsic::ID` type here (unless it's not available).
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:13826
}
Intrinsic::ID Id = getMinMaxReductionIntrinsicOp(RdxKind);
ScalarCost = EvaluateScalarCost([&]() {
----------------
Use this value instead of your switch?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153547/new/
https://reviews.llvm.org/D153547
More information about the llvm-commits
mailing list