@@ -23337,10 +23337,12 @@ static unsigned translateX86FSETCC(ISD::CondCode SetCCOpcode, SDValue &Op0,
2333723337 return SSECC;
2333823338}
2333923339
23340- /// Break a VSETCC 256-bit integer VSETCC into two new 128 ones and then
23340+ /// Break a VSETCC 256/512 -bit vector into two new 128/256 ones and then
2334123341/// concatenate the result back.
2334223342static SDValue splitVSETCC(EVT VT, SDValue LHS, SDValue RHS, ISD::CondCode Cond,
2334323343 SelectionDAG &DAG, const SDLoc &dl) {
23344+ assert(VT.isInteger() && LHS.getValueType() == RHS.getValueType() &&
23345+ "Unsupported VTs!");
2334423346 SDValue CC = DAG.getCondCode(Cond);
2334523347
2334623348 // Extract the LHS Lo/Hi vectors
@@ -23481,26 +23483,25 @@ static SDValue LowerVSETCC(SDValue Op, const X86Subtarget &Subtarget,
2348123483 SDValue CC = Op.getOperand(IsStrict ? 3 : 2);
2348223484 MVT VT = Op->getSimpleValueType(0);
2348323485 ISD::CondCode Cond = cast<CondCodeSDNode>(CC)->get();
23484- bool isFP = Op1 .getSimpleValueType().isFloatingPoint ();
23486+ MVT OpVT = Op0 .getSimpleValueType();
2348523487 SDLoc dl(Op);
2348623488
23487- if (isFP) {
23488- MVT SVT = Op0.getSimpleValueType();
23489- MVT EltVT = SVT.getVectorElementType();
23489+ if (OpVT.isFloatingPoint()) {
23490+ MVT EltVT = OpVT.getVectorElementType();
2349023491 assert(EltVT == MVT::bf16 || EltVT == MVT::f16 || EltVT == MVT::f32 ||
2349123492 EltVT == MVT::f64);
2349223493
2349323494 SDValue Chain = IsStrict ? Op.getOperand(0) : SDValue();
2349423495 if (isSoftF16(EltVT, Subtarget)) {
2349523496 // Break 256-bit FP vector compare into smaller ones.
23496- if (SVT .is256BitVector() && !Subtarget.useAVX512Regs())
23497+ if (OpVT .is256BitVector() && !Subtarget.useAVX512Regs())
2349723498 return splitVSETCC(VT, Op0, Op1, Cond, DAG, dl);
2349823499
2349923500 // Break 512-bit FP vector compare into smaller ones.
23500- if (SVT .is512BitVector())
23501+ if (OpVT .is512BitVector())
2350123502 return splitVSETCC(VT, Op0, Op1, Cond, DAG, dl);
2350223503
23503- MVT NVT = SVT .changeVectorElementType(MVT::f32);
23504+ MVT NVT = OpVT .changeVectorElementType(MVT::f32);
2350423505 if (IsStrict) {
2350523506 Op0 = DAG.getNode(ISD::STRICT_FP_EXTEND, dl, {NVT, MVT::Other},
2350623507 {Chain, Op0});
0 commit comments