Debian Codegraph @

llvm/test/CodeGen/SPIRV/transcoding/DecorationMaxByteOffset.ll

raw
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 %}
3
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]]
12
13 define spir_kernel void @worker(ptr addrspace(3) dereferenceable(12) %ptr) {
14 entry:
15 %ptr.addr = alloca ptr addrspace(3), align 4
16 store ptr addrspace(3) %ptr, ptr %ptr.addr, align 4
17 ret void
18 }
19
20 define spir_func void @not_a_kernel(ptr addrspace(3) dereferenceable(123) %ptr2) {
21 entry:
22 ret void
23 }