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