[llvm] [TTI] Use MemIntrinsicCostAttributes for getGatherScatterOpCost (PR #168650)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 27 07:36:19 PST 2025
================
@@ -1598,8 +1603,10 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
// For a target without strided memory operations (or for an illegal
// operation type on one which does), assume we lower to a gather/scatter
// operation. (Which may in turn be scalarized.)
- return thisT()->getGatherScatterOpCost(Opcode, DataTy, Ptr, VariableMask,
- Alignment, CostKind, I);
+ unsigned IID = Opcode == Instruction::Load ? Intrinsic::masked_gather
+ : Intrinsic::masked_scatter;
+ return thisT()->getGatherScatterOpCost(
+ {IID, DataTy, Ptr, VariableMask, Alignment, I}, CostKind);
----------------
arcbbb wrote:
Fixed. Thanks!
https://github.com/llvm/llvm-project/pull/168650
More information about the llvm-commits
mailing list