cmd/compile: fix noopt builder, weird append case
cmd/compile: fix noopt builder, weird append case

Turn off append-to-itself optimization if optimizations are turned off.

This optimization triggered a bug when doing
  s = append(s, s)
where we write to the leftmost s before reading the rightmost s.

Update #17039

Change-Id: I21996532d20a75db6ec8d49db50cb157a1360b80
Reviewed-on: https://go-review.googlesource.com/81816
Run-TryBot: Keith Randall <8c99c3a9284e493be632950b84cd789d08ed3e9d@golang.org>
Reviewed-by: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>
Reviewed-by: David Chase <ae171625adc8645b8b79b7e405a6da5aba5341e0@google.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

nawawi/go,codestation/go,CAFxX/go,Cofyc/go,nawawi/go,akutz/go,akutz/go,akutz/go,golang/go,CAFxX/go,josharian/go,cloudflare/go,codestation/go,nawawi/go,golang/go,CAFxX/go,akutz/go,Cofyc/go,christopher-henderson/Go,Cofyc/go,codestation/go,akutz/go,cloudflare/go,golang/go,CAFxX/go,cloudflare/go,golang/go,Cofyc/go,Cofyc/go,nawawi/go,codestation/go,golang/go,nawawi/go,josharian/go,cloudflare/go,josharian/go,CAFxX/go,akutz/go,nawawi/go,golang/go,CAFxX/go,golang/go,codestation/go,josharian/go,CAFxX/go,CAFxX/go,codestation/go,josharian/go,josharian/go,akutz/go,nawawi/go,nawawi/go,codestation/go,cloudflare/go,cloudflare/go,Cofyc/go,cloudflare/go,cloudflare/go,Cofyc/go,josharian/go,golang/go,josharian/go,Cofyc/go,codestation/go,akutz/go