[clang] [llvm] [clang] Add __builtin_elementwise_saturating_cast (PR #227603)

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 04:55:13 PDT 2026


AaronBallman wrote:

>     * we already have `__builtin_elementwise_add_sat`, so adding the remaining elementwise saturating operations seems like a logical next step

I looked to see if we had an RFC about that and couldn't find one. The closest I could find was https://discourse.llvm.org/t/rfc-clang-elementwise-builtins-for-converting-encoded-floating-point-values/91644 which was not officially accepted. But the prior experience with the saturating builtin is part of why I think we should wait -- we added something we thought was reasonable and the committee changed the design somewhat and we had to address it. That said, I don't feel that strongly, so if folks like @arsenm have a different opinion, I'm happy to go with their guidance.

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


More information about the llvm-commits mailing list