isKnownNonNull needs to consider globals in non-zero address spaces.
authorPete Cooper <peter_cooper@apple.com>
Thu, 27 Aug 2015 03:16:29 +0000 (03:16 +0000)
committerPete Cooper <peter_cooper@apple.com>
Thu, 27 Aug 2015 03:16:29 +0000 (03:16 +0000)
commita72297881f8d1892fd6f0480469617a1b80c18d9
treebe15c700ddfc54e34e56d57c283dfb76f79db33c
parente7d1e02b6c5f30fb7494a8eceaa8b0f762892fd5
isKnownNonNull needs to consider globals in non-zero address spaces.

Globals in address spaces other than one may have 0 as a valid address,
so we should not assume that they can be null.

Reviewed by Philip Reames.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246137 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
test/Transforms/InstCombine/nonnull-attribute.ll [new file with mode: 0644]