[PATCH] D144563: [SimplifyCFG] Improve the precision of `PtrValueMayBeModified`
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 07:16:16 PST 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:7128
+ // getelementptr inbounds (TY, null, 0) -> null
+ // getelementptr inbounds (TY, null, not zero) -> poison
+ if (!GEP->isInBounds() && !GEP->hasAllZeroIndices())
----------------
This is only the case if `!NullPointerIsDefined(GEP->getFunction(), GEP->getPointerAddressSpace())`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144563/new/
https://reviews.llvm.org/D144563
More information about the llvm-commits
mailing list