public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* rs6000: Trivial code generation stupidity
@ 2001-12-17 10:30 degger
  2001-12-17 10:31 ` David Edelsohn
  0 siblings, 1 reply; 10+ messages in thread
From: degger @ 2001-12-17 10:30 UTC (permalink / raw)
  To: gcc

Hija,

I just noticed that the current cvs gcc generates stupid
code for dead simple cases.

Consider:

int
foo (int a, int b)
{
  return b+1;
}

This will compile into:
foo:
        addi 4,4,1
        mr 3,4
        blr

What I would have expected is:
foo:
        addi 3,4,1
        blr

The same happens for floatingpoint code. If there's more then 1
parameter then I will always get a register move which is
really unnecessary. gcc 2.95.3 gets it right. Any ideas?

--
Servus,
       Daniel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2001-12-26 19:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-17 10:30 rs6000: Trivial code generation stupidity degger
2001-12-17 10:31 ` David Edelsohn
2001-12-17 12:54   ` degger
2001-12-17 13:12     ` David Edelsohn
2001-12-17 13:21     ` David Edelsohn
2001-12-18  3:53       ` Analysis try (was: Re: rs6000: Trivial code generation stupidity) degger
2001-12-25 23:13         ` cant_combine_insn_p hard_reg->reg moves David Edelsohn
2001-12-26  1:18           ` Richard Henderson
2001-12-26  4:13             ` Jan Hubicka
2001-12-26 11:25               ` Richard Henderson

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).