[Bug tree-optimization/19719] missed optimization on boolean operation with boolean arguments

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Jan 31 06:47:00 GMT 2005

------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-31 06:47 -------
Part of the problem is recorded in PR 15618.
Note on the tcb we get better code at least for PPC:
        cmpwi cr7,r3,0
        subfic r0,r4,0
        adde r4,r0,r4
        li r3,0
        beqlr- cr7
        xori r3,r4,1

VS (old code):
        cmpwi cr7,r3,0
        cmpwi cr6,r4,0
        li r3,1
        beq- cr7,L2
        bnelr+ cr6
        li r3,0

But we should be able to get when PR 15618 gets fixed:
        cmpwi cr7,r3,0
        li r3,0
        beqlr- cr7
        xori r3,r4,1
There is most likely a better way to optimize this on ppc but I cannot think of it right now.

           What    |Removed                     |Added
  BugsThisDependsOn|                            |15618
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
          Component|rtl-optimization            |tree-optimization
     Ever Confirmed|                            |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2005-01-31 06:47:35
               date|                            |


More information about the Gcc-bugs mailing list