correct this logic.

llvm-svn: 114474
This commit is contained in:
Chris Lattner 2010-09-21 20:46:40 +00:00
parent 5e65dfbb97
commit 0bb8b19865
1 changed files with 2 additions and 2 deletions

View File

@ -2087,8 +2087,8 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
unsigned RecNo = MatcherTable[MatcherIndex++];
assert(RecNo < RecordedNodes.size() && "Invalid CheckComplexPat");
SDNode *Parent = 0;
if (NodeStack.size() > 1)
Parent = NodeStack[NodeStack.size()-2].getNode();
if (!NodeStack.empty())
Parent = NodeStack[NodeStack.size()-1].getNode();
if (!CheckComplexPattern(NodeToMatch, Parent, RecordedNodes[RecNo], CPNum,
RecordedNodes))