[llvm] r352784 - [DAG] Aggressively cleanup dangling node in CombineZExtLogicopShiftLoad.
Nirav Dave via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 31 11:35:14 PST 2019
Author: niravd
Date: Thu Jan 31 11:35:14 2019
New Revision: 352784
URL: http://llvm.org/viewvc/llvm-project?rev=352784&view=rev
Log:
[DAG] Aggressively cleanup dangling node in CombineZExtLogicopShiftLoad.
While dangling nodes will eventually be pruned when they are
considered, leaving them disables combines requiring single-use.
Reviewers: Carrot, spatel, craig.topper, RKSimon, efriedma
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D57520
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=352784&r1=352783&r2=352784&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Jan 31 11:35:14 2019
@@ -8465,6 +8465,10 @@ SDValue DAGCombiner::CombineZExtLogicopS
Load->getValueType(0), ExtLoad);
CombineTo(Load, Trunc, ExtLoad.getValue(1));
}
+
+ // N0 is dead at this point.
+ recursivelyDeleteUnusedNodes(N0.getNode());
+
return SDValue(N,0); // Return N so it doesn't get rechecked!
}
More information about the llvm-commits
mailing list