cmd/compile: avoid appends and allocate full slice length in copyRet
cmd/compile: avoid appends and allocate full slice length in copyRet

passes toolstash -cmp

compilebench allocs:
name      old allocs/op   new allocs/op   delta
Template       385k ± 0%       385k ± 0%  -0.00%  (p=0.017 n=19+20)
Unicode        342k ± 0%       342k ± 0%    ~     (p=0.867 n=20+20)
GoTypes       1.15M ± 0%      1.15M ± 0%  -0.00%  (p=0.008 n=20+20)
SSA           12.1M ± 0%      12.1M ± 0%    ~     (p=0.141 n=20+19)
Flate          234k ± 0%       234k ± 0%    ~     (p=0.125 n=20+19)
GoParser       315k ± 0%       315k ± 0%    ~     (p=0.104 n=20+20)
Reflect        972k ± 0%       972k ± 0%  -0.00%  (p=0.000 n=17+20)
Tar            391k ± 0%       391k ± 0%  -0.01%  (p=0.000 n=19+20)
XML            404k ± 0%       403k ± 0%  -0.01%  (p=0.000 n=20+19)

Change-Id: Ie24f7fae7b6b85422ec1ff0240f08f0a34064d72
Reviewed-on: https://go-review.googlesource.com/c/144038
Run-TryBot: Martin Möhrmann <351cee93cee855ec83663f800954e6cac9e83b41@uos.de>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>

nawawi/go,akutz/go,josharian/go,golang/go,cloudflare/go,CAFxX/go,golang/go,josharian/go,josharian/go,akutz/go,golang/go,CAFxX/go,cloudflare/go,cloudflare/go,cloudflare/go,cloudflare/go,nawawi/go,akutz/go,CAFxX/go,CAFxX/go,akutz/go,golang/go,CAFxX/go,CAFxX/go,akutz/go,golang/go,nawawi/go,josharian/go,CAFxX/go,nawawi/go,nawawi/go,cloudflare/go,nawawi/go,golang/go,akutz/go,cloudflare/go,josharian/go,josharian/go,akutz/go,josharian/go,nawawi/go,golang/go,nawawi/go,josharian/go,akutz/go,cloudflare/go,golang/go,CAFxX/go