OSDN Git Service

[ValueTracking] Look through casts when determining non-nullness
authorJohannes Doerfert <jdoerfert@anl.gov>
Sat, 26 Jan 2019 23:40:35 +0000 (23:40 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Sat, 26 Jan 2019 23:40:35 +0000 (23:40 +0000)
commit9e7dd29d66ea43ff7c554dfec68ae743e63d9c4f
tree04a1b206892bd62374a854b4e2594ff46e738ebe
parent901b4d6ba1da6bff6c30fc9932f5c8ca5c3d0a79
[ValueTracking] Look through casts when determining non-nullness

Bitcast and certain Ptr2Int/Int2Ptr instructions will not alter the
value of their operand and can therefore be looked through when we
determine non-nullness.

Differential Revision: https://reviews.llvm.org/D54956

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352293 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
test/Transforms/InstCombine/alloca-cast-debuginfo.ll
test/Transforms/InstCombine/callsite_nonnull_args_through_casts.ll [new file with mode: 0644]
test/Transforms/InstCombine/objsize.ll
test/Transforms/InstCombine/select.ll
test/Transforms/LoopVectorize/X86/gather_scatter.ll
test/Transforms/LoopVectorize/X86/masked_load_store.ll
test/Transforms/MemCpyOpt/memcpy-to-memset-with-lifetimes.ll