[PATCH] D26080: [DAG] Improve loads-from-store forwarding to handle TokenFactor

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 16:53:29 PST 2016


hfinkel accepted this revision.
hfinkel added a reviewer: hfinkel.
hfinkel added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:10256
       ISD::isNormalLoad(N) && !LD->isVolatile()) {
-    if (ISD::isNON_TRUNCStore(Chain.getNode())) {
+    // Either a direct store, or a store off of a TokenFactor can be
+    // forwarded.
----------------
I think this is okay: If the token factor represented dependencies of multiple stores of the same address and type, then the relative order would be undefined, and we'd have other problems.


https://reviews.llvm.org/D26080





More information about the llvm-commits mailing list