fix syntax error
[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('3586',
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']), expect_broken(4321)],
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       expect_broken(7046)
124       ],
125      compile_and_run,
126      ['-O'])
127
128
129 test('T4978',
130      [if_wordsize(32,
131           stats_num_field('bytes allocated',  9000000,
132                                              11000000)),
133       if_wordsize(64,
134           stats_num_field('bytes allocated',  9000000,
135                                              11000000)),
136                                      # expected value: 10137680 (amd64/Linux)
137       only_ways(['normal'])
138       ],
139      compile_and_run,
140      ['-O2'])
141
142 test('T5205',
143      [if_wordsize(32,
144           stats_num_field('bytes allocated', 40000,
145                                              50000)),
146                            # expected value: 47088 (x86/Darwin)
147       if_wordsize(64,
148           stats_num_field('bytes allocated', 40000,
149                                              60000)),
150                            # expected value: 51320 (amd64/Linux)
151       only_ways(['normal'])
152       ],
153      compile_and_run,
154      ['-O'])
155
156 test('T5549',
157      [if_wordsize(32,
158           stats_num_field('bytes allocated', 3000000000,
159                                              8000000000)),
160                            # expected value: 3362958676 (Windows)
161       if_wordsize(64,
162           stats_num_field('bytes allocated', 5000000000,
163                                              8000000000)),
164                            # expected value: 6,725,846,120 (amd64/Linux)
165       only_ways(['normal'])
166       ],
167      compile_and_run,
168      ['-O'])
169
170 test('T4474a',
171      [if_wordsize(32,
172           stats_num_field('bytes allocated', 1600000000,
173                                              2000000000)),
174                            # expected value: 1879095912 (i386/OSX)
175       if_wordsize(64,
176           stats_num_field('bytes allocated', 3500000000,
177                                              3900000000)),
178                            # expected value: 3766493912 (amd64/Linux)
179       only_ways(['normal'])
180       ],
181      compile_and_run,
182      ['-O'])
183 test('T4474b',
184      [if_wordsize(32,
185           stats_num_field('bytes allocated', 1600000000,
186                                              2000000000)),
187                            # expected value: 1879095912 (i386/OSX)
188       if_wordsize(64,
189           stats_num_field('bytes allocated', 3500000000,
190                                              3900000000)),
191                            # expected value: 3766493912 (amd64/Linux)
192       only_ways(['normal'])
193       ],
194      compile_and_run,
195      ['-O'])
196 test('T4474c',
197      [if_wordsize(32,
198           stats_num_field('bytes allocated', 1600000000,
199                                              2000000000)),
200                            # expected value: 1879095912 (i386/OSX)
201       if_wordsize(64,
202           stats_num_field('bytes allocated', 3500000000,
203                                              3900000000)),
204                            # expected value: 3766493912 (amd64/Linux)
205       only_ways(['normal'])
206       ],
207      compile_and_run,
208      ['-O'])
209
210 test('T5237',
211      [if_wordsize(32,
212           stats_num_field('bytes allocated',  70000,
213                                               90000)),
214                            # expected value: 78328 (i386/Linux)
215       if_wordsize(64,
216           stats_num_field('bytes allocated',  90000,
217                                              130000)),
218                            # expected value: 110888 (amd64/Linux)
219      only_ways(['normal'])
220      ],
221     compile_and_run,
222     ['-O ' + sse2_opts])
223
224 test('T5536',
225      [if_wordsize(32,
226           stats_num_field('bytes allocated', 1150000000,
227                                              1250000000)),
228                            # expected value: 1246287228 (i386/Linux)
229       if_wordsize(64,
230           stats_num_field('bytes allocated', 2480000000,
231                                              2510000000)),
232                            # expected value: 2492589480 (amd64/Linux)
233      extra_clean(['T5536.data']),
234      ignore_output,
235      only_ways(['normal'])
236      ],
237     compile_and_run,
238     ['-O'])
239