[AST[Tests] Shorten tests using noalias params

llvm-svn: 340099
This commit is contained in:
Philip Reames 2018-08-17 21:45:57 +00:00
parent b1b791b9b1
commit 9e313167cf
1 changed files with 4 additions and 12 deletions

View File

@ -26,10 +26,8 @@ entry:
; CHECK-NEXT: Unknown instructions: call void @my_memmove(i8* %d, i8* %s, i64 1)
; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Pointers: (i8* %b, 1)
define void @test3(i8* %s, i8* %d) {
define void @test3(i8* noalias %a, i8* noalias %b, i8* %s, i8* %d) {
entry:
%a = alloca i8, align 1
%b = alloca i8, align 1
store i8 1, i8* %a, align 1
call void @my_memmove(i8* %d, i8* %s, i64 1)
store i8 1, i8* %b, align 1
@ -40,10 +38,8 @@ entry:
; CHECK-NEXT: Alias Set Tracker: 1 alias sets for 2 pointer values.
; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref Pointers: (i8* %a, 1), (i8* %b, 1)
; CHECK-NEXT: 1 Unknown instructions: call void @my_memcpy(i8* %b, i8* %a, i64 1)
define void @test5() {
define void @test5(i8* noalias %a, i8* noalias %b) {
entry:
%a = alloca i8, align 1
%b = alloca i8, align 1
store i8 1, i8* %a, align 1
call void @my_memcpy(i8* %b, i8* %a, i64 1)
store i8 1, i8* %b, align 1
@ -54,10 +50,8 @@ entry:
; CHECK-NEXT: Alias Set Tracker: 1 alias sets for 2 pointer values.
; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref Pointers: (i8* %a, 1), (i8* %b, 1)
; CHECK-NEXT: 1 Unknown instructions: call void @my_memmove(i8* %b, i8* %a, i64 1)
define void @test6() {
define void @test6(i8* noalias %a, i8* noalias %b) {
entry:
%a = alloca i8, align 1
%b = alloca i8, align 1
store i8 1, i8* %a, align 1
call void @my_memmove(i8* %b, i8* %a, i64 1)
store i8 1, i8* %b, align 1
@ -69,10 +63,8 @@ entry:
; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref Pointers: (i8* %a, 1), (i8* %b, 1)
; CHECK-NEXT: 2 Unknown instructions: call void @my_memcpy(i8* %b, i8* %a, i64 1), call void @my_memcpy(i8* %a, i8* %b, i64 1)
define void @test7() {
define void @test7(i8* noalias %a, i8* noalias %b) {
entry:
%a = alloca i8, align 1
%b = alloca i8, align 1
store i8 1, i8* %a, align 1
call void @my_memcpy(i8* %b, i8* %a, i64 1)
call void @my_memcpy(i8* %a, i8* %b, i64 1)