[llvm] [AArch64] treat `@llvm.ssub.sat` the same as `@llvm.aarch64.neon.sqsub` (PR #140454)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed May 28 03:28:16 PDT 2025
nikic wrote:
> > Would it be possible to entirely remove these neon intrinsics and auto-upgrade them to the generic ones?
>
> For other intrinsics (abs, min/max) that is a good way to go. For these though, the instructions technically set a Q flag on saturation that the users might try and use. That is not something we support at the moment (we don't model the sideeffects), but having the intrinsics present allows us to pivot if we need to in the future.
Hm, if you wanted to model the Q flag, I'd assume you would change the intrinsic to return something like `{ <4 x i32>, i1 }` instead?
That seems like a reasonable motivation for a separate intrinsic -- but for the case where the i1 result is unused, wouldn't you still want to use the target-independent ones anyway?
https://github.com/llvm/llvm-project/pull/140454
More information about the llvm-commits
mailing list