================ @@ -7380,12 +7380,26 @@ bool AArch64DAGToDAGISel::SelectAddrModeIndexedSVE(SDNode *Root, SDValue N, return false; SDValue VScale = N.getOperand(1); - if (VScale.getOpcode() != ISD::VSCALE) + int64_t MulImm = std::numeric_limits<int64_t>::max(); + if (VScale.getOpcode() == ISD::VSCALE) { + MulImm = cast<ConstantSDNode>(VScale.getOperand(0))->getSExtValue(); + } else if (auto C = dyn_cast<ConstantSDNode>(VScale)) { + int64_t ByteOffset = C->getSExtValue(); + const auto KnownVScale = + Subtarget->getSVEVectorSizeInBits() / AArch64::SVEBitsPerBlock; + + if (!KnownVScale || ByteOffset % KnownVScale != 0) + return false; + + MulImm = ByteOffset / KnownVScale; + } else return false; + assert(MulImm != std::numeric_limits<int64_t>::max() && + "Uninitialized MulImm."); + ---------------- rj-jesus wrote:
Sounds good to me, removed. https://github.com/llvm/llvm-project/pull/129732 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits