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/3507] appalling optimisation with sub/cmp on i386


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|i386-linux                  |i386-linux, powerpc-*-*
   Last reconfirmed|0000-00-00 00:00:00         |2003-08-03 17:59:19
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-03 17:59 -------
It also happens on powerpc-apple-darwin6.6
Currently GCC produces:
_foo:
        cmplw cr0,r3,r4
        subf r3,r4,r3
        bgelr- cr0
        addi r3,r3,100
        blr
But GCC should be able to produce:
_foo:
        subf. r3,r4,r3
        bgelr- cr0
        addi r3,r3,100
        blr
Which is smaller (and faster on every thing except maybe 970 and Power4).


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