fix a bug I introduced by checking the wrong node's VT in OPC_CheckChildXType

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-02-24 22:52:52 +00:00
parent 5cf0b6e4a9
commit 556a1b47e2

View File

@ -494,9 +494,10 @@ SDNode *SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
MVT::SimpleValueType VT =
(MVT::SimpleValueType)MatcherTable[MatcherIndex++];
if (N.getOperand(ChildNo).getValueType() != VT) {
EVT ChildVT = N.getOperand(ChildNo).getValueType();
if (ChildVT != VT) {
// Handle the case when VT is iPTR.
if (VT != MVT::iPTR || N.getValueType() != TLI.getPointerTy())
if (VT != MVT::iPTR || ChildVT != TLI.getPointerTy())
break;
}
continue;