[llvm] [InstCombine] Try to fold add into GEP x, C (PR #85090)

David Green via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 04:02:02 PDT 2024


https://github.com/davemgreen commented:

> I'm not really willing to take patches for the formation of "big GEPs" anymore at this point. Our canonicalization direction should start to go in the opposite direction, breaking up these GEPs into smaller parts. At that point, the existing gep+add to gep+gep canonicalization will also handle this.

Yeah I thought you might bring that up :)  I was hoping we could be reasonable and take optimizations like this as a short-term improvement until the canonicalisation is ready, if the patch was simple enough. (This wasn't attempting to make bigger geps, just change the ones that already existed). I had seen that with smaller geps it was already handled better, this just reduces some of the differences between the current larger geps and the future smaller ones.

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


More information about the llvm-commits mailing list