[PATCH] D135137: [AggressiveInstCombine] Load merge the reverse load pattern of consecutive loads.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 09:21:33 PDT 2022


spatel added a comment.

In D135137#3867684 <https://reviews.llvm.org/D135137#3867684>, @bipmis wrote:

> In D135137#3865593 <https://reviews.llvm.org/D135137#3865593>, @spatel wrote:
>
>> LGTM.
>> I'm not sure if the transforms are completely reliable, but the PhaseOrdering tests show that we're getting 8 of the 24 patterns. Another 4 are partially folded, so those would presumably improve with the one-line enhancement that was originally in this patch. That leaves 12 that are escaping, but those might be canonicalized enough that we don't need to deal with every possible ordering.
>
> Thanks.
> Looks like Reassociate does convert all the cases to the pattern needed. Just that it occurs late.

Thanks for checking. So there are 3 possible follow-ups to make the transform robust:

1. Re-order the passes so AIC is after Reassociate
2. Add a late run of AIC.
3. Enhance the pattern matching in AIC to capture the alternate patterns.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135137



More information about the llvm-commits mailing list