diff options
author | Justin Bogner <mail@justinbogner.com> | 2016-06-03 18:09:53 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2016-06-03 18:09:53 +0000 |
commit | 1785503dd3c238f0943e072dea9d0cc794537a61 (patch) | |
tree | 39a170850de31ffabcf9d89f0ce3e85062471e45 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 98df480c8e343aa42d61c0052504b775604e5272 (diff) | |
download | bcm5719-llvm-1785503dd3c238f0943e072dea9d0cc794537a61.tar.gz bcm5719-llvm-1785503dd3c238f0943e072dea9d0cc794537a61.zip |
SDAG: Replace some unreachable code with an assert. NFC
The current node shouldn't be (and isn't) removed partway through
selection.
llvm-svn: 271699
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index bd0c992c4e9..359919e14b2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -3365,13 +3365,10 @@ void SelectionDAGISel::SelectCodeCommon(SDNode *NodeToMatch, nullptr)); } - } else if (NodeToMatch->getOpcode() != ISD::DELETED_NODE) { - Res = MorphNode(NodeToMatch, TargetOpc, VTList, Ops, EmitNodeInfo); } else { - // NodeToMatch was eliminated by CSE when the target changed the DAG. - // We will visit the equivalent node later. - DEBUG(dbgs() << "Node was eliminated by CSE\n"); - return; + assert(NodeToMatch->getOpcode() != ISD::DELETED_NODE && + "NodeToMatch was removed partway through selection"); + Res = MorphNode(NodeToMatch, TargetOpc, VTList, Ops, EmitNodeInfo); } // If the node had chain/glue results, update our notion of the current |