annotate clang/test/CodeGenOpenCL/address-spaces-mangling.cl @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 5f17cb93ff66
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=yes -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefixes="ASMANG,ASMANG10" %s
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 %s -cl-std=CL2.0 -ffake-address-space-map -faddress-space-map-mangling=yes -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefixes="ASMANG,ASMANG20" %s
anatofuz
parents:
diff changeset
3 // RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefixes="NOASMANG,NOASMANG10" %s
anatofuz
parents:
diff changeset
4 // RUN: %clang_cc1 %s -cl-std=CL2.0 -ffake-address-space-map -faddress-space-map-mangling=no -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefixes="NOASMANG,NOASMANG20" %s
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 // We check that the address spaces are mangled the same in both version of OpenCL
anatofuz
parents:
diff changeset
7 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL2.0 -emit-llvm -o - | FileCheck -check-prefix=OCL-20 %s
anatofuz
parents:
diff changeset
8 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL1.2 -emit-llvm -o - | FileCheck -check-prefix=OCL-12 %s
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 // We can't name this f as private is equivalent to default
anatofuz
parents:
diff changeset
11 // no specifier given address space so we get multiple definition
anatofuz
parents:
diff changeset
12 // warnings, but we do want it for comparison purposes.
anatofuz
parents:
diff changeset
13 __attribute__((overloadable))
anatofuz
parents:
diff changeset
14 void ff(int *arg) { }
anatofuz
parents:
diff changeset
15 // ASMANG10: @_Z2ffPi
anatofuz
parents:
diff changeset
16 // ASMANG20: @_Z2ffPU3AS4i
anatofuz
parents:
diff changeset
17 // NOASMANG10: @_Z2ffPU9CLprivatei
anatofuz
parents:
diff changeset
18 // NOASMANG20: @_Z2ffPU9CLgenerici
anatofuz
parents:
diff changeset
19 // OCL-20-DAG: @_Z2ffPU3AS4i
anatofuz
parents:
diff changeset
20 // OCL-12-DAG: @_Z2ffPi
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 __attribute__((overloadable))
anatofuz
parents:
diff changeset
23 void f(private int *arg) { }
anatofuz
parents:
diff changeset
24 // ASMANG: @_Z1fPi
anatofuz
parents:
diff changeset
25 // NOASMANG: @_Z1fPU9CLprivatei
anatofuz
parents:
diff changeset
26 // OCL-20-DAG: @_Z1fPi
anatofuz
parents:
diff changeset
27 // OCL-12-DAG: @_Z1fPi
anatofuz
parents:
diff changeset
28
anatofuz
parents:
diff changeset
29 __attribute__((overloadable))
anatofuz
parents:
diff changeset
30 void f(global int *arg) { }
anatofuz
parents:
diff changeset
31 // ASMANG: @_Z1fPU3AS1i
anatofuz
parents:
diff changeset
32 // NOASMANG: @_Z1fPU8CLglobali
anatofuz
parents:
diff changeset
33 // OCL-20-DAG: @_Z1fPU3AS1i
anatofuz
parents:
diff changeset
34 // OCL-12-DAG: @_Z1fPU3AS1i
anatofuz
parents:
diff changeset
35
anatofuz
parents:
diff changeset
36 __attribute__((overloadable))
anatofuz
parents:
diff changeset
37 void f(local int *arg) { }
anatofuz
parents:
diff changeset
38 // ASMANG: @_Z1fPU3AS3i
anatofuz
parents:
diff changeset
39 // NOASMANG: @_Z1fPU7CLlocali
anatofuz
parents:
diff changeset
40 // OCL-20-DAG: @_Z1fPU3AS3i
anatofuz
parents:
diff changeset
41 // OCL-12-DAG: @_Z1fPU3AS3i
anatofuz
parents:
diff changeset
42
anatofuz
parents:
diff changeset
43 __attribute__((overloadable))
anatofuz
parents:
diff changeset
44 void f(constant int *arg) { }
anatofuz
parents:
diff changeset
45 // ASMANG: @_Z1fPU3AS2i
anatofuz
parents:
diff changeset
46 // NOASMANG: @_Z1fPU10CLconstanti
anatofuz
parents:
diff changeset
47 // OCL-20-DAG: @_Z1fPU3AS2i
anatofuz
parents:
diff changeset
48 // OCL-12-DAG: @_Z1fPU3AS2i
anatofuz
parents:
diff changeset
49
anatofuz
parents:
diff changeset
50 #if __OPENCL_C_VERSION__ >= 200
anatofuz
parents:
diff changeset
51 __attribute__((overloadable))
anatofuz
parents:
diff changeset
52 void f(generic int *arg) { }
anatofuz
parents:
diff changeset
53 // ASMANG20: @_Z1fPU3AS4i
anatofuz
parents:
diff changeset
54 // NOASMANG20: @_Z1fPU9CLgenerici
anatofuz
parents:
diff changeset
55 // OCL-20-DAG: @_Z1fPU3AS4i
anatofuz
parents:
diff changeset
56 #endif