SDAG: Clean up a dangling node in HexagonISelDAGToDAG::SelectImpl

When we convert to the void Select interface, leaving unreferenced
nodes around won't be allowed anymore.

Part of llvm.org/pr26808.

llvm-svn: 269355
This commit is contained in:
Justin Bogner 2016-05-12 21:24:23 +00:00
parent 608cb5def6
commit d82025b133

View File

@ -1049,7 +1049,7 @@ SDNode *HexagonDAGToDAGISel::SelectIntrinsicWOChain(SDNode *N) {
if (isValueExtension(V, Bits, U)) {
SDValue R = CurDAG->getNode(N->getOpcode(), SDLoc(N), N->getValueType(0),
N->getOperand(0), U);
ReplaceUses(N, R.getNode());
ReplaceNode(N, R.getNode());
return SelectCode(R.getNode());
}
return SelectCode(N);