Debian Codegraph @

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

raw
1 ;; Check translation of intel_reqd_sub_group_size metadata to SubgroupSize
2 ;; execution mode and back. The IR is producded from the following OpenCL C code:
3 ;; kernel __attribute__((intel_reqd_sub_group_size(8)))
4 ;; void foo() {}
5
6 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
7
8 ; CHECK-SPIRV: OpCapability SubgroupDispatch
9 ; CHECK-SPIRV: OpEntryPoint Kernel %[[#kernel:]] "foo"
10 ; CHECK-SPIRV: OpExecutionMode %[[#kernel]] SubgroupSize 8
11
12 define spir_kernel void @foo() !intel_reqd_sub_group_size !0 {
13 entry:
14 ret void
15 }
16
17 !0 = !{i32 8}