================
@@ -7757,6 +7757,35 @@ def CIR_FMAOp : CIR_TernaryFPToFPBuiltinOp<"fma",
"FMAOp"> {
}];
}
+def CIR_FMulAddOp : CIR_TernaryFPToFPBuiltinOp<"fmuladd", "FMulAddOp"> {
+ let summary = "Contractable fused multiply-add operation";
+
+ let description = [{
+ Computes `(a * b) + c`, allowing the multiply and add to be fused (or not)
+ into a single rounding step at the target's discretion. It lowers to the
+ `llvm.fmuladd` intrinsic (or its constrained variant when an `fenv`
+ attribute is present).
+
+ Unlike `cir.fma`, which maps to `llvm.fma` and guarantees a single
+ rounding, `cir.fmuladd` expresses the FP-contraction relaxation used for
+ `a * b + c` under `-ffp-contract=on` / `fast`, where the backend is free to
----------------
bcardosolopes wrote:
CIRGen support coming on a new PR?
https://github.com/llvm/llvm-project/pull/215329
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits