Debian Codegraph @

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

raw
1 ; RUN: llvm-as %s -o %t.bc
2 ; RUN: llvm-spirv %t.bc -spirv-text -o %t.txt
3 ; RUN: FileCheck < %t.txt %s --check-prefix=CHECK-SPIRV
4 ; RUN: llvm-spirv %t.bc -o %t.spv
5 ; RUN: spirv-val %t.spv
6 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.rev.bc
7 ; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM
8
9 ; LLVM => SPIRV checks
10 ; check for magic number followed by version 1.0
11 ; CHECK-SPIRV: 119734787 65536
12
13 ; CHECK-SPIRV-DAG: EntryPoint 6 [[WORKER:[0-9]+]] "worker"
14 ; CHECK-SPIRV-DAG: ExecutionMode [[WORKER]] 18 128 10 1
15
16
17 ; LLVM => SPIRV => LLVM checks
18 ; CHECK-LLVM: define spir_kernel void @worker()
19 ; CHECK-LLVM-SAME: !work_group_size_hint [[WG:![0-9]+]]
20
21 ; CHECK-LLVM: [[WG]] = !{i32 128, i32 10, i32 1}
22
23 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"
24 target triple = "spir-unknown-unknown"
25
26 ; Function Attrs: norecurse nounwind readnone
27 define spir_kernel void @worker() local_unnamed_addr #0 !kernel_arg_addr_space !1 !kernel_arg_access_qual !1 !kernel_arg_type !1 !kernel_arg_base_type !1 !kernel_arg_type_qual !1 !work_group_size_hint !3 {
28 entry:
29 ret void
30 }
31
32 attributes #0 = { norecurse nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
33
34 !opencl.enable.FP_CONTRACT = !{}
35 !opencl.ocl.version = !{!0}
36 !opencl.spir.version = !{!0}
37 !opencl.used.extensions = !{!1}
38 !opencl.used.optional.core.features = !{!1}
39 !opencl.compiler.options = !{!1}
40
41 !0 = !{i32 1, i32 2}
42 !1 = !{}
43 !3 = !{i32 128, i32 10, i32 1}