[llvm] [SLP] More accurately cost RISCV scalar splats (PR #213104)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 2 20:48:43 PDT 2026


lukel97 wrote:

> > We may consider `TuneNoSinkSplatOperands` here.
> 
> Is there any reason we don't just gate `canSplatOperand()` with `sinkSplatOperands()`?

I think `canSplatOperand` is more like a "legality" check whereas the later is a profitability one. For this PR we should probably query `sinkSplatOperands()` in `getShuffleCost` since we would have access to the subtarget there

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


More information about the llvm-commits mailing list