[PATCH] D75847: [DAGCombine] Skip PostInc combine with later users

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 03:46:39 PDT 2020


dmgreen added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14189
+        // there are later users which could do it instead.
+        if (isa<MemSDNode>(Use)) {
+          Worklist.push_back(Use);
----------------
Should we also be checking that this Use can use some addressing mode and fold the offset in? Not that it just is a memory operation?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14192
+          if (SDNode::hasPredecessorHelper(N, Visited, Worklist)) {
+            LaterMemOps.insert(cast<MemSDNode>(Use));
+            break;
----------------
Do we need to store LaterMemOps or can we just set TryNext to true?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75847/new/

https://reviews.llvm.org/D75847





More information about the llvm-commits mailing list