public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/52019] New: [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS
@ 2012-01-27 14:58 rguenth at gcc dot gnu.org
2012-01-27 15:51 ` [Bug tree-optimization/52019] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-27 14:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52019
Bug #: 52019
Summary: [4.7 Regression] tree-ssa/ipa-split-5.c fails with
-fno-tree-sra because of CLOBBERS
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
IPA split is confused by the stale clobber in BB 5:
<bb 2>:
D.1717_2 = a_1(D) != 0;
D.1718_3 = (long int) D.1717_2;
D.1719_4 = __builtin_expect (D.1718_3, 1);
if (D.1719_4 != 0)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
D.1722.a = 0;
D.1722.b = 0;
goto <bb 5>;
<bb 4>:
retval = make_me_big (a_1(D));
retval = make_me_big (a_1(D));
retval = make_me_big (a_1(D));
retval = make_me_big (a_1(D));
retval = make_me_big (a_1(D));
retval = make_me_big (a_1(D));
D.1722 = retval;
retval ={v} {CLOBBER};
<bb 5>:
retval ={v} {CLOBBER};
return D.1722;
As you can see 'retval' is completely unused on the path to BB5. We
should arrange for them to be removed in such cases, maybe by DCE.
This blocks SRA from not "scalarizing" clobbers, which it does like:
<bb 5>:
retval$a_21 = 0;
retval$b_22 = 0;
return D.1722;
which is sort-of bogus anyway.
I'll fixup SRA, but for SRA to do this trick there needs to be stmts
that touch retval in any meaningful way, so a clobber that is stale
before SRA will stay so.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/52019] [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS
2012-01-27 14:58 [Bug tree-optimization/52019] New: [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS rguenth at gcc dot gnu.org
@ 2012-01-27 15:51 ` rguenth at gcc dot gnu.org
2012-02-22 10:16 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-27 15:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52019
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matz at gcc dot gnu.org
Target Milestone|--- |4.7.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/52019] [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS
2012-01-27 14:58 [Bug tree-optimization/52019] New: [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS rguenth at gcc dot gnu.org
2012-01-27 15:51 ` [Bug tree-optimization/52019] " rguenth at gcc dot gnu.org
@ 2012-02-22 10:16 ` jakub at gcc dot gnu.org
2012-02-22 10:20 ` rguenther at suse dot de
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-22 10:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52019
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-22 10:11:28 UTC ---
Shouldn't IPA split just ignore clobbers when deciding whether to split?
Then obviously it needs to handle them somehow, but IMHO the decision shouldn't
take them into account.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/52019] [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS
2012-01-27 14:58 [Bug tree-optimization/52019] New: [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS rguenth at gcc dot gnu.org
2012-01-27 15:51 ` [Bug tree-optimization/52019] " rguenth at gcc dot gnu.org
2012-02-22 10:16 ` jakub at gcc dot gnu.org
@ 2012-02-22 10:20 ` rguenther at suse dot de
2012-02-23 11:39 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenther at suse dot de @ 2012-02-22 10:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52019
--- Comment #2 from rguenther at suse dot de <rguenther at suse dot de> 2012-02-22 10:16:01 UTC ---
On Wed, 22 Feb 2012, jakub at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52019
>
> Jakub Jelinek <jakub at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |jakub at gcc dot gnu.org
>
> --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-22 10:11:28 UTC ---
> Shouldn't IPA split just ignore clobbers when deciding whether to split?
> Then obviously it needs to handle them somehow, but IMHO the decision shouldn't
> take them into account.
Yes. The question is how exactly ... the idea was that dropping them
(for 'unused' vars) would be appropriate.
Richard.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/52019] [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS
2012-01-27 14:58 [Bug tree-optimization/52019] New: [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS rguenth at gcc dot gnu.org
` (2 preceding siblings ...)
2012-02-22 10:20 ` rguenther at suse dot de
@ 2012-02-23 11:39 ` jakub at gcc dot gnu.org
2012-02-23 15:07 ` jakub at gcc dot gnu.org
2012-02-23 15:24 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-23 11:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52019
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-02-23
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-23 11:36:43 UTC ---
Created attachment 26726
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26726
gcc47-pr52019.patch
Untested fix.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/52019] [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS
2012-01-27 14:58 [Bug tree-optimization/52019] New: [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS rguenth at gcc dot gnu.org
` (3 preceding siblings ...)
2012-02-23 11:39 ` jakub at gcc dot gnu.org
@ 2012-02-23 15:07 ` jakub at gcc dot gnu.org
2012-02-23 15:24 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-23 15:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52019
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-23 14:43:48 UTC ---
Author: jakub
Date: Thu Feb 23 14:43:43 2012
New Revision: 184508
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184508
Log:
PR tree-optimization/52019
* ipa-split.c (find_return_bb, find_retval, visit_bb): Ignore
CLOBBER stmts.
* gcc.dg/tree-ssa/ipa-split-6.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-6.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-split.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/52019] [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS
2012-01-27 14:58 [Bug tree-optimization/52019] New: [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS rguenth at gcc dot gnu.org
` (4 preceding siblings ...)
2012-02-23 15:07 ` jakub at gcc dot gnu.org
@ 2012-02-23 15:24 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-23 15:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52019
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-23 15:19:58 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-02-23 15:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-27 14:58 [Bug tree-optimization/52019] New: [4.7 Regression] tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS rguenth at gcc dot gnu.org
2012-01-27 15:51 ` [Bug tree-optimization/52019] " rguenth at gcc dot gnu.org
2012-02-22 10:16 ` jakub at gcc dot gnu.org
2012-02-22 10:20 ` rguenther at suse dot de
2012-02-23 11:39 ` jakub at gcc dot gnu.org
2012-02-23 15:07 ` jakub at gcc dot gnu.org
2012-02-23 15:24 ` jakub at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).