[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 10:37:10 PST 2025


================
@@ -2767,7 +2766,9 @@ SDValue AMDGPUTargetLowering::LowerFLOGCommon(SDValue Op,
   EVT VT = Op.getValueType();
   SDNodeFlags Flags = Op->getFlags();
   SDLoc DL(Op);
-
+  // Our implementation of LOG is not contract safe, so disable instruction
+  // contraction.
+  Flags.setAllowContract(false);
----------------
arsenm wrote:

No, I mean this placement is far removed away from the problematic contraction (which I'm guessing is https://github.com/llvm/llvm-project/blob/6ff15f4b7176df9f704e34cab8e1c88438f34e1a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp#L2833 and https://github.com/llvm/llvm-project/blob/6ff15f4b7176df9f704e34cab8e1c88438f34e1a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp#L2814)

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


More information about the llvm-commits mailing list