[llvm] [AArch64][SDAG] Fix invalid index into STEP_VECTOR operand (PR #193236)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 08:17:56 PDT 2026


================
@@ -26322,7 +26322,7 @@ static bool findMoreOptimalIndexType(const MaskedGatherScatterSDNode *N,
     SDValue RHS = Index.getOperand(1);
     if (auto *Shift =
             dyn_cast_or_null<ConstantSDNode>(DAG.getSplatValue(RHS))) {
-      int64_t Step = (int64_t)Index.getOperand(0).getConstantOperandVal(1);
+      int64_t Step = (int64_t)Index.getOperand(0).getConstantOperandVal(0);
----------------
david-arm wrote:

Nice bug fix! I have no idea what it would have returned previously. :)

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


More information about the llvm-commits mailing list