This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/18908] Missed folding opportunities with bools
- 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: 9 Dec 2004 17:45:04 -0000
- Subject: [Bug middle-end/18908] Missed folding opportunities with bools
- References: <20041209173912.18908.falk@debian.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-09 17:45 -------
Confirmed here is what we get on ppc:
_f1:
lwz r3,0(r3)
rlwinm r3,r3,0,31,31 <-- not useful
blr
.align 2
.globl _f2
_f2:
lwz r0,0(r3)
addic r2,r0,-1
subfe r3,r2,r0 <-- previous two instructions not useful (comes from _Bool !=0 is not converted
to _Bool, I think there is another bug about this)
blr
.align 2
.globl _f3
_f3:
lwz r0,0(r3)
xori r0,r0,1
addic r9,r0,-1
subfe r2,r9,r0
stw r2,0(r3)
blr
.align 2
.globl _f4
_f4:
lwz r0,0(r3)
nor r0,r0,r0
addic r9,r0,-1
subfe r2,r9,r0
stw r2,0(r3)
blr
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-12-09 17:45:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18908