etc/services - sync with NetBSD-8
[minix.git] / external / bsd / llvm / dist / clang / test / CodeGenOpenCL / addr-space-struct-arg.cl
blobd711f78d4ef0f1d82c2c348b66455c320014c1e1
1 // RUN: %clang_cc1 %s -emit-llvm -o - -O0 -ffake-address-space-map -triple i686-pc-darwin | FileCheck %s
3 typedef struct {
4 int cells[9];
5 } Mat3X3;
7 typedef struct {
8 int cells[16];
9 } Mat4X4;
11 Mat4X4 __attribute__((noinline)) foo(Mat3X3 in) {
12 Mat4X4 out;
13 return out;
16 kernel void ker(global Mat3X3 *in, global Mat4X4 *out) {
17 out[0] = foo(in[1]);
20 // Expect two mem copies: one for the argument "in", and one for
21 // the return value.
22 // CHECK: call void @llvm.memcpy.p0i8.p1i8.i32(i8*
23 // CHECK: call void @llvm.memcpy.p1i8.p0i8.i32(i8 addrspace(1)*