Lines Matching refs:Node
88 SDValue UnrollVSETCC(SDNode *Node);
94 void Expand(SDNode *Node, SmallVectorImpl<SDValue> &Results);
98 void ExpandFP_TO_UINT(SDNode *Node, SmallVectorImpl<SDValue> &Results);
102 void ExpandUINT_TO_FLOAT(SDNode *Node, SmallVectorImpl<SDValue> &Results);
105 SDValue ExpandSEXTINREG(SDNode *Node);
112 SDValue ExpandANY_EXTEND_VECTOR_INREG(SDNode *Node);
119 SDValue ExpandSIGN_EXTEND_VECTOR_INREG(SDNode *Node);
125 SDValue ExpandZERO_EXTEND_VECTOR_INREG(SDNode *Node);
128 SDValue ExpandBSWAP(SDNode *Node);
132 SDValue ExpandVSELECT(SDNode *Node);
133 SDValue ExpandVP_SELECT(SDNode *Node);
134 SDValue ExpandVP_MERGE(SDNode *Node);
135 SDValue ExpandSELECT(SDNode *Node);
138 SDValue ExpandFNEG(SDNode *Node);
139 void ExpandFSUB(SDNode *Node, SmallVectorImpl<SDValue> &Results);
140 void ExpandSETCC(SDNode *Node, SmallVectorImpl<SDValue> &Results);
141 void ExpandBITREVERSE(SDNode *Node, SmallVectorImpl<SDValue> &Results);
142 void ExpandUADDSUBO(SDNode *Node, SmallVectorImpl<SDValue> &Results);
143 void ExpandSADDSUBO(SDNode *Node, SmallVectorImpl<SDValue> &Results);
144 void ExpandMULO(SDNode *Node, SmallVectorImpl<SDValue> &Results);
145 void ExpandFixedPointDiv(SDNode *Node, SmallVectorImpl<SDValue> &Results);
146 void ExpandStrictFPOp(SDNode *Node, SmallVectorImpl<SDValue> &Results);
147 void ExpandREM(SDNode *Node, SmallVectorImpl<SDValue> &Results);
149 void UnrollStrictFPOp(SDNode *Node, SmallVectorImpl<SDValue> &Results);
155 void Promote(SDNode *Node, SmallVectorImpl<SDValue> &Results);
160 void PromoteINT_TO_FP(SDNode *Node, SmallVectorImpl<SDValue> &Results);
166 void PromoteFP_TO_INT(SDNode *Node, SmallVectorImpl<SDValue> &Results);
254 SDNode *Node = DAG.UpdateNodeOperands(Op.getNode(), Ops); in LegalizeOp() local
257 llvm::any_of(Node->values(), [](EVT T) { return T.isVector(); }) || in LegalizeOp()
258 llvm::any_of(Node->op_values(), in LegalizeOp()
261 return TranslateLegalizeResults(Op, Node); in LegalizeOp()
267 return TranslateLegalizeResults(Op, Node); in LegalizeOp()
269 LoadSDNode *LD = cast<LoadSDNode>(Node); in LegalizeOp()
277 StoreSDNode *ST = cast<StoreSDNode>(Node); in LegalizeOp()
285 Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); in LegalizeOp()
294 ValVT = Node->getValueType(0); in LegalizeOp()
297 ValVT = Node->getOperand(1).getValueType(); in LegalizeOp()
298 Action = TLI.getOperationAction(Node->getOpcode(), ValVT); in LegalizeOp()
305 TLI.getStrictFPOperationAction(Node->getOpcode(), ValVT) == in LegalizeOp()
308 if (TLI.getOperationAction(Node->getOpcode(), EltVT) in LegalizeOp()
310 TLI.getStrictFPOperationAction(Node->getOpcode(), EltVT) in LegalizeOp()
413 Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); in LegalizeOp()
423 unsigned Scale = Node->getConstantOperandVal(2); in LegalizeOp()
424 Action = TLI.getFixedPointOperationAction(Node->getOpcode(), in LegalizeOp()
425 Node->getValueType(0), Scale); in LegalizeOp()
443 Action = TLI.getOperationAction(Node->getOpcode(), in LegalizeOp()
444 Node->getOperand(0).getValueType()); in LegalizeOp()
448 Action = TLI.getOperationAction(Node->getOpcode(), in LegalizeOp()
449 Node->getOperand(1).getValueType()); in LegalizeOp()
452 MVT OpVT = Node->getOperand(0).getSimpleValueType(); in LegalizeOp()
453 ISD::CondCode CCCode = cast<CondCodeSDNode>(Node->getOperand(2))->get(); in LegalizeOp()
456 Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); in LegalizeOp()
462 EVT LegalizeVT = LEGALPOS < 0 ? Node->getValueType(-(1 + LEGALPOS)) \ in LegalizeOp()
463 : Node->getOperand(LEGALPOS).getValueType(); \ in LegalizeOp()
465 ISD::CondCode CCCode = cast<CondCodeSDNode>(Node->getOperand(2))->get(); \ in LegalizeOp()
470 Action = TLI.getOperationAction(Node->getOpcode(), LegalizeVT); \ in LegalizeOp()
475 LLVM_DEBUG(dbgs() << "\nLegalizing vector op: "; Node->dump(&DAG)); in LegalizeOp()
484 Promote(Node, ResultVals); in LegalizeOp()
492 if (LowerOperationWrapper(Node, ResultVals)) in LegalizeOp()
498 Expand(Node, ResultVals); in LegalizeOp()
503 return TranslateLegalizeResults(Op, Node); in LegalizeOp()
511 bool VectorLegalizer::LowerOperationWrapper(SDNode *Node, in LowerOperationWrapper() argument
513 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG); in LowerOperationWrapper()
518 if (Res == SDValue(Node, 0)) in LowerOperationWrapper()
523 if (Node->getNumValues() == 1) { in LowerOperationWrapper()
530 assert((Node->getNumValues() == Res->getNumValues()) && in LowerOperationWrapper()
534 for (unsigned I = 0, E = Node->getNumValues(); I != E; ++I) in LowerOperationWrapper()
540 void VectorLegalizer::Promote(SDNode *Node, SmallVectorImpl<SDValue> &Results) { in Promote() argument
543 switch (Node->getOpcode()) { in Promote()
549 PromoteINT_TO_FP(Node, Results); in Promote()
556 PromoteFP_TO_INT(Node, Results); in Promote()
570 assert(Node->getNumValues() == 1 && in Promote()
572 MVT VT = Node->getSimpleValueType(0); in Promote()
573 MVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), VT); in Promote()
574 SDLoc dl(Node); in Promote()
575 SmallVector<SDValue, 4> Operands(Node->getNumOperands()); in Promote()
577 for (unsigned j = 0; j != Node->getNumOperands(); ++j) { in Promote()
578 if (Node->getOperand(j).getValueType().isVector()) in Promote()
579 if (Node->getOperand(j) in Promote()
584 Operands[j] = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(j)); in Promote()
586 Operands[j] = DAG.getNode(ISD::BITCAST, dl, NVT, Node->getOperand(j)); in Promote()
588 Operands[j] = Node->getOperand(j); in Promote()
592 DAG.getNode(Node->getOpcode(), dl, NVT, Operands, Node->getFlags()); in Promote()
604 void VectorLegalizer::PromoteINT_TO_FP(SDNode *Node, in PromoteINT_TO_FP() argument
608 bool IsStrict = Node->isStrictFPOpcode(); in PromoteINT_TO_FP()
609 MVT VT = Node->getOperand(IsStrict ? 1 : 0).getSimpleValueType(); in PromoteINT_TO_FP()
610 MVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), VT); in PromoteINT_TO_FP()
614 SDLoc dl(Node); in PromoteINT_TO_FP()
615 SmallVector<SDValue, 4> Operands(Node->getNumOperands()); in PromoteINT_TO_FP()
617 unsigned Opc = (Node->getOpcode() == ISD::UINT_TO_FP || in PromoteINT_TO_FP()
618 Node->getOpcode() == ISD::STRICT_UINT_TO_FP) in PromoteINT_TO_FP()
621 for (unsigned j = 0; j != Node->getNumOperands(); ++j) { in PromoteINT_TO_FP()
622 if (Node->getOperand(j).getValueType().isVector()) in PromoteINT_TO_FP()
623 Operands[j] = DAG.getNode(Opc, dl, NVT, Node->getOperand(j)); in PromoteINT_TO_FP()
625 Operands[j] = Node->getOperand(j); in PromoteINT_TO_FP()
629 SDValue Res = DAG.getNode(Node->getOpcode(), dl, in PromoteINT_TO_FP()
630 {Node->getValueType(0), MVT::Other}, Operands); in PromoteINT_TO_FP()
637 DAG.getNode(Node->getOpcode(), dl, Node->getValueType(0), Operands); in PromoteINT_TO_FP()
645 void VectorLegalizer::PromoteFP_TO_INT(SDNode *Node, in PromoteFP_TO_INT() argument
647 MVT VT = Node->getSimpleValueType(0); in PromoteFP_TO_INT()
648 MVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), VT); in PromoteFP_TO_INT()
649 bool IsStrict = Node->isStrictFPOpcode(); in PromoteFP_TO_INT()
653 unsigned NewOpc = Node->getOpcode(); in PromoteFP_TO_INT()
664 SDLoc dl(Node); in PromoteFP_TO_INT()
668 {Node->getOperand(0), Node->getOperand(1)}); in PromoteFP_TO_INT()
671 Promoted = DAG.getNode(NewOpc, dl, NVT, Node->getOperand(0)); in PromoteFP_TO_INT()
676 if (Node->getOpcode() == ISD::FP_TO_UINT || in PromoteFP_TO_INT()
677 Node->getOpcode() == ISD::STRICT_FP_TO_UINT) in PromoteFP_TO_INT()
701 void VectorLegalizer::Expand(SDNode *Node, SmallVectorImpl<SDValue> &Results) { in Expand() argument
702 switch (Node->getOpcode()) { in Expand()
704 std::pair<SDValue, SDValue> Tmp = ExpandLoad(Node); in Expand()
710 Results.push_back(ExpandStore(Node)); in Expand()
713 for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) in Expand()
714 Results.push_back(Node->getOperand(i)); in Expand()
717 Results.push_back(ExpandSEXTINREG(Node)); in Expand()
720 Results.push_back(ExpandANY_EXTEND_VECTOR_INREG(Node)); in Expand()
723 Results.push_back(ExpandSIGN_EXTEND_VECTOR_INREG(Node)); in Expand()
726 Results.push_back(ExpandZERO_EXTEND_VECTOR_INREG(Node)); in Expand()
729 Results.push_back(ExpandBSWAP(Node)); in Expand()
732 Results.push_back(ExpandVSELECT(Node)); in Expand()
735 Results.push_back(ExpandVP_SELECT(Node)); in Expand()
738 Results.push_back(ExpandSELECT(Node)); in Expand()
741 if (Node->getValueType(0).isScalableVector()) { in Expand()
743 DAG.getDataLayout(), *DAG.getContext(), Node->getValueType(0)); in Expand()
745 DAG.getNode(ISD::SETCC, SDLoc(Node), CondVT, Node->getOperand(0), in Expand()
746 Node->getOperand(1), Node->getOperand(4)); in Expand()
747 Results.push_back(DAG.getSelect(SDLoc(Node), Node->getValueType(0), SetCC, in Expand()
748 Node->getOperand(2), in Expand()
749 Node->getOperand(3))); in Expand()
755 ExpandFP_TO_UINT(Node, Results); in Expand()
758 ExpandUINT_TO_FLOAT(Node, Results); in Expand()
761 Results.push_back(ExpandFNEG(Node)); in Expand()
764 ExpandFSUB(Node, Results); in Expand()
768 ExpandSETCC(Node, Results); in Expand()
771 if (SDValue Expanded = TLI.expandABS(Node, DAG)) { in Expand()
777 ExpandBITREVERSE(Node, Results); in Expand()
780 if (SDValue Expanded = TLI.expandCTPOP(Node, DAG)) { in Expand()
787 if (SDValue Expanded = TLI.expandCTLZ(Node, DAG)) { in Expand()
794 if (SDValue Expanded = TLI.expandCTTZ(Node, DAG)) { in Expand()
801 if (SDValue Expanded = TLI.expandFunnelShift(Node, DAG)) { in Expand()
808 if (SDValue Expanded = TLI.expandROT(Node, false /*AllowVectorOps*/, DAG)) { in Expand()
815 if (SDValue Expanded = TLI.expandFMINNUM_FMAXNUM(Node, DAG)) { in Expand()
824 if (SDValue Expanded = TLI.expandIntMINMAX(Node, DAG)) { in Expand()
831 ExpandUADDSUBO(Node, Results); in Expand()
835 ExpandSADDSUBO(Node, Results); in Expand()
839 ExpandMULO(Node, Results); in Expand()
845 if (SDValue Expanded = TLI.expandAddSubSat(Node, DAG)) { in Expand()
853 if (Node->getValueType(0).isScalableVector()) { in Expand()
854 if (SDValue Expanded = TLI.expandFP_TO_INT_SAT(Node, DAG)) { in Expand()
862 if (SDValue Expanded = TLI.expandFixedPointMul(Node, DAG)) { in Expand()
876 ExpandFixedPointDiv(Node, Results); in Expand()
884 ExpandStrictFPOp(Node, Results); in Expand()
899 Results.push_back(TLI.expandVecReduce(Node, DAG)); in Expand()
903 Results.push_back(TLI.expandVecReduceSeq(Node, DAG)); in Expand()
907 ExpandREM(Node, Results); in Expand()
910 Results.push_back(ExpandVP_MERGE(Node)); in Expand()
914 Results.push_back(DAG.UnrollVectorOp(Node)); in Expand()
917 SDValue VectorLegalizer::ExpandSELECT(SDNode *Node) { in ExpandSELECT() argument
921 EVT VT = Node->getValueType(0); in ExpandSELECT()
922 SDLoc DL(Node); in ExpandSELECT()
924 SDValue Mask = Node->getOperand(0); in ExpandSELECT()
925 SDValue Op1 = Node->getOperand(1); in ExpandSELECT()
926 SDValue Op2 = Node->getOperand(2); in ExpandSELECT()
945 return DAG.UnrollVectorOp(Node); in ExpandSELECT()
973 return DAG.getNode(ISD::BITCAST, DL, Node->getValueType(0), Val); in ExpandSELECT()
976 SDValue VectorLegalizer::ExpandSEXTINREG(SDNode *Node) { in ExpandSEXTINREG() argument
977 EVT VT = Node->getValueType(0); in ExpandSEXTINREG()
982 return DAG.UnrollVectorOp(Node); in ExpandSEXTINREG()
984 SDLoc DL(Node); in ExpandSEXTINREG()
985 EVT OrigTy = cast<VTSDNode>(Node->getOperand(1))->getVT(); in ExpandSEXTINREG()
991 SDValue Op = DAG.getNode(ISD::SHL, DL, VT, Node->getOperand(0), ShiftSz); in ExpandSEXTINREG()
997 SDValue VectorLegalizer::ExpandANY_EXTEND_VECTOR_INREG(SDNode *Node) { in ExpandANY_EXTEND_VECTOR_INREG() argument
998 SDLoc DL(Node); in ExpandANY_EXTEND_VECTOR_INREG()
999 EVT VT = Node->getValueType(0); in ExpandANY_EXTEND_VECTOR_INREG()
1001 SDValue Src = Node->getOperand(0); in ExpandANY_EXTEND_VECTOR_INREG()
1032 SDValue VectorLegalizer::ExpandSIGN_EXTEND_VECTOR_INREG(SDNode *Node) { in ExpandSIGN_EXTEND_VECTOR_INREG() argument
1033 SDLoc DL(Node); in ExpandSIGN_EXTEND_VECTOR_INREG()
1034 EVT VT = Node->getValueType(0); in ExpandSIGN_EXTEND_VECTOR_INREG()
1035 SDValue Src = Node->getOperand(0); in ExpandSIGN_EXTEND_VECTOR_INREG()
1056 SDValue VectorLegalizer::ExpandZERO_EXTEND_VECTOR_INREG(SDNode *Node) { in ExpandZERO_EXTEND_VECTOR_INREG() argument
1057 SDLoc DL(Node); in ExpandZERO_EXTEND_VECTOR_INREG()
1058 EVT VT = Node->getValueType(0); in ExpandZERO_EXTEND_VECTOR_INREG()
1060 SDValue Src = Node->getOperand(0); in ExpandZERO_EXTEND_VECTOR_INREG()
1099 SDValue VectorLegalizer::ExpandBSWAP(SDNode *Node) { in ExpandBSWAP() argument
1100 EVT VT = Node->getValueType(0); in ExpandBSWAP()
1104 return TLI.expandBSWAP(Node, DAG); in ExpandBSWAP()
1113 SDLoc DL(Node); in ExpandBSWAP()
1114 SDValue Op = DAG.getNode(ISD::BITCAST, DL, ByteVT, Node->getOperand(0)); in ExpandBSWAP()
1125 return TLI.expandBSWAP(Node, DAG); in ExpandBSWAP()
1128 return DAG.UnrollVectorOp(Node); in ExpandBSWAP()
1131 void VectorLegalizer::ExpandBITREVERSE(SDNode *Node, in ExpandBITREVERSE() argument
1133 EVT VT = Node->getValueType(0); in ExpandBITREVERSE()
1137 Results.push_back(TLI.expandBITREVERSE(Node, DAG)); in ExpandBITREVERSE()
1143 SDValue Tmp = DAG.UnrollVectorOp(Node); in ExpandBITREVERSE()
1163 SDLoc DL(Node); in ExpandBITREVERSE()
1164 SDValue Op = DAG.getNode(ISD::BITCAST, DL, ByteVT, Node->getOperand(0)); in ExpandBITREVERSE()
1180 Results.push_back(TLI.expandBITREVERSE(Node, DAG)); in ExpandBITREVERSE()
1185 SDValue Tmp = DAG.UnrollVectorOp(Node); in ExpandBITREVERSE()
1189 SDValue VectorLegalizer::ExpandVSELECT(SDNode *Node) { in ExpandVSELECT() argument
1192 SDLoc DL(Node); in ExpandVSELECT()
1194 SDValue Mask = Node->getOperand(0); in ExpandVSELECT()
1195 SDValue Op1 = Node->getOperand(1); in ExpandVSELECT()
1196 SDValue Op2 = Node->getOperand(2); in ExpandVSELECT()
1207 return DAG.UnrollVectorOp(Node); in ExpandVSELECT()
1217 return DAG.UnrollVectorOp(Node); in ExpandVSELECT()
1223 return DAG.UnrollVectorOp(Node); in ExpandVSELECT()
1236 return DAG.getNode(ISD::BITCAST, DL, Node->getValueType(0), Val); in ExpandVSELECT()
1239 SDValue VectorLegalizer::ExpandVP_SELECT(SDNode *Node) { in ExpandVP_SELECT() argument
1242 SDLoc DL(Node); in ExpandVP_SELECT()
1244 SDValue Mask = Node->getOperand(0); in ExpandVP_SELECT()
1245 SDValue Op1 = Node->getOperand(1); in ExpandVP_SELECT()
1246 SDValue Op2 = Node->getOperand(2); in ExpandVP_SELECT()
1247 SDValue EVL = Node->getOperand(3); in ExpandVP_SELECT()
1256 return DAG.UnrollVectorOp(Node); in ExpandVP_SELECT()
1260 return DAG.UnrollVectorOp(Node); in ExpandVP_SELECT()
1270 SDValue VectorLegalizer::ExpandVP_MERGE(SDNode *Node) { in ExpandVP_MERGE() argument
1275 SDLoc DL(Node); in ExpandVP_MERGE()
1277 SDValue Mask = Node->getOperand(0); in ExpandVP_MERGE()
1278 SDValue Op1 = Node->getOperand(1); in ExpandVP_MERGE()
1279 SDValue Op2 = Node->getOperand(2); in ExpandVP_MERGE()
1280 SDValue EVL = Node->getOperand(3); in ExpandVP_MERGE()
1294 return DAG.UnrollVectorOp(Node); in ExpandVP_MERGE()
1300 return DAG.UnrollVectorOp(Node); in ExpandVP_MERGE()
1309 return DAG.getSelect(DL, Node->getValueType(0), FullMask, Op1, Op2); in ExpandVP_MERGE()
1312 void VectorLegalizer::ExpandFP_TO_UINT(SDNode *Node, in ExpandFP_TO_UINT() argument
1316 if (TLI.expandFP_TO_UINT(Node, Result, Chain, DAG)) { in ExpandFP_TO_UINT()
1318 if (Node->isStrictFPOpcode()) in ExpandFP_TO_UINT()
1324 if (Node->isStrictFPOpcode()) { in ExpandFP_TO_UINT()
1325 UnrollStrictFPOp(Node, Results); in ExpandFP_TO_UINT()
1329 Results.push_back(DAG.UnrollVectorOp(Node)); in ExpandFP_TO_UINT()
1332 void VectorLegalizer::ExpandUINT_TO_FLOAT(SDNode *Node, in ExpandUINT_TO_FLOAT() argument
1334 bool IsStrict = Node->isStrictFPOpcode(); in ExpandUINT_TO_FLOAT()
1336 SDValue Src = Node->getOperand(OpNo); in ExpandUINT_TO_FLOAT()
1338 SDLoc DL(Node); in ExpandUINT_TO_FLOAT()
1343 if (TLI.expandUINT_TO_FP(Node, Result, Chain, DAG)) { in ExpandUINT_TO_FLOAT()
1357 UnrollStrictFPOp(Node, Results); in ExpandUINT_TO_FLOAT()
1361 Results.push_back(DAG.UnrollVectorOp(Node)); in ExpandUINT_TO_FLOAT()
1379 DAG.getConstantFP(1ULL << (BW / 2), DL, Node->getValueType(0)); in ExpandUINT_TO_FLOAT()
1390 {Node->getValueType(0), MVT::Other}, in ExpandUINT_TO_FLOAT()
1391 {Node->getOperand(0), HI}); in ExpandUINT_TO_FLOAT()
1392 fHI = DAG.getNode(ISD::STRICT_FMUL, DL, {Node->getValueType(0), MVT::Other}, in ExpandUINT_TO_FLOAT()
1395 {Node->getValueType(0), MVT::Other}, in ExpandUINT_TO_FLOAT()
1396 {Node->getOperand(0), LO}); in ExpandUINT_TO_FLOAT()
1403 DAG.getNode(ISD::STRICT_FADD, DL, {Node->getValueType(0), MVT::Other}, in ExpandUINT_TO_FLOAT()
1414 SDValue fHI = DAG.getNode(ISD::SINT_TO_FP, DL, Node->getValueType(0), HI); in ExpandUINT_TO_FLOAT()
1415 fHI = DAG.getNode(ISD::FMUL, DL, Node->getValueType(0), fHI, TWOHW); in ExpandUINT_TO_FLOAT()
1416 SDValue fLO = DAG.getNode(ISD::SINT_TO_FP, DL, Node->getValueType(0), LO); in ExpandUINT_TO_FLOAT()
1420 DAG.getNode(ISD::FADD, DL, Node->getValueType(0), fHI, fLO)); in ExpandUINT_TO_FLOAT()
1423 SDValue VectorLegalizer::ExpandFNEG(SDNode *Node) { in ExpandFNEG() argument
1424 if (TLI.isOperationLegalOrCustom(ISD::FSUB, Node->getValueType(0))) { in ExpandFNEG()
1425 SDLoc DL(Node); in ExpandFNEG()
1426 SDValue Zero = DAG.getConstantFP(-0.0, DL, Node->getValueType(0)); in ExpandFNEG()
1428 return DAG.getNode(ISD::FSUB, DL, Node->getValueType(0), Zero, in ExpandFNEG()
1429 Node->getOperand(0)); in ExpandFNEG()
1431 return DAG.UnrollVectorOp(Node); in ExpandFNEG()
1434 void VectorLegalizer::ExpandFSUB(SDNode *Node, in ExpandFSUB() argument
1439 EVT VT = Node->getValueType(0); in ExpandFSUB()
1444 SDValue Tmp = DAG.UnrollVectorOp(Node); in ExpandFSUB()
1448 void VectorLegalizer::ExpandSETCC(SDNode *Node, in ExpandSETCC() argument
1451 bool IsVP = Node->getOpcode() == ISD::VP_SETCC; in ExpandSETCC()
1452 SDLoc dl(Node); in ExpandSETCC()
1453 MVT OpVT = Node->getOperand(0).getSimpleValueType(); in ExpandSETCC()
1454 ISD::CondCode CCCode = cast<CondCodeSDNode>(Node->getOperand(2))->get(); in ExpandSETCC()
1457 Results.push_back(UnrollVSETCC(Node)); in ExpandSETCC()
1462 SDValue LHS = Node->getOperand(0); in ExpandSETCC()
1463 SDValue RHS = Node->getOperand(1); in ExpandSETCC()
1464 SDValue CC = Node->getOperand(2); in ExpandSETCC()
1467 Mask = Node->getOperand(3); in ExpandSETCC()
1468 EVL = Node->getOperand(4); in ExpandSETCC()
1472 TLI.LegalizeSetCCCondCode(DAG, Node->getValueType(0), LHS, RHS, CC, Mask, in ExpandSETCC()
1480 LHS = DAG.getNode(ISD::SETCC, dl, Node->getValueType(0), LHS, RHS, CC, in ExpandSETCC()
1481 Node->getFlags()); in ExpandSETCC()
1483 LHS = DAG.getNode(ISD::VP_SETCC, dl, Node->getValueType(0), in ExpandSETCC()
1484 {LHS, RHS, CC, Mask, EVL}, Node->getFlags()); in ExpandSETCC()
1498 EVT VT = Node->getValueType(0); in ExpandSETCC()
1503 LHS->setFlags(Node->getFlags()); in ExpandSETCC()
1509 void VectorLegalizer::ExpandUADDSUBO(SDNode *Node, in ExpandUADDSUBO() argument
1512 TLI.expandUADDSUBO(Node, Result, Overflow, DAG); in ExpandUADDSUBO()
1517 void VectorLegalizer::ExpandSADDSUBO(SDNode *Node, in ExpandSADDSUBO() argument
1520 TLI.expandSADDSUBO(Node, Result, Overflow, DAG); in ExpandSADDSUBO()
1525 void VectorLegalizer::ExpandMULO(SDNode *Node, in ExpandMULO() argument
1528 if (!TLI.expandMULO(Node, Result, Overflow, DAG)) in ExpandMULO()
1529 std::tie(Result, Overflow) = DAG.UnrollVectorOverflowOp(Node); in ExpandMULO()
1535 void VectorLegalizer::ExpandFixedPointDiv(SDNode *Node, in ExpandFixedPointDiv() argument
1537 SDNode *N = Node; in ExpandFixedPointDiv()
1543 void VectorLegalizer::ExpandStrictFPOp(SDNode *Node, in ExpandStrictFPOp() argument
1545 if (Node->getOpcode() == ISD::STRICT_UINT_TO_FP) { in ExpandStrictFPOp()
1546 ExpandUINT_TO_FLOAT(Node, Results); in ExpandStrictFPOp()
1549 if (Node->getOpcode() == ISD::STRICT_FP_TO_UINT) { in ExpandStrictFPOp()
1550 ExpandFP_TO_UINT(Node, Results); in ExpandStrictFPOp()
1554 UnrollStrictFPOp(Node, Results); in ExpandStrictFPOp()
1557 void VectorLegalizer::ExpandREM(SDNode *Node, in ExpandREM() argument
1559 assert((Node->getOpcode() == ISD::SREM || Node->getOpcode() == ISD::UREM) && in ExpandREM()
1563 if (!TLI.expandREM(Node, Result, DAG)) in ExpandREM()
1564 Result = DAG.UnrollVectorOp(Node); in ExpandREM()
1568 void VectorLegalizer::UnrollStrictFPOp(SDNode *Node, in UnrollStrictFPOp() argument
1570 EVT VT = Node->getValueType(0); in UnrollStrictFPOp()
1573 unsigned NumOpers = Node->getNumOperands(); in UnrollStrictFPOp()
1577 if (Node->getOpcode() == ISD::STRICT_FSETCC || in UnrollStrictFPOp()
1578 Node->getOpcode() == ISD::STRICT_FSETCCS) in UnrollStrictFPOp()
1583 SDValue Chain = Node->getOperand(0); in UnrollStrictFPOp()
1584 SDLoc dl(Node); in UnrollStrictFPOp()
1597 SDValue Oper = Node->getOperand(j); in UnrollStrictFPOp()
1607 SDValue ScalarOp = DAG.getNode(Node->getOpcode(), dl, ValueVTs, Opers); in UnrollStrictFPOp()
1611 if (Node->getOpcode() == ISD::STRICT_FSETCC || in UnrollStrictFPOp()
1612 Node->getOpcode() == ISD::STRICT_FSETCCS) in UnrollStrictFPOp()
1628 SDValue VectorLegalizer::UnrollVSETCC(SDNode *Node) { in UnrollVSETCC() argument
1629 EVT VT = Node->getValueType(0); in UnrollVSETCC()
1632 SDValue LHS = Node->getOperand(0); in UnrollVSETCC()
1633 SDValue RHS = Node->getOperand(1); in UnrollVSETCC()
1634 SDValue CC = Node->getOperand(2); in UnrollVSETCC()
1636 SDLoc dl(Node); in UnrollVSETCC()