]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: on PPC64, fold offset into some loads/stores only when offset is 4-aligned
authorCherry Zhang <cherryyz@google.com>
Fri, 24 Jan 2020 19:11:04 +0000 (14:11 -0500)
committerCherry Zhang <cherryyz@google.com>
Mon, 27 Jan 2020 16:13:58 +0000 (16:13 +0000)
commit6fbdfe48041c883a9f6d8c981a7205b7c327862a
tree6a98fd53c740e87891ede5e2ff715fcbe5f9e1f3
parent4615b39514d1463c1cfed624ff3629ab1580a915
cmd/compile: on PPC64, fold offset into some loads/stores only when offset is 4-aligned

On PPC64, MOVWload, MOVDload, and MOVDstore are assembled to a
"DS from" instruction which requiers the offset is a multiple of
4. Only fold offset to such instructions if it is a multiple of 4.

Fixes #36723.

"GOARCH=ppc64 GOOS=linux go build -gcflags=all=-d=ssa/check/on std cmd"
passes now.

Change-Id: I67f2a6ac02f0d33d470f68ff54936c289a4c765b
Reviewed-on: https://go-review.googlesource.com/c/go/+/216379
Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
src/cmd/compile/internal/ssa/gen/PPC64.rules
src/cmd/compile/internal/ssa/rewritePPC64.go
test/fixedbugs/issue36723.go [new file with mode: 0644]