all.T 21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# T12791 and T5835 test that GHC uses top-level instances in places where using
# a locally given solution would produce worse code.
# See Note [Solving from instances when interacting Dicts]

test('T5835',
     [stats_num_field('max_bytes_used',
           [(wordsize(64), 44312, 10)]),
       only_ways(['normal'])
       ],
     compile_and_run,
     ['-O'])

test('T12791',
     [stats_num_field('max_bytes_used',
           [(wordsize(64), 44312, 10)]),
       only_ways(['normal'])
       ],
     compile_and_run,
     ['-O'])

21 22
# Tests that newArray/newArray_ is being optimised correctly

Simon Peyton Jones's avatar
Simon Peyton Jones committed
23 24
test('T10359',
     [stats_num_field('bytes allocated',
25 26 27
          [(wordsize(64), 450920, 5),
           # previously   499512    (amd64/Linux)
           # 2017-03-10   450920    (amd64/Linux)  Don't generate wrapper for !Int#
28
           (wordsize(32), 351508, 5)]),
Simon Peyton Jones's avatar
Simon Peyton Jones committed
29 30 31 32 33
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O'])

34 35 36 37 38 39 40 41 42
test('T14955',
     [stats_num_field('bytes allocated',
          [(wordsize(64), 48050760, 5),
           (wordsize(32), 351508, 5)]),
      only_ways(['normal'])
      ],
     multimod_compile_and_run,
     ['T14955', '-O'])

43 44
# fortunately the values here are mostly independent of the wordsize,
# because the test allocates an unboxed array of doubles.
45
test('T3586',
46 47
     [stats_num_field('peak_megabytes_allocated', (17, 1)),
                                 # expected value: 17 (amd64/Linux)
48 49 50
      stats_num_field('bytes allocated', (16102024, 5)),
                        # prev:           16835544 (amd64/Linux)
                        # 2014-07-17:     16102024 (amd64/Linux), general round of updates
51 52 53 54 55
      only_ways(['normal']),

      # Use `+RTS -G1` for more stable residency measurements. Note [residency].
      # Only 64-bit as we don't have a good 32-bit test environment at the moment
      when(wordsize(64), extra_hc_opts('+RTS -G1 -RTS'))
56 57 58
      ],
     compile_and_run,
     ['-O'])
Simon Peyton Jones's avatar
Simon Peyton Jones committed
59

Simon Peyton Jones's avatar
Simon Peyton Jones committed
60
test('T4830',
61
     [stats_num_field('bytes allocated',
62
          [(wordsize(64), 98248, 4),
63 64
           #             127000 (amd64/Linux)
           # 2013-02-07:  99264 (amd64/Linux)
65
           # 2014-01-13:  98248 (amd64/Linux) due to #8647
66
           # 2015-04-03: Widen 1->4% (amd64/Windows was doing better)
67
           (wordsize(32), 70646, 3)]),
68 69
           # 2013-02-10:  69744 (x86/Windows)
           # 2013-02-10:  71548 (x86/OSX)
70 71
           # 2014-01-28:  Widen range 2->3
           #                (x86/Windows - actual 69000, lower was 69233)
Simon Peyton Jones's avatar
Simon Peyton Jones committed
72 73 74 75 76
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O2'])

77 78
test('T3245', [when(doing_ghci(), extra_hc_opts('-fobject-code'))],
     compile_and_run, ['-O'])
79 80 81 82 83

# Test that bytestring reading/writing isn't over-allocating.  We had
# a bug in hGetBufNonBlocking in 6.13 that triggered this.
#
test('lazy-bs-alloc',
84 85
     [extra_files(['../../numeric/should_run/arith011.stdout']),
      stats_num_field('peak_megabytes_allocated', (2, 1)),
86
                                 # expected value: 2 (amd64/Linux)
87
      stats_num_field('bytes allocated',
Ben Gamari's avatar
Ben Gamari committed
88
          [(wordsize(64), 421792, 5),
89 90
            #             489776 (amd64/Linux)
            # 2013-02-07: 429744 (amd64/Linux)
91
            # 2013-12-12: 425400 (amd64/Linux)
92
            # 2015-04-04: Widen 1->3% (amd64/Windows was failing)
93
            # 2015-08-15: 431500 (Windows not good enough. avg of Windows&Linux)
94
            # 2015-12-15: 444720 (amd64/Linux, D1616)
95
            # 2015-12-17: 444720 (widen 3->5%, Windows is at 462688)
Ben Gamari's avatar
Ben Gamari committed
96
            # 2017-01-30: 421792 (amd64/Linux, strangely Type-indexed Typeable)
97
           (wordsize(32), 410040, 5)]),
98 99
            # 2013-02-10: 421296 (x86/Windows)
            # 2013-02-10: 414180 (x86/OSX)
100
            # 2014-01-22: 411500 (x86/Linux)
101
            # 2014-01-28: Widen 1->2% (x86/Windows was at 425212)
102
            # 2016-04-06: 429760 (x86/Linux) no idea what happened
Simon Peyton Jones's avatar
Simon Peyton Jones committed
103
            # 2017-02-14: 421448 Early inline patch
104
            # 2017-03-24: 410040 It's not entirely clear, widen threshold to match 64-bit case
Simon Peyton Jones's avatar
Simon Peyton Jones committed
105

106
      only_ways(['normal']),
107
      extra_run_opts('arith011.stdout'),
108
      ignore_stdout,
109 110 111 112

      # Use `+RTS -G1` for more stable residency measurements. Note [residency].
      # Only 64-bit as we don't have a good 32-bit test environment at the moment
      when(wordsize(64), extra_hc_opts('+RTS -G1 -RTS'))
113
      ],
114
     # use a suitably big file, without bloating the repo with a new one:
115 116
     compile_and_run,
     ['-O'])
Ian Lynagh's avatar
Ian Lynagh committed
117

Simon Peyton Jones's avatar
Simon Peyton Jones committed
118 119
test('T876',
     [stats_num_field('bytes allocated',
120
          [(platform('x86_64-unknown-mingw32'), 53472, 5),
121
              # 2015-04-03: 71904 (amd64/Windows, unknown cause)
122
              # 2016-11-27: 66928 (amd64/Windows, unknown cause)
123
              # 2017-12-24: 53472 (amd64/Windows, unknown cause)
124

125
           (wordsize(64), 58128, 5),
Simon Peyton Jones's avatar
Simon Peyton Jones committed
126
              # 2013-02-14: 1263712 (x86_64/Linux)
127
              # 2014-02-10:   63216 (x86_64/Linux), call arity analysis
128
              # 2016-11-11:   58128 (x86_64/Linux), it's not clear
129

130
           (wordsize(32), 50408, 5) ]),
131 132
              # some date:  663712  (Windows, 64-bit machine)
              # 2014-04-04:  56820  (Windows, 64-bit machine)
133
              # 2014-06-29:  53024  (x86_64/Linux)
134
              # 2014-12-01:  56796  (Windows)
135
              # 2015-07-11:  53156  (x86_64/Linux)
136
              # 2017-03-24:  50408  (x86/Linux, 64-bit machine)
137

Simon Peyton Jones's avatar
Simon Peyton Jones committed
138 139 140 141 142 143
      only_ways(['normal']),
      extra_run_opts('10000')
      ],
     compile_and_run,
     ['-O'])

144 145 146 147 148 149
# Get reproducible floating-point results on x86
if config.arch == 'i386':
   sse2_opts = '-msse2'
else:
   sse2_opts = ''

Ian Lynagh's avatar
Ian Lynagh committed
150
test('T4321',
Simon Peyton Jones's avatar
Simon Peyton Jones committed
151
     omit_ways(['ghci']),
Ian Lynagh's avatar
Ian Lynagh committed
152
     compile_and_run, ['-O ' + sse2_opts])
153

154
test('T3736', [], run_command, ['$MAKE -s --no-print-directory T3736'])
155
test('T3738',
Ian Lynagh's avatar
Ian Lynagh committed
156
     [extra_clean(['T3738a.hi', 'T3738a.o']),
157 158 159
      stats_num_field('peak_megabytes_allocated', (2, 0)),
                    # expected value: 1 (amd64/Linux)
                    # 2016-08-31:     2 (allocation area size bumped to 1MB)
160 161
      stats_num_field('bytes allocated',
                      [(wordsize(32), 45648, 5),
162
                    # expected value: 50520 (x86/Linux)
163
                       (wordsize(64), 50592, 8)]),
164 165
                    # prev:           49400 (amd64/Linux)
                    # 2014-07-17:     50520 (amd64/Linux) general round of updates
166
                    # 2014-09-10:     50592 (amd64/Linux) post-AMP-update
167
                    # 2015-04-03: Widen 5->8% (amd64/Windows was doing better)
168 169 170 171
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O'])
Ian Lynagh's avatar
Ian Lynagh committed
172

Simon Peyton Jones's avatar
Simon Peyton Jones committed
173
test('MethSharing',
174 175 176
     [stats_num_field('peak_megabytes_allocated', (2, 0)),
                    # expected value: 1 (amd64/Linux)
                    # 2016-08-31:     2 (allocation area size bumped to 1MB)
177
      stats_num_field('bytes allocated',
178
                      [(wordsize(32), 240071008, 5),
179
                    # expected value: 2685858140 (x86/OS X)
180 181
                    # expected:       360940756 (x86/Linux)
                    # 2017-03-24:     240071008 (x86/Linux, 64-bit machine)
182
                       (wordsize(64), 480098192, 5)]),
183 184
                    # expected:   640067672 (amd64/Linux)
                    # 2017-01-31: 480098192 work/wrap noinline things
Simon Peyton Jones's avatar
Simon Peyton Jones committed
185 186 187 188
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O'])
189
test('T2902', [], run_command, ['$MAKE -s --no-print-directory T2902'])
190
test('T149',
Simon Marlow's avatar
Simon Marlow committed
191 192
     [ # expect_broken(149),
       # working (2 Jul 2013, x86-64/Linux)
193 194 195 196 197
      extra_clean(['T149_A',    'T149_B',
                   'T149_A.hi', 'T149_B.hi',
                   'T149_A.o',  'T149_B.o'])],
     run_command,
     ['$MAKE -s --no-print-directory T149'])
Ian Lynagh's avatar
Ian Lynagh committed
198

Simon Peyton Jones's avatar
Simon Peyton Jones committed
199
test('T5113',
200 201 202
     [stats_num_field('bytes allocated',
                      [(wordsize(32), 4000000, 5),
                       (wordsize(64), 8000000, 5)]),
Simon Peyton Jones's avatar
Simon Peyton Jones committed
203
      only_ways(['normal'])
Simon Peyton Jones's avatar
Simon Peyton Jones committed
204 205 206 207
      ],
     compile_and_run,
     ['-O'])

208 209

test('T4978',
210 211 212 213
     [stats_num_field('bytes allocated',
                      [(wordsize(32), 10000000, 5),
                       (wordsize(64), 10137680, 5)]),
                    # expected value: 10137680 (amd64/Linux)
214 215 216 217
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O2'])
Ian Lynagh's avatar
Ian Lynagh committed
218 219

test('T5205',
220
     [stats_num_field('bytes allocated',
221
                      [(wordsize(32), 49460, 5),
222
                    # expected value: 47088 (x86/Darwin)
223
                    # 2017-03-24:     49460 (x86/Linux, 64-bit machine)
224 225 226 227 228

                       (platform('x86_64-unknown-mingw32'), 52264, 5),
                    # 2016-12-14: 52264 (Separate out Windows results)

                       (wordsize(64), 56208, 5)]),
229
                    # expected value: 51320 (amd64/Linux)
230
                    # 2014-07-17:     52600 (amd64/Linux) general round of updates
231
                    # 2015-04-03: Widen 5->7% (amd64/Windows was doing better)
232
                    # 2015-08-15: 50648 (Windows too good. avg of Windows&Linux)
233
                    # 2015-10-30: 56208 (D757: Emit Typeable at definition site)
234
                    # 2016-12-14: Narrow 7->5% (Separate out Windows results)
235
      only_ways(['normal', 'optasm'])
Ian Lynagh's avatar
Ian Lynagh committed
236 237
      ],
     compile_and_run,
238
     [''])
Ian Lynagh's avatar
Ian Lynagh committed
239

Simon Peyton Jones's avatar
Simon Peyton Jones committed
240
test('T5549',
241
     [stats_num_field('bytes allocated',
242
                      [(wordsize(32), 2896607976, 5),
243
                    # expected value: 3362958676 (Windows)
244
                    # 2014-12-01:     4096606332 (Windows) integer-gmp2
245
                    # 2017-03-24:     2896607976 (x86/Linux, 64-bit machine)
246

247
                       (wordsize(64), 5793140200, 5)]),
248
                    # expected value: 6725846120 (amd64/Linux)
249
                    #                 8193140752 (amd64/Linux) integer-gmp2
250
                    #                 5793140200 (amd64/Linux) integer-gmp2
Simon Peyton Jones's avatar
Simon Peyton Jones committed
251 252 253 254 255
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O'])

Ian Lynagh's avatar
Ian Lynagh committed
256
test('T4474a',
257
     [stats_num_field('bytes allocated',
258 259 260
                      [(wordsize(32), 2405242767, 5),
                       (wordsize(64), 4831890304, 5)]),
                    # expected value: 4831890304 (amd64/OSX)
Ian Lynagh's avatar
Ian Lynagh committed
261 262 263 264 265
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O'])
test('T4474b',
266
     [stats_num_field('bytes allocated',
267 268 269
                      [(wordsize(32), 2405242767, 5),
                       (wordsize(64), 4831890304, 5)]),
                    # expected value: 4831890304 (amd64/OSX)
Ian Lynagh's avatar
Ian Lynagh committed
270 271 272 273 274
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O'])
test('T4474c',
275
     [stats_num_field('bytes allocated',
276 277 278
                      [(wordsize(32), 2405242767, 5),
                       (wordsize(64), 4831890304, 5)]),
                    # expected value: 4831890304 (amd64/OSX)
Ian Lynagh's avatar
Ian Lynagh committed
279 280 281 282 283
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O'])

daniel.is.fischer's avatar
daniel.is.fischer committed
284
test('T5237',
285
     [stats_num_field('bytes allocated',
286 287
                        [(platform('i386-unknown-mingw32'), 73280, 5),
                         (wordsize(32), 78328, 5),
288
                      # expected value: 78328 (i386/Linux)
289
                         (wordsize(64), 104176, 5)]),
290
                      # expected value: 110888 (amd64/Linux)
291
                      # expected value: 104176 (amd64/Linux)
daniel.is.fischer's avatar
daniel.is.fischer committed
292 293 294 295
     only_ways(['normal'])
     ],
    compile_and_run,
    ['-O ' + sse2_opts])
Ian Lynagh's avatar
Ian Lynagh committed
296 297

test('T5536',
298
     [stats_num_field('bytes allocated',
299 300 301 302
                      [(wordsize(32), 446260520, 1),
                                   # 1246287228 (i386/Linux)
                                    # 446328556 (i386/Windows)
                                    # 446192484 (i386/OSX)
303 304 305 306
                       (wordsize(64), 892399040, 5)]),
                   # expected value: 2492589480 (amd64/Linux)
                   # 17/1/13:         892399040 (x86_64/Linux)
                   #                  (new demand analyser)
Ian Lynagh's avatar
Ian Lynagh committed
307
     extra_clean(['T5536.data']),
308
     ignore_stdout,
Ian Lynagh's avatar
Ian Lynagh committed
309 310 311 312 313
     only_ways(['normal'])
     ],
    compile_and_run,
    ['-O'])

Simon Marlow's avatar
Simon Marlow committed
314
test('T7257',
315
     [stats_num_field('bytes allocated',
316
                      [(wordsize(32), 869850704, 10),
317 318
                        # expected value: 1246287228 (i386/Linux)
                        # 2016-04-06: 989850664 (i386/Linux) no idea what happened
319
                        # 2017-03-25: 869850704 (x86/Linux, 64-bit machine) probably sizeExpr fix
320
                       (wordsize(64), 1414893248, 5)]),
321
                        # 2012-09-21: 1774893760 (amd64/Linux)
322
                        # 2015-11-03: 1654893248 (amd64/Linux)
323
                        # 2016-06-22: 1414893248 (amd64/Linux, sizeExpr fix)
324 325 326 327 328
      stats_num_field('peak_megabytes_allocated',
                      [(wordsize(32), 217, 5),
                        # 2012-10-08: 217 (x86/Linux)
                       (wordsize(64), 227, 5)]),
                        # 2012-09-21: 227 (amd64/Linux)
Simon Marlow's avatar
Simon Marlow committed
329 330 331 332

      only_ways(['normal'])
     ],
    compile_and_run, ['-O'])
333 334

test('Conversions',
335
     [stats_num_field('bytes allocated',
336
                      [(wordsize(32), 76768, 3),
337 338 339
                        # 2012-12-18: 55316 Guessed 64-bit value / 2
                        # 2013-02-10: 77472 (x86/OSX)
                        # 2013-02-10: 79276 (x86/Windows)
340
                        # 2014-01-13: 76768 (x86/Linux) due to #8647
341
                       (wordsize(64), 107544, 5)]),
342
                        # 2012-12-18: 109608 (amd64/OS X)
343
                        # 2014-07-17: 107544 (amd64/Linux)
344 345 346

      only_ways(['normal'])
     ],
347
    compile_and_run, ['-O -msse2'])
Simon Peyton Jones's avatar
Simon Peyton Jones committed
348

Simon Peyton Jones's avatar
Simon Peyton Jones committed
349
test('T7507', omit_ways(['ghci']), compile_and_run, ['-O'])
Simon Peyton Jones's avatar
Simon Peyton Jones committed
350
# For 7507, stack overflow is the bad case
Simon Peyton Jones's avatar
Simon Peyton Jones committed
351 352

test('T7436',
353
     [stats_num_field('max_bytes_used',
354
          [(wordsize(64), 60360, 4),
355 356
           #             127000 (amd64/Linux)
           # 2013-02-07:  60360 (amd64/Linux)
357
           # 2015-04-03: Widen 1->4% (amd64/Windows was doing better)
358 359 360 361 362
           (wordsize(32), 42772, 4)]),
           # 2013-02-10: 58032 (x86/Windows)
           # 2013-02-10: 58836 (x86/OSX)
           # 2017-03-24: 42772 (x86/Linux, 64-bit machine) no idea why
           # 2017-04-02: Widen 1->4% (i386/Windows was doing better)
Simon Peyton Jones's avatar
Simon Peyton Jones committed
363 364 365 366
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O'])
Simon Peyton Jones's avatar
Simon Peyton Jones committed
367 368

test('T7797',
369
      [stats_num_field('bytes allocated',
370 371
                      [(wordsize(32), 240044984, 5),
                          # expected value: 2685858140 (x86/OS X)
Simon Peyton Jones's avatar
Simon Peyton Jones committed
372
                          # expected: 360940756 (x86/Linux)
373
                          # expected: 240044984 (x86/Windows, 64bit machine)
Simon Peyton Jones's avatar
Simon Peyton Jones committed
374 375
                       (wordsize(64), 480050944, 5)]),
                          # expected: 480050944 (amd64/Linux)
376
      extra_clean(['T7797a.hi', 'T7797a.o']),
Simon Peyton Jones's avatar
Simon Peyton Jones committed
377 378 379 380 381
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O'])

Simon Peyton Jones's avatar
Simon Peyton Jones committed
382
test('T7954',
383
      [stats_num_field('bytes allocated',
384 385 386
                      [(wordsize(32), 920045264, 10),
              # some date:  1380051408    (64-bit Windows machine)
              # 2014-04-04:  920045264    (64-bit Windows machine)
387 388
                       (wordsize(64), 1680051336, 10)]),
              # 2014-02-10: 1680051336 (x86_64/Linux), call arity analysis
Simon Peyton Jones's avatar
Simon Peyton Jones committed
389 390 391 392 393
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O'])

ian@well-typed.com's avatar
ian@well-typed.com committed
394
test('T7850',
395
     [stats_num_field('peak_megabytes_allocated',
396 397
                      [(wordsize(32), 2, 10),
                       (wordsize(64), 4, 10)]),
ian@well-typed.com's avatar
ian@well-typed.com committed
398 399 400 401
      only_ways(['normal'])],
     compile_and_run,
     ['-O'])

Joachim Breitner's avatar
Joachim Breitner committed
402 403
test('T5949',
     [stats_num_field('bytes allocated',
404
                      [ (wordsize(32), 116020, 10),
405
                        (wordsize(64), 201008, 10)]),
Joachim Breitner's avatar
Joachim Breitner committed
406 407 408 409 410
                      # previously, it was >400000 bytes
      only_ways(['normal'])],
     compile_and_run,
     ['-O'])

Joachim Breitner's avatar
Joachim Breitner committed
411 412
test('T4267',
     [stats_num_field('bytes allocated',
413 414
                      [ (wordsize(32), 36012, 10)
                      # 32-bit value close to 64 bit; c.f. T7619
415
                      , (wordsize(64), 40992, 10) ]),
Joachim Breitner's avatar
Joachim Breitner committed
416
                      # previously, it was >170000 bytes
417 418
                      # 2014-01-17: 130000
                      # 2014-02-10: 40992 (x86_64/Linux), call arity analysis
Joachim Breitner's avatar
Joachim Breitner committed
419 420 421 422
      only_ways(['normal'])],
     compile_and_run,
     ['-O'])

Joachim Breitner's avatar
Joachim Breitner committed
423 424
test('T7619',
     [stats_num_field('bytes allocated',
425
                      [ (wordsize(32), 36012, 10)
426
                      # 32-bit close to 64-bit value; most of this very
427
                      # small number is standard start-up boilerplate I think
428
                      , (wordsize(64), 40992, 10) ]),
Joachim Breitner's avatar
Joachim Breitner committed
429 430 431 432 433
                      # previously, it was >400000 bytes
      only_ways(['normal'])],
     compile_and_run,
     ['-O'])

434 435
test('InlineArrayAlloc',
     [stats_num_field('bytes allocated',
436 437
                      [ (wordsize(32), 800040960, 5)
                      , (wordsize(64), 1600040960, 5) ]),
438 439 440
      only_ways(['normal'])],
     compile_and_run,
     ['-O2'])
441 442 443

test('InlineByteArrayAlloc',
     [stats_num_field('bytes allocated',
444
                      [ (wordsize(32), 1360036012, 5)
445
                      , (wordsize(64), 1440040960, 5) ]),
446
         # 32 and 64 bit not so different, because
447
         # we are allocating *byte* arrays
448 449 450
      only_ways(['normal'])],
     compile_and_run,
     ['-O2'])
451 452 453

test('InlineCloneArrayAlloc',
     [stats_num_field('bytes allocated',
454
                      [ (wordsize(32), 800041120, 5)
455
                      , (wordsize(64), 1600041120, 5) ]),
456 457 458
      only_ways(['normal'])],
     compile_and_run,
     ['-O2'])
459 460 461

test('T9203',
     [stats_num_field('bytes allocated',
462
                      [ (wordsize(32), 77969268, 5)
463 464
                      # was
                      # 2016-04-06     84345136 (i386/Debian) not sure
465 466
                      # 2017-03-24     77969268 (x86/Linux, 64-bit machine) probably join points

lukemaurer's avatar
lukemaurer committed
467
                      , (wordsize(64), 84620888, 5) ]),
468 469
                      # was            95747304
                      # 2019-09-10     94547280 post-AMP cleanup
470
                      # 2015-10-28     95451192 emit Typeable at definition site
lukemaurer's avatar
lukemaurer committed
471
                      # 2016-12-19     84620888 Join points
472 473 474
      only_ways(['normal'])],
     compile_and_run,
     ['-O2'])
Joachim Breitner's avatar
Joachim Breitner committed
475 476 477

test('T9339',
     [stats_num_field('bytes allocated',
478
                      [ (wordsize(32),    46904, 5)
479
                      # is this number correct? Seems very high.
480
                      # 2017-03-24:       46904 (x86/Linux, 64-bit machine) who knows
481 482 483 484

                      , (platform('x86_64-unknown-mingw32'), 47088, 7)
                      # 2017-02-19                           47088 (x64/Windows) - Unknown

lukemaurer's avatar
lukemaurer committed
485
                      , (wordsize(64),       50728, 5) ]),
Joachim Breitner's avatar
Joachim Breitner committed
486 487
                      # w/o fusing last: 320005080
                      # 2014-07-22:       80050760
lukemaurer's avatar
lukemaurer committed
488
                      # 2016-08-17:          50728 Join points (#12988)
Joachim Breitner's avatar
Joachim Breitner committed
489 490
      only_ways(['normal'])],
     compile_and_run,
Simon Peyton Jones's avatar
Simon Peyton Jones committed
491 492 493
     ['-O2 -fspec-constr-keen'])
     # For the -fspec-constr-keen see Note [Making SpecConstr keener] in SpecConstr

Simon Peyton Jones's avatar
Simon Peyton Jones committed
494

495 496 497 498 499 500 501 502
test('T8472',
     [stats_num_field('bytes allocated',
                      [ (wordsize(32),    50000, 80)
                      , (wordsize(64),    51424, 80) ]),
      only_ways(['normal'])],
     compile_and_run,
     ['-O2'])

Simon Peyton Jones's avatar
Simon Peyton Jones committed
503 504 505 506 507 508
test('T12996',
     [stats_num_field('bytes allocated',
                      [ (wordsize(64),    76776, 5) ]),
      only_ways(['normal'])],
     compile_and_run,
     ['-O2'])
509 510 511 512 513 514 515 516

test('T13001',
     [stats_num_field('bytes allocated',
                      [ (wordsize(32),    46728, 20)
                      , (wordsize(64),    50600, 20) ]),
      only_ways(['normal'])],
     compile_and_run,
     ['-O2'])
517 518 519

test('T12990',
    [stats_num_field('bytes allocated',
520
                     [ (wordsize(64), 20040936, 5) ]),
521 522 523
                     # 2017-01-03     34440936  w/o inlining unsaturated
                     #                          constructor wrappers
                     # 2017-01-03     21640904 inline wrappers
524
                     # 2017-01-31     20040936 work/wrap noinline things
525 526 527
     only_ways(['normal'])],
    compile_and_run,
    ['-O2'])
David Feuer's avatar
David Feuer committed
528 529 530 531 532 533 534 535 536 537 538 539 540

test('T13218',
    [stats_num_field('bytes allocated',
                     [ (wordsize(64), 82040056, 5) ]),
                     # 8.1 with default <$  163644216
                     # 8.1 with derived <$   82040056
     stats_num_field('max_bytes_used',
                     [ (wordsize(64), 359128, 10) ]),
                     # 8.1 with default <$  64408248
                     # 8.1 with derived <$    359128
     only_ways(['normal'])],
    compile_and_run,
    ['-O'])
541 542 543

test('DeriveNull',
    [stats_num_field('bytes allocated',
David Feuer's avatar
David Feuer committed
544 545 546
                    [ (wordsize(64), 112050856, 5) ]),
                    # 2017-04-01     152083704 w/o derived null
                    # 2017-04-02     112050856 derive null
547 548 549
     only_ways(['normal'])],
    compile_and_run,
    ['-O'])
David Feuer's avatar
David Feuer committed
550 551

test('DeriveNullTermination', normal, compile_and_run, [''])
552 553 554

test('T13623',
    [stats_num_field('bytes allocated',
555 556 557
                    [(platform('x86_64-unknown-mingw32'),   47232, 10),
                    # 2017-12-24     47232 unknown
                    (wordsize(64), 50936, 5)]),
558 559 560 561
                    # 2017-05-02     50936 initial
     only_ways(['normal'])],
    compile_and_run,
    ['-O2'])
562 563 564

test('T14052',
     [stats_num_field('bytes allocated',
565
                      [ (wordsize(64), 2346183840, 10) ])],
566 567
     ghci_script,
     ['T14052.script'])
568 569 570 571 572 573

test('T14936',
     [stats_num_field('bytes allocated',
                      [ (wordsize(64), 51792, 5) ])],
     compile_and_run,
     ['-O2'])