Debian Codegraph @

IGC/ocloc_tests/SPIRV-extenstions/SPV_INTEL_function_pointers/vector_elem.ll

raw
1 ; UNSUPPORTED: system-windows
2 ; REQUIRES: llvm-spirv, regkeys, dg2-supported
3
4 ; RUN: llvm-as %s -o %t.bc
5 ; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_INTEL_function_pointers,+SPV_INTEL_masked_gather_scatter -o %t.spv
6 ; RUN: ocloc compile -spirv_input -file %t.spv -device dg2 -options " -igc_opts 'ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-LLVM
7
8 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"
9 target triple = "spir-unknown-unknown"
10
11 ; Function Attrs: noinline norecurse nounwind readnone
12 define internal i32 @_Z2f1u2CMvb32_j(i32 %x) {
13
14 entry:
15 ret i32 %x
16 }
17 ; Function Attrs: noinline norecurse nounwind readnone
18 define internal i32 @_Z2f2u2CMvb32_j(i32 %x) {
19 entry:
20 ret i32 %x
21 }
22
23 ; Function Attrs: noinline nounwind
24 define dllexport void @vadd() {
25 entry:
26 ; CHECK-LLVM: [[FUNCS:%.*]] = alloca <2 x i32 (i32)*>, align 16, !spirv.Decorations [[MOD1:![0-9]+]]
27 ; CHECK-LLVM: store <2 x i32 (i32)*> <i32 (i32)* @_Z2f1u2CMvb32_j, i32 (i32)* @_Z2f2u2CMvb32_j>, <2 x i32 (i32)*>* [[FUNCS]], align 16
28 %Funcs = alloca <2 x i32 (i32)*>, align 16
29 %0 = insertelement <2 x i32 (i32)*> undef, i32 (i32)* @_Z2f1u2CMvb32_j, i32 0
30 %1 = insertelement <2 x i32 (i32)*> %0, i32 (i32)* @_Z2f2u2CMvb32_j, i32 1
31 store <2 x i32 (i32)*> %1, <2 x i32 (i32)*>* %Funcs, align 16
32 ret void
33 }
34
35 ; CHECK-LLVM: [[MOD1]] = !{[[MOD2:![0-9]+]]}
36 ; CHECK-LLVM: [[MOD2]] = !{i32 44, i32 16}