[llvm] [InstCombine] Fold pointer adding in integer to arithmetic add (PR #91596)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 20:38:55 PDT 2024


https://github.com/nikic commented:

This looks like a reasonable transform to me.

More generally, we could fold `ptrtoint(gep p, x)` to `add ptrtoint(p), x`, but I think this may currently interfere with some other things, so I'm fine with checking this specific pattern.

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


More information about the llvm-commits mailing list