[clang] [Clang] Add elementwise maximumnum/minimumnum builtin functions (PR #149775)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 21 20:02:23 PDT 2025


================
@@ -4108,6 +4108,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     return RValue::get(Result);
   }
 
+  case Builtin::BI__builtin_elementwise_maximumnum: {
+    Value *Op0 = EmitScalarExpr(E->getArg(0));
----------------
erichkeane wrote:

Ah, I stopped chasing down the call-stack 1 too few :)  I see it now in `Sema::BuiltinVectorMath(`.

I was pointing out that we refer to `[1]` (the second element), but the Prototype in Builtins.td is a `...` which allows 0 or 1 arguments.

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


More information about the cfe-commits mailing list