From: Chris Lattner Date: Wed, 24 Feb 2010 22:52:52 +0000 (+0000) Subject: fix a bug I introduced by checking the wrong node's VT in OPC_CheckChildXType X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=556a1b47e2cbc03561c1a8818f08f424e8322ddd;p=oota-llvm.git 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 --- diff --git a/include/llvm/CodeGen/DAGISelHeader.h b/include/llvm/CodeGen/DAGISelHeader.h index 4babed87ae2..d208acdc745 100644 --- a/include/llvm/CodeGen/DAGISelHeader.h +++ b/include/llvm/CodeGen/DAGISelHeader.h @@ -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;