xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenOpenCL/address-spaces.cl (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 %s -ffake-address-space-map -emit-llvm -o - | FileCheck %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambucvoid f__p(__private int *arg) { }
4*f4a2713aSLionel Sambuc// CHECK: i32* nocapture %arg
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambucvoid f__g(__global int *arg) { }
7*f4a2713aSLionel Sambuc// CHECK: i32 addrspace(1)* nocapture %arg
8*f4a2713aSLionel Sambuc
9*f4a2713aSLionel Sambucvoid f__l(__local int *arg) { }
10*f4a2713aSLionel Sambuc// CHECK: i32 addrspace(2)* nocapture %arg
11*f4a2713aSLionel Sambuc
12*f4a2713aSLionel Sambucvoid f__c(__constant int *arg) { }
13*f4a2713aSLionel Sambuc// CHECK: i32 addrspace(3)* nocapture %arg
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambuc
16*f4a2713aSLionel Sambucvoid fp(private int *arg) { }
17*f4a2713aSLionel Sambuc// CHECK: i32* nocapture %arg
18*f4a2713aSLionel Sambuc
19*f4a2713aSLionel Sambucvoid fg(global int *arg) { }
20*f4a2713aSLionel Sambuc// CHECK: i32 addrspace(1)* nocapture %arg
21*f4a2713aSLionel Sambuc
22*f4a2713aSLionel Sambucvoid fl(local int *arg) { }
23*f4a2713aSLionel Sambuc// CHECK: i32 addrspace(2)* nocapture %arg
24*f4a2713aSLionel Sambuc
25*f4a2713aSLionel Sambucvoid fc(constant int *arg) { }
26*f4a2713aSLionel Sambuc// CHECK: i32 addrspace(3)* nocapture %arg
27*f4a2713aSLionel Sambuc
28