diff options
author | Nikita Popov <npopov@redhat.com> | 2025-09-03 10:47:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-03 10:47:32 +0200 |
commit | 349523e26b80155b200e52e628006855371b6a93 (patch) | |
tree | 6ee5a13ced4b28addd7fdea0127b35d77765cfdd /llvm/utils/FileCheck | |
parent | d0d79fd1ac70602b3286bedbb75e42d3766c8019 (diff) | |
download | llvm-349523e26b80155b200e52e628006855371b6a93.zip llvm-349523e26b80155b200e52e628006855371b6a93.tar.gz llvm-349523e26b80155b200e52e628006855371b6a93.tar.bz2 |
[InstCombine] Merge constant offset geps across variable geps (#156326)
Fold:
%gep1 = ptradd %p, C1
%gep2 = ptradd %gep1, %x
%res = ptradd %gep2, C2
To:
%gep = ptradd %gep, %x
%res = ptradd %gep, C1+C2
An alternative to this would be to generally canonicalize constant
offset GEPs to the right. I found the results of doing that somewhat
mixed, so I'm going for this more obviously beneficial change for now.
Proof for flag preservation on reassociation:
https://alive2.llvm.org/ce/z/gmpAMg
Diffstat (limited to 'llvm/utils/FileCheck')
0 files changed, 0 insertions, 0 deletions