diff options
author | Chris Lattner <sabre@nondot.org> | 2010-09-21 20:46:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-09-21 20:46:40 +0000 |
commit | 0bb8b1986588a9a3dfde09ae8c79bdba3f406d82 (patch) | |
tree | 6539ef4beea24a9e7046cde5b58ab2b4a04a784b /llvm/lib/CodeGen/SelectionDAG | |
parent | 5e65dfbb970870142dbcea166ba5344f5a9317e2 (diff) | |
download | bcm5719-llvm-0bb8b1986588a9a3dfde09ae8c79bdba3f406d82.tar.gz bcm5719-llvm-0bb8b1986588a9a3dfde09ae8c79bdba3f406d82.zip |
correct this logic.
llvm-svn: 114474
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 7b2898dcbfb..a754ac2040b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -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)) |