teach OPC_CheckType to handle MVT::iPTR, down to 2 ppc failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96752 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-02-21 20:10:43 +00:00
parent 1d4cb41fdd
commit be92e6a0d2

View File

@ -406,10 +406,16 @@ SDNode *SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
case OPC_CheckOpcode:
if (N->getOpcode() != MatcherTable[MatcherIndex++]) break;
continue;
case OPC_CheckType:
if (N.getValueType() !=
(MVT::SimpleValueType)MatcherTable[MatcherIndex++]) break;
case OPC_CheckType: {
MVT::SimpleValueType VT =
(MVT::SimpleValueType)MatcherTable[MatcherIndex++];
if (N.getValueType() != VT) {
// Handle the case when VT is iPTR.
if (VT != MVT::iPTR || N.getValueType() != TLI.getPointerTy())
break;
}
continue;
}
case OPC_CheckCondCode:
if (cast<CondCodeSDNode>(N)->get() !=
(ISD::CondCode)MatcherTable[MatcherIndex++]) break;