Skip to content

Commit 21a32a4

Browse files
committed
Simplify the test
Signed-off-by: Dmitry Sidorov <[email protected]>
1 parent 95db1e9 commit 21a32a4

File tree

1 file changed

+7
-40
lines changed

1 file changed

+7
-40
lines changed

llvm-spirv/test/pointer_type_mapping.ll

+7-40
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
; TODO add check count one and remove unused, when the type mapping bug is fixed
88
; CHECK: TypePointer [[#UNUSED:]] {{.*}} [[#NAME]]
99
; CHECK: TypePointer [[#PTRTY:]] {{.*}} [[#NAME]]
10-
; CHECK-COUNT-2: TypePointer {{.*}} {{.*}} [[#PTRTY]]
11-
; CHECK-NOT: TypePointer {{.*}} {{.*}} [[#UNUSED]]
10+
; CHECK: FunctionParameter [[#PTRTY]]
11+
; CHECK-NOT: FunctionParameter [[#UNUSED]]
1212

1313
; ModuleID = 'sycl_test.bc'
1414
source_filename = "sycl_test.cpp"
@@ -19,45 +19,12 @@ target triple = "spir64-unknown-unknown-sycldevice"
1919
%struct._ZTS6Object.Object = type { i32 (%struct._ZTS6Object.Object addrspace(4)*, i32)* }
2020

2121
; Function Attrs: convergent norecurse nounwind mustprogress
22-
define dso_local spir_func i32 @_Z9somefunc0P4Args(%struct._ZTS4Args.Args addrspace(4)* %args) #0 {
22+
define dso_local spir_func i32 @_Z9somefunc0P4Args(%struct._ZTS4Args.Args addrspace(4)* %a, %struct._ZTS6Object.Object addrspace(4)* %b) {
2323
entry:
24-
%retval = alloca i32, align 4
25-
%retval.ascast = addrspacecast i32* %retval to i32 addrspace(4)*
26-
%args.addr = alloca %struct._ZTS4Args.Args addrspace(4)*, align 8
27-
%args.addr.ascast = addrspacecast %struct._ZTS4Args.Args addrspace(4)** %args.addr to %struct._ZTS4Args.Args addrspace(4)* addrspace(4)*
28-
store %struct._ZTS4Args.Args addrspace(4)* %args, %struct._ZTS4Args.Args addrspace(4)* addrspace(4)* %args.addr.ascast, align 8, !tbaa !5
2924
ret i32 0
3025
}
3126

32-
; Function Attrs: convergent norecurse nounwind mustprogress
33-
define dso_local spir_func i32 @_Z9somefunc1P6Objecti(%struct._ZTS6Object.Object addrspace(4)* %object, i32 %value) #0 {
34-
entry:
35-
%retval = alloca i32, align 4
36-
%retval.ascast = addrspacecast i32* %retval to i32 addrspace(4)*
37-
%object.addr = alloca %struct._ZTS6Object.Object addrspace(4)*, align 8
38-
%object.addr.ascast = addrspacecast %struct._ZTS6Object.Object addrspace(4)** %object.addr to %struct._ZTS6Object.Object addrspace(4)* addrspace(4)*
39-
%value.addr = alloca i32, align 4
40-
%value.addr.ascast = addrspacecast i32* %value.addr to i32 addrspace(4)*
41-
store %struct._ZTS6Object.Object addrspace(4)* %object, %struct._ZTS6Object.Object addrspace(4)* addrspace(4)* %object.addr.ascast, align 8, !tbaa !5
42-
store i32 %value, i32 addrspace(4)* %value.addr.ascast, align 4, !tbaa !9
43-
ret i32 0
44-
}
45-
46-
attributes #0 = { convergent norecurse nounwind mustprogress "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "referenced-indirectly" "stack-protector-buffer-size"="8" "sycl-module-id"="sycl_test.cpp" }
47-
48-
!llvm.module.flags = !{!0, !1}
49-
!opencl.spir.version = !{!2}
50-
!spirv.Source = !{!3}
51-
!llvm.ident = !{!4}
52-
53-
!0 = !{i32 1, !"wchar_size", i32 4}
54-
!1 = !{i32 7, !"frame-pointer", i32 2}
55-
!2 = !{i32 1, i32 2}
56-
!3 = !{i32 4, i32 100000}
57-
!4 = !{!"clang version 13.0.0"}
58-
!5 = !{!6, !6, i64 0}
59-
!6 = !{!"any pointer", !7, i64 0}
60-
!7 = !{!"omnipotent char", !8, i64 0}
61-
!8 = !{!"Simple C++ TBAA"}
62-
!9 = !{!10, !10, i64 0}
63-
!10 = !{!"int", !7, i64 0}
27+
!opencl.spir.version = !{!0}
28+
!spirv.Source = !{!1}
29+
!0 = !{i32 1, i32 2}
30+
!1 = !{i32 4, i32 100000}

0 commit comments

Comments
 (0)