[PATCH] D127115: [RFC][DAGCombine] Make sure combined nodes are added back to the worklist in topological order.

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 02:28:22 PDT 2022


deadalnix added inline comments.


================
Comment at: llvm/test/CodeGen/ARM/dsp-mlal.ll:39
+; NODSP-NEXT:    bx lr
 entry:
   %conv = sext i32 %b1 to i64
----------------
RKSimon wrote:
> deadalnix wrote:
> > I'm not sure what we want to do there, but we should expect the MERGE_VALUES node to be optimized away, no? Once the DAG is processed fully topologically, this shouldn't be a problem.
> Can you take a look at DAGTypeLegalizer::run to see if we're failing to add nodes there in a topological order please?
I don't think that it is expected that node are added in topological order by the legalizer. The next step after this patch is indeed, to sort topologically the nodes before combining. But doing this at the same time as this one would create an even bigger mess.


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