http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418
Bug ID: 60418 Summary: [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com Since r208165, 435.gromacs in SPEC CPU 2006 is miscompiled on x32 with -mx32 -O3 -funroll-loops -ffast-math -fwhole-program -flto=jobserver -fuse-linker-plugin The failure is Running 435.gromacs ref peak lto default *** Miscompare of gromacs.out; for details see /export/project/git/gcc-regression/spec/2006/spec/benchspec/CPU2006/435.grom acs/run/run_peak_ref_lto.0000/gromacs.out.mis cat /export/project/git/gcc-regression/spec/2006/spec/benchspec/CPU2006/435.gromacs/run/run_peak_ref_lto.0000/gromacs.out.mis 0002: 3.07684e+02 3.03594e+02 The result of 3.03594e+02 is outside of tolerance for 3.07684e+02. I added a static counter in tree_forwarder_block_p for the number of times returned true above and return false if it is between getenv("from") and getenv("to"). I noticed that as more basic blocks get removed, the deviation is getting bigger. One removed basic block has ;; basic block 3, loop depth 0, count 0, freq 225, maybe hot ;; prev block 2, next block 4, flags: (NEW, REACHABLE) ;; pred: 2 ;; ;; succ: 4 and its successor has ;; basic block 4, loop depth 1, count 0, freq 2500, maybe hot ;; prev block 3, next block 5, flags: (NEW) ;; pred: 3 ;; 6 ;; starting at line 722 # gimple_phi <i_429, 0(3), [bondfree.c : 726:24] i_27(6)> Is is safe to remove basic block 3?