[llvm] [InstCombine] fold `sub(zext(ptrtoint), zext(ptrtoint))` (PR #115369)

Nikolay Panchenko via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 06:48:46 PST 2024


npanchen wrote:

> This optimization looks invalid to me. The claim you're making here is essentially this? https://alive2.llvm.org/ce/z/vzy3qB

thanks, I totally missed the obvious case. Seems like I need to pattern-match exact case we have: `sub(zext(ptrtoint(gep(A, B))), ptrtoint(A))` with some constraint on

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


More information about the llvm-commits mailing list