This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/14859] [tree-ssa] integrate identical cases of a switch statement.


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]