Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/transcoding/vec8.ll

raw
1 ; This test verifies that the Vector16 capability is correctly added
2 ; if an OpenCL kernel uses a vector of eight elements.
3 ;
4 ;Source:
5 ;__kernel void test( int8 v ) {}
6
7 ; RUN: llvm-as %s -o %t.bc
8 ; RUN: llvm-spirv %t.bc -o - -spirv-text | FileCheck %s --check-prefix=CHECK-SPIRV
9 ; RUN: llvm-spirv %t.bc -o %t.spv
10 ; RUN: spirv-val %t.spv
11 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.rev.bc
12 ; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM
13
14 ; CHECK-SPIRV: Capability Vector16
15
16 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-n8:16:32:64"
17 target triple = "spir"
18
19 ; Function Attrs: nounwind
20 define spir_kernel void @test(<8 x i32> %v) #0 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3 !kernel_arg_base_type !4 !kernel_arg_type_qual !5 {
21 ; CHECK-LLVM: <8 x i32>
22 %1 = alloca <8 x i32>, align 32
23 store <8 x i32> %v, <8 x i32>* %1, align 32
24 ret void
25 }
26
27 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
28
29 !opencl.enable.FP_CONTRACT = !{}
30 !opencl.spir.version = !{!6}
31 !opencl.ocl.version = !{!6}
32 !opencl.used.extensions = !{!7}
33 !opencl.used.optional.core.features = !{!7}
34 !opencl.compiler.options = !{!7}
35
36 !1 = !{i32 0}
37 !2 = !{!"none"}
38 !3 = !{!"int8"}
39 !4 = !{!"int8"}
40 !5 = !{!""}
41 !6 = !{i32 1, i32 2}
42 !7 = !{}