public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/10588: [PPC] i==0||j==0 should use cntlzw and swrawi
@ 2003-05-01 21:06 pinskia
0 siblings, 0 replies; only message in thread
From: pinskia @ 2003-05-01 21:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 10588
>Category: optimization
>Synopsis: [PPC] i==0||j==0 should use cntlzw and swrawi
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Thu May 01 21:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Andrew Pinski
>Release: all (3.4)
>Organization:
>Environment:
ppc-darwin6.5
>Description:
compile:
int h(int i, int j)
{
return i==0||j==0;
}
you get currently:
_h:
subfic r0,r3,0
adde r2,r0,r3
subfic r0,r4,0
adde r5,r0,r4
or r3,r2,r5
blr
I would like gcc to produce:
_h:
cntlzw r5,r3
cntlzw r2,r4
or r0,r2,r5
srwi r3,r0,5
blr
Which is smaller and faster.
Note this will speed up gcc.
>How-To-Repeat:
see description.
>Fix:
When converting the trees into rtl do this translation if the backend requests it. I tried to do it in combine but this did not work because it was replacing two rtls with two, so it rejected it.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-05-01 21:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-01 21:06 optimization/10588: [PPC] i==0||j==0 should use cntlzw and swrawi pinskia
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).