[llvm] [CostModel] Add a DstTy to getShuffleCost (PR #141634)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Fri May 30 07:30:30 PDT 2025
================
@@ -1360,16 +1360,17 @@ class TargetTransformInfo {
const SmallBitVector &OpcodeMask,
TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput) const;
- /// \return The cost of a shuffle instruction of kind Kind and of type Tp.
- /// The exact mask may be passed as Mask, or else the array will be empty.
- /// The index and subtype parameters are used by the subvector insertion and
- /// extraction shuffle kinds to show the insert/extract point and the type of
- /// the subvector being inserted/extracted. The operands of the shuffle can be
- /// passed through \p Args, which helps improve the cost estimation in some
- /// cases, like in broadcast loads.
- /// NOTE: For subvector extractions Tp represents the source type.
+ /// \return The cost of a shuffle instruction of kind Kind with inputs of type
+ /// SrcTy, producing a vector of type DstTy. The exact mask may be passed as
+ /// Mask, or else the array will be empty. The index and subtype parameters
+ /// are used by the subvector insertion and extraction shuffle kinds to show
+ /// the insert/extract point and the type of the subvector being
+ /// inserted/extracted. The operands of the shuffle can be passed through \p
----------------
davemgreen wrote:
I've updated the comment (but it might not be true quite yet as we still set and use the SubTp for ExtractSubRegs at the moment).
https://github.com/llvm/llvm-project/pull/141634
More information about the llvm-commits
mailing list