public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/36557] New: -m32 -mpowerpc64 produces better code than -m64 for a!=0
@ 2008-06-17 20:12 pinskia at gcc dot gnu dot org
0 siblings, 0 replies; only message in thread
From: pinskia at gcc dot gnu dot org @ 2008-06-17 20:12 UTC (permalink / raw)
To: gcc-bugs
Testcase:
unsigned char f(unsigned int m_pAttachedTo)
{
return m_pAttachedTo != 0;
}
When merging the PS3 specific changes up to 4.3.0, I Noticed that -m32
-mpowerpc64 produces better code in some cases than -m64, this is one such
case.
Right now with -m64 we produce:
srawi 0,3,31
xor 3,0,3
subf 3,3,0
rldicl 3,3,33,63
blr
But since m_pAttachedTo is passed as a zero extended 64bit we should be able to
produce:
addic 9,3,-1
subfe 0,9,3
blr
As we do for -m32 and also for 64bit unsigned integers with -m64.
--
Summary: -m32 -mpowerpc64 produces better code than -m64 for a!=0
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36557
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-06-17 20:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-17 20:12 [Bug target/36557] New: -m32 -mpowerpc64 produces better code than -m64 for a!=0 pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).