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

Biplob Mishra via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 03:11:03 PDT 2022


bipmis added a comment.

In D127392#3625567 <https://reviews.llvm.org/D127392#3625567>, @spatel wrote:

> In D127392#3625257 <https://reviews.llvm.org/D127392#3625257>, @nikic wrote:
>
>> When switching this to AggressiveInstCombine, I would strongly recommend to start with a much more minimal patch. Handle only a single simple case, without any of the possible variants. We can build on that base later.
>
> Strongly agree - there's a lot of potential for this to go wrong both in correctness and perf regressions, so we need to build up in steps. 
> AFAIK, the load combine pass did not have correctness problems when it died, so that source code would be a good reference.

The load combine pass is different in that it implements load combine in a more generic way and not based on a specific pattern. So if it find 2 loads can be combined it generates a wider load and subsequent usage are derived from this wider load using CreateExtractInteger. The current implementation will be more like a pattern match with offset and shift verify to confirm the loads are consecutive and with the only use to create a wider load.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127392



More information about the llvm-commits mailing list