[clang] [Clang] Add `__builtin_[ordered_]reduce_fadd` for ordered/unordered fp reductions (PR #176160)
Benjamin Maxwell via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 27 02:08:56 PST 2026
================
@@ -3628,6 +3630,44 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
break;
}
+ case Builtin::BI__builtin_reduce_addf:
+ case Builtin::BI__builtin_ordered_reduce_addf: {
+ if (checkArgCountRange(TheCall, 1, 2))
+ return ExprError();
----------------
MacDue wrote:
Since I've added separate builtins, I've allowed both to optionally specify the start value (with the default being -0.0f -- the FP additive identity).
https://github.com/llvm/llvm-project/pull/176160
More information about the cfe-commits
mailing list