@@ -2796,8 +2796,7 @@ static SDValue convertFromScalableVector(EVT VT, SDValue V, SelectionDAG &DAG,
2796
2796
assert(V.getValueType().isScalableVector() &&
2797
2797
"Expected a scalable vector operand!");
2798
2798
SDLoc DL(V);
2799
- SDValue Zero = DAG.getConstant(0, DL, Subtarget.getXLenVT());
2800
- return DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, VT, V, Zero);
2799
+ return DAG.getExtractSubvector(DL, VT, V, 0);
2801
2800
}
2802
2801
2803
2802
/// Return the type of the mask type suitable for masking the provided
@@ -3906,8 +3905,7 @@ static SDValue lowerBuildVectorOfConstants(SDValue Op, SelectionDAG &DAG,
3906
3905
// our final mask.
3907
3906
assert(IntegerViaVecVT == MVT::v1i8 && "Unexpected mask vector type");
3908
3907
Vec = DAG.getBitcast(MVT::v8i1, Vec);
3909
- Vec = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, VT, Vec,
3910
- DAG.getConstant(0, DL, XLenVT));
3908
+ Vec = DAG.getExtractSubvector(DL, VT, Vec, 0);
3911
3909
} else {
3912
3910
// Else we must have produced an integer type with the same size as the
3913
3911
// mask type; bitcast for the final result.
@@ -3970,9 +3968,7 @@ static SDValue lowerBuildVectorOfConstants(SDValue Op, SelectionDAG &DAG,
3970
3968
DAG.getSignedConstant(SplatValue, DL, XLenVT),
3971
3969
DAG.getVectorIdxConstant(0, DL));
3972
3970
if (ViaVecLen != 1)
3973
- Vec = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL,
3974
- MVT::getVectorVT(ViaIntVT, 1), Vec,
3975
- DAG.getConstant(0, DL, XLenVT));
3971
+ Vec = DAG.getExtractSubvector(DL, MVT::getVectorVT(ViaIntVT, 1), Vec, 0);
3976
3972
return DAG.getBitcast(VT, Vec);
3977
3973
}
3978
3974
@@ -4040,9 +4036,8 @@ static SDValue lowerBuildVectorOfConstants(SDValue Op, SelectionDAG &DAG,
4040
4036
DAG.getSignedConstant(SplatValue, DL, XLenVT), ViaVL);
4041
4037
Splat = convertFromScalableVector(ViaVecVT, Splat, DAG, Subtarget);
4042
4038
if (ViaVecLen != RequiredVL)
4043
- Splat = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL,
4044
- MVT::getVectorVT(ViaIntVT, RequiredVL), Splat,
4045
- DAG.getConstant(0, DL, XLenVT));
4039
+ Splat = DAG.getExtractSubvector(
4040
+ DL, MVT::getVectorVT(ViaIntVT, RequiredVL), Splat, 0);
4046
4041
return DAG.getBitcast(VT, Splat);
4047
4042
}
4048
4043
}
@@ -4876,10 +4871,8 @@ static SDValue lowerVECTOR_SHUFFLEAsVSlidedown(const SDLoc &DL, MVT VT,
4876
4871
getVSlidedown(DAG, Subtarget, DL, ContainerVT, DAG.getUNDEF(ContainerVT),
4877
4872
convertToScalableVector(ContainerVT, Src, DAG, Subtarget),
4878
4873
DAG.getConstant(NewMask[0], DL, XLenVT), TrueMask, VL);
4879
- return DAG.getNode(
4880
- ISD::EXTRACT_SUBVECTOR, DL, VT,
4881
- convertFromScalableVector(SrcVT, Slidedown, DAG, Subtarget),
4882
- DAG.getConstant(0, DL, XLenVT));
4874
+ return DAG.getExtractSubvector(
4875
+ DL, VT, convertFromScalableVector(SrcVT, Slidedown, DAG, Subtarget), 0);
4883
4876
}
4884
4877
4885
4878
// Because vslideup leaves the destination elements at the start intact, we can
@@ -11205,8 +11198,7 @@ SDValue RISCVTargetLowering::lowerINSERT_SUBVECTOR(SDValue Op,
11205
11198
assert(VLen);
11206
11199
unsigned Vscale = *VLen / RISCV::RVVBitsPerBlock;
11207
11200
SDValue Insert =
11208
- DAG.getNode(ISD::INSERT_SUBVECTOR, DL, ContainerVecVT, Vec, SubVec,
11209
- DAG.getConstant(OrigIdx / Vscale, DL, XLenVT));
11201
+ DAG.getInsertSubvector(DL, Vec, SubVec, OrigIdx / Vscale);
11210
11202
if (VecVT.isFixedLengthVector())
11211
11203
Insert = convertFromScalableVector(VecVT, Insert, DAG, Subtarget);
11212
11204
return Insert;
@@ -11402,8 +11394,8 @@ SDValue RISCVTargetLowering::lowerEXTRACT_SUBVECTOR(SDValue Op,
11402
11394
if (SubVecVT.isFixedLengthVector()) {
11403
11395
assert(VLen);
11404
11396
unsigned Vscale = *VLen / RISCV::RVVBitsPerBlock;
11405
- Vec = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, ContainerSubVecVT, Vec,
11406
- DAG.getConstant(OrigIdx / Vscale, DL, XLenVT) );
11397
+ Vec =
11398
+ DAG.getExtractSubvector(DL, ContainerSubVecVT, Vec, OrigIdx / Vscale );
11407
11399
return convertFromScalableVector(SubVecVT, Vec, DAG, Subtarget);
11408
11400
}
11409
11401
return Op;
@@ -11430,8 +11422,7 @@ SDValue RISCVTargetLowering::lowerEXTRACT_SUBVECTOR(SDValue Op,
11430
11422
Idx /= *VLen / RISCV::RVVBitsPerBlock;
11431
11423
}
11432
11424
InterSubVT = getLMUL1VT(VecVT);
11433
- Vec = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, InterSubVT, Vec,
11434
- DAG.getConstant(Idx, DL, XLenVT));
11425
+ Vec = DAG.getExtractSubvector(DL, InterSubVT, Vec, Idx);
11435
11426
}
11436
11427
11437
11428
// Slide this vector register down by the desired number of elements in order
0 commit comments