[PATCH] D143641: [MemorySSA] Iteratively check if gep's pointer operand is a guaranteed loop invariant
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 14 00:44:48 PST 2023
nikic added a comment.
I'm curious where this came up in practice. Constant GEP based on constant GEP gets merged by InstCombine.
FWIW, we have a stripInBoundsConstantOffsets() method, which does //nearly// what we want here. I wonder whether it would make sense to add a new PointerStripKind for this? (I think some existing users of stripInBoundsConstantOffsets don't actually need the "inbounds" part and just end up using it because it's convenient.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143641/new/
https://reviews.llvm.org/D143641
More information about the llvm-commits
mailing list