[llvm] [AArch64][GlobalISel] Expand abs.v4i8 to v4i16 and abs.v2s16 to v2s32 (PR #81231)

David Green via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 01:48:20 PST 2024


davemgreen wrote:

I'm not sure we want to promote (elements) as opposed to widen (the vector). Promote is what SDAG does, and there are advantages in places (notably that is how args are passed but I've seen other cases where it does work quite well too, usually when the code is already extending the v4i8 to a larger type). But it is certainly not optimal in all cases: https://godbolt.org/z/5bnWxqc4x.

I think the reason the existing code is falling back is because there is an anyext between the arg and the abs. Which presumably we will need to fix in any case?

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


More information about the llvm-commits mailing list