[InstCombineCalls] Use isKnownNonNullAt() to check nullness of gc.relocate return...
authorChen Li <meloli87@gmail.com>
Thu, 10 Sep 2015 22:35:41 +0000 (22:35 +0000)
committerChen Li <meloli87@gmail.com>
Thu, 10 Sep 2015 22:35:41 +0000 (22:35 +0000)
commit55a7e0fc54a10543692af9c5c386989956142871
treeab4688773c96066e930a6b780ef036fbd572368b
parent4d0f917f947f96d50ba4841d76b22a3d797889f9
[InstCombineCalls] Use isKnownNonNullAt() to check nullness of gc.relocate return value

Summary: This patch replaces isKnownNonNull() with isKnownNonNullAt() when checking nullness of gc.relocate return value. In this way it can handle cases where the relocated value does not have nonnull attribute but has a dominating null check from the CFG.

Reviewers: reames

Subscribers: llvm-commits, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247353 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/gc.relocate.ll