2273ddd400d14d4dc97a6642faf9630c08b7266f
[ghc.git] / testsuite / tests / perf / should_run / all.T
1 # T12791 and T5835 test that GHC uses top-level instances in places where using
2 # a locally given solution would produce worse code.
3 # See Note [Solving from instances when interacting Dicts]
4
5 test('T5835',
6      [collect_stats('max_bytes_used',10),
7        only_ways(['normal'])
8        ],
9      compile_and_run,
10      ['-O'])
11
12 test('T12791',
13      [collect_stats('max_bytes_used',10),
14        only_ways(['normal'])
15        ],
16      compile_and_run,
17      ['-O'])
18
19 # Tests that newArray/newArray_ is being optimised correctly
20
21 test('T10359',
22      [collect_stats('bytes allocated',5),
23       only_ways(['normal'])
24       ],
25      compile_and_run,
26      ['-O'])
27
28 test('T14955',
29      [collect_stats('bytes allocated',5),
30       only_ways(['normal'])
31       ],
32      multimod_compile_and_run,
33      ['T14955', '-O'])
34
35 # fortunately the values here are mostly independent of the wordsize,
36 # because the test allocates an unboxed array of doubles.
37 test('T3586',
38      [collect_stats('peak_megabytes_allocated',1),
39       collect_stats('bytes allocated', 5),
40       only_ways(['normal']),
41
42       # Use `+RTS -G1` for more stable residency measurements. Note [residency].
43       # Only 64-bit as we don't have a good 32-bit test environment at the moment
44       when(wordsize(64), extra_hc_opts('+RTS -G1 -RTS'))
45       ],
46      compile_and_run,
47      ['-O'])
48
49 test('T4830',
50      [collect_stats('bytes allocated',4),
51       only_ways(['normal'])
52       ],
53      compile_and_run,
54      ['-O2'])
55
56 test('T3245', [when(doing_ghci(), extra_hc_opts('-fobject-code'))],
57      compile_and_run, ['-O'])
58
59 # Test that bytestring reading/writing isn't over-allocating.  We had
60 # a bug in hGetBufNonBlocking in 6.13 that triggered this.
61 #
62 test('lazy-bs-alloc',
63      [extra_files(['../../numeric/should_run/arith011.stdout']),
64       collect_stats('peak_megabytes_allocated', 1),
65       collect_stats('bytes allocated',5),
66       only_ways(['normal']),
67       extra_run_opts('arith011.stdout'),
68       ignore_stdout,
69
70       # Use `+RTS -G1` for more stable residency measurements. Note [residency].
71       # Only 64-bit as we don't have a good 32-bit test environment at the moment
72       when(wordsize(64), extra_hc_opts('+RTS -G1 -RTS'))
73       ],
74      # use a suitably big file, without bloating the repo with a new one:
75      compile_and_run,
76      ['-O'])
77
78 test('T876',
79      [collect_stats('bytes allocated',5),
80       only_ways(['normal']),
81       extra_run_opts('10000')
82       ],
83      compile_and_run,
84      ['-O'])
85
86 # Get reproducible floating-point results on x86
87 if config.arch == 'i386':
88    sse2_opts = '-msse2'
89 else:
90    sse2_opts = ''
91
92 test('T4321',
93      omit_ways(['ghci']),
94      compile_and_run, ['-O ' + sse2_opts])
95
96 test('T3736', [], makefile_test, ['T3736'])
97 test('T3738',
98      [extra_clean(['T3738a.hi', 'T3738a.o']),
99       collect_stats('peak_megabytes_allocated', 0),
100       collect_stats('bytes allocated',8),
101       only_ways(['normal'])
102       ],
103      compile_and_run,
104      ['-O'])
105
106 test('MethSharing',
107      [collect_stats('peak_megabytes_allocated',  0),
108       collect_stats('bytes allocated',5),
109       only_ways(['normal'])
110       ],
111      compile_and_run,
112      ['-O'])
113 test('T2902', [], makefile_test, ['T2902'])
114 test('T149',
115      [ # expect_broken(149),
116        # working (2 Jul 2013, x86-64/Linux)
117       extra_clean(['T149_A',    'T149_B',
118                    'T149_A.hi', 'T149_B.hi',
119                    'T149_A.o',  'T149_B.o'])],
120      makefile_test, ['T149'])
121
122 test('T5113',
123      [collect_stats('bytes allocated',5),
124       only_ways(['normal'])
125       ],
126      compile_and_run,
127      ['-O'])
128
129
130 test('T4978',
131      [collect_stats('bytes allocated',5),
132       only_ways(['normal'])
133       ],
134      compile_and_run,
135      ['-O2'])
136
137 test('T5205',
138      [collect_stats('bytes allocated',5),
139       only_ways(['normal', 'optasm'])
140       ],
141      compile_and_run,
142      [''])
143
144 test('T5549',
145      [collect_stats('bytes allocated',5),
146       only_ways(['normal'])
147       ],
148      compile_and_run,
149      ['-O'])
150
151 test('T4474a',
152      [collect_stats('bytes allocated',5),
153       only_ways(['normal'])
154       ],
155      compile_and_run,
156      ['-O'])
157 test('T4474b',
158      [collect_stats('bytes allocated',5),
159       only_ways(['normal'])
160       ],
161      compile_and_run,
162      ['-O'])
163 test('T4474c',
164      [collect_stats('bytes allocated',5),
165       only_ways(['normal'])
166       ],
167      compile_and_run,
168      ['-O'])
169
170 test('T5237',
171      [collect_stats('bytes allocated',5),
172      only_ways(['normal'])
173      ],
174     compile_and_run,
175     ['-O ' + sse2_opts])
176
177 test('T5536',
178      [collect_stats('bytes allocated',1),
179      extra_clean(['T5536.data']),
180      ignore_stdout,
181      only_ways(['normal'])
182      ],
183     compile_and_run,
184     ['-O'])
185
186 test('T7257',
187      [collect_stats('bytes allocated',10),
188       collect_stats('peak_megabytes_allocated',5),
189       only_ways(['normal'])
190      ],
191     compile_and_run, ['-O'])
192
193 test('Conversions',
194      [collect_stats('bytes allocated',3),
195       only_ways(['normal'])
196      ],
197     compile_and_run, ['-O -msse2'])
198
199 test('T7507', omit_ways(['ghci']), compile_and_run, ['-O'])
200 # For 7507, stack overflow is the bad case
201
202 test('T7436',
203      [collect_stats('max_bytes_used',4),
204       only_ways(['normal'])
205       ],
206      compile_and_run,
207      ['-O'])
208
209 test('T7797',
210       [collect_stats('bytes allocated',5),
211       extra_clean(['T7797a.hi', 'T7797a.o']),
212       only_ways(['normal'])
213       ],
214      compile_and_run,
215      ['-O'])
216
217 test('T7954',
218       [collect_stats('bytes allocated',10),
219       only_ways(['normal'])
220       ],
221      compile_and_run,
222      ['-O'])
223
224 test('T7850',
225      [collect_stats('peak_megabytes_allocated',10),
226       only_ways(['normal'])],
227      compile_and_run,
228      ['-O'])
229
230 test('T5949',
231      [collect_stats('bytes allocated',10),
232       only_ways(['normal'])],
233      compile_and_run,
234      ['-O'])
235
236 test('T4267',
237      [collect_stats('bytes allocated',10),
238       only_ways(['normal'])],
239       compile_and_run,
240       ['-O'])
241
242 test('T7619',
243      [collect_stats('bytes allocated',10),
244       only_ways(['normal'])],
245      compile_and_run,
246      ['-O'])
247
248 test('InlineArrayAlloc',
249      [collect_stats('bytes allocated',5),
250       only_ways(['normal'])],
251      compile_and_run,
252      ['-O2'])
253
254 test('InlineByteArrayAlloc',
255      [collect_stats('bytes allocated',5),
256       only_ways(['normal'])],
257      compile_and_run,
258      ['-O2'])
259
260 test('InlineCloneArrayAlloc',
261      [collect_stats('bytes allocated',5),
262       only_ways(['normal'])],
263      compile_and_run,
264      ['-O2'])
265
266 test('T9203',
267      [collect_stats('bytes allocated',5),
268       only_ways(['normal'])],
269      compile_and_run,
270      ['-O2'])
271
272 test('T9339',
273      [collect_stats('bytes allocated',5),
274       only_ways(['normal'])],
275      compile_and_run,
276      ['-O2 -fspec-constr-keen'])
277      # For the -fspec-constr-keen see Note [Making SpecConstr keener] in SpecConstr
278
279
280 test('T8472',
281      [collect_stats('bytes allocated',80),
282       only_ways(['normal'])],
283      compile_and_run,
284      ['-O2'])
285
286 test('T12996',
287      [collect_stats('bytes allocated',5),
288       only_ways(['normal'])],
289      compile_and_run,
290      ['-O2'])
291
292 test('T13001',
293      [collect_stats('bytes allocated',20),
294       only_ways(['normal'])],
295      compile_and_run,
296      ['-O2'])
297
298 test('T8763',
299      [collect_stats('bytes allocated', 20),
300       only_ways(['normal'])],
301      compile_and_run,
302      ['-O2'])
303
304 test('T12990',
305     [collect_stats('bytes allocated',5),
306      only_ways(['normal'])],
307     compile_and_run,
308     ['-O2'])
309
310 test('T13218',
311     [collect_stats('bytes allocated',5),
312      collect_stats('max_bytes_used',10),
313      only_ways(['normal'])],
314     compile_and_run,
315     ['-O'])
316
317 test('DeriveNull',
318     [collect_stats('bytes allocated',5),
319      only_ways(['normal'])],
320     compile_and_run,
321     ['-O'])
322
323 test('DeriveNullTermination', normal, compile_and_run, [''])
324
325 test('T13623',
326     [collect_stats('bytes allocated',10),
327      only_ways(['normal'])],
328     compile_and_run,
329     ['-O2'])
330
331 test('T14052',
332      [collect_compiler_stats('bytes allocated',15)],
333      ghci_script,
334      ['T14052.script'])
335
336 test('T14936',
337      [collect_stats('bytes allocated',10)],
338      compile_and_run,
339      ['-O2'])
340
341 test('T15226',
342     [collect_stats('bytes allocated',5),
343      only_ways(['normal'])],
344     compile_and_run,
345     ['-O'])
346
347 test('T15226a',
348     [collect_stats('bytes allocated',5),
349      only_ways(['normal'])],
350     compile_and_run,
351     ['-O'])
352
353 test('T15263',
354     [collect_stats('bytes allocated', 4),
355      only_ways(['normal'])],
356     compile_and_run,
357     ['-O'])
358
359 test('T15426',
360     [collect_stats('bytes allocated', 20),
361     only_ways(['normal'])],
362     compile_and_run,
363     ['-O2'])
364
365 test('T15578',
366     [collect_stats('bytes allocated', 5),
367      only_ways(['normal'])],
368     compile_and_run,
369     ['-O2'])