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 rtl-optimization/25848] missed-rtl-optimization



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-01-18 20:08 -------
Hmm, I don't think so as slwi only acts on the lower 32bits so the upper 32bits
have the same sign as before which might be invalid if the b+a overflows.

Actually optimial is:
_f1:
        slwi r0,r3,1
        add r0,r0,r3
        extsw r3,r0
        blr

No extra move.  
The extsw is to extend the return value to 64bits as required by the ABI.
In fact I can think of different cases where this would cause issues.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|3.4.5                       |


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


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