@@ -56708,10 +56708,11 @@ static SDValue combineGatherScatter(SDNode *N, SelectionDAG &DAG,
56708
56708
SDValue Scale = GorS->getScale();
56709
56709
EVT IndexVT = Index.getValueType();
56710
56710
EVT IndexSVT = IndexVT.getVectorElementType();
56711
+ unsigned IndexWidth = Index.getScalarValueSizeInBits();
56711
56712
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
56713
+ EVT PtrVT = TLI.getPointerTy(DAG.getDataLayout());
56712
56714
56713
56715
if (DCI.isBeforeLegalize()) {
56714
- unsigned IndexWidth = Index.getScalarValueSizeInBits();
56715
56716
// Attempt to move shifted index into the address scale, allows further
56716
56717
// index truncation below.
56717
56718
if (Index.getOpcode() == ISD::SHL && isa<ConstantSDNode>(Scale)) {
@@ -56774,8 +56775,6 @@ static SDValue combineGatherScatter(SDNode *N, SelectionDAG &DAG,
56774
56775
}
56775
56776
}
56776
56777
56777
- EVT PtrVT = TLI.getPointerTy(DAG.getDataLayout());
56778
-
56779
56778
// Try to move splat adders from the index operand to the base
56780
56779
// pointer operand. Taking care to multiply by the scale. We can only do
56781
56780
// this when index element type is the same as the pointer type.
@@ -56823,8 +56822,6 @@ static SDValue combineGatherScatter(SDNode *N, SelectionDAG &DAG,
56823
56822
}
56824
56823
56825
56824
if (DCI.isBeforeLegalizeOps()) {
56826
- unsigned IndexWidth = Index.getScalarValueSizeInBits();
56827
-
56828
56825
// Make sure the index is either i32 or i64
56829
56826
if (IndexWidth != 32 && IndexWidth != 64) {
56830
56827
MVT EltVT = IndexWidth > 32 ? MVT::i64 : MVT::i32;
0 commit comments