[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / tools / llvm-mca / JSON / X86 / instruction-tables-multiple-regions.s
blobbc0bd0aafa966f77d677ec80c00268cb7e5d3199
1 # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=haswell --json -instruction-tables < %s | FileCheck %s
3 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=haswell --json -instruction-tables -o %t.json < %s
4 # RUN: cat %t.json \
5 # RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
6 # RUN: | FileCheck %s
8 # LLVM-MCA-BEGIN foo
9 add %eax, %eax
10 # LLVM-MCA-BEGIN bar
11 add %ebx, %ebx
12 add %ecx, %ecx
13 # LLVM-MCA-END bar
14 add %edx, %edx
15 # LLVM-MCA-END foo
17 # CHECK: {
18 # CHECK-NEXT: "CodeRegions": [
19 # CHECK-NEXT: {
20 # CHECK-NEXT: "InstructionInfoView": {
21 # CHECK-NEXT: "InstructionList": [
22 # CHECK-NEXT: {
23 # CHECK-NEXT: "Instruction": 0,
24 # CHECK-NEXT: "Latency": 1,
25 # CHECK-NEXT: "NumMicroOpcodes": 1,
26 # CHECK-NEXT: "RThroughput": 0.25,
27 # CHECK-NEXT: "hasUnmodeledSideEffects": false,
28 # CHECK-NEXT: "mayLoad": false,
29 # CHECK-NEXT: "mayStore": false
30 # CHECK-NEXT: },
31 # CHECK-NEXT: {
32 # CHECK-NEXT: "Instruction": 1,
33 # CHECK-NEXT: "Latency": 1,
34 # CHECK-NEXT: "NumMicroOpcodes": 1,
35 # CHECK-NEXT: "RThroughput": 0.25,
36 # CHECK-NEXT: "hasUnmodeledSideEffects": false,
37 # CHECK-NEXT: "mayLoad": false,
38 # CHECK-NEXT: "mayStore": false
39 # CHECK-NEXT: },
40 # CHECK-NEXT: {
41 # CHECK-NEXT: "Instruction": 2,
42 # CHECK-NEXT: "Latency": 1,
43 # CHECK-NEXT: "NumMicroOpcodes": 1,
44 # CHECK-NEXT: "RThroughput": 0.25,
45 # CHECK-NEXT: "hasUnmodeledSideEffects": false,
46 # CHECK-NEXT: "mayLoad": false,
47 # CHECK-NEXT: "mayStore": false
48 # CHECK-NEXT: },
49 # CHECK-NEXT: {
50 # CHECK-NEXT: "Instruction": 3,
51 # CHECK-NEXT: "Latency": 1,
52 # CHECK-NEXT: "NumMicroOpcodes": 1,
53 # CHECK-NEXT: "RThroughput": 0.25,
54 # CHECK-NEXT: "hasUnmodeledSideEffects": false,
55 # CHECK-NEXT: "mayLoad": false,
56 # CHECK-NEXT: "mayStore": false
57 # CHECK-NEXT: }
58 # CHECK-NEXT: ]
59 # CHECK-NEXT: },
60 # CHECK-NEXT: "Instructions": [
61 # CHECK-NEXT: "addl\t%eax, %eax",
62 # CHECK-NEXT: "addl\t%ebx, %ebx",
63 # CHECK-NEXT: "addl\t%ecx, %ecx",
64 # CHECK-NEXT: "addl\t%edx, %edx"
65 # CHECK-NEXT: ],
66 # CHECK-NEXT: "Name": "foo",
67 # CHECK-NEXT: "ResourcePressureView": {
68 # CHECK-NEXT: "ResourcePressureInfo": [
69 # CHECK-NEXT: {
70 # CHECK-NEXT: "InstructionIndex": 0,
71 # CHECK-NEXT: "ResourceIndex": 2,
72 # CHECK-NEXT: "ResourceUsage": 0.25
73 # CHECK-NEXT: },
74 # CHECK-NEXT: {
75 # CHECK-NEXT: "InstructionIndex": 0,
76 # CHECK-NEXT: "ResourceIndex": 3,
77 # CHECK-NEXT: "ResourceUsage": 0.25
78 # CHECK-NEXT: },
79 # CHECK-NEXT: {
80 # CHECK-NEXT: "InstructionIndex": 0,
81 # CHECK-NEXT: "ResourceIndex": 7,
82 # CHECK-NEXT: "ResourceUsage": 0.25
83 # CHECK-NEXT: },
84 # CHECK-NEXT: {
85 # CHECK-NEXT: "InstructionIndex": 0,
86 # CHECK-NEXT: "ResourceIndex": 8,
87 # CHECK-NEXT: "ResourceUsage": 0.25
88 # CHECK-NEXT: },
89 # CHECK-NEXT: {
90 # CHECK-NEXT: "InstructionIndex": 1,
91 # CHECK-NEXT: "ResourceIndex": 2,
92 # CHECK-NEXT: "ResourceUsage": 0.25
93 # CHECK-NEXT: },
94 # CHECK-NEXT: {
95 # CHECK-NEXT: "InstructionIndex": 1,
96 # CHECK-NEXT: "ResourceIndex": 3,
97 # CHECK-NEXT: "ResourceUsage": 0.25
98 # CHECK-NEXT: },
99 # CHECK-NEXT: {
100 # CHECK-NEXT: "InstructionIndex": 1,
101 # CHECK-NEXT: "ResourceIndex": 7,
102 # CHECK-NEXT: "ResourceUsage": 0.25
103 # CHECK-NEXT: },
104 # CHECK-NEXT: {
105 # CHECK-NEXT: "InstructionIndex": 1,
106 # CHECK-NEXT: "ResourceIndex": 8,
107 # CHECK-NEXT: "ResourceUsage": 0.25
108 # CHECK-NEXT: },
109 # CHECK-NEXT: {
110 # CHECK-NEXT: "InstructionIndex": 2,
111 # CHECK-NEXT: "ResourceIndex": 2,
112 # CHECK-NEXT: "ResourceUsage": 0.25
113 # CHECK-NEXT: },
114 # CHECK-NEXT: {
115 # CHECK-NEXT: "InstructionIndex": 2,
116 # CHECK-NEXT: "ResourceIndex": 3,
117 # CHECK-NEXT: "ResourceUsage": 0.25
118 # CHECK-NEXT: },
119 # CHECK-NEXT: {
120 # CHECK-NEXT: "InstructionIndex": 2,
121 # CHECK-NEXT: "ResourceIndex": 7,
122 # CHECK-NEXT: "ResourceUsage": 0.25
123 # CHECK-NEXT: },
124 # CHECK-NEXT: {
125 # CHECK-NEXT: "InstructionIndex": 2,
126 # CHECK-NEXT: "ResourceIndex": 8,
127 # CHECK-NEXT: "ResourceUsage": 0.25
128 # CHECK-NEXT: },
129 # CHECK-NEXT: {
130 # CHECK-NEXT: "InstructionIndex": 3,
131 # CHECK-NEXT: "ResourceIndex": 2,
132 # CHECK-NEXT: "ResourceUsage": 0.25
133 # CHECK-NEXT: },
134 # CHECK-NEXT: {
135 # CHECK-NEXT: "InstructionIndex": 3,
136 # CHECK-NEXT: "ResourceIndex": 3,
137 # CHECK-NEXT: "ResourceUsage": 0.25
138 # CHECK-NEXT: },
139 # CHECK-NEXT: {
140 # CHECK-NEXT: "InstructionIndex": 3,
141 # CHECK-NEXT: "ResourceIndex": 7,
142 # CHECK-NEXT: "ResourceUsage": 0.25
143 # CHECK-NEXT: },
144 # CHECK-NEXT: {
145 # CHECK-NEXT: "InstructionIndex": 3,
146 # CHECK-NEXT: "ResourceIndex": 8,
147 # CHECK-NEXT: "ResourceUsage": 0.25
148 # CHECK-NEXT: },
149 # CHECK-NEXT: {
150 # CHECK-NEXT: "InstructionIndex": 4,
151 # CHECK-NEXT: "ResourceIndex": 2,
152 # CHECK-NEXT: "ResourceUsage": 1
153 # CHECK-NEXT: },
154 # CHECK-NEXT: {
155 # CHECK-NEXT: "InstructionIndex": 4,
156 # CHECK-NEXT: "ResourceIndex": 3,
157 # CHECK-NEXT: "ResourceUsage": 1
158 # CHECK-NEXT: },
159 # CHECK-NEXT: {
160 # CHECK-NEXT: "InstructionIndex": 4,
161 # CHECK-NEXT: "ResourceIndex": 7,
162 # CHECK-NEXT: "ResourceUsage": 1
163 # CHECK-NEXT: },
164 # CHECK-NEXT: {
165 # CHECK-NEXT: "InstructionIndex": 4,
166 # CHECK-NEXT: "ResourceIndex": 8,
167 # CHECK-NEXT: "ResourceUsage": 1
168 # CHECK-NEXT: }
169 # CHECK-NEXT: ]
170 # CHECK-NEXT: }
171 # CHECK-NEXT: },
172 # CHECK-NEXT: {
173 # CHECK-NEXT: "InstructionInfoView": {
174 # CHECK-NEXT: "InstructionList": [
175 # CHECK-NEXT: {
176 # CHECK-NEXT: "Instruction": 0,
177 # CHECK-NEXT: "Latency": 1,
178 # CHECK-NEXT: "NumMicroOpcodes": 1,
179 # CHECK-NEXT: "RThroughput": 0.25,
180 # CHECK-NEXT: "hasUnmodeledSideEffects": false,
181 # CHECK-NEXT: "mayLoad": false,
182 # CHECK-NEXT: "mayStore": false
183 # CHECK-NEXT: },
184 # CHECK-NEXT: {
185 # CHECK-NEXT: "Instruction": 1,
186 # CHECK-NEXT: "Latency": 1,
187 # CHECK-NEXT: "NumMicroOpcodes": 1,
188 # CHECK-NEXT: "RThroughput": 0.25,
189 # CHECK-NEXT: "hasUnmodeledSideEffects": false,
190 # CHECK-NEXT: "mayLoad": false,
191 # CHECK-NEXT: "mayStore": false
192 # CHECK-NEXT: }
193 # CHECK-NEXT: ]
194 # CHECK-NEXT: },
195 # CHECK-NEXT: "Instructions": [
196 # CHECK-NEXT: "addl\t%ebx, %ebx",
197 # CHECK-NEXT: "addl\t%ecx, %ecx"
198 # CHECK-NEXT: ],
199 # CHECK-NEXT: "Name": "bar",
200 # CHECK-NEXT: "ResourcePressureView": {
201 # CHECK-NEXT: "ResourcePressureInfo": [
202 # CHECK-NEXT: {
203 # CHECK-NEXT: "InstructionIndex": 0,
204 # CHECK-NEXT: "ResourceIndex": 2,
205 # CHECK-NEXT: "ResourceUsage": 0.25
206 # CHECK-NEXT: },
207 # CHECK-NEXT: {
208 # CHECK-NEXT: "InstructionIndex": 0,
209 # CHECK-NEXT: "ResourceIndex": 3,
210 # CHECK-NEXT: "ResourceUsage": 0.25
211 # CHECK-NEXT: },
212 # CHECK-NEXT: {
213 # CHECK-NEXT: "InstructionIndex": 0,
214 # CHECK-NEXT: "ResourceIndex": 7,
215 # CHECK-NEXT: "ResourceUsage": 0.25
216 # CHECK-NEXT: },
217 # CHECK-NEXT: {
218 # CHECK-NEXT: "InstructionIndex": 0,
219 # CHECK-NEXT: "ResourceIndex": 8,
220 # CHECK-NEXT: "ResourceUsage": 0.25
221 # CHECK-NEXT: },
222 # CHECK-NEXT: {
223 # CHECK-NEXT: "InstructionIndex": 1,
224 # CHECK-NEXT: "ResourceIndex": 2,
225 # CHECK-NEXT: "ResourceUsage": 0.25
226 # CHECK-NEXT: },
227 # CHECK-NEXT: {
228 # CHECK-NEXT: "InstructionIndex": 1,
229 # CHECK-NEXT: "ResourceIndex": 3,
230 # CHECK-NEXT: "ResourceUsage": 0.25
231 # CHECK-NEXT: },
232 # CHECK-NEXT: {
233 # CHECK-NEXT: "InstructionIndex": 1,
234 # CHECK-NEXT: "ResourceIndex": 7,
235 # CHECK-NEXT: "ResourceUsage": 0.25
236 # CHECK-NEXT: },
237 # CHECK-NEXT: {
238 # CHECK-NEXT: "InstructionIndex": 1,
239 # CHECK-NEXT: "ResourceIndex": 8,
240 # CHECK-NEXT: "ResourceUsage": 0.25
241 # CHECK-NEXT: },
242 # CHECK-NEXT: {
243 # CHECK-NEXT: "InstructionIndex": 2,
244 # CHECK-NEXT: "ResourceIndex": 2,
245 # CHECK-NEXT: "ResourceUsage": 0.5
246 # CHECK-NEXT: },
247 # CHECK-NEXT: {
248 # CHECK-NEXT: "InstructionIndex": 2,
249 # CHECK-NEXT: "ResourceIndex": 3,
250 # CHECK-NEXT: "ResourceUsage": 0.5
251 # CHECK-NEXT: },
252 # CHECK-NEXT: {
253 # CHECK-NEXT: "InstructionIndex": 2,
254 # CHECK-NEXT: "ResourceIndex": 7,
255 # CHECK-NEXT: "ResourceUsage": 0.5
256 # CHECK-NEXT: },
257 # CHECK-NEXT: {
258 # CHECK-NEXT: "InstructionIndex": 2,
259 # CHECK-NEXT: "ResourceIndex": 8,
260 # CHECK-NEXT: "ResourceUsage": 0.5
261 # CHECK-NEXT: }
262 # CHECK-NEXT: ]
263 # CHECK-NEXT: }
264 # CHECK-NEXT: }
265 # CHECK-NEXT: ],
266 # CHECK-NEXT: "SimulationParameters": {
267 # CHECK-NEXT: "-march": "x86_64",
268 # CHECK-NEXT: "-mcpu": "haswell",
269 # CHECK-NEXT: "-mtriple": "x86_64-unknown-unknown"
270 # CHECK-NEXT: },
271 # CHECK-NEXT: "TargetInfo": {
272 # CHECK-NEXT: "CPUName": "haswell",
273 # CHECK-NEXT: "Resources": [
274 # CHECK-NEXT: "HWDivider",
275 # CHECK-NEXT: "HWFPDivider",
276 # CHECK-NEXT: "HWPort0",
277 # CHECK-NEXT: "HWPort1",
278 # CHECK-NEXT: "HWPort2",
279 # CHECK-NEXT: "HWPort3",
280 # CHECK-NEXT: "HWPort4",
281 # CHECK-NEXT: "HWPort5",
282 # CHECK-NEXT: "HWPort6",
283 # CHECK-NEXT: "HWPort7"
284 # CHECK-NEXT: ]
285 # CHECK-NEXT: }
286 # CHECK-NEXT: }