[PATCH] D127392: [AggressiveInstCombine] Combine consecutive loads which are being merged to form a wider load.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 07:41:44 PDT 2022


spatel added inline comments.


================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:694-697
+  // Swap loads if LI1 comes later as we handle only forward loads.
+  // This is done as InstCombine folds lowest node forward loads to reverse.
+  // The implementation will be subsequently extended to handle all reverse
+  // loads.
----------------
I didn't notice this limitation before. "Forward" and "reverse" are referring to the order that the `or` instructions use the loaded values?

I agree that we don't want to complicate the initial implementation any more than necessary, but it might help to see how the backend handles that in DAGCombiner::MatchLoadCombine() (see D133584 for a proposed enhancement to that code).


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

https://reviews.llvm.org/D127392



More information about the llvm-commits mailing list