[Bug tree-optimization/19940] Missed jump threading opportunity due to |.

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Feb 14 02:27:00 GMT 2005


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-13 18:59 -------
Confirmed, related to PR 18832.

Note on PPC at least we don't really thread the jumps that well on the rtl level:
_foo:
        or. r0,r4,r3
        bne- cr0,L2
        lis r2,ha16(_global)
        ori r0,r3,1
        lwz r2,lo16(_global)(r2)
        cmpwi cr6,r0,0
        cmpwi cr7,r2,0
        beqlr- cr7
        beqlr- cr6
L2:
        b _bar

Now if we change all the unsigned char to _Bool we get the threaded jump:
_foo:
        or. r0,r4,r3
        bne- cr0,L2
        lis r2,ha16(_global)
        lwz r2,lo16(_global)(r2)
        cmpwi cr7,r2,0
        beqlr- cr7
L2:
        b _bar

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |18832
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-13 18:59:10
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19940



More information about the Gcc-bugs mailing list