1
0
mirror of https://github.com/golang/go synced 2024-11-17 13:04:54 -07:00

cmd/compile: use ellipses in dec64 rules

Passes toolstash-check -all.

Change-Id: I1b56c3b00e7fb7875165b337a93d5fce158b9df0
Reviewed-on: https://go-review.googlesource.com/c/go/+/217010
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
Josh Bleecher Snyder 2020-01-23 14:28:40 -08:00
parent 088aad5ff6
commit 5abab1da2c
2 changed files with 3 additions and 13 deletions

View File

@ -110,7 +110,7 @@
// Sadly, just because we know that x is non-zero,
// we don't know whether either component is,
// so just treat Ctz64NonZero the same as Ctz64.
(Ctz64NonZero x) -> (Ctz64 x)
(Ctz64NonZero ...) -> (Ctz64 ...)
(Ctz64 x) ->
(Add32 <typ.UInt32>

View File

@ -24,7 +24,8 @@ func rewriteValuedec64(v *Value) bool {
case OpCtz64:
return rewriteValuedec64_OpCtz64(v)
case OpCtz64NonZero:
return rewriteValuedec64_OpCtz64NonZero(v)
v.Op = OpCtz64
return true
case OpEq64:
return rewriteValuedec64_OpEq64(v)
case OpGeq64:
@ -431,17 +432,6 @@ func rewriteValuedec64_OpCtz64(v *Value) bool {
return true
}
}
func rewriteValuedec64_OpCtz64NonZero(v *Value) bool {
v_0 := v.Args[0]
// match: (Ctz64NonZero x)
// result: (Ctz64 x)
for {
x := v_0
v.reset(OpCtz64)
v.AddArg(x)
return true
}
}
func rewriteValuedec64_OpEq64(v *Value) bool {
v_1 := v.Args[1]
v_0 := v.Args[0]