[llvm] [TTI][Vectorize] Migrate masked/gather-scatter/strided/expand-compress costing (NFCI) (PR #165532)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 02:07:51 PST 2025


================
@@ -1606,10 +1606,13 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
 
     // Firstly, the cost of load/store operation.
     InstructionCost Cost;
-    if (UseMaskForCond || UseMaskForGaps)
-      Cost = thisT()->getMaskedMemoryOpCost(Opcode, VecTy, Alignment,
-                                            AddressSpace, CostKind);
-    else
+    if (UseMaskForCond || UseMaskForGaps) {
+      unsigned IID = (Opcode == Instruction::Load) ? Intrinsic::masked_load
+                                                   : Intrinsic::masked_store;
----------------
lukel97 wrote:

```suggestion
      unsigned IID = Opcode == Instruction::Load ? Intrinsic::masked_load
                                                   : Intrinsic::masked_store;
```

https://github.com/llvm/llvm-project/pull/165532


More information about the llvm-commits mailing list