SDOperand N1, SDOperand N2) {
#ifndef NDEBUG
switch (Opcode) {
+ case ISD::TokenFactor:
+ assert(VT == MVT::Other && N1.getValueType() == MVT::Other &&
+ N2.getValueType() == MVT::Other && "Invalid token factor!");
+ break;
case ISD::AND:
case ISD::OR:
case ISD::XOR:
// Finally, fold operations that do not require constants.
switch (Opcode) {
+ case ISD::TokenFactor:
+ if (N1.getOpcode() == ISD::EntryToken)
+ return N2;
+ if (N2.getOpcode() == ISD::EntryToken)
+ return N1;
+ break;
+
case ISD::AND:
case ISD::OR:
if (SetCCSDNode *LHS = dyn_cast<SetCCSDNode>(N1.Val))