Debian Codegraph @

third_party/spirv-cross/shaders-no-opt/asm/frag/do-while-loop-inverted-test.asm.frag

raw
1 ; SPIR-V
2 ; Version: 1.0
3 ; Generator: Khronos Glslang Reference Front End; 7
4 ; Bound: 28
5 ; Schema: 0
6 OpCapability Shader
7 %1 = OpExtInstImport "GLSL.std.450"
8 OpMemoryModel Logical GLSL450
9 OpEntryPoint Fragment %main "main"
10 OpExecutionMode %main OriginUpperLeft
11 OpSource GLSL 450
12 OpName %main "main"
13 OpName %i "i"
14 OpName %j "j"
15 %void = OpTypeVoid
16 %3 = OpTypeFunction %void
17 %int = OpTypeInt 32 1
18 %_ptr_Function_int = OpTypePointer Function %int
19 %int_0 = OpConstant %int 0
20 %int_1 = OpConstant %int 1
21 %int_20 = OpConstant %int 20
22 %bool = OpTypeBool
23 %main = OpFunction %void None %3
24 %5 = OpLabel
25 %i = OpVariable %_ptr_Function_int Function
26 %j = OpVariable %_ptr_Function_int Function
27 OpStore %i %int_0
28 OpStore %j %int_0
29 OpBranch %11
30 %11 = OpLabel
31 OpLoopMerge %13 %14 None
32 OpBranch %12
33 %12 = OpLabel
34 %15 = OpLoad %int %j
35 %16 = OpLoad %int %i
36 %17 = OpIAdd %int %15 %16
37 %19 = OpIAdd %int %17 %int_1
38 %20 = OpLoad %int %j
39 %21 = OpIMul %int %19 %20
40 OpStore %j %21
41 %22 = OpLoad %int %i
42 %23 = OpIAdd %int %22 %int_1
43 OpStore %i %23
44 OpBranch %14
45 %14 = OpLabel
46 %24 = OpLoad %int %i
47 %27 = OpIEqual %bool %24 %int_20
48 OpBranchConditional %27 %13 %11
49 %13 = OpLabel
50 OpReturn
51 OpFunctionEnd