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

Jan Schultke via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 00:14:17 PDT 2026


eisenwave wrote:

> > Note that this PR is still heavily WIP.
> 
> Given that it's in service of work not yet adopted by WG21 (correct me if I'm wrong), there's also a question of whether we should accept these changes now or wait until the features are adopted.

Nah, you're right, but I don't think that any of the proposals in the pipeline are particularly contentious. Even if they weren't adopted, I think this addition to Clang makes sense because
- it feels like we're missing a way to emit `llvm.fptoui.sat.*` without relying on a global flag
- we already have `__builtin_elementwise_add_sat`, so adding the remaining elementwise saturating operations seems like a logical next step


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


More information about the llvm-commits mailing list