• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1;; Test where src and dst have a few large functions with large differences.
2               OpCapability Shader
3          %1 = OpExtInstImport "GLSL.std.450"
4               OpMemoryModel Logical GLSL450
5               OpEntryPoint GLCompute %4 "main" %15
6               OpExecutionMode %4 LocalSize 1 1 1
7               OpSource ESSL 310
8               OpName %4 "main"
9               OpName %6 "f1("
10               OpName %8 "f2("
11               OpName %12 "x"
12               OpName %15 "gl_LocalInvocationID"
13               OpName %20 "y"
14               OpName %27 "image"
15               OpName %44 "sum"
16               OpName %46 "i"
17               OpName %56 "j"
18               OpName %80 "BufferOut"
19               OpMemberName %80 0 "o_uv4"
20               OpMemberName %80 1 "o_v3"
21               OpMemberName %80 2 "o_i"
22               OpName %82 ""
23               OpName %88 "BufferIn"
24               OpMemberName %88 0 "i_u"
25               OpMemberName %88 1 "i_v4"
26               OpMemberName %88 2 "i_f"
27               OpName %90 ""
28               OpName %101 "i"
29               OpName %128 "image2"
30               OpDecorate %15 BuiltIn LocalInvocationId
31               OpDecorate %27 DescriptorSet 0
32               OpDecorate %27 Binding 2
33               OpMemberDecorate %80 0 Offset 0
34               OpMemberDecorate %80 1 Offset 16
35               OpMemberDecorate %80 2 Offset 28
36               OpDecorate %80 BufferBlock
37               OpDecorate %82 DescriptorSet 0
38               OpDecorate %82 Binding 1
39               OpMemberDecorate %88 0 Offset 0
40               OpMemberDecorate %88 1 RowMajor
41               OpMemberDecorate %88 1 Offset 16
42               OpMemberDecorate %88 1 MatrixStride 16
43               OpMemberDecorate %88 2 Offset 80
44               OpDecorate %88 Block
45               OpDecorate %90 DescriptorSet 0
46               OpDecorate %90 Binding 0
47               OpDecorate %128 DescriptorSet 0
48               OpDecorate %128 Binding 3
49          %2 = OpTypeVoid
50          %3 = OpTypeFunction %2
51         %10 = OpTypeInt 32 0
52         %11 = OpTypePointer Function %10
53         %13 = OpTypeVector %10 3
54         %14 = OpTypePointer Input %13
55         %15 = OpVariable %14 Input
56         %16 = OpConstant %10 0
57         %17 = OpTypePointer Input %10
58         %21 = OpConstant %10 1
59         %24 = OpTypeInt 32 1
60         %25 = OpTypeImage %24 2D 0 0 0 2 R32i
61         %26 = OpTypePointer UniformConstant %25
62         %27 = OpVariable %26 UniformConstant
63         %29 = OpTypeVector %10 2
64         %32 = OpTypeVector %24 2
65         %38 = OpTypeVector %24 4
66         %40 = OpConstant %10 2
67         %41 = OpConstant %10 3400
68         %42 = OpConstant %10 264
69         %43 = OpTypePointer Function %24
70         %45 = OpConstant %24 0
71         %53 = OpConstant %24 2
72         %54 = OpTypeBool
73         %73 = OpConstant %24 1
74         %77 = OpTypeVector %10 4
75         %78 = OpTypeFloat 32
76         %79 = OpTypeVector %78 3
77         %80 = OpTypeStruct %77 %79 %24
78         %81 = OpTypePointer Uniform %80
79         %82 = OpVariable %81 Uniform
80         %84 = OpTypePointer Uniform %24
81         %86 = OpTypeVector %78 4
82         %87 = OpTypeMatrix %86 4
83         %88 = OpTypeStruct %10 %87 %78
84         %89 = OpTypePointer Uniform %88
85         %90 = OpVariable %89 Uniform
86         %91 = OpTypePointer Uniform %87
87         %94 = OpTypePointer Uniform %77
88        %108 = OpConstant %24 3
89        %110 = OpTypePointer Uniform %79
90        %113 = OpTypePointer Uniform %78
91        %128 = OpVariable %26 UniformConstant
92        %130 = OpConstantComposite %32 %45 %45
93          %4 = OpFunction %2 None %3
94          %5 = OpLabel
95        %136 = OpFunctionCall %2 %6
96        %137 = OpFunctionCall %2 %8
97               OpReturn
98               OpFunctionEnd
99          %6 = OpFunction %2 None %3
100          %7 = OpLabel
101         %12 = OpVariable %11 Function
102         %20 = OpVariable %11 Function
103         %44 = OpVariable %43 Function
104         %46 = OpVariable %43 Function
105         %56 = OpVariable %43 Function
106         %18 = OpAccessChain %17 %15 %16
107         %19 = OpLoad %10 %18
108               OpStore %12 %19
109         %22 = OpAccessChain %17 %15 %21
110         %23 = OpLoad %10 %22
111               OpStore %20 %23
112         %28 = OpLoad %25 %27
113         %30 = OpLoad %13 %15
114         %31 = OpVectorShuffle %29 %30 %30 0 1
115         %33 = OpBitcast %32 %31
116         %34 = OpLoad %10 %12
117         %35 = OpLoad %10 %20
118         %36 = OpIAdd %10 %34 %35
119         %37 = OpBitcast %24 %36
120         %39 = OpCompositeConstruct %38 %37 %37 %37 %37
121               OpImageWrite %28 %33 %39
122               OpMemoryBarrier %40 %41
123               OpControlBarrier %40 %40 %42
124               OpStore %44 %45
125               OpStore %46 %45
126               OpBranch %47
127         %47 = OpLabel
128               OpLoopMerge %49 %50 None
129               OpBranch %51
130         %51 = OpLabel
131         %52 = OpLoad %24 %46
132         %55 = OpSLessThan %54 %52 %53
133               OpBranchConditional %55 %48 %49
134         %48 = OpLabel
135               OpStore %56 %45
136               OpBranch %57
137         %57 = OpLabel
138               OpLoopMerge %59 %60 None
139               OpBranch %61
140         %61 = OpLabel
141         %62 = OpLoad %24 %56
142         %63 = OpSLessThan %54 %62 %53
143               OpBranchConditional %63 %58 %59
144         %58 = OpLabel
145         %64 = OpLoad %25 %27
146         %65 = OpLoad %24 %46
147         %66 = OpLoad %24 %56
148         %67 = OpCompositeConstruct %32 %65 %66
149         %68 = OpImageRead %38 %64 %67
150         %69 = OpCompositeExtract %24 %68 0
151         %70 = OpLoad %24 %44
152         %71 = OpIMul %24 %70 %69
153               OpStore %44 %71
154               OpBranch %60
155         %60 = OpLabel
156         %72 = OpLoad %24 %56
157         %74 = OpIAdd %24 %72 %73
158               OpStore %56 %74
159               OpBranch %57
160         %59 = OpLabel
161               OpBranch %50
162         %50 = OpLabel
163         %75 = OpLoad %24 %46
164         %76 = OpIAdd %24 %75 %73
165               OpStore %46 %76
166               OpBranch %47
167         %49 = OpLabel
168               OpMemoryBarrier %40 %41
169               OpControlBarrier %40 %40 %42
170         %83 = OpLoad %24 %44
171         %85 = OpAccessChain %84 %82 %53
172               OpStore %85 %83
173               OpReturn
174               OpFunctionEnd
175          %8 = OpFunction %2 None %3
176          %9 = OpLabel
177        %101 = OpVariable %43 Function
178         %92 = OpAccessChain %91 %90 %73
179         %93 = OpLoad %87 %92
180         %95 = OpAccessChain %94 %82 %45
181         %96 = OpLoad %77 %95
182         %97 = OpConvertUToF %86 %96
183         %98 = OpMatrixTimesVector %86 %93 %97
184         %99 = OpConvertFToU %77 %98
185        %100 = OpAccessChain %94 %82 %45
186               OpStore %100 %99
187               OpStore %101 %45
188               OpBranch %102
189        %102 = OpLabel
190               OpLoopMerge %104 %105 None
191               OpBranch %106
192        %106 = OpLabel
193        %107 = OpLoad %24 %101
194        %109 = OpSLessThan %54 %107 %108
195               OpBranchConditional %109 %103 %104
196        %103 = OpLabel
197        %111 = OpAccessChain %110 %82 %73
198        %112 = OpLoad %79 %111
199        %114 = OpAccessChain %113 %90 %53
200        %115 = OpLoad %78 %114
201        %116 = OpVectorTimesScalar %79 %112 %115
202        %117 = OpConvertFToU %13 %116
203        %118 = OpCompositeExtract %10 %117 0
204        %119 = OpCompositeExtract %10 %117 1
205        %120 = OpCompositeExtract %10 %117 2
206        %121 = OpCompositeConstruct %77 %118 %119 %120 %16
207        %122 = OpAccessChain %94 %82 %45
208        %123 = OpLoad %77 %122
209        %124 = OpIAdd %77 %123 %121
210        %125 = OpAccessChain %94 %82 %45
211               OpStore %125 %124
212               OpBranch %105
213        %105 = OpLabel
214        %126 = OpLoad %24 %101
215        %127 = OpIAdd %24 %126 %73
216               OpStore %101 %127
217               OpBranch %102
218        %104 = OpLabel
219               OpMemoryBarrier %40 %41
220               OpControlBarrier %40 %40 %42
221        %129 = OpLoad %25 %128
222        %131 = OpImageRead %38 %129 %130
223        %132 = OpCompositeExtract %24 %131 0
224        %133 = OpConvertSToF %78 %132
225        %134 = OpCompositeConstruct %79 %133 %133 %133
226        %135 = OpAccessChain %110 %82 %73
227               OpStore %135 %134
228               OpReturn
229               OpFunctionEnd
230
231