[llvm] [LLVM][SVE][CodeGen] Fix incorrect isel for signed saturating instructions. (PR #88136)

David Green via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 00:21:26 PDT 2024


davemgreen wrote:

> > This certainly sounds like one of those problems that is easy to get wrong. It sounds like the generation of the intrinsics in clang might need to change too?
> 
> Please can you elaborate if I've misunderstood? We don't typically expose immediate forms to Clang unless that's the only instruction format available, which is not the case for sqadd/sqsub. We leave it as a code generation optimisation to use them when appropriate.

Hi. It was sqadd_n_s8 that I was thinking of, but looking again it looks like the argument is signed, not unsigned. There are some details in the documentation for the intrinsic about it producing sqadd or sqsub depending on the range of the value, so if that is now happening this sounds good to me!

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


More information about the llvm-commits mailing list