1 // RUN: %clang_cc1 -no-opaque-pointers -triple spir64 -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s --check-prefix=SPIR
2 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64 -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s --check-prefix=X86
4 // REQUIRES: x86-registered-target
6 void foo(__attribute__((opencl_global
)) int *);
7 void foo(__attribute__((opencl_local
)) int *);
8 void foo(__attribute__((opencl_private
)) int *);
11 // SPIR: declare spir_func void @_Z3fooPU3AS1i(i32 addrspace(1)* noundef) #1
12 // SPIR: declare spir_func void @_Z3fooPU3AS3i(i32 addrspace(3)* noundef) #1
13 // SPIR: declare spir_func void @_Z3fooPU3AS0i(i32* noundef) #1
14 // SPIR: declare spir_func void @_Z3fooPi(i32 addrspace(4)* noundef) #1
16 // X86: declare void @_Z3fooPU8SYglobali(i32* noundef) #1
17 // X86: declare void @_Z3fooPU7SYlocali(i32* noundef) #1
18 // X86: declare void @_Z3fooPU9SYprivatei(i32* noundef) #1
19 // X86: declare void @_Z3fooPi(i32* noundef) #1
22 __attribute__((opencl_global
)) int *glob
;
23 __attribute__((opencl_local
)) int *loc
;
24 __attribute__((opencl_private
)) int *priv
;