[PATCH] D130444: [DAG] Use recursivelyDeleteUnusedNodes in ReplaceLoadWithPromotedLoad
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 05:32:45 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7920805b27fd: [DAG] Use recursivelyDeleteUnusedNodes in ReplaceLoadWithPromotedLoad (authored by Amaury Séchet <deadalnix at gmail.com>).
Changed prior to commit:
https://reviews.llvm.org/D130444?vs=447161&id=448312#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130444/new/
https://reviews.llvm.org/D130444
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -1263,11 +1263,12 @@
LLVM_DEBUG(dbgs() << "\nReplacing.9 "; Load->dump(&DAG); dbgs() << "\nWith: ";
Trunc.dump(&DAG); dbgs() << '\n');
- WorklistRemover DeadNodes(*this);
+
DAG.ReplaceAllUsesOfValueWith(SDValue(Load, 0), Trunc);
DAG.ReplaceAllUsesOfValueWith(SDValue(Load, 1), SDValue(ExtLoad, 1));
- deleteAndRecombine(Load);
+
AddToWorklist(Trunc.getNode());
+ recursivelyDeleteUnusedNodes(Load);
}
SDValue DAGCombiner::PromoteOperand(SDValue Op, EVT PVT, bool &Replace) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130444.448312.patch
Type: text/x-patch
Size: 734 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220728/b2c3cba5/attachment.bin>
More information about the llvm-commits
mailing list