[llvm] [RISCV] Implement RISCV TTI::getNumberOfParts() (PR #223096)
Ryan Buchner via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 00:12:52 PDT 2026
bababuck wrote:
> Can we maybe update the documentation on `getNumberOfParts` to reflect the fact that it won't actually return the number of time it was split, but is a proxy of cost?
Yes, will update.
> > we care about if the wider type will cost more to operate on
>
> It's hard to reason about the cost of a type without an underlying opcode. Is there a reason why SLP doesn't use the regular TTI costing hooks?
My understanding is that in some scenarios we're trying to make decisions about vector widths without wanting to look ahead at the opcodes of all the ancestor instructions, and this provides a quick proxy for that.
I'm going to first try to get a MR for replacing `getNumberOfParts` replaced with `getRegUsageForType` where appropriate in the SLP, and then I will try to figure out why we're seeing regressions in the `test-suite` for this change (if we still are).
https://github.com/llvm/llvm-project/pull/223096
More information about the llvm-commits
mailing list