Commit 35b4a346 authored by Simon Marlow's avatar Simon Marlow
Browse files

add a perf regression test for #783

parent 03ee7cd1
module Test where
foo :: Double -> Int
foo x | x == 1 = 1
foo x | x == 2 = 2
foo x | x == 3 = 3
foo x | x == 4 = 4
foo x | x == 5 = 5
foo x | x == 6 = 6
foo x | x == 7 = 7
foo x | x == 8 = 8
foo x | x == 9 = 9
foo x | x == 10 = 10
foo x | x == 11 = 11
foo x | x == 12 = 12
foo x | x == 13 = 13
foo x | x == 14 = 14
foo x | x == 15 = 15
foo x | x == 16 = 16
foo x | x == 17 = 17
foo x | x == 18 = 18
foo x | x == 19 = 19
foo x | x == 20 = 20
foo x | x == 21 = 21
foo x | x == 22 = 22
foo x | x == 23 = 23
foo x | x == 24 = 24
foo x | x == 25 = 25
foo x | x == 26 = 26
foo x | x == 27 = 27
foo x | x == 28 = 28
foo x | x == 29 = 29
foo x | x == 30 = 30
foo x | x == 31 = 31
foo x | x == 32 = 32
foo x | x == 33 = 33
foo x | x == 34 = 34
foo x | x == 35 = 35
foo x | x == 36 = 36
foo x | x == 37 = 37
foo x | x == 38 = 38
foo x | x == 39 = 39
foo x | x == 40 = 40
foo x | x == 41 = 41
foo x | x == 42 = 42
foo x | x == 43 = 43
foo x | x == 44 = 44
foo x | x == 45 = 45
foo x | x == 46 = 46
foo x | x == 47 = 47
foo x | x == 48 = 48
foo x | x == 49 = 49
foo x | x == 50 = 50
foo x | x == 51 = 51
foo x | x == 52 = 52
foo x | x == 53 = 53
foo x | x == 54 = 54
foo x | x == 55 = 55
foo x | x == 56 = 56
foo x | x == 57 = 57
foo x | x == 58 = 58
foo x | x == 59 = 59
foo x | x == 60 = 60
foo x | x == 61 = 61
foo x | x == 62 = 62
foo x | x == 63 = 63
foo x | x == 64 = 64
foo x | x == 65 = 65
foo x | x == 66 = 66
foo x | x == 67 = 67
foo x | x == 68 = 68
foo x | x == 69 = 69
foo x | x == 70 = 70
foo x | x == 71 = 71
foo x | x == 72 = 72
foo x | x == 73 = 73
foo x | x == 74 = 74
foo x | x == 75 = 75
foo x | x == 76 = 76
foo x | x == 77 = 77
foo x | x == 78 = 78
foo x | x == 79 = 79
foo x | x == 80 = 80
foo x | x == 81 = 81
foo x | x == 82 = 82
foo x | x == 83 = 83
foo x | x == 84 = 84
foo x | x == 85 = 85
foo x | x == 86 = 86
foo x | x == 87 = 87
foo x | x == 88 = 88
foo x | x == 89 = 89
foo x | x == 90 = 90
foo x | x == 91 = 91
foo x | x == 92 = 92
foo x | x == 93 = 93
foo x | x == 94 = 94
foo x | x == 95 = 95
foo x | x == 96 = 96
foo x | x == 97 = 97
foo x | x == 98 = 98
foo x | x == 99 = 99
foo x | x == 100 = 100
foo x | x == 101 = 101
foo x | x == 102 = 102
foo x | x == 103 = 103
foo x | x == 104 = 104
foo x | x == 105 = 105
foo x | x == 106 = 106
foo x | x == 107 = 107
foo x | x == 108 = 108
foo x | x == 109 = 109
foo x | x == 110 = 110
foo x | x == 111 = 111
foo x | x == 112 = 112
foo x | x == 113 = 113
foo x | x == 114 = 114
foo x | x == 115 = 115
foo x | x == 116 = 116
foo x | x == 117 = 117
foo x | x == 118 = 118
foo x | x == 119 = 119
foo x | x == 120 = 120
foo x | x == 121 = 121
foo x | x == 122 = 122
foo x | x == 123 = 123
foo x | x == 124 = 124
foo x | x == 125 = 125
foo x | x == 126 = 126
foo x | x == 127 = 127
foo x | x == 128 = 128
foo x | x == 129 = 129
foo x | x == 130 = 130
foo x | x == 131 = 131
foo x | x == 132 = 132
foo x | x == 133 = 133
foo x | x == 134 = 134
foo x | x == 135 = 135
foo x | x == 136 = 136
foo x | x == 137 = 137
foo x | x == 138 = 138
foo x | x == 139 = 139
foo x | x == 140 = 140
foo x | x == 141 = 141
foo x | x == 142 = 142
foo x | x == 143 = 143
foo x | x == 144 = 144
foo x | x == 145 = 145
foo x | x == 146 = 146
foo x | x == 147 = 147
foo x | x == 148 = 148
foo x | x == 149 = 149
foo x | x == 150 = 150
foo x | x == 151 = 151
foo x | x == 152 = 152
foo x | x == 153 = 153
foo x | x == 154 = 154
foo x | x == 155 = 155
foo x | x == 156 = 156
foo x | x == 157 = 157
foo x | x == 158 = 158
foo x | x == 159 = 159
foo x | x == 160 = 160
foo x | x == 161 = 161
foo x | x == 162 = 162
foo x | x == 163 = 163
foo x | x == 164 = 164
foo x | x == 165 = 165
foo x | x == 166 = 166
foo x | x == 167 = 167
foo x | x == 168 = 168
foo x | x == 169 = 169
foo x | x == 170 = 170
foo x | x == 171 = 171
foo x | x == 172 = 172
foo x | x == 173 = 173
foo x | x == 174 = 174
foo x | x == 175 = 175
foo x | x == 176 = 176
foo x | x == 177 = 177
foo x | x == 178 = 178
foo x | x == 179 = 179
foo x | x == 180 = 180
foo x | x == 181 = 181
foo x | x == 182 = 182
foo x | x == 183 = 183
foo x | x == 184 = 184
foo x | x == 185 = 185
foo x | x == 186 = 186
foo x | x == 187 = 187
foo x | x == 188 = 188
foo x | x == 189 = 189
foo x | x == 190 = 190
foo x | x == 191 = 191
foo x | x == 192 = 192
foo x | x == 193 = 193
foo x | x == 194 = 194
foo x | x == 195 = 195
foo x | x == 196 = 196
foo x | x == 197 = 197
foo x | x == 198 = 198
foo x | x == 199 = 199
foo x | x == 200 = 200
foo x | x == 201 = 201
foo x | x == 202 = 202
foo x | x == 203 = 203
foo x | x == 204 = 204
foo x | x == 205 = 205
foo x | x == 206 = 206
foo x | x == 207 = 207
foo x | x == 208 = 208
foo x | x == 209 = 209
foo x | x == 210 = 210
foo x | x == 211 = 211
foo x | x == 212 = 212
foo x | x == 213 = 213
foo x | x == 214 = 214
foo x | x == 215 = 215
foo x | x == 216 = 216
foo x | x == 217 = 217
foo x | x == 218 = 218
foo x | x == 219 = 219
foo x | x == 220 = 220
foo x | x == 221 = 221
foo x | x == 222 = 222
foo x | x == 223 = 223
foo x | x == 224 = 224
foo x | x == 225 = 225
foo x | x == 226 = 226
foo x | x == 227 = 227
foo x | x == 228 = 228
foo x | x == 229 = 229
foo x | x == 230 = 230
foo x | x == 231 = 231
foo x | x == 232 = 232
foo x | x == 233 = 233
foo x | x == 234 = 234
foo x | x == 235 = 235
foo x | x == 236 = 236
foo x | x == 237 = 237
foo x | x == 238 = 238
foo x | x == 239 = 239
foo x | x == 240 = 240
foo x | x == 241 = 241
foo x | x == 242 = 242
foo x | x == 243 = 243
foo x | x == 244 = 244
foo x | x == 245 = 245
foo x | x == 246 = 246
foo x | x == 247 = 247
foo x | x == 248 = 248
foo x | x == 249 = 249
foo x | x == 250 = 250
foo x | x == 251 = 251
foo x | x == 252 = 252
foo x | x == 253 = 253
foo x | x == 254 = 254
foo x | x == 255 = 255
foo x | x == 256 = 256
foo x | x == 257 = 257
foo x | x == 258 = 258
foo x | x == 259 = 259
foo x | x == 260 = 260
foo x | x == 261 = 261
foo x | x == 262 = 262
foo x | x == 263 = 263
foo x | x == 264 = 264
foo x | x == 265 = 265
foo x | x == 266 = 266
foo x | x == 267 = 267
foo x | x == 268 = 268
foo x | x == 269 = 269
foo x | x == 270 = 270
foo x | x == 271 = 271
foo x | x == 272 = 272
foo x | x == 273 = 273
foo x | x == 274 = 274
foo x | x == 275 = 275
foo x | x == 276 = 276
foo x | x == 277 = 277
foo x | x == 278 = 278
foo x | x == 279 = 279
foo x | x == 280 = 280
foo x | x == 281 = 281
foo x | x == 282 = 282
foo x | x == 283 = 283
foo x | x == 284 = 284
foo x | x == 285 = 285
foo x | x == 286 = 286
foo x | x == 287 = 287
foo x | x == 288 = 288
foo x | x == 289 = 289
foo x | x == 290 = 290
foo x | x == 291 = 291
foo x | x == 292 = 292
foo x | x == 293 = 293
foo x | x == 294 = 294
foo x | x == 295 = 295
foo x | x == 296 = 296
foo x | x == 297 = 297
foo x | x == 298 = 298
foo x | x == 299 = 299
foo x | x == 300 = 300
foo x | x == 301 = 301
foo x | x == 302 = 302
foo x | x == 303 = 303
foo x | x == 304 = 304
foo x | x == 305 = 305
foo x | x == 306 = 306
foo x | x == 307 = 307
foo x | x == 308 = 308
foo x | x == 309 = 309
foo x | x == 310 = 310
foo x | x == 311 = 311
foo x | x == 312 = 312
foo x | x == 313 = 313
foo x | x == 314 = 314
foo x | x == 315 = 315
foo x | x == 316 = 316
foo x | x == 317 = 317
foo x | x == 318 = 318
foo x | x == 319 = 319
foo x | x == 320 = 320
foo x | x == 321 = 321
foo x | x == 322 = 322
foo x | x == 323 = 323
foo x | x == 324 = 324
foo x | x == 325 = 325
foo x | x == 326 = 326
foo x | x == 327 = 327
foo x | x == 328 = 328
foo x | x == 329 = 329
foo x | x == 330 = 330
foo x | x == 331 = 331
foo x | x == 332 = 332
foo x | x == 333 = 333
foo x | x == 334 = 334
foo x | x == 335 = 335
foo x | x == 336 = 336
foo x | x == 337 = 337
foo x | x == 338 = 338
foo x | x == 339 = 339
foo x | x == 340 = 340
foo x | x == 341 = 341
foo x | x == 342 = 342
foo x | x == 343 = 343
foo x | x == 344 = 344
foo x | x == 345 = 345
foo x | x == 346 = 346
foo x | x == 347 = 347
foo x | x == 348 = 348
foo x | x == 349 = 349
foo x | x == 350 = 350
foo x | x == 351 = 351
foo x | x == 352 = 352
foo x | x == 353 = 353
foo x | x == 354 = 354
foo x | x == 355 = 355
foo x | x == 356 = 356
foo x | x == 357 = 357
foo x | x == 358 = 358
foo x | x == 359 = 359
foo x | x == 360 = 360
foo x | x == 361 = 361
foo x | x == 362 = 362
foo x | x == 363 = 363
foo x | x == 364 = 364
foo x | x == 365 = 365
foo x | x == 366 = 366
foo x | x == 367 = 367
foo x | x == 368 = 368
foo x | x == 369 = 369
foo x | x == 370 = 370
foo x | x == 371 = 371
foo x | x == 372 = 372
foo x | x == 373 = 373
foo x | x == 374 = 374
foo x | x == 375 = 375
foo x | x == 376 = 376
foo x | x == 377 = 377
foo x | x == 378 = 378
foo x | x == 379 = 379
foo x | x == 380 = 380
foo x | x == 381 = 381
foo x | x == 382 = 382
foo x | x == 383 = 383
foo x | x == 384 = 384
foo x | x == 385 = 385
foo x | x == 386 = 386
foo x | x == 387 = 387
foo x | x == 388 = 388
foo x | x == 389 = 389
foo x | x == 390 = 390
foo x | x == 391 = 391
foo x | x == 392 = 392
foo x | x == 393 = 393
foo x | x == 394 = 394
foo x | x == 395 = 395
foo x | x == 396 = 396
foo x | x == 397 = 397
foo x | x == 398 = 398
foo x | x == 399 = 399
foo x | x == 400 = 400
foo x | x == 401 = 401
foo x | x == 402 = 402
foo x | x == 403 = 403
foo x | x == 404 = 404
foo x | x == 405 = 405
foo x | x == 406 = 406
foo x | x == 407 = 407
foo x | x == 408 = 408
foo x | x == 409 = 409
foo x | x == 410 = 410
foo x | x == 411 = 411
foo x | x == 412 = 412
foo x | x == 413 = 413
foo x | x == 414 = 414
foo x | x == 415 = 415
foo x | x == 416 = 416
foo x | x == 417 = 417
foo x | x == 418 = 418
foo x | x == 419 = 419
foo x | x == 420 = 420
foo x | x == 421 = 421
foo x | x == 422 = 422
foo x | x == 423 = 423
foo x | x == 424 = 424
foo x | x == 425 = 425
foo x | x == 426 = 426
foo x | x == 427 = 427
foo x | x == 428 = 428
foo x | x == 429 = 429
foo x | x == 430 = 430
foo x | x == 431 = 431
foo x | x == 432 = 432
foo x | x == 433 = 433
foo x | x == 434 = 434
foo x | x == 435 = 435
foo x | x == 436 = 436
foo x | x == 437 = 437
foo x | x == 438 = 438
foo x | x == 439 = 439
foo x | x == 440 = 440
foo x | x == 441 = 441
foo x | x == 442 = 442
foo x | x == 443 = 443
foo x | x == 444 = 444
foo x | x == 445 = 445
foo x | x == 446 = 446
foo x | x == 447 = 447
foo x | x == 448 = 448
foo x | x == 449 = 449
foo x | x == 450 = 450
foo x | x == 451 = 451
foo x | x == 452 = 452
foo x | x == 453 = 453
foo x | x == 454 = 454
foo x | x == 455 = 455
foo x | x == 456 = 456
foo x | x == 457 = 457
foo x | x == 458 = 458
foo x | x == 459 = 459
foo x | x == 460 = 460
foo x | x == 461 = 461
foo x | x == 462 = 462
foo x | x == 463 = 463
foo x | x == 464 = 464
foo x | x == 465 = 465
foo x | x == 466 = 466
foo x | x == 467 = 467
foo x | x == 468 = 468
foo x | x == 469 = 469
foo x | x == 470 = 470
foo x | x == 471 = 471
foo x | x == 472 = 472
foo x | x == 473 = 473
foo x | x == 474 = 474
foo x | x == 475 = 475
foo x | x == 476 = 476
foo x | x == 477 = 477
foo x | x == 478 = 478
foo x | x == 479 = 479
foo x | x == 480 = 480
foo x | x == 481 = 481
foo x | x == 482 = 482
foo x | x == 483 = 483
foo x | x == 484 = 484
foo x | x == 485 = 485
foo x | x == 486 = 486
foo x | x == 487 = 487
foo x | x == 488 = 488
foo x | x == 489 = 489
foo x | x == 490 = 490
foo x | x == 491 = 491
foo x | x == 492 = 492
foo x | x == 493 = 493
foo x | x == 494 = 494
foo x | x == 495 = 495
foo x | x == 496 = 496
foo x | x == 497 = 497
foo x | x == 498 = 498
foo x | x == 499 = 499
foo x | x == 500 = 500
......@@ -194,3 +194,15 @@ test('parsing001',
compile_fail, [''])
test('T783',
[ only_ways(['normal']), # no optimisation for this one
# expected value: 175,569,928 (x86/Linux)
if_wordsize(32,
compiler_stats_num_field('bytes allocated', 125000000,
225000000)),
# expected value: 390895576 (amd64/Linux):
if_wordsize(64,
compiler_stats_num_field('bytes allocated', 350000000,
450000000))
],
compile,[''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment