public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/21031] New: Another missed forward propagation opportunity
@ 2005-04-14 20:43 kazu at cs dot umass dot edu
2005-04-14 20:51 ` [Bug tree-optimization/21031] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-04-14 20:43 UTC (permalink / raw)
To: gcc-bugs
Consider:
int
foo (int a)
{
int b = a != 0;
unsigned char c = b;
if (c)
return 1;
else
return 0;
}
We end up with code like this:
b_3 = a_2 != 0;
c_4 = (unsigned char) b_3;
if (c_4 != 0) goto <L0>; else goto <L2>;
We want to forward-propagate the preceding two statements into the COND_EXPR
and get
if (a_2 != 0) goto <L0>; else goto <L2>;
Unlike forward propagation opportunities noted in PR 14754 or PR15558,
this kind of opportunity occurs often in practice.
--
Summary: Another missed forward propagation opportunity
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: kazu at cs dot umass dot edu
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21031
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/21031] Another missed forward propagation opportunity
2005-04-14 20:43 [Bug tree-optimization/21031] New: Another missed forward propagation opportunity kazu at cs dot umass dot edu
@ 2005-04-14 20:51 ` pinskia at gcc dot gnu dot org
2005-04-15 15:30 ` kazu at cs dot umass dot edu
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-14 20:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-14 20:50 -------
Confirmed, I thought I saw a bug like before.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-04-14 20:50:59
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21031
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/21031] Another missed forward propagation opportunity
2005-04-14 20:43 [Bug tree-optimization/21031] New: Another missed forward propagation opportunity kazu at cs dot umass dot edu
2005-04-14 20:51 ` [Bug tree-optimization/21031] " pinskia at gcc dot gnu dot org
@ 2005-04-15 15:30 ` kazu at cs dot umass dot edu
2005-04-15 18:43 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-04-15 15:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2005-04-15 15:30 -------
Patch posted:
http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01726.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21031
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/21031] Another missed forward propagation opportunity
2005-04-14 20:43 [Bug tree-optimization/21031] New: Another missed forward propagation opportunity kazu at cs dot umass dot edu
2005-04-14 20:51 ` [Bug tree-optimization/21031] " pinskia at gcc dot gnu dot org
2005-04-15 15:30 ` kazu at cs dot umass dot edu
@ 2005-04-15 18:43 ` cvs-commit at gcc dot gnu dot org
2005-04-15 18:44 ` kazu at cs dot umass dot edu
2005-04-15 19:05 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-15 18:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-04-15 18:42 -------
Subject: Bug 21031
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: kazu@gcc.gnu.org 2005-04-15 18:42:38
Modified files:
gcc : ChangeLog tree-ssa-forwprop.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/tree-ssa: pr21031.c
Log message:
gcc/
PR tree-optimization/21031
* tree-ssa-forwprop.c (ssa_name_defined_by_comparison_p): New.
(forward_propagate_into_cond_1): Call it. Forward propagate
integer-integer casts into COND_EXPRs.
testsuite/
PR tree-optimization/21031
* gcc.dg/tree-ssa/pr21031.c: New.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8313&r2=2.8314
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-forwprop.c.diff?cvsroot=gcc&r1=2.13&r2=2.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5354&r2=1.5355
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr21031.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21031
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/21031] Another missed forward propagation opportunity
2005-04-14 20:43 [Bug tree-optimization/21031] New: Another missed forward propagation opportunity kazu at cs dot umass dot edu
` (2 preceding siblings ...)
2005-04-15 18:43 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-15 18:44 ` kazu at cs dot umass dot edu
2005-04-15 19:05 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-04-15 18:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2005-04-15 18:44 -------
Just checked in a patch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21031
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/21031] Another missed forward propagation opportunity
2005-04-14 20:43 [Bug tree-optimization/21031] New: Another missed forward propagation opportunity kazu at cs dot umass dot edu
` (3 preceding siblings ...)
2005-04-15 18:44 ` kazu at cs dot umass dot edu
@ 2005-04-15 19:05 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-15 19:05 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21031
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-04-15 19:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-14 20:43 [Bug tree-optimization/21031] New: Another missed forward propagation opportunity kazu at cs dot umass dot edu
2005-04-14 20:51 ` [Bug tree-optimization/21031] " pinskia at gcc dot gnu dot org
2005-04-15 15:30 ` kazu at cs dot umass dot edu
2005-04-15 18:43 ` cvs-commit at gcc dot gnu dot org
2005-04-15 18:44 ` kazu at cs dot umass dot edu
2005-04-15 19:05 ` pinskia at gcc dot gnu dot 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).