wgpu/naga/tests/out/spv/wgsl-control-flow.spvasm

443 lines
8.8 KiB
Plaintext

; SPIR-V
; Version: 1.1
; Generator: rspirv
; Bound: 241
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %231 "main"
OpExecutionMode %231 LocalSize 1 1 1
%2 = OpTypeVoid
%3 = OpTypeInt 32 1
%6 = OpTypeFunction %2
%7 = OpConstant %3 1
%8 = OpConstant %3 0
%9 = OpConstant %3 2
%10 = OpConstant %3 3
%11 = OpConstant %3 4
%12 = OpTypeInt 32 0
%13 = OpConstant %12 0
%15 = OpTypePointer Function %3
%16 = OpConstantNull %3
%18 = OpConstant %12 2
%19 = OpConstant %12 1
%20 = OpConstant %12 72
%21 = OpConstant %12 264
%22 = OpConstant %12 2056
%52 = OpTypeFunction %2 %3
%89 = OpTypeVector %12 2
%90 = OpTypePointer Function %89
%91 = OpTypeBool
%92 = OpTypeVector %91 2
%93 = OpConstantComposite %89 %13 %13
%94 = OpConstant %12 4294967295
%95 = OpConstantComposite %89 %94 %94
%115 = OpTypeFunction %2 %3 %3 %3
%184 = OpTypeFunction %2 %3 %3 %3 %3
%5 = OpFunction %2 None %6
%4 = OpLabel
%14 = OpVariable %15 Function %16
OpBranch %17
%17 = OpLabel
OpControlBarrier %18 %19 %20
OpControlBarrier %18 %18 %21
OpControlBarrier %18 %18 %22
OpSelectionMerge %23 None
OpSwitch %7 %24
%24 = OpLabel
OpStore %14 %7
OpBranch %23
%23 = OpLabel
%25 = OpLoad %3 %14
OpSelectionMerge %26 None
OpSwitch %25 %31 1 %27 2 %28 3 %29 4 %29 5 %30 6 %31
%27 = OpLabel
OpStore %14 %8
OpBranch %26
%28 = OpLabel
OpStore %14 %7
OpBranch %26
%29 = OpLabel
OpStore %14 %9
OpBranch %26
%30 = OpLabel
OpStore %14 %10
OpBranch %26
%31 = OpLabel
OpStore %14 %11
OpBranch %26
%26 = OpLabel
OpSelectionMerge %32 None
OpSwitch %13 %34 0 %33
%33 = OpLabel
OpBranch %32
%34 = OpLabel
OpBranch %32
%32 = OpLabel
%35 = OpLoad %3 %14
OpSelectionMerge %36 None
OpSwitch %35 %41 1 %37 2 %38 3 %39 4 %40
%37 = OpLabel
OpStore %14 %8
OpBranch %36
%38 = OpLabel
OpStore %14 %7
OpBranch %36
%39 = OpLabel
OpStore %14 %9
OpBranch %36
%40 = OpLabel
OpBranch %36
%41 = OpLabel
OpStore %14 %10
OpBranch %36
%36 = OpLabel
%42 = OpLoad %3 %14
OpSelectionMerge %43 None
OpSwitch %42 %48 1 %44 2 %45 3 %46 4 %46 5 %47 6 %47
%44 = OpLabel
OpStore %14 %8
OpReturn
%45 = OpLabel
OpStore %14 %7
OpReturn
%46 = OpLabel
OpStore %14 %9
OpReturn
%47 = OpLabel
OpStore %14 %10
OpReturn
%48 = OpLabel
OpStore %14 %11
OpReturn
%43 = OpLabel
OpReturn
OpFunctionEnd
%51 = OpFunction %2 None %52
%50 = OpFunctionParameter %3
%49 = OpLabel
OpBranch %53
%53 = OpLabel
OpSelectionMerge %54 None
OpSwitch %50 %55
%55 = OpLabel
OpBranch %54
%54 = OpLabel
OpReturn
OpFunctionEnd
%57 = OpFunction %2 None %6
%56 = OpLabel
OpBranch %58
%58 = OpLabel
OpSelectionMerge %59 None
OpSwitch %8 %61 0 %60
%60 = OpLabel
OpBranch %59
%61 = OpLabel
OpBranch %59
%59 = OpLabel
OpReturn
OpFunctionEnd
%63 = OpFunction %2 None %6
%62 = OpLabel
OpBranch %64
%64 = OpLabel
OpSelectionMerge %65 None
OpSwitch %13 %67 0 %66
%66 = OpLabel
OpBranch %65
%67 = OpLabel
OpBranch %65
%65 = OpLabel
OpSelectionMerge %68 None
OpSwitch %13 %70 0 %69
%69 = OpLabel
OpReturn
%70 = OpLabel
OpReturn
%68 = OpLabel
OpReturn
OpFunctionEnd
%72 = OpFunction %2 None %6
%71 = OpLabel
OpBranch %73
%73 = OpLabel
OpSelectionMerge %74 None
OpSwitch %8 %80 0 %75 1 %76 2 %77 3 %78 4 %79
%75 = OpLabel
OpReturn
%76 = OpLabel
OpReturn
%77 = OpLabel
OpReturn
%78 = OpLabel
OpReturn
%79 = OpLabel
OpReturn
%80 = OpLabel
OpReturn
%74 = OpLabel
OpReturn
OpFunctionEnd
%83 = OpFunction %2 None %52
%82 = OpFunctionParameter %3
%81 = OpLabel
%96 = OpVariable %90 Function %95
OpBranch %84
%84 = OpLabel
OpBranch %85
%85 = OpLabel
OpLoopMerge %86 %88 None
OpBranch %97
%97 = OpLabel
%98 = OpLoad %89 %96
%99 = OpIEqual %92 %93 %98
%100 = OpAll %91 %99
OpSelectionMerge %101 None
OpBranchConditional %100 %86 %101
%101 = OpLabel
%102 = OpCompositeExtract %12 %98 1
%103 = OpIEqual %91 %102 %13
%104 = OpSelect %12 %103 %19 %13
%105 = OpCompositeConstruct %89 %104 %19
%106 = OpISub %89 %98 %105
OpStore %96 %106
OpBranch %87
%87 = OpLabel
OpSelectionMerge %107 None
OpSwitch %82 %109 1 %108
%108 = OpLabel
OpBranch %88
%109 = OpLabel
OpBranch %107
%107 = OpLabel
OpBranch %88
%88 = OpLabel
OpBranch %85
%86 = OpLabel
OpReturn
OpFunctionEnd
%114 = OpFunction %2 None %115
%111 = OpFunctionParameter %3
%112 = OpFunctionParameter %3
%113 = OpFunctionParameter %3
%110 = OpLabel
%121 = OpVariable %90 Function %95
%143 = OpVariable %90 Function %95
%163 = OpVariable %90 Function %95
OpBranch %116
%116 = OpLabel
OpBranch %117
%117 = OpLabel
OpLoopMerge %118 %120 None
OpBranch %122
%122 = OpLabel
%123 = OpLoad %89 %121
%124 = OpIEqual %92 %93 %123
%125 = OpAll %91 %124
OpSelectionMerge %126 None
OpBranchConditional %125 %118 %126
%126 = OpLabel
%127 = OpCompositeExtract %12 %123 1
%128 = OpIEqual %91 %127 %13
%129 = OpSelect %12 %128 %19 %13
%130 = OpCompositeConstruct %89 %129 %19
%131 = OpISub %89 %123 %130
OpStore %121 %131
OpBranch %119
%119 = OpLabel
OpSelectionMerge %132 None
OpSwitch %111 %135 1 %133 2 %134
%133 = OpLabel
OpBranch %120
%134 = OpLabel
OpSelectionMerge %136 None
OpSwitch %112 %138 1 %137
%137 = OpLabel
OpBranch %120
%138 = OpLabel
OpBranch %139
%139 = OpLabel
OpLoopMerge %140 %142 None
OpBranch %144
%144 = OpLabel
%145 = OpLoad %89 %143
%146 = OpIEqual %92 %93 %145
%147 = OpAll %91 %146
OpSelectionMerge %148 None
OpBranchConditional %147 %140 %148
%148 = OpLabel
%149 = OpCompositeExtract %12 %145 1
%150 = OpIEqual %91 %149 %13
%151 = OpSelect %12 %150 %19 %13
%152 = OpCompositeConstruct %89 %151 %19
%153 = OpISub %89 %145 %152
OpStore %143 %153
OpBranch %141
%141 = OpLabel
OpSelectionMerge %154 None
OpSwitch %113 %156 1 %155
%155 = OpLabel
OpBranch %142
%156 = OpLabel
OpBranch %154
%154 = OpLabel
OpBranch %142
%142 = OpLabel
OpBranch %139
%140 = OpLabel
OpBranch %136
%136 = OpLabel
OpBranch %132
%135 = OpLabel
OpBranch %132
%132 = OpLabel
OpSelectionMerge %157 None
OpSwitch %112 %158
%158 = OpLabel
OpBranch %120
%157 = OpLabel
OpBranch %120
%120 = OpLabel
OpBranch %117
%118 = OpLabel
OpBranch %159
%159 = OpLabel
OpLoopMerge %160 %162 None
OpBranch %164
%164 = OpLabel
%165 = OpLoad %89 %163
%166 = OpIEqual %92 %93 %165
%167 = OpAll %91 %166
OpSelectionMerge %168 None
OpBranchConditional %167 %160 %168
%168 = OpLabel
%169 = OpCompositeExtract %12 %165 1
%170 = OpIEqual %91 %169 %13
%171 = OpSelect %12 %170 %19 %13
%172 = OpCompositeConstruct %89 %171 %19
%173 = OpISub %89 %165 %172
OpStore %163 %173
OpBranch %161
%161 = OpLabel
OpSelectionMerge %174 None
OpSwitch %112 %175 1 %175
%175 = OpLabel
OpSelectionMerge %176 None
OpSwitch %113 %177
%177 = OpLabel
OpBranch %162
%176 = OpLabel
OpBranch %174
%174 = OpLabel
OpBranch %162
%162 = OpLabel
OpBranch %159
%160 = OpLabel
OpReturn
OpFunctionEnd
%183 = OpFunction %2 None %184
%179 = OpFunctionParameter %3
%180 = OpFunctionParameter %3
%181 = OpFunctionParameter %3
%182 = OpFunctionParameter %3
%178 = OpLabel
%185 = OpVariable %15 Function %8
%191 = OpVariable %90 Function %95
%209 = OpVariable %90 Function %95
OpBranch %186
%186 = OpLabel
OpBranch %187
%187 = OpLabel
OpLoopMerge %188 %190 None
OpBranch %192
%192 = OpLabel
%193 = OpLoad %89 %191
%194 = OpIEqual %92 %93 %193
%195 = OpAll %91 %194
OpSelectionMerge %196 None
OpBranchConditional %195 %188 %196
%196 = OpLabel
%197 = OpCompositeExtract %12 %193 1
%198 = OpIEqual %91 %197 %13
%199 = OpSelect %12 %198 %19 %13
%200 = OpCompositeConstruct %89 %199 %19
%201 = OpISub %89 %193 %200
OpStore %191 %201
OpBranch %189
%189 = OpLabel
OpSelectionMerge %202 None
OpSwitch %179 %204 1 %203
%203 = OpLabel
OpStore %185 %7
OpBranch %202
%204 = OpLabel
OpBranch %202
%202 = OpLabel
OpBranch %190
%190 = OpLabel
OpBranch %187
%188 = OpLabel
OpBranch %205
%205 = OpLabel
OpLoopMerge %206 %208 None
OpBranch %210
%210 = OpLabel
%211 = OpLoad %89 %209
%212 = OpIEqual %92 %93 %211
%213 = OpAll %91 %212
OpSelectionMerge %214 None
OpBranchConditional %213 %206 %214
%214 = OpLabel
%215 = OpCompositeExtract %12 %211 1
%216 = OpIEqual %91 %215 %13
%217 = OpSelect %12 %216 %19 %13
%218 = OpCompositeConstruct %89 %217 %19
%219 = OpISub %89 %211 %218
OpStore %209 %219
OpBranch %207
%207 = OpLabel
OpSelectionMerge %220 None
OpSwitch %179 %223 1 %221 2 %222
%221 = OpLabel
OpBranch %220
%222 = OpLabel
OpSelectionMerge %224 None
OpSwitch %180 %226 1 %225
%225 = OpLabel
OpBranch %208
%226 = OpLabel
OpSelectionMerge %227 None
OpSwitch %181 %229 1 %228
%228 = OpLabel
OpStore %185 %9
OpBranch %227
%229 = OpLabel
OpBranch %227
%227 = OpLabel
OpBranch %224
%224 = OpLabel
OpBranch %220
%223 = OpLabel
OpBranch %220
%220 = OpLabel
OpBranch %208
%208 = OpLabel
OpBranch %205
%206 = OpLabel
OpReturn
OpFunctionEnd
%231 = OpFunction %2 None %6
%230 = OpLabel
OpBranch %232
%232 = OpLabel
%233 = OpFunctionCall %2 %5
%234 = OpFunctionCall %2 %51 %7
%235 = OpFunctionCall %2 %57
%236 = OpFunctionCall %2 %63
%237 = OpFunctionCall %2 %72
%238 = OpFunctionCall %2 %83 %7
%239 = OpFunctionCall %2 %114 %7 %9 %10
%240 = OpFunctionCall %2 %183 %7 %9 %10 %11
OpReturn
OpFunctionEnd