]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use shorter versions of zero-extend ops
authorKeith Randall <khr@golang.org>
Thu, 2 Jun 2016 19:41:42 +0000 (12:41 -0700)
committerKeith Randall <khr@golang.org>
Tue, 16 Aug 2016 21:32:21 +0000 (21:32 +0000)
commit5ae82307696458269b373d82c072347d87a2a554
tree52da3cf7703ec2ce54845379fa5a7cdf3ce8548e
parent0cd8faf74494f400d278b9b0071908951bea6f40
cmd/compile: use shorter versions of zero-extend ops

Only need to zero-extend to 32 bits and we get the top
32 bits zeroed for free.

Only the WQ change actually generates different code.
The assembler did this optimization for us in the other two cases.
But we might as well do it during SSA so -S output more closely
matches the actual generated instructions.

Change-Id: I3e4ac50dc4da124014d4e31c86e9fc539d94f7fd
Reviewed-on: https://go-review.googlesource.com/23711
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/opGen.go