diff options
author | Keith Randall <khr@golang.org> | 2016-08-23 10:43:47 -0700 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2016-08-23 23:45:12 +0000 |
commit | 3e270ab80bbbc259402f0ae22b5eb36f4daec426 (patch) | |
tree | 34836f4f96c46c1bf46ac6a2634b5889d60ae259 /test/intrinsic.dir | |
parent | 6394eb378eb6b2c0e691c519b2a6664f930b427e (diff) | |
download | go-3e270ab80bbbc259402f0ae22b5eb36f4daec426.tar.gz go-3e270ab80bbbc259402f0ae22b5eb36f4daec426.zip |
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>
Diffstat (limited to 'test/intrinsic.dir')
-rw-r--r-- | test/intrinsic.dir/main.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/test/intrinsic.dir/main.go b/test/intrinsic.dir/main.go index 46e6cb3283..e0c11d0907 100644 --- a/test/intrinsic.dir/main.go +++ b/test/intrinsic.dir/main.go @@ -45,18 +45,6 @@ func test(i, x uint64) { logf("Ctz32(0x%x) expected %d but got %d\n", x32, i, t32) } } - if i <= 16 { - x16 := uint16(x) - t16 := T.Ctz16(x16) // ERROR "intrinsic substitution for Ctz16" - if uint16(i) != t16 { - logf("Ctz16(0x%x) expected %d but got %d\n", x16, i, t16) - } - x16 = -x16 - t16 = T.Ctz16(x16) // ERROR "intrinsic substitution for Ctz16" - if uint16(i) != t16 { - logf("Ctz16(0x%x) expected %d but got %d\n", x16, i, t16) - } - } } func main() { @@ -88,9 +76,6 @@ func main() { } // Zero is a special case, be sure it is done right. - if T.Ctz16(0) != 16 { // ERROR "intrinsic substitution for Ctz16" - logf("ctz16(0) != 16") - } if T.Ctz32(0) != 32 { // ERROR "intrinsic substitution for Ctz32" logf("ctz32(0) != 32") } |