[llvm] [X86][SelectionDAG] Fix the Gather's base and index by modifying the Scale value (PR #137813)

via llvm-commits llvm-commits at lists.llvm.org
Sun May 4 23:33:48 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 -- llvm/lib/Target/X86/X86ISelLowering.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index b2841b7ec..c299c6be1 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -56607,10 +56607,10 @@ static SDValue combineGatherScatter(SDNode *N, SelectionDAG &DAG,
     }
     unsigned IndexWidth = Index.getScalarValueSizeInBits();
 
-    // If the index is a left shift, \ComputeNumSignBits we are recomputing the number of sign bits
-    // from the shifted value. We are trying to enable the optimization in which
-    // we can shrink indices if they are larger than 32-bits. Using the existing
-    // fold techniques implemented below.
+    // If the index is a left shift, \ComputeNumSignBits we are recomputing the
+    // number of sign bits from the shifted value. We are trying to enable the
+    // optimization in which we can shrink indices if they are larger than
+    // 32-bits. Using the existing fold techniques implemented below.
     unsigned ComputeNumSignBits = DAG.ComputeNumSignBits(Index);
     if (Index.getOpcode() == ISD::SHL) {
       if (auto MinShAmt = DAG.getValidMinimumShiftAmount(Index)) {

``````````

</details>


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


More information about the llvm-commits mailing list