[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #32 from Jakub Jelinek jakub at gcc dot gnu.org --- Author: jakub Date: Thu Mar 13 09:38:28 2014 New Revision: 208535 URL: http://gcc.gnu.org/viewcvs?rev=208535root=gccview=rev Log: PR tree-optimization/59025 PR

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-12 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #27 from Jakub Jelinek jakub at gcc dot gnu.org --- basic_block bbb = gimple_bb (SSA_NAME_DEF_STMT (oea-op)); in the patch contains a pasto, which I guess can explain most if not all the -fcompare-debug failures. That said, thinking

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-12 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #28 from rguenther at suse dot de rguenther at suse dot de --- On Tue, 11 Mar 2014, hjl.tools at gmail dot com wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #26 from H.J. Lu hjl.tools at gmail dot com ---

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-12 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #29 from Jakub Jelinek jakub at gcc dot gnu.org --- Created attachment 32338 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32338action=edit gcc49-pr60418.patch New version of the patch, going to bootstrap/regtest it momentarily.

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-12 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #30 from Jakub Jelinek jakub at gcc dot gnu.org --- The #c29 patch now passed bootstrap/regtest on x86_64-linux and i686-linux. So, if it also fixes 435.gromacs on -mx32, I'll submit it to gcc-patches.

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-12 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #31 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Jakub Jelinek from comment #29) Created attachment 32338 [details] gcc49-pr60418.patch New version of the patch, going to bootstrap/regtest it momentarily. H.J., could

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-11 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #23 from rguenther at suse dot de rguenther at suse dot de --- On Mon, 10 Mar 2014, hjl.tools at gmail dot com wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #20 from H.J. Lu hjl.tools at gmail dot com ---

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-11 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #24 from H.J. Lu hjl.tools at gmail dot com --- (In reply to rguent...@suse.de from comment #23) On Mon, 10 Mar 2014, hjl.tools at gmail dot com wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #20 from

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-11 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #25 from Jakub Jelinek jakub at gcc dot gnu.org --- Created attachment 32334 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32334action=edit gcc49-pr60418.patch Unfortunately the patch fails to bootstrap due to -fcompare-debug

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-11 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #26 from H.J. Lu hjl.tools at gmail dot com --- This patch avoids removing preheader when optimizing since preheader will be added back later even if it is removed: diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-10 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #18 from Jakub Jelinek jakub at gcc dot gnu.org --- Shouldn't we just prefer the original IL if possible? That is not SSA_NAME_VERSION, but not gimple_uid of the stmt definition either. If you have: _4 = something; _5 =

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-10 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #19 from rguenther at suse dot de rguenther at suse dot de --- On Mon, 10 Mar 2014, jakub at gcc dot gnu.org wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #18 from Jakub Jelinek jakub at gcc dot gnu.org ---

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-10 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #20 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Richard Biener from comment #13) Huh, adding a pre-header should _never_ do sth like that. Can you produce a small testcase that exhibits these kind of changes with

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-10 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #21 from Jakub Jelinek jakub at gcc dot gnu.org --- Can you try if sorting on gimple_uid would help this or not? I think it would be something like: --- gcc/tree-ssa-reassoc.c.jj2014-02-19 06:59:35.0 +0100 +++

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-10 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #22 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Jakub Jelinek from comment #21) Can you try if sorting on gimple_uid would help this or not? I think it would be something like: Yes, it works.

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-08 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #17 from rguenther at suse dot de rguenther at suse dot de --- On 3/7/14 10:57 PM, hjl.tools at gmail dot com wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #14 from H.J. Lu hjl.tools at gmail dot com --- (In

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-07 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #12 from Richard Biener rguenth at gcc dot gnu.org --- (In reply to H.J. Lu from comment #8) With LTO, current_loops-state may not be set and loops_state_satisfies_p () may always be false. It's zero. It probably should be

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-07 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added CC||rguenth at gcc

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-07 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #14 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Richard Biener from comment #13) Huh, adding a pre-header should _never_ do sth like that. Can you produce a small testcase that exhibits these kind of changes with

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-07 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added CC||jakub at gcc dot

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-07 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #16 from H.J. Lu hjl.tools at gmail dot com --- This patch: diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index 2fc8220..56160bd 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -136,7 +136,7 @@ make_ssa_name_fn

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-06 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #9 from H.J. Lu hjl.tools at gmail dot com --- One pass removes a preheader in if (_47 0) goto bb 3; else goto bb 8; bb 3: bb 4: # n_20 = PHI 1(3), n_269(7) and becomes: if (_47 0) goto bb 3; else

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-06 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #10 from H.J. Lu hjl.tools at gmail dot com --- Sources have many FP loops contains codes like: rsq11 = dx11*dx11+dy11*dy11+dz11*dz11; When they are compiled with -O3 -funroll-loops -ffast-math -fwhole-program

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-06 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #11 from H.J. Lu hjl.tools at gmail dot com --- sort_by_operand_rank in reassoc.cin has /* Lastly, make sure the versions that are the same go next to each other. We use SSA_NAME_VERSION because it's stable. */ if

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Target||x32 Target

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #3 from Richard Biener rguenth at gcc dot gnu.org --- (In reply to H.J. Lu from comment #1) Do we need to verify that basic block DEST has a single predecessor? No, that's not necessary. In fact that disables all pre-header removal

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #4 from Richard Biener rguenth at gcc dot gnu.org --- (In reply to H.J. Lu from comment #0) Since r208165, 435.gromacs in SPEC CPU 2006 is miscompiled on x32 with -mx32 -O3 -funroll-loops -ffast-math -fwhole-program -flto=jobserver

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-05 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #5 from H.J. Lu hjl.tools at gmail dot com --- Created attachment 32280 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32280action=edit The assembly difference of good and bad executables Here is the assembly difference of good

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-05 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #6 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Richard Biener from comment #4) That's odd. What's the code generation difference in the end for the minimal range {to, from} that still shows a difference of the

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-05 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #7 from H.J. Lu hjl.tools at gmail dot com --- current_loops is setup by (gdb) bt #0 set_loops_for_fn (fn=0x715901f8, loops=0x7fffef079e20) at ../../../../gcc/gcc/function.h:747 #1 0x008fe35e in input_cfg

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-05 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #8 from H.J. Lu hjl.tools at gmail dot com --- With LTO, current_loops-state may not be set and loops_state_satisfies_p () may always be false.

[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

2014-03-04 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 --- Comment #1 from H.J. Lu hjl.tools at gmail dot com --- Do we need to verify that basic block DEST has a single predecessor? This patch works for me: diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index 926d300..0ed15df 100644 ---