================
@@ -127,9 +127,9 @@ _CLC_DEF _CLC_OVERLOAD float __clc_sw_fma(float a, float b, 
float c) {
     return c;
   }
 
-  a = __clc_flush_denormal_if_not_supported(a);
-  b = __clc_flush_denormal_if_not_supported(b);
-  c = __clc_flush_denormal_if_not_supported(c);
+  a = __clc_soft_flush_denormal(a);
+  b = __clc_soft_flush_denormal(b);
+  c = __clc_soft_flush_denormal(c);
----------------
arsenm wrote:

Unconditionally forcing flush of denormals is not desirable. In this context 
I'm not sure why it's trying to flush in the first place.

The below code extracting the exponent can be replaced with frexp, and the 
return c on the above paths is missing a canonicalize.

But on a deeper level I don't think libclc should be trying to provide a 
software FMA implementation in the first place; that's a decision for the 
compiler when codegening llvm.fma, surely compiler-rt already has an 
implementation? 

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

Reply via email to