https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83497
Bug ID: 83497 Summary: CPU2000 172.mgrid starts failing with r254730 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: pthaugen at gcc dot gnu.org CC: dje at gcc dot gnu.org, hubicka at gcc dot gnu.org, rguenth at gcc dot gnu.org, segher at gcc dot gnu.org, wschmidt at gcc dot gnu.org Target Milestone: --- Host: powerpc64-unknown-linux-gnu Target: powerpc64-unknown-linux-gnu Build: powerpc64-unknown-linux-gnu mgrid started failing (output miscompare) with r254730. The following options demonstrate the failure "-O3 -mcpu=power6 -ffast-math". The miscompared output is... 29748: -0.839533E-12 0.182462E-12 ^ 29749: -0.839533E-12 0.182462E-12 ^ 29750: -0.849589E-12 0.184648E-12 ^ 29751: -0.849589E-12 0.184648E-12 ^ 29752: -0.852151E-12 0.185205E-12 ^ 29753: -0.852151E-12 0.185205E-12 ^ 29754: -0.852839E-12 0.185354E-12 ^ A little brief history on this since it's come and gone a couple times. All revisions deal with CFG/inlining issues. r254730 - initial failure r254937 - started working, only because this inadvertently disabled some inlining r254946 - fixed inlining from 254937, benchmark started failing again r255103 - started working So even though it's currently working on trunk I think there's an issue in r255103 which I've emailed Honza about separately. If I apply the following (which hopefully Honza will confirm is the desired behavior) to current trunk the benchmark fails again. Index: gcc/ipa-inline.c =================================================================== --- gcc/ipa-inline.c (revision 255838) +++ gcc/ipa-inline.c (working copy) @@ -691,7 +691,7 @@ sreal time = compute_uninlined_call_time (e, unspec_time); sreal inlined_time = compute_inlined_call_time (e, spec_time); - if (time - inlined_time * 100 + if ((time - inlined_time) * 100 > (sreal) (time * PARAM_VALUE (PARAM_INLINE_MIN_SPEEDUP))) return true; return false;