https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86425
Bug ID: 86425 Summary: Spec 2006 soplex seems to be slower on PowerPC using -ffast-math than without -ffast-math Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: meissner at gcc dot gnu.org Target Milestone: --- I did some Spec 2006 runs, and one of the runs I was comparing normal speed with -ffast-math. As expected a lot of SpecFP benchmarks were faster using the -ffast-math option. However, 3 of the benchmarks were slower, including soplex. The 4 hottest functions in soplex are all slower using -ffast-math: Percent Percent | Samples Samples | slowmath fastmath | slowmath fastmath | Function ======== ======== | ======== ======== | ======== 32.3283% 33.0005% | 4,005,273 4,344,449 | _ZN6soplex10SPxSteepPR8entered4ENS_5SPxIdEi 10.8967% 11.2537% | 1,350,038 1,481,531 | _ZN6soplex8SSVector20assign2product4setupERKNS_5SVSetERKS0_ 10.4306% 10.9159% | 1,292,285 1,437,055 | _ZN6soplex8SSVector5setupEv 7.0912% 7.5644% | 878,557 995,832 | _ZN6soplex9CLUFactor16vSolveUrightNoNZEPdS1_Piid Function _ZN6soplex10SPxSteepPR8entered4ENS_5SPxIdEi, 32.33 - 33.00% of total in 2 files ---------------------------------------------------------------------------------------- The C++ name is soplex::SPxSteepPR::entered4(soplex::SPxId, int). Percent Percent | Samples Samples | Line # Filename slowmath fastmath | slowmath fastmath | Line # Filename -------- -------- | --------- --------- | ------ ------------- 50.4925% 51.6016% | 2,022,362 2,241,806 | 175 svector.h 15.1681% 15.6850% | 607,528 681,424 | 161 vector.h 13.8269% 14.9673% | 553,806 650,241 | 295 svector.h 10.0395% 8.8185% | 402,106 383,111 | 293 svector.h 5.0159% 1.5512% | 200,903 67,390 | 403 spxsteeppr.cc 2.3271% | 101,098 | 409 spxsteeppr.cc 2.2996% 1.9382% | 92,107 84,204 | 346 dataset.h 1.2001% 1.2045% | 48,071 52,327 | 402 spxsteeppr.cc Function _ZN6soplex8SSVector20assign2product4setupERKNS_5SVSetERKS0_, 10.90 - 11.25% of total in 2 files -------------------------------------------------------------------------------------------------------- The C++ name is soplex::SSVector::assign2product4setup(soplex::SVSet const&, soplex::SSVector const&). Percent Percent | Samples Samples | Line # Filename slowmath fastmath | slowmath fastmath | Line # Filename -------- -------- | -------- -------- | ------ ----------- 60.5187% 59.4371% | 817,025 880,583 | 984 ssvector.cc 29.4260% 29.5739% | 397,262 438,147 | 981 ssvector.cc 4.9556% 5.2965% | 66,903 78,469 | 983 ssvector.cc 3.9925% 4.4770% | 53,900 66,328 | 980 ssvector.cc Function _ZN6soplex8SSVector5setupEv, 10.43 - 10.92% of total in 2 files ------------------------------------------------------------------------ The C++ name is soplex::SSVector::setup(). Percent Percent | Samples Samples | Line # Filename slowmath fastmath | slowmath fastmath | Line # Filename -------- -------- | -------- -------- | ------ ------------ 32.1165% 35.4180% | 415,037 508,976 | 220 ssvector.cc 22.2823% 25.1495% | 287,951 361,412 | 212 ssvector.cc 21.6266% 17.6770% | 279,478 254,029 | 216 ssvector.cc 20.2979% 19.6491% | 262,308 282,368 | 214 ssvector.cc 3.6149% 2.1003% | 46,715 30,182 | 193 spxdefines.h Function _ZN6soplex9CLUFactor16vSolveUrightNoNZEPdS1_Piid, 7.09 - 7.56% of total in 2 files ------------------------------------------------------------------------------------------- The C++ name is soplex::CLUFactor::vSolveUrightNoNZ(double*, double*, int*, int, double). Percent Percent | Samples Samples | Line # Filename slowmath fastmath | slowmath fastmath | Line # Filename -------- -------- | -------- -------- | ------ --------- 14.3154% 11.5548% | 125,771 115,066 | 479 vsolve.cc 8.4523% 10.0335% | 74,259 99,917 | 72 vsolve.cc 9.5626% 7.6039% | 84,013 75,722 | 470 vsolve.cc 8.0533% 9.5256% | 70,753 94,859 | 73 vsolve.cc 8.0590% 6.2612% | 70,802 62,351 | 469 vsolve.cc 5.9002% 7.1628% | 51,836 71,330 | 490 vsolve.cc 6.3017% 4.9831% | 55,364 49,624 | 474 vsolve.cc 4.5466% 2.8041% | 39,944 27,924 | 502 vsolve.cc 3.7633% 4.3653% | 33,063 43,471 | 76 vsolve.cc 3.9925% 3.2432% | 35,076 32,297 | 477 vsolve.cc 3.0480% 3.6673% | 26,779 36,520 | 89 vsolve.cc 2.9868% 3.4680% | 26,241 34,535 | 491 vsolve.cc 2.8291% | 28,173 | 499 vsolve.cc 2.3567% 2.8041% | 20,705 27,924 | 91 vsolve.cc 2.6888% 2.1113% | 23,623 21,025 | 466 vsolve.cc 2.2936% 2.6018% | 20,151 25,910 | 78 vsolve.cc 1.7462% 1.4687% | 15,342 14,626 | 478 vsolve.cc 1.4010% 1.6444% | 12,309 16,375 | 102 vsolve.cc 1.3051% 1.6403% | 11,466 16,335 | 464 vsolve.cc 1.1126% 1.2585% | 9,775 12,533 | 498 vsolve.cc 1.0127% | 10,085 | 108 vsolve.cc