Debian Codegraph @

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

raw
1 ; SPIR-V
2 ; Version: 1.0
3 ; Generator: Khronos Glslang Reference Front End; 7
4 ; Bound: 29
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_20 = OpConstant %int 20
21 %bool = OpTypeBool
22 %int_1 = OpConstant %int 1
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 %15
33 %15 = OpLabel
34 %16 = OpLoad %int %i
35 %19 = OpIEqual %bool %16 %int_20
36 OpBranchConditional %19 %13 %12
37 %12 = OpLabel
38 %20 = OpLoad %int %j
39 %21 = OpLoad %int %i
40 %22 = OpIAdd %int %20 %21
41 %24 = OpIAdd %int %22 %int_1
42 %25 = OpLoad %int %j
43 %26 = OpIMul %int %24 %25
44 OpStore %j %26
45 %27 = OpLoad %int %i
46 %28 = OpIAdd %int %27 %int_1
47 OpStore %i %28
48 OpBranch %14
49 %14 = OpLabel
50 OpBranch %11
51 %13 = OpLabel
52 OpReturn
53 OpFunctionEnd