public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/9707] Unnecessary range test in switches with less than 4 cases
[not found] <20030214164600.9707.gertom@rgai.hu>
@ 2003-08-04 4:00 ` pinskia at physics dot uc dot edu
2003-08-11 18:19 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-04 4:00 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9707
------- Additional Comments From pinskia at physics dot uc dot edu 2003-08-04 04:00 -------
Here is a better version of this (f should produce the same code as g)
int f (int r)
{
switch (r) {
case 1:
return 11;
case 2:
return 12;
case 3:
return 13;
default:
return 20;
}
}
int g(int r)
{
if(r==1)
return 11;
else if (r==2)
return 12;
else if (r==3)
return 13;
else
return 30;
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/9707] Unnecessary range test in switches with less than 4 cases
[not found] <20030214164600.9707.gertom@rgai.hu>
2003-08-04 4:00 ` [Bug optimization/9707] Unnecessary range test in switches with less than 4 cases pinskia at physics dot uc dot edu
@ 2003-08-11 18:19 ` pinskia at gcc dot gnu dot org
2003-11-17 2:59 ` roger at eyesopen dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-11 18:19 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9707
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/9707] Unnecessary range test in switches with less than 4 cases
[not found] <20030214164600.9707.gertom@rgai.hu>
2003-08-04 4:00 ` [Bug optimization/9707] Unnecessary range test in switches with less than 4 cases pinskia at physics dot uc dot edu
2003-08-11 18:19 ` pinskia at gcc dot gnu dot org
@ 2003-11-17 2:59 ` roger at eyesopen dot com
2004-02-16 13:48 ` [Bug middle-end/9707] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: roger at eyesopen dot com @ 2003-11-17 2:59 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |roger at eyesopen dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9707
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/9707] Unnecessary range test in switches with less than 4 cases
[not found] <20030214164600.9707.gertom@rgai.hu>
` (2 preceding siblings ...)
2003-11-17 2:59 ` roger at eyesopen dot com
@ 2004-02-16 13:48 ` pinskia at gcc dot gnu dot org
2004-03-24 22:30 ` kazu at cs dot umass dot edu
` (3 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-16 13:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-16 13:48 -------
This is caused by the TREE to RTL expanders so moving to middle-end.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|optimization |middle-end
Last reconfirmed|2003-11-10 08:19:59 |2004-02-16 13:48:40
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9707
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/9707] Unnecessary range test in switches with less than 4 cases
[not found] <20030214164600.9707.gertom@rgai.hu>
` (3 preceding siblings ...)
2004-02-16 13:48 ` [Bug middle-end/9707] " pinskia at gcc dot gnu dot org
@ 2004-03-24 22:30 ` kazu at cs dot umass dot edu
2004-03-25 4:46 ` kazu at cs dot umass dot edu
` (2 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-24 22:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-03-24 22:30 -------
I've got a patch in testing.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|roger at eyesopen dot com |kazu at cs dot umass dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9707
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/9707] Unnecessary range test in switches with less than 4 cases
[not found] <20030214164600.9707.gertom@rgai.hu>
` (4 preceding siblings ...)
2004-03-24 22:30 ` kazu at cs dot umass dot edu
@ 2004-03-25 4:46 ` kazu at cs dot umass dot edu
2004-03-25 16:17 ` cvs-commit at gcc dot gnu dot org
2004-03-25 16:28 ` kazu at cs dot umass dot edu
7 siblings, 0 replies; 8+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-25 4:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-03-25 04:46 -------
Patch:
http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02065.html
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9707
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/9707] Unnecessary range test in switches with less than 4 cases
[not found] <20030214164600.9707.gertom@rgai.hu>
` (5 preceding siblings ...)
2004-03-25 4:46 ` kazu at cs dot umass dot edu
@ 2004-03-25 16:17 ` cvs-commit at gcc dot gnu dot org
2004-03-25 16:28 ` kazu at cs dot umass dot edu
7 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-25 16:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-03-25 16:16 -------
Subject: Bug 9707
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: kazu@gcc.gnu.org 2004-03-25 16:16:43
Modified files:
gcc : ChangeLog stmt.c
Log message:
PR optimization/9707.
* stmt.c (emit_case_nodes): Emit equality comparisons instead
of recursing if both children are single-valued cases with no
children.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3288&r2=2.3289
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/stmt.c.diff?cvsroot=gcc&r1=1.350&r2=1.351
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9707
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/9707] Unnecessary range test in switches with less than 4 cases
[not found] <20030214164600.9707.gertom@rgai.hu>
` (6 preceding siblings ...)
2004-03-25 16:17 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-25 16:28 ` kazu at cs dot umass dot edu
7 siblings, 0 replies; 8+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-25 16:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-03-25 16:27 -------
I just checked in the patch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9707
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-03-25 16:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20030214164600.9707.gertom@rgai.hu>
2003-08-04 4:00 ` [Bug optimization/9707] Unnecessary range test in switches with less than 4 cases pinskia at physics dot uc dot edu
2003-08-11 18:19 ` pinskia at gcc dot gnu dot org
2003-11-17 2:59 ` roger at eyesopen dot com
2004-02-16 13:48 ` [Bug middle-end/9707] " pinskia at gcc dot gnu dot org
2004-03-24 22:30 ` kazu at cs dot umass dot edu
2004-03-25 4:46 ` kazu at cs dot umass dot edu
2004-03-25 16:17 ` cvs-commit at gcc dot gnu dot org
2004-03-25 16:28 ` 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).