[llvm] [AMDGPU] Flush denormal results when constant folding amdgcn.rcp (PR #203566)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 08:30:12 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/AMDGPUInstCombineIntrinsic.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/AMDGPUInstCombineIntrinsic.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
index 3e71ec99a..4751d4614 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
@@ -1141,7 +1141,8 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
         else if (Mode.Output == DenormalMode::PositiveZero)
           Val = APFloat::getZero(Sem, /*Negative=*/false);
         else if (Mode.Output != DenormalMode::IEEE)
-          break; // Dynamic: hardware behavior is unknown, leave the call in place.
+          break; // Dynamic: hardware behavior is unknown, leave the call in
+                 // place.
       }
 
       return IC.replaceInstUsesWith(II, ConstantFP::get(II.getContext(), Val));

``````````

</details>


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


More information about the llvm-commits mailing list