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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 11:12:33 PST 2025


================
@@ -2807,7 +2804,9 @@ 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, so disable instruction
+    // contraction.
----------------
arsenm wrote:

Comment should explain why it's not unsafe, not simply state it's unsafe 

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


More information about the llvm-commits mailing list