This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/14859] [tree-ssa] integrate identical cases of a switch statement.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Apr 2004 23:00:47 -0000
- Subject: [Bug optimization/14859] [tree-ssa] integrate identical cases of a switch statement.
- References: <20040405225029.14859.kazu@cs.umass.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-05 23:00 -------
Actually this is a size/speed win on every target because at least for this case you can do a range
comparision after combing the BB in the switch statement.
For PPC, foo1 is the one where they are combined.
_foo:
cmpwi cr7,r3,15
cmpwi cr6,r3,16
xori r0,r3,14
addic r0,r0,-1
subfe r0,r0,r0
li r3,123
beqlr- cr7
andi. r3,r0,123
bnelr+ cr6
li r3,123
blr
.align 2
.globl _foo1
_foo1:
addi r0,r3,-14
subfic r3,r0,2
subfe r3,r3,r3
nand r3,r3,r3
andi. r3,r3,123
blr
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-04-05 23:00:42
date| |
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14859