Debian Codegraph @

IGC/ocloc_tests/SPIRV-extensions/SPV_INTEL_io_pipes/PipeStorageIOINTEL.ll

raw
1 ; UNSUPPORTED: system-windows
2 ; REQUIRES: llvm-spirv, regkeys, dg2-supported, llvm-16-plus
3
4 ; LLVM with opaque pointers:
5 ; RUN: llvm-as %OPAQUE_PTR_FLAG% %s -o %t.bc
6 ; RUN: llvm-spirv %t.bc %OPAQUE_PTR_FLAG% --spirv-ext=+SPV_INTEL_fpga_reg -o %t.spv
7 ; RUN: ocloc compile -spirv_input -file %t.spv -device dg2 -options " -igc_opts 'EnableOpaquePointersBackend=1,ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s
8
9 ; CHECK-DAG: %spirv.ConstantPipeStorage = type { i32, i32, i32 }
10 ; CHECK-DAG: %"[[CL_PIPE_STORAGE_NAME:[^"]+]]" = type { ptr addrspace(1) }
11 ; CHECK-DAG: [[CREATOR_NAME:[^ ]+]] = linkonce_odr addrspace(1) global %spirv.ConstantPipeStorage { i32 16, i32 16, i32 1 }, align 4
12 ; CHECK-DAG: @mygpipe = addrspace(1) global %"[[CL_PIPE_STORAGE_NAME]]" { ptr addrspace(1) [[CREATOR_NAME]] }, align 4, !spirv.Decorations ![[IO_MD:[0-9]+]]
13
14 ; CHECK: ![[IO_MD]] = !{![[IO_MD1:[0-9]+]], ![[IO_MD2:[0-9]+]]}
15 ; CHECK: ![[IO_MD1]] = !{i32 41, !"mygpipe", i32 0}
16 ; CHECK: ![[IO_MD2]] = !{i32 44, i32 4}
17
18 target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
19 target triple = "spir-unknown-unknown"
20
21 %spirv.ConstantPipeStorage = type { i32, i32, i32 }
22 %"class.cl::pipe_storage<int __attribute__((ext_vector_type(4))), 1>" = type { %spirv.PipeStorage addrspace(1)* }
23 %spirv.PipeStorage = type opaque
24
25 @_ZN2cl9__details29OpConstantPipeStorage_CreatorILi16ELi16ELi1EE5valueE = linkonce_odr addrspace(1) global %spirv.ConstantPipeStorage { i32 16, i32 16, i32 1 }, align 4
26 @mygpipe = addrspace(1) global %"class.cl::pipe_storage<int __attribute__((ext_vector_type(4))), 1>" { %spirv.PipeStorage addrspace(1)* bitcast (%spirv.ConstantPipeStorage addrspace(1)* @_ZN2cl9__details29OpConstantPipeStorage_CreatorILi16ELi16ELi1EE5valueE to %spirv.PipeStorage addrspace(1)*) }, align 4, !io_pipe_id !5
27
28 ; Function Attrs: nounwind
29 define spir_kernel void @worker() {
30 entry:
31 ret void
32 }
33
34 !opencl.enable.FP_CONTRACT = !{}
35 !opencl.spir.version = !{!0}
36 !opencl.ocl.version = !{!1}
37 !opencl.used.extensions = !{!2}
38 !opencl.used.optional.core.features = !{!2}
39 !opencl.compiler.options = !{!2}
40 !llvm.ident = !{!3}
41 !spirv.Source = !{!4}
42 !spirv.String = !{}
43
44 !0 = !{i32 1, i32 2}
45 !1 = !{i32 2, i32 2}
46 !2 = !{}
47 !3 = !{!"clang version 3.6.1 "}
48 !4 = !{i32 4, i32 202000}
49 !5 = !{i32 1}