[llvm] [WIP] Consider datalayout sentinel pointer value for isKnownNonZero check (PR #91769)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 07:54:31 PDT 2024
arsenm wrote:
> This doesn't look right. Pointers can have contain an all-zero value no matter what the sentinel value is.
>
> I think you want to modify NullPointerIsDefined?
There are a few pieces I think need to change. I think we need a variant of isKnownNonZero that specifically checks for known-non-null pointers. Currently some of the uses of this are using as a null check.
Additionally we need to eventually do something about ConstantPointerNull, where you should be able to assume the bitvalue is what the datalayout says
https://github.com/llvm/llvm-project/pull/91769
More information about the llvm-commits
mailing list