[PATCH] D71177: [ValueTracking] Use the assumption that if the pointer was loaded/stored, then it is nonnull.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 8 13:02:50 PST 2019
lebedev.ri added a comment.
There were behavior-changing alterations, but no test changes?
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1927
+ // If the value is used as a load/store, then the pointer must be non null.
+ if (V == getLoadStorePointerOperand(U) &&
----------------
danlark wrote:
> danlark wrote:
> > lebedev.ri wrote:
> > > This is certainly not sound for non-default address spaces;
> > > does this already check for default address space somewhere here?
> > I don't see any checks of this. Should I add here?
> Done
You want `NullPointerIsDefined()`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71177/new/
https://reviews.llvm.org/D71177
More information about the llvm-commits
mailing list