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 %}
15 ; if (4 + 3 > 7 || 4 + 3 < 8) {
19 ; if (4 + 3 > 7 && true) {
31 ; [numthreads(1, 1, 1)]
36 ; CHECK: %[[#func_9:]] = OpFunction %[[#uint:]] DontInline %[[#]]
37 ; CHECK: %[[#bb19:]] = OpLabel
38 ; CHECK: OpReturnValue %[[#]]
39 ; CHECK: OpFunctionEnd
40 ; CHECK: %[[#func_15:]] = OpFunction %[[#void:]] DontInline %[[#]]
41 ; CHECK: %[[#bb20:]] = OpLabel
43 ; CHECK: OpFunctionEnd
44 ; CHECK: %[[#func_17:]] = OpFunction %[[#void:]] None %[[#]]
45 ; CHECK: %[[#bb21:]] = OpLabel
47 ; CHECK: OpFunctionEnd
51 target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-G1"
52 target triple = "spirv-unknown-vulkan1.3-compute"
54 ; Function Attrs: convergent noinline norecurse nounwind optnone
55 define spir_func noundef i32 @_Z7processv() #0 {
57 %0 = call token @llvm.experimental.convergence.entry()
58 %a = alloca i32, align 4
59 %b = alloca i32, align 4
60 store i32 0, ptr %a, align 4
61 store i32 0, ptr %b, align 4
62 store i32 1, ptr %a, align 4
63 store i32 2, ptr %b, align 4
64 %1 = load i32, ptr %a, align 4
65 %2 = load i32, ptr %b, align 4
66 %add = add nsw i32 %1, %2
70 ; Function Attrs: convergent nocallback nofree nosync nounwind willreturn memory(none)
71 declare token @llvm.experimental.convergence.entry() #1
73 ; Function Attrs: convergent noinline norecurse nounwind optnone
74 define internal spir_func void @main() #0 {
76 %0 = call token @llvm.experimental.convergence.entry()
77 %call1 = call spir_func noundef i32 @_Z7processv() #3 [ "convergencectrl"(token %0) ]
81 ; Function Attrs: convergent norecurse
82 define void @main.1() #2 {
88 attributes #0 = { convergent noinline norecurse nounwind optnone "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
89 attributes #1 = { convergent nocallback nofree nosync nounwind willreturn memory(none) }
90 attributes #2 = { convergent norecurse "frame-pointer"="all" "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
91 attributes #3 = { convergent }
93 !llvm.module.flags = !{!0, !1, !2}
96 !0 = !{i32 1, !"wchar_size", i32 4}
97 !1 = !{i32 4, !"dx.disable_optimizations", i32 1}
98 !2 = !{i32 7, !"frame-pointer", i32 2}