[llvm] [SLP] More accurately cost RISCV scalar splats (PR #213104)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 06:06:39 PDT 2026
================
@@ -22334,10 +22384,28 @@ ResTy BoUpSLP::processBuildVector(const TreeEntry *E, Type *ScalarTy,
// Gather unique scalars and all constants.
SmallVector<int> ReuseMask(GatheredScalars.size(), PoisonMaskElem);
TryPackScalars(GatheredScalars, ReuseMask, /*IsRootPoison=*/true);
- Value *BV = ShuffleBuilder.gather(GatheredScalars, ReuseMask.size());
- ShuffleBuilder.add(BV, ReuseMask);
+ auto GatherUserOps = [&](SmallVectorImpl<TTI::BuildVectorUseOp> &UserOps) {
+ UserOps.clear();
----------------
alexey-bataev wrote:
```suggestion
UserOps.clear();
if (NeedFreeze)
return;
```
https://github.com/llvm/llvm-project/pull/213104
More information about the llvm-commits
mailing list