@@ -822,11 +822,11 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
822
822
823
823
// TODO: support more ops.
824
824
static const unsigned ZvfhminPromoteOps[] = {
825
- ISD::FMINNUM, ISD::FMAXNUM, ISD::FADD, ISD::FSUB,
826
- ISD::FMUL, ISD::FMA, ISD::FDIV, ISD::FSQRT,
827
- ISD::FABS, ISD::FNEG, ISD::FCOPYSIGN, ISD::FCEIL,
828
- ISD::FFLOOR, ISD::FROUND, ISD::FROUNDEVEN, ISD::FRINT,
829
- ISD::FNEARBYINT, ISD::IS_FPCLASS, ISD::SPLAT_VECTOR};
825
+ ISD::FMINNUM, ISD::FMAXNUM, ISD::FADD, ISD::FSUB,
826
+ ISD::FMUL, ISD::FMA, ISD::FDIV, ISD::FSQRT,
827
+ ISD::FABS, ISD::FNEG, ISD::FCOPYSIGN, ISD::FCEIL,
828
+ ISD::FFLOOR, ISD::FROUND, ISD::FROUNDEVEN, ISD::FRINT,
829
+ ISD::FNEARBYINT, ISD::IS_FPCLASS, ISD::SPLAT_VECTOR, ISD::SETCC };
830
830
831
831
// TODO: support more vp ops.
832
832
static const unsigned ZvfhminPromoteVPOps[] = {
@@ -837,7 +837,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
837
837
ISD::VP_FMINNUM, ISD::VP_FMAXNUM, ISD::VP_FCEIL,
838
838
ISD::VP_FFLOOR, ISD::VP_FROUND, ISD::VP_FROUNDEVEN,
839
839
ISD::VP_FCOPYSIGN, ISD::VP_FROUNDTOZERO, ISD::VP_FRINT,
840
- ISD::VP_FNEARBYINT};
840
+ ISD::VP_FNEARBYINT, ISD::VP_SETCC };
841
841
842
842
// Sets common operation actions on RVV floating-point vector types.
843
843
const auto SetCommonVFPActions = [&](MVT VT) {
@@ -5392,6 +5392,11 @@ static SDValue SplitVPOp(SDValue Op, SelectionDAG &DAG) {
5392
5392
DAG.SplitEVL(Op.getOperand(j), Op.getValueType(), DL);
5393
5393
continue;
5394
5394
}
5395
+ if (!Op.getOperand(j).getValueType().isVector()) {
5396
+ LoOperands[j] = Op.getOperand(j);
5397
+ HiOperands[j] = Op.getOperand(j);
5398
+ continue;
5399
+ }
5395
5400
std::tie(LoOperands[j], HiOperands[j]) =
5396
5401
DAG.SplitVector(Op.getOperand(j), DL);
5397
5402
}
@@ -6079,6 +6084,11 @@ SDValue RISCVTargetLowering::LowerOperation(SDValue Op,
6079
6084
return DAG.getSetCC(DL, VT, RHS, LHS, CCVal);
6080
6085
}
6081
6086
6087
+ if (Op.getOperand(0).getSimpleValueType() == MVT::nxv32f16 &&
6088
+ (Subtarget.hasVInstructionsF16Minimal() &&
6089
+ !Subtarget.hasVInstructionsF16()))
6090
+ return SplitVectorOp(Op, DAG);
6091
+
6082
6092
return lowerFixedLengthVectorSetccToRVV(Op, DAG);
6083
6093
}
6084
6094
case ISD::ADD:
@@ -6246,6 +6256,10 @@ SDValue RISCVTargetLowering::LowerOperation(SDValue Op,
6246
6256
case ISD::VP_FP_TO_UINT:
6247
6257
return lowerVPFPIntConvOp(Op, DAG);
6248
6258
case ISD::VP_SETCC:
6259
+ if (Op.getOperand(0).getSimpleValueType() == MVT::nxv32f16 &&
6260
+ (Subtarget.hasVInstructionsF16Minimal() &&
6261
+ !Subtarget.hasVInstructionsF16()))
6262
+ return SplitVPOp(Op, DAG);
6249
6263
if (Op.getOperand(0).getSimpleValueType().getVectorElementType() == MVT::i1)
6250
6264
return lowerVPSetCCMaskOp(Op, DAG);
6251
6265
[[fallthrough]];
0 commit comments