[llvm] [SeparateConstOffsetFromGEP] Reorder trivial GEP chains to separate constants (PR #73056)
Krzysztof Drewniak via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 10:58:56 PST 2024
krzysz00 wrote:
... hold on, from looking at that Alive2, I think you can be a bit more aggressive than just not applying this swap to inbounds GEPs (or stripping the inbounds - do we know which of these is more likely to lead to good codegen?).
Specifically, I claim that, if you can prove that the constant and variable indices are non-negative, you should be able to reassociate the inbounds GEPs soundly.
See the somewhat ham-fisted https://alive2.llvm.org/ce/z/CRkgEN
https://github.com/llvm/llvm-project/pull/73056
More information about the llvm-commits
mailing list