[llvm] [AMDGPU] Fix isCanonicalized for IEEE-mode-dependent sNaN quieting (PR #208733)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 09:03:54 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/lib/Target/AMDGPU/SIISelLowering.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index bb4b13d1f..942a9b481 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -16198,7 +16198,8 @@ bool SITargetLowering::isCanonicalized(Register Reg, const MachineFunction &MF,
   //   G_AMDGPU_CVT_F32_UBYTE{0-3}: always canonical (integer->float, no NaN).
   //   amdgcn_cvt_pkrtz, amdgcn_cubeid, amdgcn_fdot2: always quiet sNaN.
   //   amdgcn_div_scale: passes sNaN through on pre-GFX12.
-  //   All other ops: quiet sNaN only when MODE.IEEE=1 (or unconditionally on GFX12+).
+  //   All other ops: quiet sNaN only when MODE.IEEE=1 (or unconditionally on
+  //   GFX12+).
   const bool IsGFX12Plus = Subtarget->getGeneration() >= AMDGPUSubtarget::GFX12;
   const bool QuietsSignalNaN =
       IsGFX12Plus || MF.getInfo<SIMachineFunctionInfo>()->getMode().IEEE;

``````````

</details>


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


More information about the llvm-commits mailing list