@@ -89,7 +89,7 @@ static cl::opt<bool>
8989
9090// TODO: Support more ops
9191static const unsigned ZvfbfaVPOps[] = {
92- ISD::VP_FNEG, ISD::VP_FABS, ISD::VP_FCOPYSIGN, ISD::EXPERIMENTAL_VP_SPLAT };
92+ ISD::VP_FNEG, ISD::VP_FABS, ISD::VP_FCOPYSIGN};
9393static const unsigned ZvfbfaOps[] = {
9494 ISD::FNEG, ISD::FABS, ISD::FCOPYSIGN, ISD::SPLAT_VECTOR,
9595 ISD::FADD, ISD::FSUB, ISD::FMUL};
@@ -795,8 +795,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
795795 ISD::VP_SMAX, ISD::VP_UMIN, ISD::VP_UMAX,
796796 ISD::VP_ABS, ISD::EXPERIMENTAL_VP_REVERSE, ISD::EXPERIMENTAL_VP_SPLICE,
797797 ISD::VP_SADDSAT, ISD::VP_UADDSAT, ISD::VP_SSUBSAT,
798- ISD::VP_USUBSAT, ISD::VP_CTTZ_ELTS, ISD::VP_CTTZ_ELTS_ZERO_UNDEF,
799- ISD::EXPERIMENTAL_VP_SPLAT};
798+ ISD::VP_USUBSAT, ISD::VP_CTTZ_ELTS, ISD::VP_CTTZ_ELTS_ZERO_UNDEF};
800799
801800 static const unsigned FloatingPointVPOps[] = {
802801 ISD::VP_FADD, ISD::VP_FSUB, ISD::VP_FMUL,
@@ -811,7 +810,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
811810 ISD::VP_FRINT, ISD::VP_FNEARBYINT, ISD::VP_IS_FPCLASS,
812811 ISD::VP_FMINIMUM, ISD::VP_FMAXIMUM, ISD::VP_LRINT,
813812 ISD::VP_LLRINT, ISD::VP_REDUCE_FMINIMUM,
814- ISD::VP_REDUCE_FMAXIMUM, ISD::EXPERIMENTAL_VP_SPLAT };
813+ ISD::VP_REDUCE_FMAXIMUM};
815814
816815 static const unsigned IntegerVecReduceOps[] = {
817816 ISD::VECREDUCE_ADD, ISD::VECREDUCE_AND, ISD::VECREDUCE_OR,
@@ -905,7 +904,6 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
905904
906905 setOperationAction(ISD::EXPERIMENTAL_VP_SPLICE, VT, Custom);
907906 setOperationAction(ISD::EXPERIMENTAL_VP_REVERSE, VT, Custom);
908- setOperationAction(ISD::EXPERIMENTAL_VP_SPLAT, VT, Custom);
909907
910908 setOperationPromotedToType(
911909 ISD::VECTOR_SPLICE, VT,
@@ -1250,12 +1248,10 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
12501248 setOperationAction(ISD::EXPERIMENTAL_VP_REVERSE, VT, Custom);
12511249 MVT EltVT = VT.getVectorElementType();
12521250 if (isTypeLegal(EltVT))
1253- setOperationAction({ISD::SPLAT_VECTOR, ISD::EXPERIMENTAL_VP_SPLAT,
1254- ISD::EXTRACT_VECTOR_ELT},
1251+ setOperationAction({ISD::SPLAT_VECTOR, ISD::EXTRACT_VECTOR_ELT},
12551252 VT, Custom);
12561253 else
1257- setOperationAction({ISD::SPLAT_VECTOR, ISD::EXPERIMENTAL_VP_SPLAT},
1258- EltVT, Custom);
1254+ setOperationAction(ISD::SPLAT_VECTOR, EltVT, Custom);
12591255 setOperationAction({ISD::LOAD, ISD::STORE, ISD::MLOAD, ISD::MSTORE,
12601256 ISD::MGATHER, ISD::MSCATTER, ISD::VP_LOAD,
12611257 ISD::VP_STORE, ISD::EXPERIMENTAL_VP_STRIDED_LOAD,
@@ -1303,7 +1299,6 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
13031299 VT, Custom);
13041300 setOperationAction(ISD::EXPERIMENTAL_VP_SPLICE, VT, Custom);
13051301 setOperationAction(ISD::EXPERIMENTAL_VP_REVERSE, VT, Custom);
1306- setOperationAction(ISD::EXPERIMENTAL_VP_SPLAT, VT, Custom);
13071302
13081303 setOperationAction(ISD::FCOPYSIGN, VT, Legal);
13091304 setOperationAction(ISD::SPLAT_VECTOR, VT, Legal);
@@ -8881,8 +8876,6 @@ SDValue RISCVTargetLowering::LowerOperation(SDValue Op,
88818876 return lowerVPSpliceExperimental(Op, DAG);
88828877 case ISD::EXPERIMENTAL_VP_REVERSE:
88838878 return lowerVPReverseExperimental(Op, DAG);
8884- case ISD::EXPERIMENTAL_VP_SPLAT:
8885- return lowerVPSplatExperimental(Op, DAG);
88868879 case ISD::CLEAR_CACHE: {
88878880 assert(getTargetMachine().getTargetTriple().isOSLinux() &&
88888881 "llvm.clear_cache only needs custom lower on Linux targets");
@@ -14102,47 +14095,6 @@ RISCVTargetLowering::lowerVPSpliceExperimental(SDValue Op,
1410214095 return convertFromScalableVector(VT, Result, DAG, Subtarget);
1410314096}
1410414097
14105- SDValue RISCVTargetLowering::lowerVPSplatExperimental(SDValue Op,
14106- SelectionDAG &DAG) const {
14107- SDLoc DL(Op);
14108- SDValue Val = Op.getOperand(0);
14109- SDValue Mask = Op.getOperand(1);
14110- SDValue VL = Op.getOperand(2);
14111- MVT VT = Op.getSimpleValueType();
14112-
14113- MVT ContainerVT = VT;
14114- if (VT.isFixedLengthVector()) {
14115- ContainerVT = getContainerForFixedLengthVector(VT);
14116- MVT MaskVT = getMaskTypeFor(ContainerVT);
14117- Mask = convertToScalableVector(MaskVT, Mask, DAG, Subtarget);
14118- }
14119-
14120- SDValue Result;
14121- if (VT.getScalarType() == MVT::i1) {
14122- if (auto *C = dyn_cast<ConstantSDNode>(Val)) {
14123- Result =
14124- DAG.getNode(C->isZero() ? RISCVISD::VMCLR_VL : RISCVISD::VMSET_VL, DL,
14125- ContainerVT, VL);
14126- } else {
14127- MVT WidenVT = ContainerVT.changeVectorElementType(MVT::i8);
14128- SDValue LHS =
14129- DAG.getNode(RISCVISD::VMV_V_X_VL, DL, WidenVT, DAG.getUNDEF(WidenVT),
14130- DAG.getZExtOrTrunc(Val, DL, Subtarget.getXLenVT()), VL);
14131- SDValue RHS = DAG.getConstant(0, DL, WidenVT);
14132- Result = DAG.getNode(RISCVISD::SETCC_VL, DL, ContainerVT,
14133- {LHS, RHS, DAG.getCondCode(ISD::SETNE),
14134- DAG.getUNDEF(ContainerVT), Mask, VL});
14135- }
14136- } else {
14137- Result =
14138- lowerScalarSplat(SDValue(), Val, VL, ContainerVT, DL, DAG, Subtarget);
14139- }
14140-
14141- if (!VT.isFixedLengthVector())
14142- return Result;
14143- return convertFromScalableVector(VT, Result, DAG, Subtarget);
14144- }
14145-
1414614098SDValue
1414714099RISCVTargetLowering::lowerVPReverseExperimental(SDValue Op,
1414814100 SelectionDAG &DAG) const {
0 commit comments