ConstraintType = SDTCisVTSmallerThanOp;
x.SDTCisVTSmallerThanOp_Info.OtherOperandNum =
R->getValueAsInt("OtherOperandNum");
+ } else if (R->isSubClassOf("SDTCisOpSmallerThanOp")) {
+ ConstraintType = SDTCisOpSmallerThanOp;
+ x.SDTCisOpSmallerThanOp_Info.BigOperandNum =
+ R->getValueAsInt("BigOperandNum");
} else {
std::cerr << "Unrecognized SDTypeConstraint '" << R->getName() << "'!\n";
exit(1);
OtherNode->UpdateNodeType(MVT::Other, TP); // Throw an error.
return false;
}
+ case SDTCisOpSmallerThanOp: {
+ // TODO
+ return false;
+ }
}
return false;
}
unsigned OperandNo; // The operand # this constraint applies to.
enum {
- SDTCisVT, SDTCisInt, SDTCisFP, SDTCisSameAs, SDTCisVTSmallerThanOp
+ SDTCisVT, SDTCisInt, SDTCisFP, SDTCisSameAs, SDTCisVTSmallerThanOp,
+ SDTCisOpSmallerThanOp
} ConstraintType;
union { // The discriminated union.
struct {
unsigned OtherOperandNum;
} SDTCisVTSmallerThanOp_Info;
+ struct {
+ unsigned BigOperandNum;
+ } SDTCisOpSmallerThanOp_Info;
} x;
/// ApplyTypeConstraint - Given a node in a pattern, apply this type