]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: PPC64, elide unnecessary sign extension
authorDavid Chase <drchase@google.com>
Wed, 5 Oct 2016 20:21:09 +0000 (13:21 -0700)
committerDavid Chase <drchase@google.com>
Mon, 10 Oct 2016 12:22:40 +0000 (12:22 +0000)
commit2f0b8f88df33ca48494a90eea705ad092322a1ca
tree93ba5c1cfc28b0277af575208cca47d41f974d99
parent672e57944458fc3c5f5ee1dd11d4f32d1aeaebe1
cmd/compile: PPC64, elide unnecessary sign extension

Inputs to store[BHW] and cmpW(U) need not be correct
in more bits than are used by the instruction.

Added a pattern tailored to what appears to be cgo boilerplate.
Added a pattern (also seen in cgo boilerplate and hashing)
to replace {EQ,NE}-CMP-ANDconst with {EQ-NE}-ANDCCconst.
Added a pattern to clean up ANDconst shift distance inputs
(this was seen in hashing).

Simplify repeated and,or,xor.

Fixes #17109.

Change-Id: I68eac83e3e614d69ffe473a08953048c8b066d88
Reviewed-on: https://go-review.googlesource.com/30455
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ppc64/ssa.go
src/cmd/compile/internal/ssa/gen/PPC64.rules
src/cmd/compile/internal/ssa/gen/PPC64Ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/rewritePPC64.go