T5113 is passing, remove expect_broken, see comment on #7046
[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,
8                                                   18),
9                                      # expected value: 17 (amd64/Linux)
10       stats_num_field('bytes allocated', 16000000,
11                                          17000000),
12                                      # expected value: 16835544 (amd64/Linux)
13       only_ways(['normal'])
14       ],
15      compile_and_run,
16      ['-O'])
17
18 test('T4830',
19      [stats_num_field('bytes allocated', 60000,
20                                          200000),
21                                      # expected value: 127,000 (amd64/Linux)
22       only_ways(['normal'])
23       ],
24      compile_and_run,
25      ['-O2'])
26
27 test('T3245', normal, compile_and_run, ['-O'])
28
29 # Test that bytestring reading/writing isn't over-allocating.  We had
30 # a bug in hGetBufNonBlocking in 6.13 that triggered this.
31 #
32 test('lazy-bs-alloc',
33      [stats_num_field('peak_megabytes_allocated', 1,
34                                                   3),
35                                      # expected value: 2 (amd64/Linux)
36       stats_num_field('bytes allocated', 400000,
37                                          600000),
38                                      # expected value: 489776 (amd64/Linux)
39       only_ways(['normal']),
40       extra_run_opts('../../numeric/should_run/arith011.stdout'),
41       ignore_output
42       ],
43       # use a suitably big file, without bloating the repo with a new one:
44      compile_and_run,
45      ['-O'])
46
47 # Get reproducible floating-point results on x86
48 if config.arch == 'i386':
49    sse2_opts = '-msse2'
50 else:
51    sse2_opts = ''
52
53 test('T4321',
54      omit_ways(['ghci']),
55      compile_and_run, ['-O ' + sse2_opts])
56
57 test('T3736',
58      extra_clean(['T3736.speed.f32']),
59      run_command,
60      ['$MAKE -s --no-print-directory T3736'])
61 test('T3738',
62      [extra_clean(['T3738a.hi', 'T3738a.o']),
63       stats_num_field('peak_megabytes_allocated', 1,
64                                                   1),
65                                      # expected value: 1 (amd64/Linux)
66       # expected value: 45648 (x86/Linux):
67       if_wordsize(32,
68           stats_num_field('bytes allocated', 40000,
69                                              50000)),
70       if_wordsize(64,
71           stats_num_field('bytes allocated', 40000,
72                                              60000)),
73                                      # expected value: 49400 (amd64/Linux)
74       only_ways(['normal'])
75       ],
76      compile_and_run,
77      ['-O'])
78
79 test('MethSharing',
80      [stats_num_field('peak_megabytes_allocated', 1,
81                                                   1),
82                                      # expected value: 1 (amd64/Linux)
83       # expected value: 2685858140 (x86/OS X):
84       if_wordsize(32,
85           stats_num_field('bytes allocated', 300000000,
86                                              400000000)),
87                                   # expected: 360940756 (x86/Linux)
88       if_wordsize(64,
89           stats_num_field('bytes allocated', 600000000,
90                                              700000000)),
91                                   # expected: 640067672 (amd64/Linux)
92       only_ways(['normal'])
93       ],
94      compile_and_run,
95      ['-O'])
96 test('T2902',
97      extra_clean(['T2902_A',    'T2902_B',
98                   'T2902_A.hi', 'T2902_B.hi',
99                   'T2902_A.o',  'T2902_B.o',
100                   'T2902_A_PairingSum.hi', 'T2902_B_PairingSum.hi',
101                   'T2902_A_PairingSum.o',  'T2902_B_PairingSum.o',
102                   'T2902_Sum.hi',
103                   'T2902_Sum.o']),
104      run_command,
105      ['$MAKE -s --no-print-directory T2902'])
106 test('T149',
107      [expect_broken(149),
108       extra_clean(['T149_A',    'T149_B',
109                    'T149_A.hi', 'T149_B.hi',
110                    'T149_A.o',  'T149_B.o'])],
111      run_command,
112      ['$MAKE -s --no-print-directory T149'])
113
114 test('T5113',
115      [
116       if_wordsize(32,
117           stats_num_field('bytes allocated', 3000000,
118                                              5000000)),
119       if_wordsize(64,
120           stats_num_field('bytes allocated', 8000000,
121                                              9000000)),
122       only_ways(['normal']),
123       normal
124       # WAS: expect_broken(7046)
125       # but it started working again around 01/2013, see #7046
126       ],
127      compile_and_run,
128      ['-O'])
129
130
131 test('T4978',
132      [if_wordsize(32,
133           stats_num_field('bytes allocated',  9000000,
134                                              11000000)),
135       if_wordsize(64,
136           stats_num_field('bytes allocated',  9000000,
137                                              11000000)),
138                                      # expected value: 10137680 (amd64/Linux)
139       only_ways(['normal'])
140       ],
141      compile_and_run,
142      ['-O2'])
143
144 test('T5205',
145      [if_wordsize(32,
146           stats_num_field('bytes allocated', 40000,
147                                              50000)),
148                            # expected value: 47088 (x86/Darwin)
149       if_wordsize(64,
150           stats_num_field('bytes allocated', 40000,
151                                              60000)),
152                            # expected value: 51320 (amd64/Linux)
153       only_ways(['normal', 'optasm'])
154       ],
155      compile_and_run,
156      [''])
157
158 test('T5549',
159      [if_wordsize(32,
160           stats_num_field('bytes allocated', 3000000000,
161                                              8000000000)),
162                            # expected value: 3362958676 (Windows)
163       if_wordsize(64,
164           stats_num_field('bytes allocated', 5000000000,
165                                              8000000000)),
166                            # expected value: 6,725,846,120 (amd64/Linux)
167       only_ways(['normal'])
168       ],
169      compile_and_run,
170      ['-O'])
171
172 test('T4474a',
173      [if_wordsize(32,
174           stats_num_field('bytes allocated', 1600000000,
175                                              2000000000)),
176                            # expected value: 1879095912 (i386/OSX)
177       if_wordsize(64,
178           stats_num_field('bytes allocated', 3500000000,
179                                              3900000000)),
180                            # expected value: 3766493912 (amd64/Linux)
181       only_ways(['normal'])
182       ],
183      compile_and_run,
184      ['-O'])
185 test('T4474b',
186      [if_wordsize(32,
187           stats_num_field('bytes allocated', 1600000000,
188                                              2000000000)),
189                            # expected value: 1879095912 (i386/OSX)
190       if_wordsize(64,
191           stats_num_field('bytes allocated', 3500000000,
192                                              3900000000)),
193                            # expected value: 3766493912 (amd64/Linux)
194       only_ways(['normal'])
195       ],
196      compile_and_run,
197      ['-O'])
198 test('T4474c',
199      [if_wordsize(32,
200           stats_num_field('bytes allocated', 1600000000,
201                                              2000000000)),
202                            # expected value: 1879095912 (i386/OSX)
203       if_wordsize(64,
204           stats_num_field('bytes allocated', 3500000000,
205                                              3900000000)),
206                            # expected value: 3766493912 (amd64/Linux)
207       only_ways(['normal'])
208       ],
209      compile_and_run,
210      ['-O'])
211
212 test('T5237',
213      [if_wordsize(32,
214           stats_num_field('bytes allocated',  70000,
215                                               90000)),
216                            # expected value: 78328 (i386/Linux)
217       if_wordsize(64,
218           stats_num_field('bytes allocated',  90000,
219                                              130000)),
220                            # expected value: 110888 (amd64/Linux)
221      only_ways(['normal'])
222      ],
223     compile_and_run,
224     ['-O ' + sse2_opts])
225
226 test('T5536',
227      [if_wordsize(32,
228           stats_num_field('bytes allocated', 1150000000,
229                                              1250000000)),
230                            # expected value: 1246287228 (i386/Linux)
231       if_wordsize(64,
232           stats_range_field('bytes allocated', 892399040, 5)),
233                            # expected value: 2,492,589,480 (amd64/Linux)
234                            # 17/1/13:          892,399,040 (x86_64/Linux)
235                            #                   (new demand analyser)
236      extra_clean(['T5536.data']),
237      ignore_output,
238      only_ways(['normal'])
239      ],
240     compile_and_run,
241     ['-O'])
242
243 test('T7257',
244      [if_wordsize(32,
245           stats_range_field('bytes allocated', 1150000000, 10)),
246                            # expected value: 1246287228 (i386/Linux)
247       if_wordsize(32,
248           stats_range_field('peak_megabytes_allocated', 217, 5)),
249                            # 2012-10-08: 217 (x86/Linux)
250       if_wordsize(64,
251           stats_range_field('bytes allocated', 1774893760, 5)),
252                            # 2012-09-21: 1774893760 (amd64/Linux)
253       if_wordsize(64,
254           stats_range_field('peak_megabytes_allocated', 227, 5)),
255                            # 2012-09-21: 227 (amd64/Linux)
256
257       only_ways(['normal'])
258      ],
259     compile_and_run, ['-O'])
260
261 test('Conversions',
262      [if_wordsize(32,
263           stats_range_field('bytes allocated', 55316, 5)),
264                            # 2012-12-18: Guessed 64-bit value / 2
265       if_wordsize(64,
266           stats_range_field('bytes allocated', 110632, 5)),
267                            # 2012-12-18: 109608 (amd64/OS X)
268
269       only_ways(['normal'])
270      ],
271     compile_and_run, ['-O'])
272
273 test('T7507', omit_ways(['ghci']), compile_and_run, ['-O'])
274 # For 7507, stack overflow is the bad case
275
276 test('T7436',
277      [stats_num_field('max_bytes_used', 50000,
278                                          100000),
279                                      # expected value: 127,000 (amd64/Linux)
280       only_ways(['normal'])
281       ],
282      compile_and_run,
283      ['-O'])