[llvm] [X86][SelectionDAG] Handle the case for gather where index is SHL (PR #139703)

Rohit Aggarwal via llvm-commits llvm-commits at lists.llvm.org
Mon May 19 04:12:22 PDT 2025


================
@@ -56717,7 +56717,8 @@ static SDValue combineGatherScatter(SDNode *N, SelectionDAG &DAG,
         return SDValue(N, 0);
       }
       if (auto MinShAmt = DAG.getValidMinimumShiftAmount(Index)) {
-        if (*MinShAmt >= 1 && (*MinShAmt + Log2ScaleAmt) < 4 &&
+        if (*MinShAmt >= 1 &&
+            (((*MinShAmt + Log2ScaleAmt) < 4) || (1 + Log2ScaleAmt < 4)) &&
----------------
rohitaggarwal007 wrote:

Yeah, It become unwanted now.  

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


More information about the llvm-commits mailing list