* [Bug tree-optimization/58246] [4.7/4.8/4.9 Regression] wrong code at -O1 and above
2013-08-27 4:36 [Bug tree-optimization/58246] New: wrong code at -O1 and above (affecting 4.6, 4.7, 4.8, and trunk) su at cs dot ucdavis.edu
@ 2013-08-27 7:15 ` jakub at gcc dot gnu.org
2013-08-27 7:23 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-27 7:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58246
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Target Milestone|--- |4.7.4
Summary|wrong code at -O1 and above |[4.7/4.8/4.9 Regression]
|(affecting 4.6, 4.7, 4.8, |wrong code at -O1 and above
|and trunk) |
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r145494.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/58246] [4.7/4.8/4.9 Regression] wrong code at -O1 and above
2013-08-27 4:36 [Bug tree-optimization/58246] New: wrong code at -O1 and above (affecting 4.6, 4.7, 4.8, and trunk) su at cs dot ucdavis.edu
2013-08-27 7:15 ` [Bug tree-optimization/58246] [4.7/4.8/4.9 Regression] wrong code at -O1 and above jakub at gcc dot gnu.org
@ 2013-08-27 7:23 ` jakub at gcc dot gnu.org
2013-08-29 10:41 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-27 7:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58246
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-08-27
Ever confirmed|0 |1
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
We have:
# .MEM_13 = VDEF <.MEM_11>
tD.1723[1] = 0;
# .MEM_15 = VDEF <.MEM_13>
tD.1723[a.0_6] = 0;
at mergephi1 and cddce1 decides to delete the first of the two stores as needed
for some weird reason:
processing: _8 = t[a.0_6];
marking necessary through .MEM_4 stmt t[1] = 1;
marking necessary through .MEM_3 stmt t[0] = 1;
marking necessary through .MEM_15 stmt t[a.0_6] = 0;
processing: t[a.0_6] = 0;
processing: t[0] = 1;
processing: t[1] = 1;
processing: a = 0;
Eliminating unnecessary statements:
Deleting : t[1] = 0;
Removed 1 of 18 statements (5%)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/58246] [4.7/4.8/4.9 Regression] wrong code at -O1 and above
2013-08-27 4:36 [Bug tree-optimization/58246] New: wrong code at -O1 and above (affecting 4.6, 4.7, 4.8, and trunk) su at cs dot ucdavis.edu
2013-08-27 7:15 ` [Bug tree-optimization/58246] [4.7/4.8/4.9 Regression] wrong code at -O1 and above jakub at gcc dot gnu.org
2013-08-27 7:23 ` jakub at gcc dot gnu.org
@ 2013-08-29 10:41 ` rguenth at gcc dot gnu.org
2013-08-29 10:58 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-08-29 10:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58246
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/58246] [4.7/4.8/4.9 Regression] wrong code at -O1 and above
2013-08-27 4:36 [Bug tree-optimization/58246] New: wrong code at -O1 and above (affecting 4.6, 4.7, 4.8, and trunk) su at cs dot ucdavis.edu
` (2 preceding siblings ...)
2013-08-29 10:41 ` rguenth at gcc dot gnu.org
@ 2013-08-29 10:58 ` rguenth at gcc dot gnu.org
2013-08-29 13:04 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-08-29 10:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58246
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
We decide to stop because we think that we reached a killing definition when
looking for possible defs of
_8 = t[a.0_6];
and reach, over the loop backedge
t[a.0_6] = 0;
here:
/* Or they need to be exactly the same. */
else if (ref->ref
/* Make sure there is no induction variable involved
in the references (gcc.c-torture/execute/pr42142.c).
The simplest way is to check if the kill dominates
the use. */
&& dominated_by_p (CDI_DOMINATORS, (basic_block) data,
gimple_bb (def_stmt))
&& operand_equal_p (ref->ref, lhs, 0))
return true;
where the dominance check was supposed to prevent this bug from happening...
I have a fix.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/58246] [4.7/4.8/4.9 Regression] wrong code at -O1 and above
2013-08-27 4:36 [Bug tree-optimization/58246] New: wrong code at -O1 and above (affecting 4.6, 4.7, 4.8, and trunk) su at cs dot ucdavis.edu
` (3 preceding siblings ...)
2013-08-29 10:58 ` rguenth at gcc dot gnu.org
@ 2013-08-29 13:04 ` rguenth at gcc dot gnu.org
2013-08-30 7:54 ` [Bug tree-optimization/58246] [4.7/4.8 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-08-29 13:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58246
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Aug 29 13:04:19 2013
New Revision: 202071
URL: http://gcc.gnu.org/viewcvs?rev=202071&root=gcc&view=rev
Log:
2013-08-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/58246
* tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Properly
handle the dominance check inside a basic-block.
* gcc.dg/torture/pr58246.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr58246.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-dce.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/58246] [4.7/4.8 Regression] wrong code at -O1 and above
2013-08-27 4:36 [Bug tree-optimization/58246] New: wrong code at -O1 and above (affecting 4.6, 4.7, 4.8, and trunk) su at cs dot ucdavis.edu
` (4 preceding siblings ...)
2013-08-29 13:04 ` rguenth at gcc dot gnu.org
@ 2013-08-30 7:54 ` rguenth at gcc dot gnu.org
2013-09-03 12:18 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-08-30 7:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58246
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.9.0
Summary|[4.7/4.8/4.9 Regression] |[4.7/4.8 Regression] wrong
|wrong code at -O1 and above |code at -O1 and above
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/58246] [4.7/4.8 Regression] wrong code at -O1 and above
2013-08-27 4:36 [Bug tree-optimization/58246] New: wrong code at -O1 and above (affecting 4.6, 4.7, 4.8, and trunk) su at cs dot ucdavis.edu
` (5 preceding siblings ...)
2013-08-30 7:54 ` [Bug tree-optimization/58246] [4.7/4.8 " rguenth at gcc dot gnu.org
@ 2013-09-03 12:18 ` rguenth at gcc dot gnu.org
2014-05-07 7:59 ` [Bug tree-optimization/58246] [4.7 " rguenth at gcc dot gnu.org
2014-05-07 8:00 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-09-03 12:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58246
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Tue Sep 3 12:18:34 2013
New Revision: 202217
URL: http://gcc.gnu.org/viewcvs?rev=202217&root=gcc&view=rev
Log:
2013-09-03 Richard Biener <rguenther@suse.de>
Backport from mainline
2013-08-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/58246
* tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Properly
handle the dominance check inside a basic-block.
* gcc.dg/torture/pr58246.c: New testcase.
Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58246.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/tree-ssa-dce.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/58246] [4.7 Regression] wrong code at -O1 and above
2013-08-27 4:36 [Bug tree-optimization/58246] New: wrong code at -O1 and above (affecting 4.6, 4.7, 4.8, and trunk) su at cs dot ucdavis.edu
` (6 preceding siblings ...)
2013-09-03 12:18 ` rguenth at gcc dot gnu.org
@ 2014-05-07 7:59 ` rguenth at gcc dot gnu.org
2014-05-07 8:00 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-05-07 7:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58246
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Known to fail| |4.7.3
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/58246] [4.7 Regression] wrong code at -O1 and above
2013-08-27 4:36 [Bug tree-optimization/58246] New: wrong code at -O1 and above (affecting 4.6, 4.7, 4.8, and trunk) su at cs dot ucdavis.edu
` (7 preceding siblings ...)
2014-05-07 7:59 ` [Bug tree-optimization/58246] [4.7 " rguenth at gcc dot gnu.org
@ 2014-05-07 8:00 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-05-07 8:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58246
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Wed May 7 07:59:26 2014
New Revision: 210141
URL: http://gcc.gnu.org/viewcvs?rev=210141&root=gcc&view=rev
Log:
2014-05-07 Richard Biener <rguenther@suse.de>
Backport from mainline
2013-08-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/58246
* tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Properly
handle the dominance check inside a basic-block.
* gcc.dg/torture/pr58246.c: New testcase.
Added:
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr58246.c
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/tree-ssa-dce.c
^ permalink raw reply [flat|nested] 10+ messages in thread