annotate clang/test/CodeGenOpenCL/address-spaces-mangling.cl @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 5f17cb93ff66
children
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
236
c4bab56944e8 LLVM 16
kono
parents: 223
diff changeset
5 // RUN: %clang_cc1 %s -cl-std=CL3.0 -cl-std=CL3.0 -cl-ext=-all,+__opencl_c_generic_address_space -ffake-address-space-map -faddress-space-map-mangling=no -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefixes="NOASMANG,NOASMANG20" %s
c4bab56944e8 LLVM 16
kono
parents: 223
diff changeset
6 // RUN: %clang_cc1 %s -cl-std=CL3.0 -cl-ext=-all,+__opencl_c_generic_address_space -ffake-address-space-map -faddress-space-map-mangling=yes -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefixes="ASMANG,ASMANG20" %s
150
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 // We check that the address spaces are mangled the same in both version of OpenCL
anatofuz
parents:
diff changeset
9 // 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
10 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL1.2 -emit-llvm -o - | FileCheck -check-prefix=OCL-12 %s
236
c4bab56944e8 LLVM 16
kono
parents: 223
diff changeset
11 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL3.0 -cl-ext=-all,+__opencl_c_generic_address_space -emit-llvm -o - | FileCheck -check-prefix=OCL-20 %s
c4bab56944e8 LLVM 16
kono
parents: 223
diff changeset
12 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL3.0 -cl-ext=-all -emit-llvm -o - | FileCheck -check-prefix=OCL-12 %s
c4bab56944e8 LLVM 16
kono
parents: 223
diff changeset
13 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++2021 -cl-ext=-all,+__opencl_c_generic_address_space -emit-llvm -o - | FileCheck -check-prefix=OCL-20 %s
c4bab56944e8 LLVM 16
kono
parents: 223
diff changeset
14 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++2021 -cl-ext=-all -emit-llvm -o - | FileCheck -check-prefix=OCL-12 %s
150
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 // We can't name this f as private is equivalent to default
anatofuz
parents:
diff changeset
17 // no specifier given address space so we get multiple definition
anatofuz
parents:
diff changeset
18 // warnings, but we do want it for comparison purposes.
anatofuz
parents:
diff changeset
19 __attribute__((overloadable))
anatofuz
parents:
diff changeset
20 void ff(int *arg) { }
anatofuz
parents:
diff changeset
21 // ASMANG10: @_Z2ffPi
anatofuz
parents:
diff changeset
22 // ASMANG20: @_Z2ffPU3AS4i
anatofuz
parents:
diff changeset
23 // NOASMANG10: @_Z2ffPU9CLprivatei
anatofuz
parents:
diff changeset
24 // NOASMANG20: @_Z2ffPU9CLgenerici
anatofuz
parents:
diff changeset
25 // OCL-20-DAG: @_Z2ffPU3AS4i
anatofuz
parents:
diff changeset
26 // OCL-12-DAG: @_Z2ffPi
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 __attribute__((overloadable))
anatofuz
parents:
diff changeset
29 void f(private int *arg) { }
anatofuz
parents:
diff changeset
30 // ASMANG: @_Z1fPi
anatofuz
parents:
diff changeset
31 // NOASMANG: @_Z1fPU9CLprivatei
anatofuz
parents:
diff changeset
32 // OCL-20-DAG: @_Z1fPi
anatofuz
parents:
diff changeset
33 // OCL-12-DAG: @_Z1fPi
anatofuz
parents:
diff changeset
34
anatofuz
parents:
diff changeset
35 __attribute__((overloadable))
anatofuz
parents:
diff changeset
36 void f(global int *arg) { }
anatofuz
parents:
diff changeset
37 // ASMANG: @_Z1fPU3AS1i
anatofuz
parents:
diff changeset
38 // NOASMANG: @_Z1fPU8CLglobali
anatofuz
parents:
diff changeset
39 // OCL-20-DAG: @_Z1fPU3AS1i
anatofuz
parents:
diff changeset
40 // OCL-12-DAG: @_Z1fPU3AS1i
anatofuz
parents:
diff changeset
41
anatofuz
parents:
diff changeset
42 __attribute__((overloadable))
anatofuz
parents:
diff changeset
43 void f(local int *arg) { }
anatofuz
parents:
diff changeset
44 // ASMANG: @_Z1fPU3AS3i
anatofuz
parents:
diff changeset
45 // NOASMANG: @_Z1fPU7CLlocali
anatofuz
parents:
diff changeset
46 // OCL-20-DAG: @_Z1fPU3AS3i
anatofuz
parents:
diff changeset
47 // OCL-12-DAG: @_Z1fPU3AS3i
anatofuz
parents:
diff changeset
48
anatofuz
parents:
diff changeset
49 __attribute__((overloadable))
anatofuz
parents:
diff changeset
50 void f(constant int *arg) { }
anatofuz
parents:
diff changeset
51 // ASMANG: @_Z1fPU3AS2i
anatofuz
parents:
diff changeset
52 // NOASMANG: @_Z1fPU10CLconstanti
anatofuz
parents:
diff changeset
53 // OCL-20-DAG: @_Z1fPU3AS2i
anatofuz
parents:
diff changeset
54 // OCL-12-DAG: @_Z1fPU3AS2i
anatofuz
parents:
diff changeset
55
223
5f17cb93ff66 LLVM13 (2021/7/18)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
56 #if (__OPENCL_C_VERSION__ == 200) || defined(__opencl_c_generic_address_space)
150
anatofuz
parents:
diff changeset
57 __attribute__((overloadable))
anatofuz
parents:
diff changeset
58 void f(generic int *arg) { }
anatofuz
parents:
diff changeset
59 // ASMANG20: @_Z1fPU3AS4i
anatofuz
parents:
diff changeset
60 // NOASMANG20: @_Z1fPU9CLgenerici
anatofuz
parents:
diff changeset
61 // OCL-20-DAG: @_Z1fPU3AS4i
anatofuz
parents:
diff changeset
62 #endif