[PATCH] D26149: [DAGCombiner] Match load by bytes idiom and fold it into a single load

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 08:36:49 PST 2021


spatel added a comment.

In D26149#3130357 <https://reviews.llvm.org/D26149#3130357>, @Joshua-401 wrote:

> Did you consider doing the load combine at IR level? I'm now trying to combine loads at IR level during the InstCombine process, so I'm wondering why you didn't do that.

There was an IR load combine pass (see D3580 <https://reviews.llvm.org/D3580> - although never enabled by default AFAIK), but it was removed because it could interfere with other passes like GVN.
https://lists.llvm.org/pipermail/llvm-dev/2016-September/105291.html
https://lists.llvm.org/pipermail/llvm-dev/2019-September/135052.html

But requests for this kind of transform pop up every few months or so, so it is probably worth experimenting to see if there is some limited/altered form of that pass that can get us optimizations without reducing effectiveness of other passes.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D26149



More information about the llvm-commits mailing list