Debian Codegraph @

llvm/test/CodeGen/SPIRV/structurizer/cf.return.void.ll

raw
1 ; RUN: llc -mtriple=spirv-unknown-vulkan-compute -O0 %s -o - | FileCheck %s
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan-compute %s -o - -filetype=obj | spirv-val %}
3
4 ;
5 ; void A() {
6 ; }
7 ;
8 ; [numthreads(1, 1, 1)]
9 ; void main() {
10 ; return A();
11 ; }
12
13 ; CHECK: %[[#func_3:]] = OpFunction %[[#void:]] DontInline %[[#]]
14 ; CHECK: %[[#bb8:]] = OpLabel
15 ; CHECK: OpReturn
16 ; CHECK: OpFunctionEnd
17 ; CHECK: %[[#func_4:]] = OpFunction %[[#void:]] DontInline %[[#]]
18 ; CHECK: %[[#bb9:]] = OpLabel
19 ; CHECK: OpReturn
20 ; CHECK: OpFunctionEnd
21 ; CHECK: %[[#func_6:]] = OpFunction %[[#void:]] None %[[#]]
22 ; CHECK: %[[#bb10:]] = OpLabel
23 ; CHECK: OpReturn
24 ; CHECK: OpFunctionEnd
25
26
27
28 target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-G1"
29 target triple = "spirv-unknown-vulkan1.3-compute"
30
31 ; Function Attrs: convergent noinline norecurse nounwind optnone
32 define spir_func void @_Z1Av() #0 {
33 entry:
34 %0 = call token @llvm.experimental.convergence.entry()
35 ret void
36 }
37
38 ; Function Attrs: convergent nocallback nofree nosync nounwind willreturn memory(none)
39 declare token @llvm.experimental.convergence.entry() #1
40
41 ; Function Attrs: convergent noinline norecurse nounwind optnone
42 define internal spir_func void @main() #0 {
43 entry:
44 %0 = call token @llvm.experimental.convergence.entry()
45 call spir_func void @_Z1Av() #3 [ "convergencectrl"(token %0) ]
46 ret void
47 }
48
49 ; Function Attrs: convergent norecurse
50 define void @main.1() #2 {
51 entry:
52 call void @main()
53 ret void
54 }
55
56 attributes #0 = { convergent noinline norecurse nounwind optnone "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
57 attributes #1 = { convergent nocallback nofree nosync nounwind willreturn memory(none) }
58 attributes #2 = { convergent norecurse "frame-pointer"="all" "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
59 attributes #3 = { convergent }
60
61 !llvm.module.flags = !{!0, !1, !2}
62
63
64 !0 = !{i32 1, !"wchar_size", i32 4}
65 !1 = !{i32 4, !"dx.disable_optimizations", i32 1}
66 !2 = !{i32 7, !"frame-pointer", i32 2}
67
68