[gnu.gcc.bug] Missing optimisation for 680x0

bryan@UUNET.UU.NET (Bryan Boreham) (09/23/89)

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.