]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix PPC64.rules for LoweredMove
authorLynn Boger <laboger@linux.vnet.ibm.com>
Mon, 10 Apr 2017 19:01:26 +0000 (15:01 -0400)
committerDavid Chase <drchase@google.com>
Wed, 12 Apr 2017 15:55:34 +0000 (15:55 +0000)
commitb8d327a438c99daa46acde41aebdcc77781fb9ee
tree8617e70098eda0511789370cf098ebdc3f5bf704
parentf30de83d79536e53bd634fcb60d6cee415b7e066
cmd/compile: fix PPC64.rules for LoweredMove

A recent performance improvement for PPC64.rules introduced a
regression for the case where the size of a move is <= 8 bytes
and the value used in the offset field of the instruction is not
aligned correctly for the instruction. In the cases where this happened,
the assembler was not detecting the incorrect offset and still generated
the instruction even though it was invalid.

This fix changes the PPC64.rules for the moves that are now failing
to include the correct alignment checks, along some additional testcases
for gc/ssa for the failing alignments.

I will add a fix to the assembler to detect incorrect offsets in
another CL.

This fixes #19907

Change-Id: I3d327ce0ea6afed884725b1824f9217cef2fe6bf
Reviewed-on: https://go-review.googlesource.com/40290
Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/testdata/copy.go
src/cmd/compile/internal/gc/testdata/gen/copyGen.go
src/cmd/compile/internal/ssa/gen/PPC64.rules
src/cmd/compile/internal/ssa/rewritePPC64.go