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
This commit is contained in:
Justin Bogner 2016-06-03 18:09:53 +00:00
parent 98df480c8e
commit 1785503dd3
1 changed files with 3 additions and 6 deletions

View File

@ -3365,13 +3365,10 @@ void SelectionDAGISel::SelectCodeCommon(SDNode *NodeToMatch,
nullptr)); nullptr));
} }
} else if (NodeToMatch->getOpcode() != ISD::DELETED_NODE) {
Res = MorphNode(NodeToMatch, TargetOpc, VTList, Ops, EmitNodeInfo);
} else { } else {
// NodeToMatch was eliminated by CSE when the target changed the DAG. assert(NodeToMatch->getOpcode() != ISD::DELETED_NODE &&
// We will visit the equivalent node later. "NodeToMatch was removed partway through selection");
DEBUG(dbgs() << "Node was eliminated by CSE\n"); Res = MorphNode(NodeToMatch, TargetOpc, VTList, Ops, EmitNodeInfo);
return;
} }
// If the node had chain/glue results, update our notion of the current // If the node had chain/glue results, update our notion of the current