PGOProfile: Convert tests to opaque pointers

This commit is contained in:
Fangrui Song 2022-11-27 18:13:09 -08:00
parent 8570893cfd
commit 34ade57019
2 changed files with 10 additions and 10 deletions

View File

@ -2,18 +2,18 @@
; CHECK: byval mismatch
define void @a(i8* %0) !prof !0 {
define void @a(ptr %0) !prof !0 {
ret void
}
define void @b(void (i64*)** %v, i64* %p) !prof !1 {
define void @b(ptr %v, ptr %p) !prof !1 {
; CHECK-LABEL: @b
; CHECK-NEXT: load
; CHECK-NEXT: call void {{.*}}(i64* byval(i64)
; CHECK-NEXT: call void {{.*}}(ptr byval(i64)
; CHECK-NEXT: ret void
;
%a = load void (i64*)*, void (i64*)** %v
call void %a(i64* byval(i64) %p), !prof !2
%a = load ptr, ptr %v
call void %a(ptr byval(i64) %p), !prof !2
ret void
}

View File

@ -2,17 +2,17 @@
; CHECK: inalloca mismatch
define void @a(i8* %0) !prof !0 {
define void @a(ptr %0) !prof !0 {
ret void
}
define void @b(void (i64*)** %v, i64* %p) !prof !1 {
define void @b(ptr %v, ptr %p) !prof !1 {
; CHECK-LABEL: @b
; CHECK-NEXT: load
; CHECK-NEXT: call void {{.*}}(i64* inalloca(i64)
; CHECK-NEXT: call void {{.*}}(ptr inalloca(i64)
; CHECK-NEXT: ret void
%a = load void (i64*)*, void (i64*)** %v
call void %a(i64* inalloca(i64) %p), !prof !2
%a = load ptr, ptr %v
call void %a(ptr inalloca(i64) %p), !prof !2
ret void
}