Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UUNET.UU.NET!kewill!bryan
From: kewill!bryan@UUNET.UU.NET (Bryan Boreham)
Newsgroups: gnu.gcc.bug
Subject: Missing optimisation for 680x0
Message-ID: <8909231650.AA24065@edinburgh.kewill.uucp>
Date: 23 Sep 89 16:50:20 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 27

This code:

	void strcpy (s, t)
	     char *s, *t;
	{
	  while ((*s++ = *t++) != 0)
	    ;
	}

compiles. via gcc -O, to this:

	_strcpy:
		link a6,#0
		movel a6@(8),a1
		movel a6@(12),a0
	L2:
		moveb a0@+,d0
		moveb d0,a1@+
		jne L2
		unlk a6
		rts

I don't see the need to go via d0.

Version is 1.35.96, system is a Sun 3/280 running SunOS 3.5.

Bryan.