@@ -73,3 +73,81 @@ kernel void foo_wo_pipe(write_only pipe int p) {}
7373void __attribute__((overloadable )) bad1 (image1d_t b , image2d_t c , image2d_t d ) {}
7474// CHECK-SPIR-LABEL: @{{_Z4bad114ocl_image1d_ro14ocl_image2d_roS0_|"\\01\?bad1@@\$\$J0YAXPAUocl_image1d_ro@@PAUocl_image2d_ro@@1@Z"}}
7575// CHECK-AMDGCN-LABEL: @{{_Z4bad114ocl_image1d_ro14ocl_image2d_roS0_|"\\01\?bad1@@\$\$J0YAXPAUocl_image1d_ro@@PAUocl_image2d_ro@@1@Z"}}(ptr addrspace(4){{.*}}ptr addrspace(4){{.*}}ptr addrspace(4){{.*}})
76+
77+
78+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test20ocl_image1d_array_ro(ptr addrspace(4) %img)
79+ __attribute__((overloadable ))
80+ void img_type_mangle_test (read_only image1d_array_t img ) {}
81+
82+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test20ocl_image1d_array_wo(ptr addrspace(4) %img)
83+ __attribute__((overloadable ))
84+ void img_type_mangle_test (write_only image1d_array_t img ) {}
85+
86+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test20ocl_image1d_array_rw(ptr addrspace(4) %img)
87+ __attribute__((overloadable ))
88+ void img_type_mangle_test (read_write image1d_array_t img ) {}
89+
90+
91+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test21ocl_image1d_buffer_ro(ptr addrspace(4) %img)
92+ __attribute__((overloadable ))
93+ void img_type_mangle_test (read_only image1d_buffer_t img ) {}
94+
95+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test21ocl_image1d_buffer_wo(ptr addrspace(4) %img)
96+ __attribute__((overloadable ))
97+ void img_type_mangle_test (write_only image1d_buffer_t img ) {}
98+
99+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test21ocl_image1d_buffer_rw(ptr addrspace(4) %img)
100+ __attribute__((overloadable ))
101+ void img_type_mangle_test (read_write image1d_buffer_t img ) {}
102+
103+
104+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test20ocl_image2d_array_ro(ptr addrspace(4) %img)
105+ __attribute__((overloadable ))
106+ void img_type_mangle_test (read_only image2d_array_t img ) {}
107+
108+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test20ocl_image2d_array_wo(ptr addrspace(4) %img)
109+ __attribute__((overloadable ))
110+ void img_type_mangle_test (write_only image2d_array_t img ) {}
111+
112+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test20ocl_image2d_array_rw(ptr addrspace(4) %img)
113+ __attribute__((overloadable ))
114+ void img_type_mangle_test (read_write image2d_array_t img ) {}
115+
116+
117+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test14ocl_image1d_ro(ptr addrspace(4) %img)
118+ __attribute__((overloadable ))
119+ void img_type_mangle_test (read_only image1d_t img ) {}
120+
121+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test14ocl_image1d_wo(ptr addrspace(4) %img)
122+ __attribute__((overloadable ))
123+ void img_type_mangle_test (write_only image1d_t img ) {}
124+
125+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test14ocl_image1d_rw(ptr addrspace(4) %img)
126+ __attribute__((overloadable ))
127+ void img_type_mangle_test (read_write image1d_t img ) {}
128+
129+
130+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test14ocl_image2d_ro(ptr addrspace(4) %img)
131+ __attribute__((overloadable ))
132+ void img_type_mangle_test (read_only image2d_t img ) {}
133+
134+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test14ocl_image2d_wo(ptr addrspace(4) %img)
135+ __attribute__((overloadable ))
136+ void img_type_mangle_test (write_only image2d_t img ) {}
137+
138+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test14ocl_image2d_rw(ptr addrspace(4) %img)
139+ __attribute__((overloadable ))
140+ void img_type_mangle_test (read_write image2d_t img ) {}
141+
142+
143+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test14ocl_image3d_ro(ptr addrspace(4) %img)
144+ __attribute__((overloadable ))
145+ void img_type_mangle_test (read_only image3d_t img ) {}
146+
147+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test14ocl_image3d_wo(ptr addrspace(4) %img)
148+ __attribute__((overloadable ))
149+ void img_type_mangle_test (write_only image3d_t img ) {}
150+
151+ // CHECK-AMDGCN: define dso_local void @_Z20img_type_mangle_test14ocl_image3d_rw(ptr addrspace(4) %img)
152+ __attribute__((overloadable ))
153+ void img_type_mangle_test (read_write image3d_t img ) {}
0 commit comments