1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
2 ; TODO: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
4 ; CHECK-SPIRV: OpName %[[#PTR_ID:]] "ptr"
5 ; CHECK-SPIRV: OpName %[[#PTR2_ID:]] "ptr2"
6 ; CHECK-SPIRV-DAG: OpDecorate %[[#PTR_ID]] MaxByteOffset 12
7 ; CHECK-SPIRV-DAG: OpDecorate %[[#PTR2_ID]] MaxByteOffset 123
8 ; CHECK-SPIRV: %[[#CHAR_T:]] = OpTypeInt 8 0
9 ; CHECK-SPIRV: %[[#CHAR_PTR_T:]] = OpTypePointer Workgroup %[[#CHAR_T]]
10 ; CHECK-SPIRV: %[[#PTR_ID]] = OpFunctionParameter %[[#CHAR_PTR_T]]
11 ; CHECK-SPIRV: %[[#PTR2_ID]] = OpFunctionParameter %[[#CHAR_PTR_T]]
13 define spir_kernel void @worker(i8 addrspace(3)* dereferenceable(12) %ptr) {
15 %ptr.addr = alloca i8 addrspace(3)*, align 4
16 store i8 addrspace(3)* %ptr, i8 addrspace(3)** %ptr.addr, align 4
20 define spir_func void @not_a_kernel(i8 addrspace(3)* dereferenceable(123) %ptr2) {