[PATCH] D127115: [RFC][DAGCombine] Make sure combined nodes are added back to the worklist in topological order.
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 13:18:15 PDT 2022
barannikov88 added a comment.
@spatel
I'm facing an issue which might be related to the work you are doing.
Suppose I have the following DAG:
A -> B -> C -> D
DAGCominer can optimize C -> D into E, and then A -> B -> E can be optimized further to just F.
If C precedes A in the visit order, this is just fine. However, if A is visited first and then C -> D is combined into E, then A will not be revisited (because it is not immediate successor or predecessor of C), and the pattern A -> B -> E will not be matched.
For this reason I have to match both A -> B -> C -> D and A -> B -> E. Will your patch help with this issue or is it something unrelated?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127115/new/
https://reviews.llvm.org/D127115
More information about the llvm-commits
mailing list