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 4target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-G1" 5target triple = "spirv-unknown-vulkan1.3-compute" 6 7; Function Attrs: convergent noinline norecurse nounwind optnone 8define spir_func noundef i32 @_Z7processv() #0 { 9 10; CHECK: %[[#entry:]] = OpLabel 11; CHECK: OpBranch %[[#header:]] 12entry: 13 %0 = call token @llvm.experimental.convergence.entry() 14 %1 = alloca i32, align 4 15 br label %header 16 17; CHECK: %[[#header]] = OpLabel 18; CHECK: OpLoopMerge %[[#merge:]] %[[#continue:]] None 19; CHECK: OpBranchConditional %[[#]] %[[#body:]] %[[#merge]] 20header: 21 %2 = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token %0) ] 22 br i1 true, label %body, label %merge 23 24; CHECK: %[[#merge]] = OpLabel 25; CHECK: OpReturnValue %[[#]] 26merge: 27 ret i32 0 28 29; CHECK: %[[#body]] = OpLabel 30; CHECK: OpBranch %[[#continue]] 31body: 32 store i32 0, ptr %1 33 br label %continue 34 35continue: 36 br label %header 37; CHECK: %[[#continue]] = OpLabel 38; CHECK: OpBranch %[[#header]] 39} 40 41; Function Attrs: convergent nocallback nofree nosync nounwind willreturn memory(none) 42declare token @llvm.experimental.convergence.entry() #1 43 44; Function Attrs: convergent nocallback nofree nosync nounwind willreturn memory(none) 45declare token @llvm.experimental.convergence.loop() #1 46 47 48attributes #0 = { convergent noinline norecurse nounwind optnone "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" } 49attributes #1 = { convergent nocallback nofree nosync nounwind willreturn memory(none) } 50attributes #2 = { convergent norecurse "frame-pointer"="all" "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" "no-trapping-math"="true" "stack-protector-buffer-size"="8" } 51attributes #3 = { convergent } 52 53!llvm.module.flags = !{!0, !1, !2} 54 55 56!0 = !{i32 1, !"wchar_size", i32 4} 57!1 = !{i32 4, !"dx.disable_optimizations", i32 1} 58!2 = !{i32 7, !"frame-pointer", i32 2} 59 60