[llvm] [AArch64][CostModel] Model sve costs for ctpop (PR #192428)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 03:47:51 PDT 2026


================

----------------
paulwalker-arm wrote:

The reason for adding MVT::nxv16i8 is to correctly cost the scalable vector variants.  As the patch stands you're generating:
```
; CHECK-NEXT:  Cost Model: Found costs of 2 for: %nxv16i8 = call <vscale x 16 x i8> @llvm.ctpop.nxv16i8(<vscale x 16 x i8> poison)
```
Which should be 1 to match the other element types.  The Neon variant is also 1 so I doubt it will affect the SVE VLS side.

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


More information about the llvm-commits mailing list