Anastasia Stulova | b339893 | 2017-06-05 11:27:03 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -x cl -O0 -cl-std=CL2.0 -emit-llvm -triple x86_64-unknown-linux-gnu %s -o - | FileCheck %s --check-prefix=X86 |
| 2 | // RUN: %clang_cc1 -x cl -O0 -cl-std=CL2.0 -emit-llvm -triple spir-unknown-unknown %s -o - | FileCheck %s --check-prefix=SPIR |
| 3 | // RUN: %clang_cc1 -x cl -O0 -cl-std=CL2.0 -emit-llvm -triple spir64-unknown-unknown %s -o - | FileCheck %s --check-prefix=SPIR64 |
| 4 | // RUN: %clang_cc1 -x cl -O0 -cl-std=CL2.0 -emit-llvm -triple amdgcn-amd-amdhsa-amdgizcl %s -o - | FileCheck %s --check-prefix=AMD |
| 5 | __kernel void testPipe( pipe int test ) |
| 6 | { |
| 7 | int s = sizeof(test); |
| 8 | // X86: store %opencl.pipe_t* %test, %opencl.pipe_t** %test.addr, align 8 |
| 9 | // X86: store i32 8, i32* %s, align 4 |
| 10 | // SPIR: store %opencl.pipe_t addrspace(1)* %test, %opencl.pipe_t addrspace(1)** %test.addr, align 4 |
| 11 | // SPIR: store i32 4, i32* %s, align 4 |
| 12 | // SPIR64: store %opencl.pipe_t addrspace(1)* %test, %opencl.pipe_t addrspace(1)** %test.addr, align 8 |
| 13 | // SPIR64: store i32 8, i32* %s, align 4 |
Yaxun Liu | 25d1b43 | 2017-07-05 04:58:24 +0000 | [diff] [blame] | 14 | // AMD: store %opencl.pipe_t addrspace(1)* %test, %opencl.pipe_t addrspace(1)* addrspace(5)* %test.addr, align 8 |
Anastasia Stulova | b339893 | 2017-06-05 11:27:03 +0000 | [diff] [blame] | 15 | // AMD: store i32 8, i32 addrspace(5)* %s, align 4 |
| 16 | } |