]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: clean up ctz ops
authorKeith Randall <khr@golang.org>
Tue, 23 Aug 2016 17:43:47 +0000 (10:43 -0700)
committerKeith Randall <khr@golang.org>
Tue, 23 Aug 2016 23:45:12 +0000 (23:45 +0000)
commit3e270ab80bbbc259402f0ae22b5eb36f4daec426
tree34836f4f96c46c1bf46ac6a2634b5889d60ae259
parent6394eb378eb6b2c0e691c519b2a6664f930b427e
cmd/compile: clean up ctz ops

Now that we have ops that can return 2 results, have BSF return a result
and flags.  We can then get rid of the redundant comparison and use CMOV
instead of CMOVconst ops.

Get rid of a bunch of the ops we don't use.  Ctz{8,16}, plus all the Clzs,
and CMOVNEs.  I don't think we'll ever use them, and they would be easy
to add back if needed.

Change-Id: I8858a1d017903474ea7e4002fc76a6a86e7bd487
Reviewed-on: https://go-review.googlesource.com/27630
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
12 files changed:
src/cmd/compile/internal/amd64/ssa.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/gen/genericOps.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
src/runtime/internal/sys/intrinsics.go
src/runtime/internal/sys/intrinsics_386.s
src/runtime/internal/sys/intrinsics_stubs.go
src/runtime/internal/sys/intrinsics_test.go
test/intrinsic.dir/main.go