[llvm] [GlobalIsel] Combine G_PTR_ADD. (PR #95647)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 09:43:54 PDT 2024


tschuett wrote:

Crazy idea: I have seen G_SUB, G_ADD, G_SHL, and G_MUL on the offset register. G_SUB and G_ADD can be combined away *sometimes*. G_SHL and G_MUL can serve as terminators of ptradd chains. Add patterns with various lengths of ptradd chains until a terminator. If the chain is used by a load/store, then collect the constants on the offset registers. Then find the largest set of constants that form a legal addressing mode.

https://github.com/llvm/llvm-project/pull/95647


More information about the llvm-commits mailing list