public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/20762] New: [tcb] missed copy-prop opportunity
@ 2005-04-04 22:45 kazu at cs dot umass dot edu
2005-04-05 23:26 ` [Bug tree-optimization/20762] " pinskia at gcc dot gnu dot org
2005-04-12 23:13 ` kazu at cs dot umass dot edu
0 siblings, 2 replies; 3+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-04-04 22:45 UTC (permalink / raw)
To: gcc-bugs
Consider:
int
foo (int a, int b)
{
int c = a;
int d;
if (a == c)
d = a;
else
d = b;
return d;
}
Note that "a == c" always holds, so the whole function should collapse
down to return a;. However, copy-prop on TCB outputs
foo (a, b)
{
int d;
int c;
int D.1137;
<bb 0>:
c_3 = a_2;
d_8 = a_2;
# d_1 = PHI <a_2(0)>;
<L2>:;
d_4 = d_1;
return d_1;
}
Note that we are still returning d_1. Not good.
The problem is that we are not folding COND_EXPR_COND during propagation.
--
Summary: [tcb] missed copy-prop 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=20762
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/20762] [tcb] missed copy-prop opportunity
2005-04-04 22:45 [Bug tree-optimization/20762] New: [tcb] missed copy-prop opportunity kazu at cs dot umass dot edu
@ 2005-04-05 23:26 ` pinskia at gcc dot gnu dot org
2005-04-12 23:13 ` kazu at cs dot umass dot edu
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-05 23:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-05 23:26 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-04-05 23:26:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20762
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/20762] [tcb] missed copy-prop opportunity
2005-04-04 22:45 [Bug tree-optimization/20762] New: [tcb] missed copy-prop opportunity kazu at cs dot umass dot edu
2005-04-05 23:26 ` [Bug tree-optimization/20762] " pinskia at gcc dot gnu dot org
@ 2005-04-12 23:13 ` kazu at cs dot umass dot edu
1 sibling, 0 replies; 3+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-04-12 23:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2005-04-12 23:13 -------
PR20913 has a better testcase.
*** This bug has been marked as a duplicate of 20913 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20762
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-12 23:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-04 22:45 [Bug tree-optimization/20762] New: [tcb] missed copy-prop opportunity kazu at cs dot umass dot edu
2005-04-05 23:26 ` [Bug tree-optimization/20762] " pinskia at gcc dot gnu dot org
2005-04-12 23:13 ` kazu at cs dot umass dot edu
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).