[llvm] [AMDGPU] Update log lowering to remove contract for AMDGCN backend (PR #168916)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 14:48:32 PST 2025


================
@@ -2805,7 +2804,12 @@ SDValue AMDGPUTargetLowering::LowerFLOGCommon(SDValue Op,
 
     SDValue C = DAG.getConstantFP(IsLog10 ? c_log10 : c_log, DL, VT);
     SDValue CC = DAG.getConstantFP(IsLog10 ? cc_log10 : cc_log, DL, VT);
-
+    // Our implementation of LOG is not contract safe because we generate
----------------
b-sumner wrote:

Is it not sufficient to say that contraction here raises the error of the approximation?  Is it really necessary to explain that it causes the error of the first product to be incorrectly added in a second time?

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


More information about the llvm-commits mailing list