diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2017-09-09 18:23:11 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2017-09-09 18:23:11 +0000 |
commit | fe353a0cbf68fc7f9ebdda606c90b81da75ac936 (patch) | |
tree | 68a953bd83d1cc5e9da25e512a3c0a50587c1f31 /test/Transforms/InstCombine/wcslen-1.ll | |
parent | a22f9f24054f0525fe1090b3fa665bd4fc0921c3 (diff) |
Merge isKnownNonNull into isKnownNonZero
It now knows the tricks of both functions.
Also, fix a bug that considered allocas of non-zero address space to be always non null
Differential Revision: https://reviews.llvm.org/D37628
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/wcslen-1.ll')
-rw-r--r-- | test/Transforms/InstCombine/wcslen-1.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Transforms/InstCombine/wcslen-1.ll b/test/Transforms/InstCombine/wcslen-1.ll index d4e51750f6d..cdde1bfbde4 100644 --- a/test/Transforms/InstCombine/wcslen-1.ll +++ b/test/Transforms/InstCombine/wcslen-1.ll @@ -155,7 +155,7 @@ define i64 @test_no_simplify2(i32 %x) { ; CHECK-LABEL: @test_no_simplify2( ; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[X:%.*]] to i64 ; CHECK-NEXT: [[HELLO_P:%.*]] = getelementptr inbounds [7 x i32], [7 x i32]* @null_hello, i64 0, i64 [[TMP1]] -; CHECK-NEXT: [[HELLO_L:%.*]] = call i64 @wcslen(i32* [[HELLO_P]]) +; CHECK-NEXT: [[HELLO_L:%.*]] = call i64 @wcslen(i32* nonnull [[HELLO_P]]) ; CHECK-NEXT: ret i64 [[HELLO_L]] ; %hello_p = getelementptr inbounds [7 x i32], [7 x i32]* @null_hello, i32 0, i32 %x @@ -170,7 +170,7 @@ define i64 @test_no_simplify3(i32 %x) { ; CHECK-NEXT: [[AND:%.*]] = and i32 [[X:%.*]], 15 ; CHECK-NEXT: [[TMP1:%.*]] = zext i32 [[AND]] to i64 ; CHECK-NEXT: [[HELLO_P:%.*]] = getelementptr inbounds [13 x i32], [13 x i32]* @null_hello_mid, i64 0, i64 [[TMP1]] -; CHECK-NEXT: [[HELLO_L:%.*]] = call i64 @wcslen(i32* [[HELLO_P]]) +; CHECK-NEXT: [[HELLO_L:%.*]] = call i64 @wcslen(i32* nonnull [[HELLO_P]]) ; CHECK-NEXT: ret i64 [[HELLO_L]] ; %and = and i32 %x, 15 |