Index: lib/Target/X86/X86ISelDAGToDAG.cpp =================================================================== --- lib/Target/X86/X86ISelDAGToDAG.cpp +++ lib/Target/X86/X86ISelDAGToDAG.cpp @@ -2455,6 +2455,7 @@ DEBUG(dbgs() << "=> "; ResHi.getNode()->dump(CurDAG); dbgs() << '\n'); } + CurDAG->RemoveDeadNode(Node); return; } @@ -2639,6 +2640,7 @@ ReplaceUses(SDValue(Node, 1), Result); DEBUG(dbgs() << "=> "; Result.getNode()->dump(CurDAG); dbgs() << '\n'); } + CurDAG->RemoveDeadNode(Node); return; } @@ -2697,6 +2699,7 @@ // one, do not call ReplaceAllUsesWith. ReplaceUses(SDValue(Node, (Opcode == X86ISD::SUB ? 1 : 0)), SDValue(NewNode, 0)); + CurDAG->RemoveDeadNode(Node); return; } @@ -2732,6 +2735,7 @@ // one, do not call ReplaceAllUsesWith. ReplaceUses(SDValue(Node, (Opcode == X86ISD::SUB ? 1 : 0)), SDValue(NewNode, 0)); + CurDAG->RemoveDeadNode(Node); return; } @@ -2752,6 +2756,7 @@ // one, do not call ReplaceAllUsesWith. ReplaceUses(SDValue(Node, (Opcode == X86ISD::SUB ? 1 : 0)), SDValue(NewNode, 0)); + CurDAG->RemoveDeadNode(Node); return; } @@ -2772,6 +2777,7 @@ // one, do not call ReplaceAllUsesWith. ReplaceUses(SDValue(Node, (Opcode == X86ISD::SUB ? 1 : 0)), SDValue(NewNode, 0)); + CurDAG->RemoveDeadNode(Node); return; } }