Debian Codegraph @

llvm/test/CodeGen/SPIRV/execution-mode-work_group_size_hint.ll

raw
1 ; From Khronos Translator's test case: test/reqd_work_group_size_md.ll
2
3 ; The purpose of this test is to check that the work_group_size_hint metadata
4 ; is correctly converted to the LocalSizeHint execution mode.
5
6 ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
7 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
8
9 ; CHECK: OpMemoryModel
10 ; CHECK-DAG: OpEntryPoint Kernel %[[#ENTRY1:]] "test1"
11 ; CHECK-DAG: OpEntryPoint Kernel %[[#ENTRY2:]] "test2"
12 ; CHECK-DAG: OpEntryPoint Kernel %[[#ENTRY3:]] "test3"
13 ; CHECK-DAG: OpExecutionMode %[[#ENTRY1]] LocalSizeHint 1 2 3
14 ; CHECK-DAG: OpExecutionMode %[[#ENTRY2]] LocalSizeHint 2 3 1
15 ; CHECK-DAG: OpExecutionMode %[[#ENTRY3]] LocalSizeHint 3 1 1
16
17 define spir_kernel void @test1() !work_group_size_hint !1 {
18 entry:
19 ret void
20 }
21
22 define spir_kernel void @test2() !work_group_size_hint !2 {
23 entry:
24 ret void
25 }
26
27 define spir_kernel void @test3() !work_group_size_hint !3 {
28 entry:
29 ret void
30 }
31
32 !1 = !{i32 1, i32 2, i32 3}
33 !2 = !{i32 2, i32 3}
34 !3 = !{i32 3}