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 | 77bd88cda5e007c6f4e042fc6b6104c9ae62083b (patch) | |
tree | 1ac9008128f2c3e42b7bb5812b793f30c3a5faed /lib/CodeGen/SelectionDAG | |
parent | bc146b0a4dcee601459eee943b4133d3cf63f1dd (diff) | |
download | external_llvm-77bd88cda5e007c6f4e042fc6b6104c9ae62083b.zip external_llvm-77bd88cda5e007c6f4e042fc6b6104c9ae62083b.tar.gz external_llvm-77bd88cda5e007c6f4e042fc6b6104c9ae62083b.tar.bz2 |
correct this logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 7b2898d..a754ac2 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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)) |