xref: /llvm-project/llvm/test/CodeGen/SPIRV/transcoding/ReqdSubgroupSize.ll (revision bb6a437306c4f20d069a84e4cc48e632cacb389f)
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
12define spir_kernel void @foo() !intel_reqd_sub_group_size !0 {
13entry:
14  ret void
15}
16
17!0 = !{i32 8}
18