public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/4079: unnecessary register move on simple code
@ 2001-08-22 6:16 mattias
0 siblings, 0 replies; 2+ messages in thread
From: mattias @ 2001-08-22 6:16 UTC (permalink / raw)
To: gcc-gnats; +Cc: gustav
>Number: 4079
>Category: optimization
>Synopsis: unnecessary register move on simple code
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Wed Aug 22 06:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: mattias@virtutech.se
>Release: gcc-3.0.1 for powerpc-unknown-linux-gnu
>Organization:
>Environment:
powerpc-unknown-linux-gnu (YDL 1.2.1)
>Description:
This code:
unsigned mulh(unsigned a, unsigned b)
{
return ((unsigned long long)a * (unsigned long long)b) >> 32;
}
produces this:
0: 7d 23 20 16 mulhwu r9,r3,r4
4: 7d 2a 4b 78 mr r10,r9
8: 7d 43 53 78 mr r3,r10
c: 4e 80 00 20 blr
when compiled with -O2.
I would have expected mulhwu r3,r3,r4; blr
>How-To-Repeat:
gcc -O2 -c mulh.c
with gcc-3.0.1 for ppc (-mcpu=<target> changes nothing)
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: optimization/4079: unnecessary register move on simple code
@ 2001-12-28 10:19 dje
0 siblings, 0 replies; 2+ messages in thread
From: dje @ 2001-12-28 10:19 UTC (permalink / raw)
To: dje, gcc-bugs, gcc-prs, gustav, mattias, nobody
Synopsis: unnecessary register move on simple code
Responsible-Changed-From-To: unassigned->dje
Responsible-Changed-By: dje
Responsible-Changed-When: Fri Dec 28 10:19:58 2001
Responsible-Changed-Why:
PowerPC issue
State-Changed-From-To: open->suspended
State-Changed-By: dje
State-Changed-When: Fri Dec 28 10:19:58 2001
State-Changed-Why:
This is a known optimization problem involving parameter and
return registers. It should be resolved when the cprop and
new register allocator optimizations are enabled.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4079
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-12-28 18:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-22 6:16 optimization/4079: unnecessary register move on simple code mattias
2001-12-28 10:19 dje
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).