OPC_CheckOpcode,
OPC_SwitchOpcode,
OPC_CheckType,
+ OPC_CheckTypeRes,
OPC_SwitchType,
OPC_CheckChild0Type, OPC_CheckChild1Type, OPC_CheckChild2Type,
OPC_CheckChild3Type, OPC_CheckChild4Type, OPC_CheckChild5Type,
Result = !::CheckType(Table, Index, N, SDISel.TLI,
SDISel.CurDAG->getDataLayout());
return Index;
+ case SelectionDAGISel::OPC_CheckTypeRes: {
+ unsigned Res = Table[Index++];
+ Result = !::CheckType(Table, Index, N.getValue(Res), SDISel.TLI,
+ SDISel.CurDAG->getDataLayout());
+ return Index;
+ }
case SelectionDAGISel::OPC_CheckChild0Type:
case SelectionDAGISel::OPC_CheckChild1Type:
case SelectionDAGISel::OPC_CheckChild2Type:
break;
continue;
+ case OPC_CheckTypeRes: {
+ unsigned Res = MatcherTable[MatcherIndex++];
+ if (!::CheckType(MatcherTable, MatcherIndex, N.getValue(Res), TLI,
+ CurDAG->getDataLayout()))
+ break;
+ continue;
+ }
+
case OPC_SwitchOpcode: {
unsigned CurNodeOpcode = N.getOpcode();
unsigned SwitchStart = MatcherIndex-1; (void)SwitchStart;
}
case Matcher::CheckType:
- assert(cast<CheckTypeMatcher>(N)->getResNo() == 0 &&
- "FIXME: Add support for CheckType of resno != 0");
- OS << "OPC_CheckType, "
- << getEnumName(cast<CheckTypeMatcher>(N)->getType()) << ",\n";
- return 2;
+ if (cast<CheckTypeMatcher>(N)->getResNo() == 0) {
+ OS << "OPC_CheckType, "
+ << getEnumName(cast<CheckTypeMatcher>(N)->getType()) << ",\n";
+ return 2;
+ }
+ OS << "OPC_CheckTypeRes, " << cast<CheckTypeMatcher>(N)->getResNo()
+ << ", " << getEnumName(cast<CheckTypeMatcher>(N)->getType()) << ",\n";
+ return 3;
case Matcher::CheckChildType:
OS << "OPC_CheckChild"