forked from OSchip/llvm-project
teach OPC_CheckType to handle MVT::iPTR, down to 2 ppc failures.
llvm-svn: 96752
This commit is contained in:
parent
d09d97cba4
commit
436187c7ed
|
@ -406,10 +406,16 @@ SDNode *SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
|
||||||
case OPC_CheckOpcode:
|
case OPC_CheckOpcode:
|
||||||
if (N->getOpcode() != MatcherTable[MatcherIndex++]) break;
|
if (N->getOpcode() != MatcherTable[MatcherIndex++]) break;
|
||||||
continue;
|
continue;
|
||||||
case OPC_CheckType:
|
case OPC_CheckType: {
|
||||||
if (N.getValueType() !=
|
MVT::SimpleValueType VT =
|
||||||
(MVT::SimpleValueType)MatcherTable[MatcherIndex++]) break;
|
(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;
|
continue;
|
||||||
|
}
|
||||||
case OPC_CheckCondCode:
|
case OPC_CheckCondCode:
|
||||||
if (cast<CondCodeSDNode>(N)->get() !=
|
if (cast<CondCodeSDNode>(N)->get() !=
|
||||||
(ISD::CondCode)MatcherTable[MatcherIndex++]) break;
|
(ISD::CondCode)MatcherTable[MatcherIndex++]) break;
|
||||||
|
|
Loading…
Reference in New Issue