[clang] [llvm] [HLSL] implement `mad` intrinsic (PR #83826)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 09:54:04 PST 2024


================
@@ -5298,6 +5298,14 @@ bool Sema::CheckHLSLBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
       return true;
     break;
   }
+  case Builtin::BI__builtin_hlsl_mad: {
+    if (checkArgCount(*this, TheCall, 3))
+      return true;
+    if (CheckVectorElementCallArgs(this, TheCall))
+      return true;
+    if (SemaBuiltinElementwiseTernaryMath(TheCall, false))
----------------
farzonl wrote:

i usually do, but this one shows up via vscode clangd extension and it threw me off.

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


More information about the cfe-commits mailing list