[InstCombineCalls] Use isKnownNonNullAt() to check nullness of passing arguments...
authorChen Li <meloli87@gmail.com>
Thu, 10 Sep 2015 23:04:49 +0000 (23:04 +0000)
committerChen Li <meloli87@gmail.com>
Thu, 10 Sep 2015 23:04:49 +0000 (23:04 +0000)
commit337cd218ef3635b2105be7578640ed16fe0a9a38
tree09e2976e0b089734bf5c1ca3c73401c24c086ff5
parent0df4288be222341c787b9cd0f7d1ca33e8feb0b7
[InstCombineCalls] Use isKnownNonNullAt() to check nullness of passing arguments at callsite

Summary: This patch replaces isKnownNonNull() with isKnownNonNullAt() when checking nullness of passing arguments at callsite. In this way it can handle cases where the argument does not have nonnull attribute but has a dominating null check from the CFG.

Reviewers: reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12779

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