diff options
author | Nirav Dave <niravd@google.com> | 2019-01-31 19:35:14 +0000 |
---|---|---|
committer | Nirav Dave <niravd@google.com> | 2019-01-31 19:35:14 +0000 |
commit | 4061b440575e9e52fd50c8c95bc94aa597f93cc3 (patch) | |
tree | c740179c210ece916770807bee821155a09afb58 /llvm/lib | |
parent | ae527ac603d1ce777521ddc72cb4afdac2de68e6 (diff) | |
download | bcm5719-llvm-4061b440575e9e52fd50c8c95bc94aa597f93cc3.tar.gz bcm5719-llvm-4061b440575e9e52fd50c8c95bc94aa597f93cc3.zip |
[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
llvm-svn: 352784
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index d2e235189ec..1f05a435bbe 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -8465,6 +8465,10 @@ SDValue DAGCombiner::CombineZExtLogicopShiftLoad(SDNode *N) { 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! } |