[llvm] [SLP] Compute a shuffle mask for getGatherCost (PR #85330)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 16:19:12 PDT 2024


================
@@ -10516,6 +10516,7 @@ InstructionCost BoUpSLP::getGatherCost(ArrayRef<Value *> VL,
           TTI->getVectorInstrCost(Instruction::InsertElement, VecTy, CostKind,
                                   I, Constant::getNullValue(VecTy), V);
   };
+  SmallVector<int> ShuffleMask(VL.size(), -1);
----------------
alexey-bataev wrote:

```suggestion
  SmallVector<int> ShuffleMask(VL.size(), PoisonMaskElem);
```

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


More information about the llvm-commits mailing list