[llvm] [Analysis] Extend llvm.experimental.cttz.elts to type-based-cost (PR #184578)
Philipp Rados via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 06:10:05 PST 2026
prados-oc wrote:
> Is this with a fixed length VF? I think we should be able to return a cost for it without crashing, even if it's less than ideal. (but we should also handle the type based cost too)
This happens for every llvm.experimental.cttz.elts (in RISCV) where `shouldExpandCttzElements()` returns true and thus gets the cost from BaseT::getIntrinsicInstrCost (if the cost-analysis is type-based).
We could also handle the scalarization case by making sure that the arguments of the intrinsic are in fact vectors.
https://github.com/llvm/llvm-project/pull/184578
More information about the llvm-commits
mailing list