[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
Sat Apr 8 07:40:38 PDT 2023


deadalnix added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2433-2439
+    // Peek through any trunc/zext to shift amount type.
+    if ((BinOpcode == ISD::SHL || BinOpcode == ISD::SRA ||
+         BinOpcode == ISD::SRL) &&
+        (Sel.getOpcode() == ISD::TRUNCATE ||
+         Sel.getOpcode() == ISD::ZERO_EXTEND) &&
+        Sel.hasOneUse())
+      Sel = Sel.getOperand(0);
----------------
Shouldn't this come in its own patch?


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