[PATCH] D56719: [DAGCombine] Enable more pre-indexed stores

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 15 12:45:49 PST 2019


efriedma added subscribers: kparzysz, efriedma.
efriedma added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:12644
+    if (BasePtr.getNode()->isPredecessorOf(Val.getNode())) {
+      // Check whether the store is in the final user of the base pointer.
+      for (auto *U : BasePtr.getNode()->uses()) {
----------------
This needs a better comment explaining exactly what cases this is rejecting, and which cases it is accepting.  (I'm not sure I follow the logic here.  What cases need to be rejected for correctness?  Are there cases which could be transformed, but shouldn't be transformed to avoid register copies?)

I'm a bit concerned about performance here. isPredecessorOf is expensive.


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

https://reviews.llvm.org/D56719





More information about the llvm-commits mailing list