[clang] [llvm] [HLSL][DirectX][SPIRV] Implement the `fma` API (PR #185304)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 09:58:14 PDT 2026


================
@@ -782,6 +782,16 @@ def FMad : DXILOp<46, tertiary> {
   let attributes = [Attributes<DXIL1_0, [ReadNone]>];
 }
 
+def Fma : DXILOp<47, tertiary> {
+  let Doc = "Double-precision fused multiply-add. fma(a,b,c) = a * b + c.";
+  let intrinsics = [IntrinSelect<int_fma>];
----------------
NeKon69 wrote:

I am not really sure how to test this..? Writing IR for DirectX backend?

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


More information about the llvm-commits mailing list