[llvm] [NFC][AMDGPU] Move cmp+select arguments optimization to SIISelLowering. (PR #150929)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 04:39:55 PDT 2025


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 HEAD~1 HEAD --extensions cpp,h -- llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp llvm/lib/Target/AMDGPU/SIISelLowering.cpp llvm/lib/Target/AMDGPU/SIISelLowering.h
``````````

</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 0fac43fa7..9017f4f26 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -15946,11 +15946,11 @@ SDValue SITargetLowering::performSelectCombine(SDNode *N,
   // Skip optimization for inlinable immediates.
   if (isFloatingPoint) {
     const APFloat &Val = cast<ConstantFPSDNode>(ConstVal)->getValueAPF();
-    if (!Val.isNormal() ||
-        Subtarget->getInstrInfo()->isInlineConstant(Val))
+    if (!Val.isNormal() || Subtarget->getInstrInfo()->isInlineConstant(Val))
       return SDValue();
   } else {
-    if (AMDGPU::isInlinableIntLiteral(cast<ConstantSDNode>(ConstVal)->getSExtValue()))
+    if (AMDGPU::isInlinableIntLiteral(
+            cast<ConstantSDNode>(ConstVal)->getSExtValue()))
       return SDValue();
   }
 

``````````

</details>


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


More information about the llvm-commits mailing list