Files
wgpu/naga/tests/out/spv/int64.spvasm
T
Sludge a9f14c7a90 Allow 64-bit hex literals and const-evaluate unary ops (#6616)
* Allow 64-bit hex literals

* Implement const evaluation for unary 64-bit ops

* Test 64-bit hex literals

* Add changelog entry
2024-11-25 18:54:12 -08:00

473 lines
13 KiB
Plaintext

; SPIR-V
; Version: 1.0
; Generator: rspirv
; Bound: 375
OpCapability Shader
OpCapability Int64
OpExtension "SPV_KHR_storage_buffer_storage_class"
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %359 "main"
OpExecutionMode %359 LocalSize 1 1 1
OpMemberDecorate %14 0 Offset 0
OpMemberDecorate %14 1 Offset 4
OpMemberDecorate %14 2 Offset 8
OpMemberDecorate %14 3 Offset 16
OpMemberDecorate %14 4 Offset 32
OpMemberDecorate %14 5 Offset 64
OpMemberDecorate %14 6 Offset 96
OpMemberDecorate %14 7 Offset 128
OpMemberDecorate %14 8 Offset 144
OpMemberDecorate %14 9 Offset 160
OpMemberDecorate %14 10 Offset 192
OpMemberDecorate %14 11 Offset 224
OpDecorate %15 ArrayStride 8
OpDecorate %17 ArrayStride 8
OpMemberDecorate %18 0 Offset 0
OpMemberDecorate %18 1 Offset 16
OpDecorate %23 DescriptorSet 0
OpDecorate %23 Binding 0
OpDecorate %24 Block
OpMemberDecorate %24 0 Offset 0
OpDecorate %26 NonWritable
OpDecorate %26 DescriptorSet 0
OpDecorate %26 Binding 1
OpDecorate %27 Block
OpMemberDecorate %27 0 Offset 0
OpDecorate %29 NonWritable
OpDecorate %29 DescriptorSet 0
OpDecorate %29 Binding 2
OpDecorate %30 Block
OpMemberDecorate %30 0 Offset 0
OpDecorate %32 DescriptorSet 0
OpDecorate %32 Binding 3
OpDecorate %33 Block
OpMemberDecorate %33 0 Offset 0
OpDecorate %35 DescriptorSet 0
OpDecorate %35 Binding 4
OpDecorate %36 Block
OpMemberDecorate %36 0 Offset 0
%2 = OpTypeVoid
%3 = OpTypeInt 64 1
%4 = OpTypeInt 64 0
%5 = OpTypeInt 32 0
%6 = OpTypeInt 32 1
%7 = OpTypeFloat 32
%8 = OpTypeVector %4 2
%9 = OpTypeVector %4 3
%10 = OpTypeVector %4 4
%11 = OpTypeVector %3 2
%12 = OpTypeVector %3 3
%13 = OpTypeVector %3 4
%14 = OpTypeStruct %5 %6 %7 %4 %8 %9 %10 %3 %11 %12 %13 %4
%16 = OpConstant %5 2
%15 = OpTypeArray %4 %16
%17 = OpTypeArray %3 %16
%18 = OpTypeStruct %15 %17
%19 = OpConstant %3 1
%20 = OpConstant %4 20
%22 = OpTypePointer Private %3
%21 = OpVariable %22 Private %19
%24 = OpTypeStruct %14
%25 = OpTypePointer Uniform %24
%23 = OpVariable %25 Uniform
%27 = OpTypeStruct %14
%28 = OpTypePointer StorageBuffer %27
%26 = OpVariable %28 StorageBuffer
%30 = OpTypeStruct %18
%31 = OpTypePointer StorageBuffer %30
%29 = OpVariable %31 StorageBuffer
%33 = OpTypeStruct %14
%34 = OpTypePointer StorageBuffer %33
%32 = OpVariable %34 StorageBuffer
%36 = OpTypeStruct %18
%37 = OpTypePointer StorageBuffer %36
%35 = OpVariable %37 StorageBuffer
%41 = OpTypeFunction %3 %3
%42 = OpTypePointer Uniform %14
%43 = OpConstant %5 0
%45 = OpTypePointer StorageBuffer %14
%47 = OpTypePointer StorageBuffer %18
%51 = OpConstant %3 20
%52 = OpConstant %3 31
%53 = OpConstant %3 1002003004005006
%54 = OpConstant %3 -9223372036854775807
%55 = OpConstant %3 5
%57 = OpTypePointer Function %3
%67 = OpTypePointer Uniform %5
%76 = OpTypePointer Uniform %6
%77 = OpConstant %5 1
%86 = OpTypePointer Uniform %7
%95 = OpTypePointer Uniform %3
%96 = OpConstant %5 7
%103 = OpTypePointer Uniform %4
%104 = OpConstant %5 3
%110 = OpTypePointer Uniform %8
%111 = OpConstant %5 4
%118 = OpTypePointer Uniform %9
%119 = OpConstant %5 5
%126 = OpTypePointer Uniform %10
%127 = OpConstant %5 6
%134 = OpTypePointer StorageBuffer %3
%141 = OpTypePointer StorageBuffer %11
%142 = OpTypePointer Uniform %11
%143 = OpConstant %5 8
%150 = OpTypePointer StorageBuffer %12
%151 = OpTypePointer Uniform %12
%152 = OpConstant %5 9
%159 = OpTypePointer StorageBuffer %13
%160 = OpTypePointer Uniform %13
%161 = OpConstant %5 10
%168 = OpTypePointer StorageBuffer %17
%188 = OpConstantNull %3
%216 = OpTypeFunction %4 %4
%222 = OpConstant %4 31
%223 = OpConstant %4 18446744073709551615
%224 = OpConstant %4 5
%226 = OpTypePointer Function %4
%289 = OpTypePointer StorageBuffer %4
%296 = OpTypePointer StorageBuffer %8
%303 = OpTypePointer StorageBuffer %9
%310 = OpTypePointer StorageBuffer %10
%317 = OpTypePointer StorageBuffer %15
%337 = OpConstantNull %4
%360 = OpTypeFunction %2
%366 = OpConstant %4 67
%367 = OpConstant %3 60
%373 = OpConstant %5 11
%40 = OpFunction %3 None %41
%39 = OpFunctionParameter %3
%38 = OpLabel
%56 = OpVariable %57 Function %51
%44 = OpAccessChain %42 %23 %43
%46 = OpAccessChain %45 %26 %43
%48 = OpAccessChain %47 %29 %43
%49 = OpAccessChain %45 %32 %43
%50 = OpAccessChain %47 %35 %43
OpBranch %58
%58 = OpLabel
%59 = OpISub %3 %52 %53
%60 = OpIAdd %3 %59 %54
%61 = OpLoad %3 %56
%62 = OpIAdd %3 %61 %60
OpStore %56 %62
%63 = OpLoad %3 %56
%64 = OpIAdd %3 %63 %55
%65 = OpLoad %3 %56
%66 = OpIAdd %3 %65 %64
OpStore %56 %66
%68 = OpAccessChain %67 %44 %43
%69 = OpLoad %5 %68
%70 = OpLoad %3 %56
%71 = OpUConvert %5 %70
%72 = OpIAdd %5 %69 %71
%73 = OpSConvert %3 %72
%74 = OpLoad %3 %56
%75 = OpIAdd %3 %74 %73
OpStore %56 %75
%78 = OpAccessChain %76 %44 %77
%79 = OpLoad %6 %78
%80 = OpLoad %3 %56
%81 = OpSConvert %6 %80
%82 = OpIAdd %6 %79 %81
%83 = OpSConvert %3 %82
%84 = OpLoad %3 %56
%85 = OpIAdd %3 %84 %83
OpStore %56 %85
%87 = OpAccessChain %86 %44 %16
%88 = OpLoad %7 %87
%89 = OpLoad %3 %56
%90 = OpConvertSToF %7 %89
%91 = OpFAdd %7 %88 %90
%92 = OpConvertFToS %3 %91
%93 = OpLoad %3 %56
%94 = OpIAdd %3 %93 %92
OpStore %56 %94
%97 = OpAccessChain %95 %44 %96
%98 = OpLoad %3 %97
%99 = OpCompositeConstruct %12 %98 %98 %98
%100 = OpCompositeExtract %3 %99 2
%101 = OpLoad %3 %56
%102 = OpIAdd %3 %101 %100
OpStore %56 %102
%105 = OpAccessChain %103 %44 %104
%106 = OpLoad %4 %105
%107 = OpBitcast %3 %106
%108 = OpLoad %3 %56
%109 = OpIAdd %3 %108 %107
OpStore %56 %109
%112 = OpAccessChain %110 %44 %111
%113 = OpLoad %8 %112
%114 = OpBitcast %11 %113
%115 = OpCompositeExtract %3 %114 1
%116 = OpLoad %3 %56
%117 = OpIAdd %3 %116 %115
OpStore %56 %117
%120 = OpAccessChain %118 %44 %119
%121 = OpLoad %9 %120
%122 = OpBitcast %12 %121
%123 = OpCompositeExtract %3 %122 2
%124 = OpLoad %3 %56
%125 = OpIAdd %3 %124 %123
OpStore %56 %125
%128 = OpAccessChain %126 %44 %127
%129 = OpLoad %10 %128
%130 = OpBitcast %13 %129
%131 = OpCompositeExtract %3 %130 3
%132 = OpLoad %3 %56
%133 = OpIAdd %3 %132 %131
OpStore %56 %133
%135 = OpAccessChain %95 %44 %96
%136 = OpLoad %3 %135
%137 = OpAccessChain %134 %46 %96
%138 = OpLoad %3 %137
%139 = OpIAdd %3 %136 %138
%140 = OpAccessChain %134 %49 %96
OpStore %140 %139
%144 = OpAccessChain %142 %44 %143
%145 = OpLoad %11 %144
%146 = OpAccessChain %141 %46 %143
%147 = OpLoad %11 %146
%148 = OpIAdd %11 %145 %147
%149 = OpAccessChain %141 %49 %143
OpStore %149 %148
%153 = OpAccessChain %151 %44 %152
%154 = OpLoad %12 %153
%155 = OpAccessChain %150 %46 %152
%156 = OpLoad %12 %155
%157 = OpIAdd %12 %154 %156
%158 = OpAccessChain %150 %49 %152
OpStore %158 %157
%162 = OpAccessChain %160 %44 %161
%163 = OpLoad %13 %162
%164 = OpAccessChain %159 %46 %161
%165 = OpLoad %13 %164
%166 = OpIAdd %13 %163 %165
%167 = OpAccessChain %159 %49 %161
OpStore %167 %166
%169 = OpAccessChain %168 %48 %77
%170 = OpLoad %17 %169
%171 = OpAccessChain %168 %50 %77
OpStore %171 %170
%172 = OpLoad %3 %56
%173 = OpExtInst %3 %1 SAbs %172
%174 = OpLoad %3 %56
%175 = OpIAdd %3 %174 %173
OpStore %56 %175
%176 = OpLoad %3 %56
%177 = OpLoad %3 %56
%178 = OpLoad %3 %56
%180 = OpExtInst %3 %1 SMax %176 %177
%179 = OpExtInst %3 %1 SMin %180 %178
%181 = OpLoad %3 %56
%182 = OpIAdd %3 %181 %179
OpStore %56 %182
%183 = OpLoad %3 %56
%184 = OpCompositeConstruct %11 %183 %183
%185 = OpLoad %3 %56
%186 = OpCompositeConstruct %11 %185 %185
%189 = OpCompositeExtract %3 %184 0
%190 = OpCompositeExtract %3 %186 0
%191 = OpIMul %3 %189 %190
%192 = OpIAdd %3 %188 %191
%193 = OpCompositeExtract %3 %184 1
%194 = OpCompositeExtract %3 %186 1
%195 = OpIMul %3 %193 %194
%187 = OpIAdd %3 %192 %195
%196 = OpLoad %3 %56
%197 = OpIAdd %3 %196 %187
OpStore %56 %197
%198 = OpLoad %3 %56
%199 = OpLoad %3 %56
%200 = OpExtInst %3 %1 SMax %198 %199
%201 = OpLoad %3 %56
%202 = OpIAdd %3 %201 %200
OpStore %56 %202
%203 = OpLoad %3 %56
%204 = OpLoad %3 %56
%205 = OpExtInst %3 %1 SMin %203 %204
%206 = OpLoad %3 %56
%207 = OpIAdd %3 %206 %205
OpStore %56 %207
%208 = OpLoad %3 %56
%209 = OpExtInst %3 %1 SSign %208
%210 = OpLoad %3 %56
%211 = OpIAdd %3 %210 %209
OpStore %56 %211
%212 = OpLoad %3 %56
OpReturnValue %212
OpFunctionEnd
%215 = OpFunction %4 None %216
%214 = OpFunctionParameter %4
%213 = OpLabel
%225 = OpVariable %226 Function %20
%217 = OpAccessChain %42 %23 %43
%218 = OpAccessChain %45 %26 %43
%219 = OpAccessChain %47 %29 %43
%220 = OpAccessChain %45 %32 %43
%221 = OpAccessChain %47 %35 %43
OpBranch %227
%227 = OpLabel
%228 = OpIAdd %4 %222 %223
%229 = OpISub %4 %228 %223
%230 = OpLoad %4 %225
%231 = OpIAdd %4 %230 %229
OpStore %225 %231
%232 = OpLoad %4 %225
%233 = OpIAdd %4 %232 %224
%234 = OpLoad %4 %225
%235 = OpIAdd %4 %234 %233
OpStore %225 %235
%236 = OpAccessChain %67 %217 %43
%237 = OpLoad %5 %236
%238 = OpLoad %4 %225
%239 = OpUConvert %5 %238
%240 = OpIAdd %5 %237 %239
%241 = OpUConvert %4 %240
%242 = OpLoad %4 %225
%243 = OpIAdd %4 %242 %241
OpStore %225 %243
%244 = OpAccessChain %76 %217 %77
%245 = OpLoad %6 %244
%246 = OpLoad %4 %225
%247 = OpSConvert %6 %246
%248 = OpIAdd %6 %245 %247
%249 = OpUConvert %4 %248
%250 = OpLoad %4 %225
%251 = OpIAdd %4 %250 %249
OpStore %225 %251
%252 = OpAccessChain %86 %217 %16
%253 = OpLoad %7 %252
%254 = OpLoad %4 %225
%255 = OpConvertUToF %7 %254
%256 = OpFAdd %7 %253 %255
%257 = OpConvertFToU %4 %256
%258 = OpLoad %4 %225
%259 = OpIAdd %4 %258 %257
OpStore %225 %259
%260 = OpAccessChain %103 %217 %104
%261 = OpLoad %4 %260
%262 = OpCompositeConstruct %9 %261 %261 %261
%263 = OpCompositeExtract %4 %262 2
%264 = OpLoad %4 %225
%265 = OpIAdd %4 %264 %263
OpStore %225 %265
%266 = OpAccessChain %95 %217 %96
%267 = OpLoad %3 %266
%268 = OpBitcast %4 %267
%269 = OpLoad %4 %225
%270 = OpIAdd %4 %269 %268
OpStore %225 %270
%271 = OpAccessChain %142 %217 %143
%272 = OpLoad %11 %271
%273 = OpBitcast %8 %272
%274 = OpCompositeExtract %4 %273 1
%275 = OpLoad %4 %225
%276 = OpIAdd %4 %275 %274
OpStore %225 %276
%277 = OpAccessChain %151 %217 %152
%278 = OpLoad %12 %277
%279 = OpBitcast %9 %278
%280 = OpCompositeExtract %4 %279 2
%281 = OpLoad %4 %225
%282 = OpIAdd %4 %281 %280
OpStore %225 %282
%283 = OpAccessChain %160 %217 %161
%284 = OpLoad %13 %283
%285 = OpBitcast %10 %284
%286 = OpCompositeExtract %4 %285 3
%287 = OpLoad %4 %225
%288 = OpIAdd %4 %287 %286
OpStore %225 %288
%290 = OpAccessChain %103 %217 %104
%291 = OpLoad %4 %290
%292 = OpAccessChain %289 %218 %104
%293 = OpLoad %4 %292
%294 = OpIAdd %4 %291 %293
%295 = OpAccessChain %289 %220 %104
OpStore %295 %294
%297 = OpAccessChain %110 %217 %111
%298 = OpLoad %8 %297
%299 = OpAccessChain %296 %218 %111
%300 = OpLoad %8 %299
%301 = OpIAdd %8 %298 %300
%302 = OpAccessChain %296 %220 %111
OpStore %302 %301
%304 = OpAccessChain %118 %217 %119
%305 = OpLoad %9 %304
%306 = OpAccessChain %303 %218 %119
%307 = OpLoad %9 %306
%308 = OpIAdd %9 %305 %307
%309 = OpAccessChain %303 %220 %119
OpStore %309 %308
%311 = OpAccessChain %126 %217 %127
%312 = OpLoad %10 %311
%313 = OpAccessChain %310 %218 %127
%314 = OpLoad %10 %313
%315 = OpIAdd %10 %312 %314
%316 = OpAccessChain %310 %220 %127
OpStore %316 %315
%318 = OpAccessChain %317 %219 %43
%319 = OpLoad %15 %318
%320 = OpAccessChain %317 %221 %43
OpStore %320 %319
%321 = OpLoad %4 %225
%322 = OpCopyObject %4 %321
%323 = OpLoad %4 %225
%324 = OpIAdd %4 %323 %322
OpStore %225 %324
%325 = OpLoad %4 %225
%326 = OpLoad %4 %225
%327 = OpLoad %4 %225
%329 = OpExtInst %4 %1 UMax %325 %326
%328 = OpExtInst %4 %1 UMin %329 %327
%330 = OpLoad %4 %225
%331 = OpIAdd %4 %330 %328
OpStore %225 %331
%332 = OpLoad %4 %225
%333 = OpCompositeConstruct %8 %332 %332
%334 = OpLoad %4 %225
%335 = OpCompositeConstruct %8 %334 %334
%338 = OpCompositeExtract %4 %333 0
%339 = OpCompositeExtract %4 %335 0
%340 = OpIMul %4 %338 %339
%341 = OpIAdd %4 %337 %340
%342 = OpCompositeExtract %4 %333 1
%343 = OpCompositeExtract %4 %335 1
%344 = OpIMul %4 %342 %343
%336 = OpIAdd %4 %341 %344
%345 = OpLoad %4 %225
%346 = OpIAdd %4 %345 %336
OpStore %225 %346
%347 = OpLoad %4 %225
%348 = OpLoad %4 %225
%349 = OpExtInst %4 %1 UMax %347 %348
%350 = OpLoad %4 %225
%351 = OpIAdd %4 %350 %349
OpStore %225 %351
%352 = OpLoad %4 %225
%353 = OpLoad %4 %225
%354 = OpExtInst %4 %1 UMin %352 %353
%355 = OpLoad %4 %225
%356 = OpIAdd %4 %355 %354
OpStore %225 %356
%357 = OpLoad %4 %225
OpReturnValue %357
OpFunctionEnd
%359 = OpFunction %2 None %360
%358 = OpLabel
%361 = OpAccessChain %42 %23 %43
%362 = OpAccessChain %45 %26 %43
%363 = OpAccessChain %47 %29 %43
%364 = OpAccessChain %45 %32 %43
%365 = OpAccessChain %47 %35 %43
OpBranch %368
%368 = OpLabel
%369 = OpFunctionCall %4 %215 %366
%370 = OpFunctionCall %3 %40 %367
%371 = OpBitcast %4 %370
%372 = OpIAdd %4 %369 %371
%374 = OpAccessChain %289 %364 %373
OpStore %374 %372
OpReturn
OpFunctionEnd