golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.31k stars 17.47k forks source link

cmd/compile: store combine not working on ppc64 and arm64 with global variables #24242

Closed rasky closed 6 years ago

rasky commented 6 years ago

While migrating the code generation tests for load/store combiners to to the top-level testsuite (fad31e51), I had to disable some tests for arm64 and ppc64le because it looks like that store combining is failing in some situations.

For instance: https://github.com/golang/go/blob/fad31e513d721a36f2d881d99de54def805a8648/test/codegen/memcombine.go#L132-L137

It looks like the bug is related to the fact that the store is made from a global variable rather than a local variable (as was being previously tested).

rasky commented 6 years ago

/cc @laboger @williamweixiao @mrosier-qdt

gopherbot commented 6 years ago

Change https://golang.org/cl/98397 mentions this issue: cmd/compile/internal/ssa: improve store combine optimization on arm64

laboger commented 6 years ago

I noticed this regression in combining little endian stores while testing my current change for combining loads and stores in big endian order on ppc64le. I have a fix that I was going to include with the big endian change, but could make it separate if that is preferred.

gopherbot commented 6 years ago

Change https://golang.org/cl/98136 mentions this issue: cmd/compile,test: combine byte loads and stores on ppc64le