================
@@ -1694,6 +1694,20 @@ multiclass FMA_INST {
 
 defm INT_NVVM_FMA : FMA_INST;
 
+foreach rnd = ["_RN", "_RZ", "_RM", "_RP"] in {
+  foreach sat = ["", "_SAT"] in {
+    foreach type = ["F16", "BF16"] in {
+      def INT_NVVM_FMA # rnd # sat # _F32_ # type : 
+        BasicNVPTXInst<(outs B32:$dst), (ins B16:$a, B16:$b, B32:$c),
+          !tolower(!subst("_", ".", "fma" # rnd # sat # "_f32_" # type)),
+          [(set f32:$dst, 
+           (!cast<Intrinsic>(!tolower("int_nvvm_fma_mixed" # rnd # sat # 
"_f32")) 
+             !cast<ValueType>(!tolower(type)):$a, 
!cast<ValueType>(!tolower(type)):$b, f32:$c))]>,
----------------
Artem-B wrote:

Nit: I'd put each argument on a separate line. Easier to read, compared to all 
of them jammed together on the same line, with a lot of `<>()` sprinkled around.

https://github.com/llvm/llvm-project/pull/168359
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to