Add some missing cleaning
[ghc.git] / testsuite / tests / perf / should_run / all.T
1 # Tests that newArray/newArray_ is being optimised correctly
2
3 # fortunately the values here are mostly independent of the wordsize,
4 # because the test allocates an unboxed array of doubles.
5
6 test('T3586',
7      [stats_num_field('peak_megabytes_allocated', (17, 1)),
8                                  # expected value: 17 (amd64/Linux)
9       stats_num_field('bytes allocated', (16835544, 5)),
10                         # expected value: 16835544 (amd64/Linux)
11       only_ways(['normal'])
12       ],
13      compile_and_run,
14      ['-O'])
15
16 test('T4830',
17      [stats_num_field('bytes allocated',
18           [(wordsize(64), 99264, 1),
19            #             127000 (amd64/Linux)
20            # 2013-02-07:  99264 (amd64/Linux)
21            (wordsize(32), 70646, 2)]),
22            # 2013-02-10:  69744 (x86/Windows)
23            # 2013-02-10:  71548 (x86/OSX)
24       only_ways(['normal'])
25       ],
26      compile_and_run,
27      ['-O2'])
28
29 test('T3245', normal, compile_and_run, ['-O'])
30
31 # Test that bytestring reading/writing isn't over-allocating.  We had
32 # a bug in hGetBufNonBlocking in 6.13 that triggered this.
33 #
34 test('lazy-bs-alloc',
35      [stats_num_field('peak_megabytes_allocated', (2, 1)),
36                                  # expected value: 2 (amd64/Linux)
37       stats_num_field('bytes allocated',
38           [(wordsize(64), 429744, 1),
39             #             489776 (amd64/Linux)
40             # 2013-02-07: 429744 (amd64/Linux)
41            (wordsize(32), 417738, 1)]),
42             # 2013-02-10: 421296 (x86/Windows)
43             # 2013-02-10: 414180 (x86/OSX)
44       only_ways(['normal']),
45       extra_run_opts('../../numeric/should_run/arith011.stdout'),
46       ignore_output
47       ],
48       # use a suitably big file, without bloating the repo with a new one:
49      compile_and_run,
50      ['-O'])
51
52 test('T876',
53      [stats_num_field('bytes allocated',
54           [(wordsize(64), 1263712 , 5),
55               # 2013-02-14: 1263712 (x86_64/Linux)
56            (wordsize(32), 663712, 5)]),
57       only_ways(['normal']),
58       extra_run_opts('10000')
59       ],
60      compile_and_run,
61      ['-O'])
62
63 # Get reproducible floating-point results on x86
64 if config.arch == 'i386':
65    sse2_opts = '-msse2'
66 else:
67    sse2_opts = ''
68
69 test('T4321',
70      omit_ways(['ghci']),
71      compile_and_run, ['-O ' + sse2_opts])
72
73 test('T3736',
74      extra_clean(['T3736.speed.f32']),
75      run_command,
76      ['$MAKE -s --no-print-directory T3736'])
77 test('T3738',
78      [extra_clean(['T3738a.hi', 'T3738a.o']),
79       stats_num_field('peak_megabytes_allocated', (1, 0)),
80                                  # expected value: 1 (amd64/Linux)
81       stats_num_field('bytes allocated',
82                       [(wordsize(32), 45648, 5),
83                     # expected value: 45648 (x86/Linux)
84                        (wordsize(64), 49400, 5)]),
85                     # expected value: 49400 (amd64/Linux)
86       only_ways(['normal'])
87       ],
88      compile_and_run,
89      ['-O'])
90
91 test('MethSharing',
92      [stats_num_field('peak_megabytes_allocated', (1, 0)),
93                                  # expected value: 1 (amd64/Linux)
94       stats_num_field('bytes allocated', 
95                       [(wordsize(32), 360940756, 5),
96                     # expected value: 2685858140 (x86/OS X)
97                           # expected: 360940756 (x86/Linux)
98                        (wordsize(64), 640067672, 5)]),
99                           # expected: 640067672 (amd64/Linux)
100       only_ways(['normal'])
101       ],
102      compile_and_run,
103      ['-O'])
104 test('T2902',
105      extra_clean(['T2902_A',    'T2902_B',
106                   'T2902_A.hi', 'T2902_B.hi',
107                   'T2902_A.o',  'T2902_B.o',
108                   'T2902_A_PairingSum.hi', 'T2902_B_PairingSum.hi',
109                   'T2902_A_PairingSum.o',  'T2902_B_PairingSum.o',
110                   'T2902_Sum.hi',
111                   'T2902_Sum.o']),
112      run_command,
113      ['$MAKE -s --no-print-directory 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      run_command,
121      ['$MAKE -s --no-print-directory T149'])
122
123 test('T5113',
124      [stats_num_field('bytes allocated',
125                       [(wordsize(32), 4000000, 5),
126                        (wordsize(64), 8000000, 5)]),
127       only_ways(['normal'])
128       ],
129      compile_and_run,
130      ['-O'])
131
132
133 test('T4978',
134      [stats_num_field('bytes allocated',
135                       [(wordsize(32), 10000000, 5),
136                        (wordsize(64), 10137680, 5)]),
137                     # expected value: 10137680 (amd64/Linux)
138       only_ways(['normal'])
139       ],
140      compile_and_run,
141      ['-O2'])
142
143 test('T5205',
144      [stats_num_field('bytes allocated',
145                       [(wordsize(32), 47088, 5),
146                     # expected value: 47088 (x86/Darwin)
147                        (wordsize(64), 51320, 5)]),
148                     # expected value: 51320 (amd64/Linux)
149       only_ways(['normal', 'optasm'])
150       ],
151      compile_and_run,
152      [''])
153
154 test('T5549',
155      [stats_num_field('bytes allocated',
156                       [(wordsize(32), 3362958676, 5),
157                     # expected value: 3362958676 (Windows)
158                        (wordsize(64), 6725846120, 5)]),
159                     # expected value: 6725846120 (amd64/Linux)
160       only_ways(['normal'])
161       ],
162      compile_and_run,
163      ['-O'])
164
165 test('T4474a',
166      [stats_num_field('bytes allocated',
167                       [(wordsize(32), 2405242767, 5),
168                        (wordsize(64), 4831890304, 5)]),
169                     # expected value: 4831890304 (amd64/OSX)
170       only_ways(['normal'])
171       ],
172      compile_and_run,
173      ['-O'])
174 test('T4474b',
175      [stats_num_field('bytes allocated',
176                       [(wordsize(32), 2405242767, 5),
177                        (wordsize(64), 4831890304, 5)]),
178                     # expected value: 4831890304 (amd64/OSX)
179       only_ways(['normal'])
180       ],
181      compile_and_run,
182      ['-O'])
183 test('T4474c',
184      [stats_num_field('bytes allocated',
185                       [(wordsize(32), 2405242767, 5),
186                        (wordsize(64), 4831890304, 5)]),
187                     # expected value: 4831890304 (amd64/OSX)
188       only_ways(['normal'])
189       ],
190      compile_and_run,
191      ['-O'])
192
193 test('T5237',
194      [stats_num_field('bytes allocated',
195                         [(wordsize(32), 78328, 5),
196                       # expected value: 78328 (i386/Linux)
197                          (wordsize(64), 110888, 5)]),
198                       # expected value: 110888 (amd64/Linux)
199      only_ways(['normal'])
200      ],
201     compile_and_run,
202     ['-O ' + sse2_opts])
203
204 test('T5536',
205      [stats_num_field('bytes allocated',
206                       [(wordsize(32), 446260520, 1),
207                                    # 1246287228 (i386/Linux)
208                                     # 446328556 (i386/Windows)
209                                     # 446192484 (i386/OSX)
210                        (wordsize(64), 892399040, 5)]),
211                    # expected value: 2492589480 (amd64/Linux)
212                    # 17/1/13:         892399040 (x86_64/Linux)
213                    #                  (new demand analyser)
214      extra_clean(['T5536.data']),
215      ignore_output,
216      only_ways(['normal'])
217      ],
218     compile_and_run,
219     ['-O'])
220
221 test('T7257',
222      [stats_num_field('bytes allocated',
223                       [(wordsize(32), 1150000000, 10),
224                     # expected value: 1246287228 (i386/Linux)
225                        (wordsize(64), 1774893760, 5)]),
226                         # 2012-09-21: 1774893760 (amd64/Linux)
227       stats_num_field('peak_megabytes_allocated',
228                       [(wordsize(32), 217, 5),
229                         # 2012-10-08: 217 (x86/Linux)
230                        (wordsize(64), 227, 5)]),
231                         # 2012-09-21: 227 (amd64/Linux)
232
233       only_ways(['normal'])
234      ],
235     compile_and_run, ['-O'])
236
237 test('Conversions',
238      [stats_num_field('bytes allocated',
239                       [(wordsize(32), 78374, 2),
240                         # 2012-12-18: 55316 Guessed 64-bit value / 2
241                         # 2013-02-10: 77472 (x86/OSX)
242                         # 2013-02-10: 79276 (x86/Windows)
243                        (wordsize(64), 110632, 5)]),
244                         # 2012-12-18: 109608 (amd64/OS X)
245
246       only_ways(['normal'])
247      ],
248     compile_and_run, ['-O'])
249
250 test('T7507', omit_ways(['ghci']), compile_and_run, ['-O'])
251 # For 7507, stack overflow is the bad case
252
253 test('T7436',
254      [stats_num_field('max_bytes_used',
255           [(wordsize(64), 60360, 1),
256            #             127000 (amd64/Linux)
257            # 2013-02-07:  60360 (amd64/Linux)
258            (wordsize(32), 58434, 1)]),
259             # 2013-02-10: 58032 (x86/Windows)
260             # 2013-02-10: 58836 (x86/OSX)
261       only_ways(['normal'])
262       ],
263      compile_and_run,
264      ['-O'])
265
266 test('T7797',
267       [stats_num_field('bytes allocated', 
268                       [(wordsize(32), 360940756, 5),
269                     # expected value: 2685858140 (x86/OS X)
270                           # expected: 360940756 (x86/Linux)
271                        (wordsize(64), 480050944, 5)]),
272                           # expected: 480050944 (amd64/Linux)
273       extra_clean(['T7797a.hi', 'T7797a.o']),
274       only_ways(['normal'])
275       ],
276      compile_and_run,
277      ['-O'])
278
279 test('T7954',
280       [stats_num_field('bytes allocated', 
281                       [(wordsize(32), 1380051408, 10),
282                        (wordsize(64), 2720051528, 10)]),
283       only_ways(['normal'])
284       ],
285      compile_and_run,
286      ['-O'])
287
288 test('T7850',
289      [stats_num_field('peak_megabytes_allocated', (4, 1)),
290       only_ways(['normal'])],
291      compile_and_run,
292      ['-O'])
293