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

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 10:10:16 PDT 2024


tschuett wrote:

I might investigate at a later time ptradd chain patterns with e.g. G_SHL and G_MUL as terminators.

```
G_MUL $z1, $lhs, $rhs
G_PTR_ADD $c, $d, $z1
G_PTR_ADD $b, $c, $z
G_PTR_ADD $a, $b, $y
G_PTR_ADD $root, $a$, $x
```

We can check that `$root` is used by a load/store and then investigate which offsets are constant.

This PR did not show any improvements beyond the existing patterns.

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


More information about the llvm-commits mailing list