public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14466] New: missed PHI optimization (different types)
@ 2004-03-07 4:02 pinskia at gcc dot gnu dot org
2004-03-07 4:03 ` [Bug optimization/14466] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-07 4:02 UTC (permalink / raw)
To: gcc-bugs
The following two functions should produce the same *.optimized file:
int t( int i)
{
int j;
if(i ==0)
{
j = 1;
goto end;
}
j = 0;
end:
return j;
}
int t1(int i)
{
_Bool j1 = i == 0;
return j1;
}
Other optimizations might be missed out by not doing this, I do not know. Most likely
what needs to happen is another temp then add the conversion.
--
Summary: missed PHI optimization (different types)
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14466
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/14466] missed PHI optimization (different types)
2004-03-07 4:02 [Bug optimization/14466] New: missed PHI optimization (different types) pinskia at gcc dot gnu dot org
@ 2004-03-07 4:03 ` pinskia at gcc dot gnu dot org
2004-03-07 4:50 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-07 4:03 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14466
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/14466] missed PHI optimization (different types)
2004-03-07 4:02 [Bug optimization/14466] New: missed PHI optimization (different types) pinskia at gcc dot gnu dot org
2004-03-07 4:03 ` [Bug optimization/14466] " pinskia at gcc dot gnu dot org
@ 2004-03-07 4:50 ` pinskia at gcc dot gnu dot org
2004-03-31 13:31 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-07 4:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-07 04:50 -------
Mine, I think I have a fix now.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-03-07 04:50:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14466
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/14466] missed PHI optimization (different types)
2004-03-07 4:02 [Bug optimization/14466] New: missed PHI optimization (different types) pinskia at gcc dot gnu dot org
2004-03-07 4:03 ` [Bug optimization/14466] " pinskia at gcc dot gnu dot org
2004-03-07 4:50 ` pinskia at gcc dot gnu dot org
@ 2004-03-31 13:31 ` pinskia at gcc dot gnu dot org
2004-04-05 0:23 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-31 13:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-31 13:31 -------
I had a fix but it had to be disabled but I think I just have to reenable it and add more
checks for non-gimple.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14466
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/14466] missed PHI optimization (different types)
2004-03-07 4:02 [Bug optimization/14466] New: missed PHI optimization (different types) pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-03-31 13:31 ` pinskia at gcc dot gnu dot org
@ 2004-04-05 0:23 ` pinskia at gcc dot gnu dot org
2004-05-14 8:11 ` [Bug tree-optimization/14466] " pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-05 0:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-05 00:23 -------
I finnally figured out how to fix the disabled parts of my patch and I am testing the patch
right now. Note with my cast pass also, it reduces both testcases to:
int t1(int i)
{
int j1 = i == 0;
return j1;
}
or
int t1(int i)
{
return i == 0;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |memory-hog, pessimizes-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14466
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/14466] missed PHI optimization (different types)
2004-03-07 4:02 [Bug optimization/14466] New: missed PHI optimization (different types) pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-04-05 0:23 ` pinskia at gcc dot gnu dot org
@ 2004-05-14 8:11 ` pinskia at gcc dot gnu dot org
2004-05-14 20:05 ` cvs-commit at gcc dot gnu dot org
2004-05-14 20:13 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-14 8:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-13 14:37 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00741.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|rtl-optimization |tree-optimization
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14466
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/14466] missed PHI optimization (different types)
2004-03-07 4:02 [Bug optimization/14466] New: missed PHI optimization (different types) pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-05-14 8:11 ` [Bug tree-optimization/14466] " pinskia at gcc dot gnu dot org
@ 2004-05-14 20:05 ` cvs-commit at gcc dot gnu dot org
2004-05-14 20:13 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-14 20:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-14 15:27 -------
Subject: Bug 14466
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-05-14 15:27:37
Modified files:
gcc : ChangeLog tree-complex.c tree-dfa.c tree-flow.h
tree-sra.c tree-ssa-live.h tree-ssa-phiopt.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/tree-ssa: 20040514-1.c
Log message:
2004-05-14 Andrew Pinski <pinskia@physics.uc.edu>
PR optimization/14466
* tree-complex.c (make_temp): Remove.
(gimplify_val): Replace make_temp with make_rename_temp
and add NULL as the second argument.
(expand_complex_div_wide): Likewise.
* tree-dfa.c (make_rename_temp): New function.
* tree-flow.h (make_rename_temp): Declare.
* tree-sra.c (make_temp): Remove.
(lookup_scalar): Replace make_temp with make_rename_temp.
(create_scalar_copies): Likewise.
* tree-ssa-phiopt.c (conditional_replacement): When we
get non gimple create a temporary variable to hold the
casted expression.
2004-05-14 Andrew Pinski <pinskia@physics.uc.edu>
PR optimization/14466
* gcc.dg/tree-ssa/20040514-1.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3654&r2=2.3655
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-complex.c.diff?cvsroot=gcc&r1=2.2&r2=2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-dfa.c.diff?cvsroot=gcc&r1=2.2&r2=2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-flow.h.diff?cvsroot=gcc&r1=2.2&r2=2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-sra.c.diff?cvsroot=gcc&r1=2.2&r2=2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-live.h.diff?cvsroot=gcc&r1=2.1&r2=2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-phiopt.c.diff?cvsroot=gcc&r1=2.1&r2=2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3744&r2=1.3745
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/20040514-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14466
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/14466] missed PHI optimization (different types)
2004-03-07 4:02 [Bug optimization/14466] New: missed PHI optimization (different types) pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-05-14 20:05 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-14 20:13 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-14 20:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-14 15:29 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14466
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-05-14 15:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-07 4:02 [Bug optimization/14466] New: missed PHI optimization (different types) pinskia at gcc dot gnu dot org
2004-03-07 4:03 ` [Bug optimization/14466] " pinskia at gcc dot gnu dot org
2004-03-07 4:50 ` pinskia at gcc dot gnu dot org
2004-03-31 13:31 ` pinskia at gcc dot gnu dot org
2004-04-05 0:23 ` pinskia at gcc dot gnu dot org
2004-05-14 8:11 ` [Bug tree-optimization/14466] " pinskia at gcc dot gnu dot org
2004-05-14 20:05 ` cvs-commit at gcc dot gnu dot org
2004-05-14 20:13 ` 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).