blob: e37722820341cf03a312518abefe3be0348defc4 [file] [log] [blame]
;; Test where src and dst have cases of a switch in different order.
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %4 "main"
OpExecutionMode %4 LocalSize 1 1 1
OpSource ESSL 310
OpName %4 "main"
OpName %7 "BufferIn"
OpMemberName %7 0 "i"
OpName %9 ""
OpName %23 "BufferOut"
OpMemberName %23 0 "o"
OpName %25 ""
OpMemberDecorate %7 0 Offset 0
OpDecorate %7 Block
OpDecorate %9 DescriptorSet 0
OpDecorate %9 Binding 0
OpMemberDecorate %23 0 Offset 0
OpDecorate %23 BufferBlock
OpDecorate %25 DescriptorSet 0
OpDecorate %25 Binding 1
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%6 = OpTypeInt 32 0
%7 = OpTypeStruct %6
%8 = OpTypePointer Uniform %7
%9 = OpVariable %8 Uniform
%10 = OpTypeInt 32 1
%11 = OpConstant %10 0
%12 = OpTypePointer Uniform %6
%23 = OpTypeStruct %6
%24 = OpTypePointer Uniform %23
%25 = OpVariable %24 Uniform
%28 = OpConstant %10 1
%34 = OpConstant %6 2
%52 = OpConstant %6 1
%4 = OpFunction %2 None %3
%5 = OpLabel
%13 = OpAccessChain %12 %9 %11
%14 = OpLoad %6 %13
OpSelectionMerge %22 None
OpSwitch %14 %21 0 %15 1 %16 2 %17 3 %18 4 %19 5 %20
%21 = OpLabel
%54 = OpAccessChain %12 %25 %11
%55 = OpLoad %6 %54
%56 = OpIAdd %6 %55 %34
%57 = OpAccessChain %12 %25 %11
OpStore %57 %56
OpBranch %22
%15 = OpLabel
%26 = OpAccessChain %12 %25 %11
%27 = OpLoad %6 %26
%29 = OpIAdd %6 %27 %28
OpStore %26 %29
OpBranch %22
%16 = OpLabel
%31 = OpAccessChain %12 %25 %11
%32 = OpLoad %6 %31
%33 = OpISub %6 %32 %28
OpStore %31 %33
OpBranch %17
%17 = OpLabel
%35 = OpAccessChain %12 %25 %11
%36 = OpLoad %6 %35
%37 = OpIMul %6 %36 %34
%38 = OpAccessChain %12 %25 %11
OpStore %38 %37
OpBranch %22
%18 = OpLabel
%40 = OpAccessChain %12 %25 %11
%41 = OpLoad %6 %40
%42 = OpUDiv %6 %41 %34
%43 = OpAccessChain %12 %25 %11
OpStore %43 %42
OpBranch %22
%19 = OpLabel
%45 = OpAccessChain %12 %25 %11
%46 = OpLoad %6 %45
%47 = OpAccessChain %12 %25 %11
%48 = OpLoad %6 %47
%49 = OpIMul %6 %46 %48
%50 = OpAccessChain %12 %25 %11
OpStore %50 %49
OpBranch %22
%20 = OpLabel
%53 = OpAccessChain %12 %25 %11
OpStore %53 %52
OpBranch %21
%22 = OpLabel
OpReturn
OpFunctionEnd