This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/25848] missed-rtl-optimization
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jan 2006 20:08:24 -0000
- Subject: [Bug rtl-optimization/25848] missed-rtl-optimization
- References: <bug-25848-11730@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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