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));
}
} 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