[llvm] [AArch64] Change cost of (s|z)ext <4 x i8> -> <4 x i32> to 2. (PR #141029)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 11:35:12 PDT 2025


https://github.com/fhahn commented:

> Do you have any details about what this improves for you? I am not against it, it sounds sensible, but if you look at the cost of the load it is already 2, as it includes the cost of `v4i8 load + zext to v4i16`. A v4i8 is legalized to a v4i16 and the cost model somewhat attempts to account for that. In some cases the cost of will certainly be 2 though.
> 

I don't have a super strong motivation, this is just something I noticed while working on https://github.com/llvm/llvm-project/pull/141109. This also changes vectorization factors in a number of cases, but I still need to check those. As you said, it will probably be a wash, with some cases more accruate while others less accurate, due to not being context-sensitive enough

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


More information about the llvm-commits mailing list