cmd/compile: reduce rulegen's output by 200 KiB

First, renove unnecessary "// cond:" lines from the generated files.
This shaves off about ~7k lines.

Second, join "if cond { break }" statements via "||", which allows us to
deduplicate a large number of them. This shaves off another ~25k lines.

This change is not for readability or simplicity; but rather, to avoid
unnecessary verbosity that makes the generated files larger. All in all,
git reports that the generated files overall weigh ~200KiB less, or
about 2.7% less.

While at it, add a -trace flag to rulegen.

Updates #33644.

Change-Id: I3fac0290a6066070cc62400bf970a4ae0929470a
Reviewed-on: https://go-review.googlesource.com/c/go/+/196498
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Daniel Martí 2019-09-19 15:31:03 +01:00
parent 34fe8295c5
commit 870080752d
16 changed files with 5565 additions and 36938 deletions

View File

@ -20,6 +20,7 @@ import (
"regexp" "regexp"
"runtime" "runtime"
"runtime/pprof" "runtime/pprof"
"runtime/trace"
"sort" "sort"
"strings" "strings"
"sync" "sync"
@ -101,6 +102,7 @@ var archs []arch
var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to `file`") var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to `file`")
var memprofile = flag.String("memprofile", "", "write memory profile to `file`") var memprofile = flag.String("memprofile", "", "write memory profile to `file`")
var tracefile = flag.String("trace", "", "write trace to `file`")
func main() { func main() {
flag.Parse() flag.Parse()
@ -115,6 +117,23 @@ func main() {
} }
defer pprof.StopCPUProfile() defer pprof.StopCPUProfile()
} }
if *tracefile != "" {
f, err := os.Create(*tracefile)
if err != nil {
log.Fatalf("failed to create trace output file: %v", err)
}
defer func() {
if err := f.Close(); err != nil {
log.Fatalf("failed to close trace file: %v", err)
}
}()
if err := trace.Start(f); err != nil {
log.Fatalf("failed to start trace: %v", err)
}
defer trace.Stop()
}
sort.Sort(ArchsByName(archs)) sort.Sort(ArchsByName(archs))
// The generate tasks are run concurrently, since they are CPU-intensive // The generate tasks are run concurrently, since they are CPU-intensive

View File

@ -587,7 +587,9 @@ func fprint(w io.Writer, n Node) {
} }
case *RuleRewrite: case *RuleRewrite:
fmt.Fprintf(w, "// match: %s\n", n.match) fmt.Fprintf(w, "// match: %s\n", n.match)
if n.cond != "" {
fmt.Fprintf(w, "// cond: %s\n", n.cond) fmt.Fprintf(w, "// cond: %s\n", n.cond)
}
fmt.Fprintf(w, "// result: %s\n", n.result) fmt.Fprintf(w, "// result: %s\n", n.result)
if n.checkOp != "" { if n.checkOp != "" {
fmt.Fprintf(w, "for v.Op == %s {\n", n.checkOp) fmt.Fprintf(w, "for v.Op == %s {\n", n.checkOp)
@ -636,13 +638,26 @@ type bodyBase struct {
canFail bool canFail bool
} }
func (w *bodyBase) add(nodes ...Statement) { func (w *bodyBase) add(node Statement) {
w.list = append(w.list, nodes...) var last Statement
for _, node := range nodes { if len(w.list) > 0 {
if _, ok := node.(*CondBreak); ok { last = w.list[len(w.list)-1]
}
if node, ok := node.(*CondBreak); ok {
w.canFail = true w.canFail = true
if last, ok := last.(*CondBreak); ok {
// Add to the previous "if <cond> { break }" via a
// logical OR, which will save verbosity.
last.expr = &ast.BinaryExpr{
Op: token.LOR,
X: last.expr,
Y: node.expr,
}
return
} }
} }
w.list = append(w.list, node)
} }
// declared reports if the body contains a Declare with the given name. // declared reports if the body contains a Declare with the given name.

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,6 @@ func rewriteValue386splitload_Op386CMPBconstload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPBconstload {sym} [vo] ptr mem) // match: (CMPBconstload {sym} [vo] ptr mem)
// cond:
// result: (CMPBconst (MOVBload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)]) // result: (CMPBconst (MOVBload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
for { for {
vo := v.AuxInt vo := v.AuxInt
@ -46,7 +45,6 @@ func rewriteValue386splitload_Op386CMPBload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPBload {sym} [off] ptr x mem) // match: (CMPBload {sym} [off] ptr x mem)
// cond:
// result: (CMPB (MOVBload {sym} [off] ptr mem) x) // result: (CMPB (MOVBload {sym} [off] ptr mem) x)
for { for {
off := v.AuxInt off := v.AuxInt
@ -69,7 +67,6 @@ func rewriteValue386splitload_Op386CMPLconstload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPLconstload {sym} [vo] ptr mem) // match: (CMPLconstload {sym} [vo] ptr mem)
// cond:
// result: (CMPLconst (MOVLload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)]) // result: (CMPLconst (MOVLload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
for { for {
vo := v.AuxInt vo := v.AuxInt
@ -91,7 +88,6 @@ func rewriteValue386splitload_Op386CMPLload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPLload {sym} [off] ptr x mem) // match: (CMPLload {sym} [off] ptr x mem)
// cond:
// result: (CMPL (MOVLload {sym} [off] ptr mem) x) // result: (CMPL (MOVLload {sym} [off] ptr mem) x)
for { for {
off := v.AuxInt off := v.AuxInt
@ -114,7 +110,6 @@ func rewriteValue386splitload_Op386CMPWconstload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPWconstload {sym} [vo] ptr mem) // match: (CMPWconstload {sym} [vo] ptr mem)
// cond:
// result: (CMPWconst (MOVWload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)]) // result: (CMPWconst (MOVWload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
for { for {
vo := v.AuxInt vo := v.AuxInt
@ -136,7 +131,6 @@ func rewriteValue386splitload_Op386CMPWload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPWload {sym} [off] ptr x mem) // match: (CMPWload {sym} [off] ptr x mem)
// cond:
// result: (CMPW (MOVWload {sym} [off] ptr mem) x) // result: (CMPW (MOVWload {sym} [off] ptr mem) x)
for { for {
off := v.AuxInt off := v.AuxInt

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,6 @@ func rewriteValueAMD64splitload_OpAMD64CMPBconstload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPBconstload {sym} [vo] ptr mem) // match: (CMPBconstload {sym} [vo] ptr mem)
// cond:
// result: (CMPBconst (MOVBload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)]) // result: (CMPBconst (MOVBload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
for { for {
vo := v.AuxInt vo := v.AuxInt
@ -50,7 +49,6 @@ func rewriteValueAMD64splitload_OpAMD64CMPBload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPBload {sym} [off] ptr x mem) // match: (CMPBload {sym} [off] ptr x mem)
// cond:
// result: (CMPB (MOVBload {sym} [off] ptr mem) x) // result: (CMPB (MOVBload {sym} [off] ptr mem) x)
for { for {
off := v.AuxInt off := v.AuxInt
@ -73,7 +71,6 @@ func rewriteValueAMD64splitload_OpAMD64CMPLconstload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPLconstload {sym} [vo] ptr mem) // match: (CMPLconstload {sym} [vo] ptr mem)
// cond:
// result: (CMPLconst (MOVLload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)]) // result: (CMPLconst (MOVLload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
for { for {
vo := v.AuxInt vo := v.AuxInt
@ -95,7 +92,6 @@ func rewriteValueAMD64splitload_OpAMD64CMPLload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPLload {sym} [off] ptr x mem) // match: (CMPLload {sym} [off] ptr x mem)
// cond:
// result: (CMPL (MOVLload {sym} [off] ptr mem) x) // result: (CMPL (MOVLload {sym} [off] ptr mem) x)
for { for {
off := v.AuxInt off := v.AuxInt
@ -118,7 +114,6 @@ func rewriteValueAMD64splitload_OpAMD64CMPQconstload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPQconstload {sym} [vo] ptr mem) // match: (CMPQconstload {sym} [vo] ptr mem)
// cond:
// result: (CMPQconst (MOVQload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)]) // result: (CMPQconst (MOVQload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
for { for {
vo := v.AuxInt vo := v.AuxInt
@ -140,7 +135,6 @@ func rewriteValueAMD64splitload_OpAMD64CMPQload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPQload {sym} [off] ptr x mem) // match: (CMPQload {sym} [off] ptr x mem)
// cond:
// result: (CMPQ (MOVQload {sym} [off] ptr mem) x) // result: (CMPQ (MOVQload {sym} [off] ptr mem) x)
for { for {
off := v.AuxInt off := v.AuxInt
@ -163,7 +157,6 @@ func rewriteValueAMD64splitload_OpAMD64CMPWconstload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPWconstload {sym} [vo] ptr mem) // match: (CMPWconstload {sym} [vo] ptr mem)
// cond:
// result: (CMPWconst (MOVWload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)]) // result: (CMPWconst (MOVWload {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
for { for {
vo := v.AuxInt vo := v.AuxInt
@ -185,7 +178,6 @@ func rewriteValueAMD64splitload_OpAMD64CMPWload_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (CMPWload {sym} [off] ptr x mem) // match: (CMPWload {sym} [off] ptr x mem)
// cond:
// result: (CMPW (MOVWload {sym} [off] ptr mem) x) // result: (CMPW (MOVWload {sym} [off] ptr mem) x)
for { for {
off := v.AuxInt off := v.AuxInt

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,6 @@ func rewriteValuedec(v *Value) bool {
} }
func rewriteValuedec_OpComplexImag_0(v *Value) bool { func rewriteValuedec_OpComplexImag_0(v *Value) bool {
// match: (ComplexImag (ComplexMake _ imag)) // match: (ComplexImag (ComplexMake _ imag))
// cond:
// result: imag // result: imag
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -51,7 +50,6 @@ func rewriteValuedec_OpComplexImag_0(v *Value) bool {
} }
func rewriteValuedec_OpComplexReal_0(v *Value) bool { func rewriteValuedec_OpComplexReal_0(v *Value) bool {
// match: (ComplexReal (ComplexMake real _)) // match: (ComplexReal (ComplexMake real _))
// cond:
// result: real // result: real
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -69,7 +67,6 @@ func rewriteValuedec_OpComplexReal_0(v *Value) bool {
} }
func rewriteValuedec_OpIData_0(v *Value) bool { func rewriteValuedec_OpIData_0(v *Value) bool {
// match: (IData (IMake _ data)) // match: (IData (IMake _ data))
// cond:
// result: data // result: data
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -86,7 +83,6 @@ func rewriteValuedec_OpIData_0(v *Value) bool {
} }
func rewriteValuedec_OpITab_0(v *Value) bool { func rewriteValuedec_OpITab_0(v *Value) bool {
// match: (ITab (IMake itab _)) // match: (ITab (IMake itab _))
// cond:
// result: itab // result: itab
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -237,7 +233,6 @@ func rewriteValuedec_OpLoad_0(v *Value) bool {
} }
func rewriteValuedec_OpSliceCap_0(v *Value) bool { func rewriteValuedec_OpSliceCap_0(v *Value) bool {
// match: (SliceCap (SliceMake _ _ cap)) // match: (SliceCap (SliceMake _ _ cap))
// cond:
// result: cap // result: cap
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -254,7 +249,6 @@ func rewriteValuedec_OpSliceCap_0(v *Value) bool {
} }
func rewriteValuedec_OpSliceLen_0(v *Value) bool { func rewriteValuedec_OpSliceLen_0(v *Value) bool {
// match: (SliceLen (SliceMake _ len _)) // match: (SliceLen (SliceMake _ len _))
// cond:
// result: len // result: len
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -272,7 +266,6 @@ func rewriteValuedec_OpSliceLen_0(v *Value) bool {
} }
func rewriteValuedec_OpSlicePtr_0(v *Value) bool { func rewriteValuedec_OpSlicePtr_0(v *Value) bool {
// match: (SlicePtr (SliceMake ptr _ _)) // match: (SlicePtr (SliceMake ptr _ _))
// cond:
// result: ptr // result: ptr
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -355,7 +348,6 @@ func rewriteValuedec_OpStore_0(v *Value) bool {
return true return true
} }
// match: (Store dst (StringMake ptr len) mem) // match: (Store dst (StringMake ptr len) mem)
// cond:
// result: (Store {typ.Int} (OffPtr <typ.IntPtr> [config.PtrSize] dst) len (Store {typ.BytePtr} dst ptr mem)) // result: (Store {typ.Int} (OffPtr <typ.IntPtr> [config.PtrSize] dst) len (Store {typ.BytePtr} dst ptr mem))
for { for {
mem := v.Args[2] mem := v.Args[2]
@ -382,7 +374,6 @@ func rewriteValuedec_OpStore_0(v *Value) bool {
return true return true
} }
// match: (Store dst (SliceMake ptr len cap) mem) // match: (Store dst (SliceMake ptr len cap) mem)
// cond:
// result: (Store {typ.Int} (OffPtr <typ.IntPtr> [2*config.PtrSize] dst) cap (Store {typ.Int} (OffPtr <typ.IntPtr> [config.PtrSize] dst) len (Store {typ.BytePtr} dst ptr mem))) // result: (Store {typ.Int} (OffPtr <typ.IntPtr> [2*config.PtrSize] dst) cap (Store {typ.Int} (OffPtr <typ.IntPtr> [config.PtrSize] dst) len (Store {typ.BytePtr} dst ptr mem)))
for { for {
mem := v.Args[2] mem := v.Args[2]
@ -418,7 +409,6 @@ func rewriteValuedec_OpStore_0(v *Value) bool {
return true return true
} }
// match: (Store dst (IMake itab data) mem) // match: (Store dst (IMake itab data) mem)
// cond:
// result: (Store {typ.BytePtr} (OffPtr <typ.BytePtrPtr> [config.PtrSize] dst) data (Store {typ.Uintptr} dst itab mem)) // result: (Store {typ.BytePtr} (OffPtr <typ.BytePtrPtr> [config.PtrSize] dst) data (Store {typ.Uintptr} dst itab mem))
for { for {
mem := v.Args[2] mem := v.Args[2]
@ -448,7 +438,6 @@ func rewriteValuedec_OpStore_0(v *Value) bool {
} }
func rewriteValuedec_OpStringLen_0(v *Value) bool { func rewriteValuedec_OpStringLen_0(v *Value) bool {
// match: (StringLen (StringMake _ len)) // match: (StringLen (StringMake _ len))
// cond:
// result: len // result: len
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -465,7 +454,6 @@ func rewriteValuedec_OpStringLen_0(v *Value) bool {
} }
func rewriteValuedec_OpStringPtr_0(v *Value) bool { func rewriteValuedec_OpStringPtr_0(v *Value) bool {
// match: (StringPtr (StringMake ptr _)) // match: (StringPtr (StringMake ptr _))
// cond:
// result: ptr // result: ptr
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]

View File

@ -130,7 +130,6 @@ func rewriteValuedec64_OpAdd64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Add64 x y) // match: (Add64 x y)
// cond:
// result: (Int64Make (Add32withcarry <typ.Int32> (Int64Hi x) (Int64Hi y) (Select1 <types.TypeFlags> (Add32carry (Int64Lo x) (Int64Lo y)))) (Select0 <typ.UInt32> (Add32carry (Int64Lo x) (Int64Lo y)))) // result: (Int64Make (Add32withcarry <typ.Int32> (Int64Hi x) (Int64Hi y) (Select1 <types.TypeFlags> (Add32carry (Int64Lo x) (Int64Lo y)))) (Select0 <typ.UInt32> (Add32carry (Int64Lo x) (Int64Lo y))))
for { for {
y := v.Args[1] y := v.Args[1]
@ -171,7 +170,6 @@ func rewriteValuedec64_OpAnd64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (And64 x y) // match: (And64 x y)
// cond:
// result: (Int64Make (And32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (And32 <typ.UInt32> (Int64Lo x) (Int64Lo y))) // result: (Int64Make (And32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (And32 <typ.UInt32> (Int64Lo x) (Int64Lo y)))
for { for {
y := v.Args[1] y := v.Args[1]
@ -286,7 +284,6 @@ func rewriteValuedec64_OpBitLen64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (BitLen64 x) // match: (BitLen64 x)
// cond:
// result: (Add32 <typ.Int> (BitLen32 <typ.Int> (Int64Hi x)) (BitLen32 <typ.Int> (Or32 <typ.UInt32> (Int64Lo x) (Zeromask (Int64Hi x))))) // result: (Add32 <typ.Int> (BitLen32 <typ.Int> (Int64Hi x)) (BitLen32 <typ.Int> (Or32 <typ.UInt32> (Int64Lo x) (Zeromask (Int64Hi x)))))
for { for {
x := v.Args[0] x := v.Args[0]
@ -316,7 +313,6 @@ func rewriteValuedec64_OpBswap64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Bswap64 x) // match: (Bswap64 x)
// cond:
// result: (Int64Make (Bswap32 <typ.UInt32> (Int64Lo x)) (Bswap32 <typ.UInt32> (Int64Hi x))) // result: (Int64Make (Bswap32 <typ.UInt32> (Int64Lo x)) (Bswap32 <typ.UInt32> (Int64Hi x)))
for { for {
x := v.Args[0] x := v.Args[0]
@ -338,7 +334,6 @@ func rewriteValuedec64_OpCom64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Com64 x) // match: (Com64 x)
// cond:
// result: (Int64Make (Com32 <typ.UInt32> (Int64Hi x)) (Com32 <typ.UInt32> (Int64Lo x))) // result: (Int64Make (Com32 <typ.UInt32> (Int64Hi x)) (Com32 <typ.UInt32> (Int64Lo x)))
for { for {
x := v.Args[0] x := v.Args[0]
@ -401,7 +396,6 @@ func rewriteValuedec64_OpCtz64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Ctz64 x) // match: (Ctz64 x)
// cond:
// result: (Add32 <typ.UInt32> (Ctz32 <typ.UInt32> (Int64Lo x)) (And32 <typ.UInt32> (Com32 <typ.UInt32> (Zeromask (Int64Lo x))) (Ctz32 <typ.UInt32> (Int64Hi x)))) // result: (Add32 <typ.UInt32> (Ctz32 <typ.UInt32> (Int64Lo x)) (And32 <typ.UInt32> (Com32 <typ.UInt32> (Zeromask (Int64Lo x))) (Ctz32 <typ.UInt32> (Int64Hi x))))
for { for {
x := v.Args[0] x := v.Args[0]
@ -431,7 +425,6 @@ func rewriteValuedec64_OpCtz64_0(v *Value) bool {
} }
func rewriteValuedec64_OpCtz64NonZero_0(v *Value) bool { func rewriteValuedec64_OpCtz64NonZero_0(v *Value) bool {
// match: (Ctz64NonZero x) // match: (Ctz64NonZero x)
// cond:
// result: (Ctz64 x) // result: (Ctz64 x)
for { for {
x := v.Args[0] x := v.Args[0]
@ -444,7 +437,6 @@ func rewriteValuedec64_OpEq64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Eq64 x y) // match: (Eq64 x y)
// cond:
// result: (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Eq32 (Int64Lo x) (Int64Lo y))) // result: (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Eq32 (Int64Lo x) (Int64Lo y)))
for { for {
y := v.Args[1] y := v.Args[1]
@ -473,7 +465,6 @@ func rewriteValuedec64_OpGeq64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Geq64 x y) // match: (Geq64 x y)
// cond:
// result: (OrB (Greater32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Geq32U (Int64Lo x) (Int64Lo y)))) // result: (OrB (Greater32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Geq32U (Int64Lo x) (Int64Lo y))))
for { for {
y := v.Args[1] y := v.Args[1]
@ -512,7 +503,6 @@ func rewriteValuedec64_OpGeq64U_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Geq64U x y) // match: (Geq64U x y)
// cond:
// result: (OrB (Greater32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Geq32U (Int64Lo x) (Int64Lo y)))) // result: (OrB (Greater32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Geq32U (Int64Lo x) (Int64Lo y))))
for { for {
y := v.Args[1] y := v.Args[1]
@ -551,7 +541,6 @@ func rewriteValuedec64_OpGreater64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Greater64 x y) // match: (Greater64 x y)
// cond:
// result: (OrB (Greater32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Greater32U (Int64Lo x) (Int64Lo y)))) // result: (OrB (Greater32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Greater32U (Int64Lo x) (Int64Lo y))))
for { for {
y := v.Args[1] y := v.Args[1]
@ -590,7 +579,6 @@ func rewriteValuedec64_OpGreater64U_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Greater64U x y) // match: (Greater64U x y)
// cond:
// result: (OrB (Greater32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Greater32U (Int64Lo x) (Int64Lo y)))) // result: (OrB (Greater32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Greater32U (Int64Lo x) (Int64Lo y))))
for { for {
y := v.Args[1] y := v.Args[1]
@ -627,7 +615,6 @@ func rewriteValuedec64_OpGreater64U_0(v *Value) bool {
} }
func rewriteValuedec64_OpInt64Hi_0(v *Value) bool { func rewriteValuedec64_OpInt64Hi_0(v *Value) bool {
// match: (Int64Hi (Int64Make hi _)) // match: (Int64Hi (Int64Make hi _))
// cond:
// result: hi // result: hi
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -645,7 +632,6 @@ func rewriteValuedec64_OpInt64Hi_0(v *Value) bool {
} }
func rewriteValuedec64_OpInt64Lo_0(v *Value) bool { func rewriteValuedec64_OpInt64Lo_0(v *Value) bool {
// match: (Int64Lo (Int64Make _ lo)) // match: (Int64Lo (Int64Make _ lo))
// cond:
// result: lo // result: lo
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -664,7 +650,6 @@ func rewriteValuedec64_OpLeq64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Leq64 x y) // match: (Leq64 x y)
// cond:
// result: (OrB (Less32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Leq32U (Int64Lo x) (Int64Lo y)))) // result: (OrB (Less32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Leq32U (Int64Lo x) (Int64Lo y))))
for { for {
y := v.Args[1] y := v.Args[1]
@ -703,7 +688,6 @@ func rewriteValuedec64_OpLeq64U_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Leq64U x y) // match: (Leq64U x y)
// cond:
// result: (OrB (Less32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Leq32U (Int64Lo x) (Int64Lo y)))) // result: (OrB (Less32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Leq32U (Int64Lo x) (Int64Lo y))))
for { for {
y := v.Args[1] y := v.Args[1]
@ -742,7 +726,6 @@ func rewriteValuedec64_OpLess64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Less64 x y) // match: (Less64 x y)
// cond:
// result: (OrB (Less32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Less32U (Int64Lo x) (Int64Lo y)))) // result: (OrB (Less32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Less32U (Int64Lo x) (Int64Lo y))))
for { for {
y := v.Args[1] y := v.Args[1]
@ -781,7 +764,6 @@ func rewriteValuedec64_OpLess64U_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Less64U x y) // match: (Less64U x y)
// cond:
// result: (OrB (Less32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Less32U (Int64Lo x) (Int64Lo y)))) // result: (OrB (Less32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Less32U (Int64Lo x) (Int64Lo y))))
for { for {
y := v.Args[1] y := v.Args[1]
@ -944,7 +926,6 @@ func rewriteValuedec64_OpLsh16x64_0(v *Value) bool {
return true return true
} }
// match: (Lsh16x64 x (Int64Make (Const32 [0]) lo)) // match: (Lsh16x64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Lsh16x32 x lo) // result: (Lsh16x32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -955,10 +936,7 @@ func rewriteValuedec64_OpLsh16x64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpLsh16x32) v.reset(OpLsh16x32)
@ -1019,7 +997,6 @@ func rewriteValuedec64_OpLsh32x64_0(v *Value) bool {
return true return true
} }
// match: (Lsh32x64 x (Int64Make (Const32 [0]) lo)) // match: (Lsh32x64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Lsh32x32 x lo) // result: (Lsh32x32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -1030,10 +1007,7 @@ func rewriteValuedec64_OpLsh32x64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpLsh32x32) v.reset(OpLsh32x32)
@ -1072,7 +1046,6 @@ func rewriteValuedec64_OpLsh64x16_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Lsh64x16 (Int64Make hi lo) s) // match: (Lsh64x16 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x16 <typ.UInt32> hi s) (Rsh32Ux16 <typ.UInt32> lo (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (Lsh32x16 <typ.UInt32> lo (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32])))) (Lsh32x16 <typ.UInt32> lo s)) // result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x16 <typ.UInt32> hi s) (Rsh32Ux16 <typ.UInt32> lo (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (Lsh32x16 <typ.UInt32> lo (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32])))) (Lsh32x16 <typ.UInt32> lo s))
for { for {
s := v.Args[1] s := v.Args[1]
@ -1121,7 +1094,6 @@ func rewriteValuedec64_OpLsh64x32_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Lsh64x32 (Int64Make hi lo) s) // match: (Lsh64x32 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> hi s) (Rsh32Ux32 <typ.UInt32> lo (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (Lsh32x32 <typ.UInt32> lo (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32])))) (Lsh32x32 <typ.UInt32> lo s)) // result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> hi s) (Rsh32Ux32 <typ.UInt32> lo (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (Lsh32x32 <typ.UInt32> lo (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32])))) (Lsh32x32 <typ.UInt32> lo s))
for { for {
s := v.Args[1] s := v.Args[1]
@ -1192,7 +1164,6 @@ func rewriteValuedec64_OpLsh64x64_0(v *Value) bool {
return true return true
} }
// match: (Lsh64x64 x (Int64Make (Const32 [0]) lo)) // match: (Lsh64x64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Lsh64x32 x lo) // result: (Lsh64x32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -1203,10 +1174,7 @@ func rewriteValuedec64_OpLsh64x64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpLsh64x32) v.reset(OpLsh64x32)
@ -1245,7 +1213,6 @@ func rewriteValuedec64_OpLsh64x8_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Lsh64x8 (Int64Make hi lo) s) // match: (Lsh64x8 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x8 <typ.UInt32> hi s) (Rsh32Ux8 <typ.UInt32> lo (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (Lsh32x8 <typ.UInt32> lo (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32])))) (Lsh32x8 <typ.UInt32> lo s)) // result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x8 <typ.UInt32> hi s) (Rsh32Ux8 <typ.UInt32> lo (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (Lsh32x8 <typ.UInt32> lo (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32])))) (Lsh32x8 <typ.UInt32> lo s))
for { for {
s := v.Args[1] s := v.Args[1]
@ -1316,7 +1283,6 @@ func rewriteValuedec64_OpLsh8x64_0(v *Value) bool {
return true return true
} }
// match: (Lsh8x64 x (Int64Make (Const32 [0]) lo)) // match: (Lsh8x64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Lsh8x32 x lo) // result: (Lsh8x32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -1327,10 +1293,7 @@ func rewriteValuedec64_OpLsh8x64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpLsh8x32) v.reset(OpLsh8x32)
@ -1369,7 +1332,6 @@ func rewriteValuedec64_OpMul64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Mul64 x y) // match: (Mul64 x y)
// cond:
// result: (Int64Make (Add32 <typ.UInt32> (Mul32 <typ.UInt32> (Int64Lo x) (Int64Hi y)) (Add32 <typ.UInt32> (Mul32 <typ.UInt32> (Int64Hi x) (Int64Lo y)) (Select0 <typ.UInt32> (Mul32uhilo (Int64Lo x) (Int64Lo y))))) (Select1 <typ.UInt32> (Mul32uhilo (Int64Lo x) (Int64Lo y)))) // result: (Int64Make (Add32 <typ.UInt32> (Mul32 <typ.UInt32> (Int64Lo x) (Int64Hi y)) (Add32 <typ.UInt32> (Mul32 <typ.UInt32> (Int64Hi x) (Int64Lo y)) (Select0 <typ.UInt32> (Mul32uhilo (Int64Lo x) (Int64Lo y))))) (Select1 <typ.UInt32> (Mul32uhilo (Int64Lo x) (Int64Lo y))))
for { for {
y := v.Args[1] y := v.Args[1]
@ -1421,7 +1383,6 @@ func rewriteValuedec64_OpMul64_0(v *Value) bool {
func rewriteValuedec64_OpNeg64_0(v *Value) bool { func rewriteValuedec64_OpNeg64_0(v *Value) bool {
b := v.Block b := v.Block
// match: (Neg64 <t> x) // match: (Neg64 <t> x)
// cond:
// result: (Sub64 (Const64 <t> [0]) x) // result: (Sub64 (Const64 <t> [0]) x)
for { for {
t := v.Type t := v.Type
@ -1438,7 +1399,6 @@ func rewriteValuedec64_OpNeq64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Neq64 x y) // match: (Neq64 x y)
// cond:
// result: (OrB (Neq32 (Int64Hi x) (Int64Hi y)) (Neq32 (Int64Lo x) (Int64Lo y))) // result: (OrB (Neq32 (Int64Hi x) (Int64Hi y)) (Neq32 (Int64Lo x) (Int64Lo y)))
for { for {
y := v.Args[1] y := v.Args[1]
@ -1467,7 +1427,6 @@ func rewriteValuedec64_OpOr64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Or64 x y) // match: (Or64 x y)
// cond:
// result: (Int64Make (Or32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (Or32 <typ.UInt32> (Int64Lo x) (Int64Lo y))) // result: (Int64Make (Or32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (Or32 <typ.UInt32> (Int64Lo x) (Int64Lo y)))
for { for {
y := v.Args[1] y := v.Args[1]
@ -1518,7 +1477,6 @@ func rewriteValuedec64_OpRsh16Ux64_0(v *Value) bool {
return true return true
} }
// match: (Rsh16Ux64 x (Int64Make (Const32 [0]) lo)) // match: (Rsh16Ux64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Rsh16Ux32 x lo) // result: (Rsh16Ux32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -1529,10 +1487,7 @@ func rewriteValuedec64_OpRsh16Ux64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpRsh16Ux32) v.reset(OpRsh16Ux32)
@ -1596,7 +1551,6 @@ func rewriteValuedec64_OpRsh16x64_0(v *Value) bool {
return true return true
} }
// match: (Rsh16x64 x (Int64Make (Const32 [0]) lo)) // match: (Rsh16x64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Rsh16x32 x lo) // result: (Rsh16x32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -1607,10 +1561,7 @@ func rewriteValuedec64_OpRsh16x64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpRsh16x32) v.reset(OpRsh16x32)
@ -1671,7 +1622,6 @@ func rewriteValuedec64_OpRsh32Ux64_0(v *Value) bool {
return true return true
} }
// match: (Rsh32Ux64 x (Int64Make (Const32 [0]) lo)) // match: (Rsh32Ux64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Rsh32Ux32 x lo) // result: (Rsh32Ux32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -1682,10 +1632,7 @@ func rewriteValuedec64_OpRsh32Ux64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpRsh32Ux32) v.reset(OpRsh32Ux32)
@ -1747,7 +1694,6 @@ func rewriteValuedec64_OpRsh32x64_0(v *Value) bool {
return true return true
} }
// match: (Rsh32x64 x (Int64Make (Const32 [0]) lo)) // match: (Rsh32x64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Rsh32x32 x lo) // result: (Rsh32x32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -1758,10 +1704,7 @@ func rewriteValuedec64_OpRsh32x64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpRsh32x32) v.reset(OpRsh32x32)
@ -1800,7 +1743,6 @@ func rewriteValuedec64_OpRsh64Ux16_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Rsh64Ux16 (Int64Make hi lo) s) // match: (Rsh64Ux16 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32Ux16 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux16 <typ.UInt32> lo s) (Lsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (Rsh32Ux16 <typ.UInt32> hi (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32]))))) // result: (Int64Make (Rsh32Ux16 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux16 <typ.UInt32> lo s) (Lsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (Rsh32Ux16 <typ.UInt32> hi (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32])))))
for { for {
s := v.Args[1] s := v.Args[1]
@ -1849,7 +1791,6 @@ func rewriteValuedec64_OpRsh64Ux32_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Rsh64Ux32 (Int64Make hi lo) s) // match: (Rsh64Ux32 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32Ux32 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux32 <typ.UInt32> lo s) (Lsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (Rsh32Ux32 <typ.UInt32> hi (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32]))))) // result: (Int64Make (Rsh32Ux32 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux32 <typ.UInt32> lo s) (Lsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (Rsh32Ux32 <typ.UInt32> hi (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32])))))
for { for {
s := v.Args[1] s := v.Args[1]
@ -1920,7 +1861,6 @@ func rewriteValuedec64_OpRsh64Ux64_0(v *Value) bool {
return true return true
} }
// match: (Rsh64Ux64 x (Int64Make (Const32 [0]) lo)) // match: (Rsh64Ux64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Rsh64Ux32 x lo) // result: (Rsh64Ux32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -1931,10 +1871,7 @@ func rewriteValuedec64_OpRsh64Ux64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpRsh64Ux32) v.reset(OpRsh64Ux32)
@ -1973,7 +1910,6 @@ func rewriteValuedec64_OpRsh64Ux8_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Rsh64Ux8 (Int64Make hi lo) s) // match: (Rsh64Ux8 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32Ux8 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux8 <typ.UInt32> lo s) (Lsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (Rsh32Ux8 <typ.UInt32> hi (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32]))))) // result: (Int64Make (Rsh32Ux8 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux8 <typ.UInt32> lo s) (Lsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (Rsh32Ux8 <typ.UInt32> hi (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32])))))
for { for {
s := v.Args[1] s := v.Args[1]
@ -2022,7 +1958,6 @@ func rewriteValuedec64_OpRsh64x16_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Rsh64x16 (Int64Make hi lo) s) // match: (Rsh64x16 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32x16 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux16 <typ.UInt32> lo s) (Lsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (And32 <typ.UInt32> (Rsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32]))) (Zeromask (ZeroExt16to32 (Rsh16Ux32 <typ.UInt16> s (Const32 <typ.UInt32> [5]))))))) // result: (Int64Make (Rsh32x16 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux16 <typ.UInt32> lo s) (Lsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (And32 <typ.UInt32> (Rsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32]))) (Zeromask (ZeroExt16to32 (Rsh16Ux32 <typ.UInt16> s (Const32 <typ.UInt32> [5])))))))
for { for {
s := v.Args[1] s := v.Args[1]
@ -2083,7 +2018,6 @@ func rewriteValuedec64_OpRsh64x32_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Rsh64x32 (Int64Make hi lo) s) // match: (Rsh64x32 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32x32 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux32 <typ.UInt32> lo s) (Lsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (And32 <typ.UInt32> (Rsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32]))) (Zeromask (Rsh32Ux32 <typ.UInt32> s (Const32 <typ.UInt32> [5])))))) // result: (Int64Make (Rsh32x32 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux32 <typ.UInt32> lo s) (Lsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (And32 <typ.UInt32> (Rsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32]))) (Zeromask (Rsh32Ux32 <typ.UInt32> s (Const32 <typ.UInt32> [5]))))))
for { for {
s := v.Args[1] s := v.Args[1]
@ -2174,7 +2108,6 @@ func rewriteValuedec64_OpRsh64x64_0(v *Value) bool {
return true return true
} }
// match: (Rsh64x64 x (Int64Make (Const32 [0]) lo)) // match: (Rsh64x64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Rsh64x32 x lo) // result: (Rsh64x32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -2185,10 +2118,7 @@ func rewriteValuedec64_OpRsh64x64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpRsh64x32) v.reset(OpRsh64x32)
@ -2227,7 +2157,6 @@ func rewriteValuedec64_OpRsh64x8_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Rsh64x8 (Int64Make hi lo) s) // match: (Rsh64x8 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32x8 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux8 <typ.UInt32> lo s) (Lsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (And32 <typ.UInt32> (Rsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32]))) (Zeromask (ZeroExt8to32 (Rsh8Ux32 <typ.UInt8> s (Const32 <typ.UInt32> [5]))))))) // result: (Int64Make (Rsh32x8 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux8 <typ.UInt32> lo s) (Lsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (And32 <typ.UInt32> (Rsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32]))) (Zeromask (ZeroExt8to32 (Rsh8Ux32 <typ.UInt8> s (Const32 <typ.UInt32> [5])))))))
for { for {
s := v.Args[1] s := v.Args[1]
@ -2310,7 +2239,6 @@ func rewriteValuedec64_OpRsh8Ux64_0(v *Value) bool {
return true return true
} }
// match: (Rsh8Ux64 x (Int64Make (Const32 [0]) lo)) // match: (Rsh8Ux64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Rsh8Ux32 x lo) // result: (Rsh8Ux32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -2321,10 +2249,7 @@ func rewriteValuedec64_OpRsh8Ux64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpRsh8Ux32) v.reset(OpRsh8Ux32)
@ -2388,7 +2313,6 @@ func rewriteValuedec64_OpRsh8x64_0(v *Value) bool {
return true return true
} }
// match: (Rsh8x64 x (Int64Make (Const32 [0]) lo)) // match: (Rsh8x64 x (Int64Make (Const32 [0]) lo))
// cond:
// result: (Rsh8x32 x lo) // result: (Rsh8x32 x lo)
for { for {
_ = v.Args[1] _ = v.Args[1]
@ -2399,10 +2323,7 @@ func rewriteValuedec64_OpRsh8x64_0(v *Value) bool {
} }
lo := v_1.Args[1] lo := v_1.Args[1]
v_1_0 := v_1.Args[0] v_1_0 := v_1.Args[0]
if v_1_0.Op != OpConst32 { if v_1_0.Op != OpConst32 || v_1_0.AuxInt != 0 {
break
}
if v_1_0.AuxInt != 0 {
break break
} }
v.reset(OpRsh8x32) v.reset(OpRsh8x32)
@ -2441,7 +2362,6 @@ func rewriteValuedec64_OpSignExt16to64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (SignExt16to64 x) // match: (SignExt16to64 x)
// cond:
// result: (SignExt32to64 (SignExt16to32 x)) // result: (SignExt32to64 (SignExt16to32 x))
for { for {
x := v.Args[0] x := v.Args[0]
@ -2456,7 +2376,6 @@ func rewriteValuedec64_OpSignExt32to64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (SignExt32to64 x) // match: (SignExt32to64 x)
// cond:
// result: (Int64Make (Signmask x) x) // result: (Int64Make (Signmask x) x)
for { for {
x := v.Args[0] x := v.Args[0]
@ -2472,7 +2391,6 @@ func rewriteValuedec64_OpSignExt8to64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (SignExt8to64 x) // match: (SignExt8to64 x)
// cond:
// result: (SignExt32to64 (SignExt8to32 x)) // result: (SignExt32to64 (SignExt8to32 x))
for { for {
x := v.Args[0] x := v.Args[0]
@ -2554,7 +2472,6 @@ func rewriteValuedec64_OpSub64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Sub64 x y) // match: (Sub64 x y)
// cond:
// result: (Int64Make (Sub32withcarry <typ.Int32> (Int64Hi x) (Int64Hi y) (Select1 <types.TypeFlags> (Sub32carry (Int64Lo x) (Int64Lo y)))) (Select0 <typ.UInt32> (Sub32carry (Int64Lo x) (Int64Lo y)))) // result: (Int64Make (Sub32withcarry <typ.Int32> (Int64Hi x) (Int64Hi y) (Select1 <types.TypeFlags> (Sub32carry (Int64Lo x) (Int64Lo y)))) (Select0 <typ.UInt32> (Sub32carry (Int64Lo x) (Int64Lo y))))
for { for {
y := v.Args[1] y := v.Args[1]
@ -2593,7 +2510,6 @@ func rewriteValuedec64_OpSub64_0(v *Value) bool {
} }
func rewriteValuedec64_OpTrunc64to16_0(v *Value) bool { func rewriteValuedec64_OpTrunc64to16_0(v *Value) bool {
// match: (Trunc64to16 (Int64Make _ lo)) // match: (Trunc64to16 (Int64Make _ lo))
// cond:
// result: (Trunc32to16 lo) // result: (Trunc32to16 lo)
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -2609,7 +2525,6 @@ func rewriteValuedec64_OpTrunc64to16_0(v *Value) bool {
} }
func rewriteValuedec64_OpTrunc64to32_0(v *Value) bool { func rewriteValuedec64_OpTrunc64to32_0(v *Value) bool {
// match: (Trunc64to32 (Int64Make _ lo)) // match: (Trunc64to32 (Int64Make _ lo))
// cond:
// result: lo // result: lo
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -2626,7 +2541,6 @@ func rewriteValuedec64_OpTrunc64to32_0(v *Value) bool {
} }
func rewriteValuedec64_OpTrunc64to8_0(v *Value) bool { func rewriteValuedec64_OpTrunc64to8_0(v *Value) bool {
// match: (Trunc64to8 (Int64Make _ lo)) // match: (Trunc64to8 (Int64Make _ lo))
// cond:
// result: (Trunc32to8 lo) // result: (Trunc32to8 lo)
for { for {
v_0 := v.Args[0] v_0 := v.Args[0]
@ -2644,7 +2558,6 @@ func rewriteValuedec64_OpXor64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (Xor64 x y) // match: (Xor64 x y)
// cond:
// result: (Int64Make (Xor32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (Xor32 <typ.UInt32> (Int64Lo x) (Int64Lo y))) // result: (Int64Make (Xor32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (Xor32 <typ.UInt32> (Int64Lo x) (Int64Lo y)))
for { for {
y := v.Args[1] y := v.Args[1]
@ -2673,7 +2586,6 @@ func rewriteValuedec64_OpZeroExt16to64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (ZeroExt16to64 x) // match: (ZeroExt16to64 x)
// cond:
// result: (ZeroExt32to64 (ZeroExt16to32 x)) // result: (ZeroExt32to64 (ZeroExt16to32 x))
for { for {
x := v.Args[0] x := v.Args[0]
@ -2688,7 +2600,6 @@ func rewriteValuedec64_OpZeroExt32to64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (ZeroExt32to64 x) // match: (ZeroExt32to64 x)
// cond:
// result: (Int64Make (Const32 <typ.UInt32> [0]) x) // result: (Int64Make (Const32 <typ.UInt32> [0]) x)
for { for {
x := v.Args[0] x := v.Args[0]
@ -2704,7 +2615,6 @@ func rewriteValuedec64_OpZeroExt8to64_0(v *Value) bool {
b := v.Block b := v.Block
typ := &b.Func.Config.Types typ := &b.Func.Config.Types
// match: (ZeroExt8to64 x) // match: (ZeroExt8to64 x)
// cond:
// result: (ZeroExt32to64 (ZeroExt8to32 x)) // result: (ZeroExt32to64 (ZeroExt8to32 x))
for { for {
x := v.Args[0] x := v.Args[0]

File diff suppressed because it is too large Load Diff