From: Michael Munday Date: Wed, 2 Oct 2019 10:02:41 +0000 (+0100) Subject: cmd/compile: reduce amount of code generated for block rewrite rules X-Git-Tag: go1.14beta1~841 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c7d81bc08646ca56d6fe560c77d99be933d7f6dd;p=gostls13.git cmd/compile: reduce amount of code generated for block rewrite rules Add a Reset method to blocks that allows us to reduce the amount of code we generate for block rewrite rules. Thanks to Cherry for suggesting a similar fix to this in CL 196557. Compilebench result: name old time/op new time/op delta Template 211ms ± 1% 211ms ± 1% -0.30% (p=0.028 n=19+20) Unicode 83.7ms ± 3% 83.0ms ± 2% -0.79% (p=0.029 n=18+19) GoTypes 757ms ± 1% 755ms ± 1% -0.31% (p=0.034 n=19+19) Compiler 3.51s ± 1% 3.50s ± 1% -0.20% (p=0.013 n=18+18) SSA 11.7s ± 1% 11.7s ± 1% -0.38% (p=0.000 n=19+19) Flate 131ms ± 1% 130ms ± 1% -0.32% (p=0.024 n=18+18) GoParser 162ms ± 1% 162ms ± 1% ~ (p=0.059 n=20+18) Reflect 471ms ± 0% 470ms ± 0% -0.24% (p=0.045 n=20+17) Tar 187ms ± 1% 186ms ± 1% ~ (p=0.157 n=20+20) XML 255ms ± 1% 255ms ± 1% ~ (p=0.461 n=19+20) LinkCompiler 754ms ± 2% 755ms ± 2% ~ (p=0.919 n=17+17) ExternalLinkCompiler 2.82s ±16% 2.37s ±10% -15.94% (p=0.000 n=20+20) LinkWithoutDebugCompiler 439ms ± 4% 442ms ± 6% ~ (p=0.461 n=18+19) StdCmd 25.8s ± 2% 25.5s ± 1% -0.95% (p=0.000 n=20+20) name old user-time/op new user-time/op delta Template 240ms ± 8% 238ms ± 7% ~ (p=0.301 n=20+20) Unicode 107ms ±18% 104ms ±13% ~ (p=0.149 n=20+20) GoTypes 883ms ± 3% 888ms ± 2% ~ (p=0.211 n=20+20) Compiler 4.22s ± 1% 4.20s ± 1% ~ (p=0.077 n=20+18) SSA 14.1s ± 1% 14.1s ± 2% ~ (p=0.192 n=20+20) Flate 145ms ±10% 148ms ± 5% ~ (p=0.126 n=20+18) GoParser 186ms ± 7% 186ms ± 7% ~ (p=0.779 n=20+20) Reflect 538ms ± 3% 541ms ± 3% ~ (p=0.192 n=20+20) Tar 218ms ± 4% 217ms ± 6% ~ (p=0.835 n=19+20) XML 298ms ± 5% 298ms ± 5% ~ (p=0.749 n=19+20) LinkCompiler 818ms ± 5% 825ms ± 8% ~ (p=0.461 n=20+20) ExternalLinkCompiler 1.55s ± 4% 1.53s ± 5% ~ (p=0.063 n=20+18) LinkWithoutDebugCompiler 460ms ±12% 460ms ± 7% ~ (p=0.925 n=20+20) name old object-bytes new object-bytes delta Template 554kB ± 0% 554kB ± 0% ~ (all equal) Unicode 215kB ± 0% 215kB ± 0% ~ (all equal) GoTypes 2.01MB ± 0% 2.01MB ± 0% ~ (all equal) Compiler 7.97MB ± 0% 7.97MB ± 0% +0.00% (p=0.000 n=20+20) SSA 26.8MB ± 0% 26.9MB ± 0% +0.27% (p=0.000 n=20+20) Flate 340kB ± 0% 340kB ± 0% ~ (all equal) GoParser 434kB ± 0% 434kB ± 0% ~ (all equal) Reflect 1.34MB ± 0% 1.34MB ± 0% ~ (all equal) Tar 480kB ± 0% 480kB ± 0% ~ (all equal) XML 622kB ± 0% 622kB ± 0% ~ (all equal) name old export-bytes new export-bytes delta Template 20.4kB ± 0% 20.4kB ± 0% ~ (all equal) Unicode 8.21kB ± 0% 8.21kB ± 0% ~ (all equal) GoTypes 36.6kB ± 0% 36.6kB ± 0% ~ (all equal) Compiler 115kB ± 0% 115kB ± 0% +0.08% (p=0.000 n=20+20) SSA 141kB ± 0% 141kB ± 0% +0.07% (p=0.000 n=20+20) Flate 5.11kB ± 0% 5.11kB ± 0% ~ (all equal) GoParser 8.93kB ± 0% 8.93kB ± 0% ~ (all equal) Reflect 11.8kB ± 0% 11.8kB ± 0% ~ (all equal) Tar 10.9kB ± 0% 10.9kB ± 0% ~ (all equal) XML 17.4kB ± 0% 17.4kB ± 0% ~ (all equal) name old text-bytes new text-bytes delta HelloSize 742kB ± 0% 742kB ± 0% ~ (all equal) CmdGoSize 10.7MB ± 0% 10.7MB ± 0% ~ (all equal) name old data-bytes new data-bytes delta HelloSize 10.7kB ± 0% 10.7kB ± 0% ~ (all equal) CmdGoSize 312kB ± 0% 312kB ± 0% ~ (all equal) name old bss-bytes new bss-bytes delta HelloSize 122kB ± 0% 122kB ± 0% ~ (all equal) CmdGoSize 146kB ± 0% 146kB ± 0% ~ (all equal) name old exe-bytes new exe-bytes delta HelloSize 1.10MB ± 0% 1.10MB ± 0% ~ (all equal) CmdGoSize 14.9MB ± 0% 14.9MB ± 0% ~ (all equal) Change-Id: Ic89a8e62423b3d9fd9391159e0663acf450803b5 Reviewed-on: https://go-review.googlesource.com/c/go/+/198419 Run-TryBot: Michael Munday TryBot-Result: Gobot Gobot Reviewed-by: Cherry Zhang Reviewed-by: Daniel Martí --- diff --git a/src/cmd/compile/internal/ssa/block.go b/src/cmd/compile/internal/ssa/block.go index 1ccea778c2..3e86748680 100644 --- a/src/cmd/compile/internal/ssa/block.go +++ b/src/cmd/compile/internal/ssa/block.go @@ -211,6 +211,15 @@ func (b *Block) CopyControls(from *Block) { } } +// Reset sets the block to the provided kind and clears all the blocks control +// and auxilliary values. Other properties of the block, such as its successors, +// predecessors and values are left unmodified. +func (b *Block) Reset(kind BlockKind) { + b.Kind = kind + b.ResetControls() + b.Aux = nil +} + // AddEdgeTo adds an edge from block b to block c. Used during building of the // SSA graph; do not use on an already-completed SSA graph. func (b *Block) AddEdgeTo(c *Block) { diff --git a/src/cmd/compile/internal/ssa/gen/rulegen.go b/src/cmd/compile/internal/ssa/gen/rulegen.go index 5c4c5ef1af..bc11e93ae8 100644 --- a/src/cmd/compile/internal/ssa/gen/rulegen.go +++ b/src/cmd/compile/internal/ssa/gen/rulegen.go @@ -816,8 +816,7 @@ func genBlockRewrite(rule Rule, arch arch, data blockData) *RuleRewrite { } blockName, _ := getBlockInfo(outop, arch) - rr.add(stmtf("b.Kind = %s", blockName)) - rr.add(stmtf("b.ResetControls()")) + rr.add(stmtf("b.Reset(%s)", blockName)) for i, control := range t[:outdata.controls] { // Select a source position for any new control values. // TODO: does it always make sense to use the source position @@ -835,8 +834,6 @@ func genBlockRewrite(rule Rule, arch arch, data blockData) *RuleRewrite { } if aux != "" { rr.add(stmtf("b.Aux = %s", aux)) - } else { - rr.add(stmtf("b.Aux = nil")) } succChanged := false diff --git a/src/cmd/compile/internal/ssa/rewrite386.go b/src/cmd/compile/internal/ssa/rewrite386.go index bde41059f8..a12977bc8b 100644 --- a/src/cmd/compile/internal/ssa/rewrite386.go +++ b/src/cmd/compile/internal/ssa/rewrite386.go @@ -21982,53 +21982,41 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386EQ - b.ResetControls() + b.Reset(Block386EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (EQ (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -22038,52 +22026,40 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386LE - b.ResetControls() + b.Reset(Block386LE) b.AddControl(cmp) - b.Aux = nil return true } // match: (GE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GE (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case Block386GT: @@ -22092,53 +22068,41 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386LT - b.ResetControls() + b.Reset(Block386LT) b.AddControl(cmp) - b.Aux = nil return true } // match: (GT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GT (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case BlockIf: @@ -22147,10 +22111,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETL { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386LT - b.ResetControls() + b.Reset(Block386LT) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETLE cmp) yes no) @@ -22158,10 +22120,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETLE { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386LE - b.ResetControls() + b.Reset(Block386LE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETG cmp) yes no) @@ -22169,10 +22129,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETG { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386GT - b.ResetControls() + b.Reset(Block386GT) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETGE cmp) yes no) @@ -22180,10 +22138,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETGE { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386GE - b.ResetControls() + b.Reset(Block386GE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETEQ cmp) yes no) @@ -22191,10 +22147,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETEQ { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386EQ - b.ResetControls() + b.Reset(Block386EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETNE cmp) yes no) @@ -22202,10 +22156,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETNE { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386NE - b.ResetControls() + b.Reset(Block386NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETB cmp) yes no) @@ -22213,10 +22165,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETB { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386ULT - b.ResetControls() + b.Reset(Block386ULT) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETBE cmp) yes no) @@ -22224,10 +22174,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETBE { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386ULE - b.ResetControls() + b.Reset(Block386ULE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETA cmp) yes no) @@ -22235,10 +22183,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETA { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386UGT - b.ResetControls() + b.Reset(Block386UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETAE cmp) yes no) @@ -22246,10 +22192,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETAE { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386UGE - b.ResetControls() + b.Reset(Block386UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETO cmp) yes no) @@ -22257,10 +22201,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETO { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386OS - b.ResetControls() + b.Reset(Block386OS) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETGF cmp) yes no) @@ -22268,10 +22210,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETGF { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386UGT - b.ResetControls() + b.Reset(Block386UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETGEF cmp) yes no) @@ -22279,10 +22219,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETGEF { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386UGE - b.ResetControls() + b.Reset(Block386UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETEQF cmp) yes no) @@ -22290,10 +22228,8 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETEQF { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386EQF - b.ResetControls() + b.Reset(Block386EQF) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETNEF cmp) yes no) @@ -22301,23 +22237,19 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386SETNEF { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386NEF - b.ResetControls() + b.Reset(Block386NEF) b.AddControl(cmp) - b.Aux = nil return true } // match: (If cond yes no) // result: (NE (TESTB cond cond) yes no) for { cond := b.Controls[0] - b.Kind = Block386NE - b.ResetControls() + b.Reset(Block386NE) v0 := b.NewValue0(cond.Pos, Op386TESTB, types.TypeFlags) v0.AddArg(cond) v0.AddArg(cond) b.AddControl(v0) - b.Aux = nil return true } case Block386LE: @@ -22326,51 +22258,39 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386GE - b.ResetControls() + b.Reset(Block386GE) b.AddControl(cmp) - b.Aux = nil return true } // match: (LE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LE (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -22380,52 +22300,40 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386GT - b.ResetControls() + b.Reset(Block386GT) b.AddControl(cmp) - b.Aux = nil return true } // match: (LT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LT (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LT (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LT (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LT (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -22444,10 +22352,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETL || cmp != v_0_1.Args[0] { break } - b.Kind = Block386LT - b.ResetControls() + b.Reset(Block386LT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETL cmp) (SETL cmp)) yes no) @@ -22464,10 +22370,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETL || cmp != v_0_1.Args[0] { break } - b.Kind = Block386LT - b.ResetControls() + b.Reset(Block386LT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no) @@ -22484,10 +22388,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETLE || cmp != v_0_1.Args[0] { break } - b.Kind = Block386LE - b.ResetControls() + b.Reset(Block386LE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no) @@ -22504,10 +22406,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETLE || cmp != v_0_1.Args[0] { break } - b.Kind = Block386LE - b.ResetControls() + b.Reset(Block386LE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no) @@ -22524,10 +22424,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETG || cmp != v_0_1.Args[0] { break } - b.Kind = Block386GT - b.ResetControls() + b.Reset(Block386GT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no) @@ -22544,10 +22442,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETG || cmp != v_0_1.Args[0] { break } - b.Kind = Block386GT - b.ResetControls() + b.Reset(Block386GT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no) @@ -22564,10 +22460,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETGE || cmp != v_0_1.Args[0] { break } - b.Kind = Block386GE - b.ResetControls() + b.Reset(Block386GE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no) @@ -22584,10 +22478,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETGE || cmp != v_0_1.Args[0] { break } - b.Kind = Block386GE - b.ResetControls() + b.Reset(Block386GE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no) @@ -22604,10 +22496,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETEQ || cmp != v_0_1.Args[0] { break } - b.Kind = Block386EQ - b.ResetControls() + b.Reset(Block386EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no) @@ -22624,10 +22514,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETEQ || cmp != v_0_1.Args[0] { break } - b.Kind = Block386EQ - b.ResetControls() + b.Reset(Block386EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no) @@ -22644,10 +22532,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETNE || cmp != v_0_1.Args[0] { break } - b.Kind = Block386NE - b.ResetControls() + b.Reset(Block386NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no) @@ -22664,10 +22550,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETNE || cmp != v_0_1.Args[0] { break } - b.Kind = Block386NE - b.ResetControls() + b.Reset(Block386NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no) @@ -22684,10 +22568,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETB || cmp != v_0_1.Args[0] { break } - b.Kind = Block386ULT - b.ResetControls() + b.Reset(Block386ULT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no) @@ -22704,10 +22586,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETB || cmp != v_0_1.Args[0] { break } - b.Kind = Block386ULT - b.ResetControls() + b.Reset(Block386ULT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no) @@ -22724,10 +22604,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETBE || cmp != v_0_1.Args[0] { break } - b.Kind = Block386ULE - b.ResetControls() + b.Reset(Block386ULE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no) @@ -22744,10 +22622,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETBE || cmp != v_0_1.Args[0] { break } - b.Kind = Block386ULE - b.ResetControls() + b.Reset(Block386ULE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no) @@ -22764,10 +22640,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETA || cmp != v_0_1.Args[0] { break } - b.Kind = Block386UGT - b.ResetControls() + b.Reset(Block386UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no) @@ -22784,10 +22658,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETA || cmp != v_0_1.Args[0] { break } - b.Kind = Block386UGT - b.ResetControls() + b.Reset(Block386UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no) @@ -22804,10 +22676,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETAE || cmp != v_0_1.Args[0] { break } - b.Kind = Block386UGE - b.ResetControls() + b.Reset(Block386UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no) @@ -22824,10 +22694,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETAE || cmp != v_0_1.Args[0] { break } - b.Kind = Block386UGE - b.ResetControls() + b.Reset(Block386UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no) @@ -22844,10 +22712,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETO || cmp != v_0_1.Args[0] { break } - b.Kind = Block386OS - b.ResetControls() + b.Reset(Block386OS) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no) @@ -22864,10 +22730,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETO || cmp != v_0_1.Args[0] { break } - b.Kind = Block386OS - b.ResetControls() + b.Reset(Block386OS) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no) @@ -22884,10 +22748,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETGF || cmp != v_0_1.Args[0] { break } - b.Kind = Block386UGT - b.ResetControls() + b.Reset(Block386UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no) @@ -22904,10 +22766,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETGF || cmp != v_0_1.Args[0] { break } - b.Kind = Block386UGT - b.ResetControls() + b.Reset(Block386UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no) @@ -22924,10 +22784,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETGEF || cmp != v_0_1.Args[0] { break } - b.Kind = Block386UGE - b.ResetControls() + b.Reset(Block386UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no) @@ -22944,10 +22802,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETGEF || cmp != v_0_1.Args[0] { break } - b.Kind = Block386UGE - b.ResetControls() + b.Reset(Block386UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no) @@ -22964,10 +22820,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETEQF || cmp != v_0_1.Args[0] { break } - b.Kind = Block386EQF - b.ResetControls() + b.Reset(Block386EQF) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no) @@ -22984,10 +22838,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETEQF || cmp != v_0_1.Args[0] { break } - b.Kind = Block386EQF - b.ResetControls() + b.Reset(Block386EQF) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no) @@ -23004,10 +22856,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETNEF || cmp != v_0_1.Args[0] { break } - b.Kind = Block386NEF - b.ResetControls() + b.Reset(Block386NEF) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no) @@ -23024,10 +22874,8 @@ func rewriteBlock386(b *Block) bool { if v_0_1.Op != Op386SETNEF || cmp != v_0_1.Args[0] { break } - b.Kind = Block386NEF - b.ResetControls() + b.Reset(Block386NEF) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (InvertFlags cmp) yes no) @@ -23035,51 +22883,39 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386NE - b.ResetControls() + b.Reset(Block386NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (NE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case Block386UGE: @@ -23088,52 +22924,40 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386ULE - b.ResetControls() + b.Reset(Block386ULE) b.AddControl(cmp) - b.Aux = nil return true } // match: (UGE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGE (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGE (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case Block386UGT: @@ -23142,53 +22966,41 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386ULT - b.ResetControls() + b.Reset(Block386ULT) b.AddControl(cmp) - b.Aux = nil return true } // match: (UGT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGT (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case Block386ULE: @@ -23197,51 +23009,39 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386UGE - b.ResetControls() + b.Reset(Block386UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (ULE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -23251,52 +23051,40 @@ func rewriteBlock386(b *Block) bool { for b.Controls[0].Op == Op386InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = Block386UGT - b.ResetControls() + b.Reset(Block386UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (ULT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULT (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULT (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULT (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == Op386FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULT (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == Op386FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } diff --git a/src/cmd/compile/internal/ssa/rewriteAMD64.go b/src/cmd/compile/internal/ssa/rewriteAMD64.go index 20443d2f48..d225bf318f 100644 --- a/src/cmd/compile/internal/ssa/rewriteAMD64.go +++ b/src/cmd/compile/internal/ssa/rewriteAMD64.go @@ -58117,13 +58117,11 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_0_0.Op != OpAMD64MOVLconst || v_0_0_0.AuxInt != 1 || !(!config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTL, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTL y (SHLL (MOVLconst [1]) x))) @@ -58142,13 +58140,11 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1_0.Op != OpAMD64MOVLconst || v_0_1_0.AuxInt != 1 || !(!config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTL, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTQ (SHLQ (MOVQconst [1]) x) y)) @@ -58166,13 +58162,11 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_0_0.Op != OpAMD64MOVQconst || v_0_0_0.AuxInt != 1 || !(!config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQ, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTQ y (SHLQ (MOVQconst [1]) x))) @@ -58191,13 +58185,11 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1_0.Op != OpAMD64MOVQconst || v_0_1_0.AuxInt != 1 || !(!config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQ, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTLconst [c] x)) @@ -58210,13 +58202,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(isUint32PowerOfTwo(c) && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags) v0.AuxInt = log2uint32(c) v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTQconst [c] x)) @@ -58229,13 +58219,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(isUint64PowerOfTwo(c) && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = log2(c) v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTQ (MOVQconst [c]) x)) @@ -58252,13 +58240,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(isUint64PowerOfTwo(c) && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = log2(c) v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTQ x (MOVQconst [c]))) @@ -58276,13 +58262,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(isUint64PowerOfTwo(c) && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = log2(c) v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTQ z1:(SHLQconst [63] (SHRQconst [63] x)) z2)) @@ -58303,13 +58287,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 63 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTQ z2 z1:(SHLQconst [63] (SHRQconst [63] x)))) @@ -58331,13 +58313,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 63 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTL z1:(SHLLconst [31] (SHRQconst [31] x)) z2)) @@ -58358,13 +58338,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 31 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTL z2 z1:(SHLLconst [31] (SHRQconst [31] x)))) @@ -58386,13 +58364,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 31 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTQ z1:(SHRQconst [63] (SHLQconst [63] x)) z2)) @@ -58413,13 +58389,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 0 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTQ z2 z1:(SHRQconst [63] (SHLQconst [63] x)))) @@ -58441,13 +58415,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 0 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTL z1:(SHRLconst [31] (SHLLconst [31] x)) z2)) @@ -58468,13 +58440,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags) v0.AuxInt = 0 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTL z2 z1:(SHRLconst [31] (SHLLconst [31] x)))) @@ -58496,13 +58466,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags) v0.AuxInt = 0 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTQ z1:(SHRQconst [63] x) z2)) @@ -58519,13 +58487,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 63 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTQ z2 z1:(SHRQconst [63] x))) @@ -58543,13 +58509,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 63 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTL z1:(SHRLconst [31] x) z2)) @@ -58566,13 +58530,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags) v0.AuxInt = 31 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TESTL z2 z1:(SHRLconst [31] x))) @@ -58590,13 +58552,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags) v0.AuxInt = 31 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (InvertFlags cmp) yes no) @@ -58604,53 +58564,41 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64EQ - b.ResetControls() + b.Reset(BlockAMD64EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (EQ (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -58660,52 +58608,40 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64LE - b.ResetControls() + b.Reset(BlockAMD64LE) b.AddControl(cmp) - b.Aux = nil return true } // match: (GE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GE (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case BlockAMD64GT: @@ -58714,53 +58650,41 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64LT - b.ResetControls() + b.Reset(BlockAMD64LT) b.AddControl(cmp) - b.Aux = nil return true } // match: (GT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GT (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case BlockIf: @@ -58769,10 +58693,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETL { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64LT - b.ResetControls() + b.Reset(BlockAMD64LT) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETLE cmp) yes no) @@ -58780,10 +58702,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETLE { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64LE - b.ResetControls() + b.Reset(BlockAMD64LE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETG cmp) yes no) @@ -58791,10 +58711,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETG { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64GT - b.ResetControls() + b.Reset(BlockAMD64GT) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETGE cmp) yes no) @@ -58802,10 +58720,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETGE { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64GE - b.ResetControls() + b.Reset(BlockAMD64GE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETEQ cmp) yes no) @@ -58813,10 +58729,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETEQ { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64EQ - b.ResetControls() + b.Reset(BlockAMD64EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETNE cmp) yes no) @@ -58824,10 +58738,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETNE { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64NE - b.ResetControls() + b.Reset(BlockAMD64NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETB cmp) yes no) @@ -58835,10 +58747,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETB { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETBE cmp) yes no) @@ -58846,10 +58756,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETBE { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64ULE - b.ResetControls() + b.Reset(BlockAMD64ULE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETA cmp) yes no) @@ -58857,10 +58765,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETA { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64UGT - b.ResetControls() + b.Reset(BlockAMD64UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETAE cmp) yes no) @@ -58868,10 +58774,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETAE { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETO cmp) yes no) @@ -58879,10 +58783,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETO { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64OS - b.ResetControls() + b.Reset(BlockAMD64OS) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETGF cmp) yes no) @@ -58890,10 +58792,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETGF { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64UGT - b.ResetControls() + b.Reset(BlockAMD64UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETGEF cmp) yes no) @@ -58901,10 +58801,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETGEF { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETEQF cmp) yes no) @@ -58912,10 +58810,8 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETEQF { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64EQF - b.ResetControls() + b.Reset(BlockAMD64EQF) b.AddControl(cmp) - b.Aux = nil return true } // match: (If (SETNEF cmp) yes no) @@ -58923,23 +58819,19 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64SETNEF { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64NEF - b.ResetControls() + b.Reset(BlockAMD64NEF) b.AddControl(cmp) - b.Aux = nil return true } // match: (If cond yes no) // result: (NE (TESTB cond cond) yes no) for { cond := b.Controls[0] - b.Kind = BlockAMD64NE - b.ResetControls() + b.Reset(BlockAMD64NE) v0 := b.NewValue0(cond.Pos, OpAMD64TESTB, types.TypeFlags) v0.AddArg(cond) v0.AddArg(cond) b.AddControl(v0) - b.Aux = nil return true } case BlockAMD64LE: @@ -58948,51 +58840,39 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64GE - b.ResetControls() + b.Reset(BlockAMD64GE) b.AddControl(cmp) - b.Aux = nil return true } // match: (LE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LE (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -59002,52 +58882,40 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64GT - b.ResetControls() + b.Reset(BlockAMD64GT) b.AddControl(cmp) - b.Aux = nil return true } // match: (LT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LT (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LT (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LT (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LT (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -59066,10 +58934,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETL || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64LT - b.ResetControls() + b.Reset(BlockAMD64LT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETL cmp) (SETL cmp)) yes no) @@ -59086,10 +58952,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETL || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64LT - b.ResetControls() + b.Reset(BlockAMD64LT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no) @@ -59106,10 +58970,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETLE || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64LE - b.ResetControls() + b.Reset(BlockAMD64LE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no) @@ -59126,10 +58988,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETLE || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64LE - b.ResetControls() + b.Reset(BlockAMD64LE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no) @@ -59146,10 +59006,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETG || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64GT - b.ResetControls() + b.Reset(BlockAMD64GT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no) @@ -59166,10 +59024,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETG || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64GT - b.ResetControls() + b.Reset(BlockAMD64GT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no) @@ -59186,10 +59042,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETGE || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64GE - b.ResetControls() + b.Reset(BlockAMD64GE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no) @@ -59206,10 +59060,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETGE || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64GE - b.ResetControls() + b.Reset(BlockAMD64GE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no) @@ -59226,10 +59078,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETEQ || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64EQ - b.ResetControls() + b.Reset(BlockAMD64EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no) @@ -59246,10 +59096,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETEQ || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64EQ - b.ResetControls() + b.Reset(BlockAMD64EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no) @@ -59266,10 +59114,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETNE || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64NE - b.ResetControls() + b.Reset(BlockAMD64NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no) @@ -59286,10 +59132,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETNE || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64NE - b.ResetControls() + b.Reset(BlockAMD64NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no) @@ -59306,10 +59150,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETB || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no) @@ -59326,10 +59168,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETB || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no) @@ -59346,10 +59186,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETBE || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64ULE - b.ResetControls() + b.Reset(BlockAMD64ULE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no) @@ -59366,10 +59204,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETBE || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64ULE - b.ResetControls() + b.Reset(BlockAMD64ULE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no) @@ -59386,10 +59222,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETA || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64UGT - b.ResetControls() + b.Reset(BlockAMD64UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no) @@ -59406,10 +59240,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETA || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64UGT - b.ResetControls() + b.Reset(BlockAMD64UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no) @@ -59426,10 +59258,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETAE || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no) @@ -59446,10 +59276,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETAE || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no) @@ -59466,10 +59294,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETO || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64OS - b.ResetControls() + b.Reset(BlockAMD64OS) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no) @@ -59486,10 +59312,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETO || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64OS - b.ResetControls() + b.Reset(BlockAMD64OS) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTL (SHLL (MOVLconst [1]) x) y)) @@ -59507,13 +59331,11 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_0_0.Op != OpAMD64MOVLconst || v_0_0_0.AuxInt != 1 || !(!config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTL, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTL y (SHLL (MOVLconst [1]) x))) @@ -59532,13 +59354,11 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1_0.Op != OpAMD64MOVLconst || v_0_1_0.AuxInt != 1 || !(!config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTL, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTQ (SHLQ (MOVQconst [1]) x) y)) @@ -59556,13 +59376,11 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_0_0.Op != OpAMD64MOVQconst || v_0_0_0.AuxInt != 1 || !(!config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQ, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTQ y (SHLQ (MOVQconst [1]) x))) @@ -59581,13 +59399,11 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1_0.Op != OpAMD64MOVQconst || v_0_1_0.AuxInt != 1 || !(!config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQ, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTLconst [c] x)) @@ -59600,13 +59416,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(isUint32PowerOfTwo(c) && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags) v0.AuxInt = log2uint32(c) v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTQconst [c] x)) @@ -59619,13 +59433,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(isUint64PowerOfTwo(c) && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = log2(c) v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTQ (MOVQconst [c]) x)) @@ -59642,13 +59454,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(isUint64PowerOfTwo(c) && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = log2(c) v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTQ x (MOVQconst [c]))) @@ -59666,13 +59476,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(isUint64PowerOfTwo(c) && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = log2(c) v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTQ z1:(SHLQconst [63] (SHRQconst [63] x)) z2)) @@ -59693,13 +59501,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 63 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTQ z2 z1:(SHLQconst [63] (SHRQconst [63] x)))) @@ -59721,13 +59527,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 63 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTL z1:(SHLLconst [31] (SHRQconst [31] x)) z2)) @@ -59748,13 +59552,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 31 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTL z2 z1:(SHLLconst [31] (SHRQconst [31] x)))) @@ -59776,13 +59578,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 31 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTQ z1:(SHRQconst [63] (SHLQconst [63] x)) z2)) @@ -59803,13 +59603,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 0 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTQ z2 z1:(SHRQconst [63] (SHLQconst [63] x)))) @@ -59831,13 +59629,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 0 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTL z1:(SHRLconst [31] (SHLLconst [31] x)) z2)) @@ -59858,13 +59654,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags) v0.AuxInt = 0 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTL z2 z1:(SHRLconst [31] (SHLLconst [31] x)))) @@ -59886,13 +59680,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags) v0.AuxInt = 0 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTQ z1:(SHRQconst [63] x) z2)) @@ -59909,13 +59701,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 63 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTQ z2 z1:(SHRQconst [63] x))) @@ -59933,13 +59723,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags) v0.AuxInt = 63 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTL z1:(SHRLconst [31] x) z2)) @@ -59956,13 +59744,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags) v0.AuxInt = 31 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTL z2 z1:(SHRLconst [31] x))) @@ -59980,13 +59766,11 @@ func rewriteBlockAMD64(b *Block) bool { if !(z1 == z2 && !config.nacl) { break } - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags) v0.AuxInt = 31 v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no) @@ -60003,10 +59787,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETGF || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64UGT - b.ResetControls() + b.Reset(BlockAMD64UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no) @@ -60023,10 +59805,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETGF || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64UGT - b.ResetControls() + b.Reset(BlockAMD64UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no) @@ -60043,10 +59823,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETGEF || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no) @@ -60063,10 +59841,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETGEF || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no) @@ -60083,10 +59859,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETEQF || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64EQF - b.ResetControls() + b.Reset(BlockAMD64EQF) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no) @@ -60103,10 +59877,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETEQF || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64EQF - b.ResetControls() + b.Reset(BlockAMD64EQF) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no) @@ -60123,10 +59895,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETNEF || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64NEF - b.ResetControls() + b.Reset(BlockAMD64NEF) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no) @@ -60143,10 +59913,8 @@ func rewriteBlockAMD64(b *Block) bool { if v_0_1.Op != OpAMD64SETNEF || cmp != v_0_1.Args[0] { break } - b.Kind = BlockAMD64NEF - b.ResetControls() + b.Reset(BlockAMD64NEF) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (InvertFlags cmp) yes no) @@ -60154,51 +59922,39 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64NE - b.ResetControls() + b.Reset(BlockAMD64NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (NE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case BlockAMD64UGE: @@ -60207,52 +59963,40 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64ULE - b.ResetControls() + b.Reset(BlockAMD64ULE) b.AddControl(cmp) - b.Aux = nil return true } // match: (UGE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGE (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGE (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case BlockAMD64UGT: @@ -60261,53 +60005,41 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64ULT - b.ResetControls() + b.Reset(BlockAMD64ULT) b.AddControl(cmp) - b.Aux = nil return true } // match: (UGT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGT (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case BlockAMD64ULE: @@ -60316,51 +60048,39 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64UGE - b.ResetControls() + b.Reset(BlockAMD64UGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (ULE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -60370,52 +60090,40 @@ func rewriteBlockAMD64(b *Block) bool { for b.Controls[0].Op == OpAMD64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockAMD64UGT - b.ResetControls() + b.Reset(BlockAMD64UGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (ULT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULT (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULT (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULT (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpAMD64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULT (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpAMD64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } diff --git a/src/cmd/compile/internal/ssa/rewriteARM.go b/src/cmd/compile/internal/ssa/rewriteARM.go index b51799743b..f6b0cef5ec 100644 --- a/src/cmd/compile/internal/ssa/rewriteARM.go +++ b/src/cmd/compile/internal/ssa/rewriteARM.go @@ -20659,44 +20659,34 @@ func rewriteBlockARM(b *Block) bool { // match: (EQ (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (EQ (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -20705,10 +20695,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMInvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(SUB x y)) yes no) @@ -20728,13 +20716,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(MULS x y a)) yes no) @@ -20755,8 +20741,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -20764,7 +20749,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(SUBconst [c] x)) yes no) @@ -20784,13 +20768,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(SUBshiftLL x y [c])) yes no) @@ -20811,14 +20793,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(SUBshiftRL x y [c])) yes no) @@ -20839,14 +20819,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(SUBshiftRA x y [c])) yes no) @@ -20867,14 +20845,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no) @@ -20895,14 +20871,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no) @@ -20923,14 +20897,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no) @@ -20951,14 +20923,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ADD x y)) yes no) @@ -20978,13 +20948,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(MULA x y a)) yes no) @@ -21005,8 +20973,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -21014,7 +20981,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ADDconst [c] x)) yes no) @@ -21034,13 +21000,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ADDshiftLL x y [c])) yes no) @@ -21061,14 +21025,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ADDshiftRL x y [c])) yes no) @@ -21089,14 +21051,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ADDshiftRA x y [c])) yes no) @@ -21117,14 +21077,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no) @@ -21145,14 +21103,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no) @@ -21173,14 +21129,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no) @@ -21201,14 +21155,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(AND x y)) yes no) @@ -21228,13 +21180,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ANDconst [c] x)) yes no) @@ -21254,13 +21204,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ANDshiftLL x y [c])) yes no) @@ -21281,14 +21229,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ANDshiftRL x y [c])) yes no) @@ -21309,14 +21255,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ANDshiftRA x y [c])) yes no) @@ -21337,14 +21281,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no) @@ -21365,14 +21307,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no) @@ -21393,14 +21333,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no) @@ -21421,14 +21359,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(XOR x y)) yes no) @@ -21448,13 +21384,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(XORconst [c] x)) yes no) @@ -21474,13 +21408,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(XORshiftLL x y [c])) yes no) @@ -21501,14 +21433,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(XORshiftRL x y [c])) yes no) @@ -21529,14 +21459,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(XORshiftRA x y [c])) yes no) @@ -21557,14 +21485,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(XORshiftLLreg x y z)) yes no) @@ -21585,14 +21511,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(XORshiftRLreg x y z)) yes no) @@ -21613,14 +21537,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] l:(XORshiftRAreg x y z)) yes no) @@ -21641,57 +21563,45 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } case BlockARMGE: // match: (GE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GE (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (InvertFlags cmp) yes no) @@ -21699,10 +21609,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMInvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) b.AddControl(cmp) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(SUB x y)) yes no) @@ -21722,13 +21630,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(MULS x y a)) yes no) @@ -21749,8 +21655,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -21758,7 +21663,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(SUBconst [c] x)) yes no) @@ -21778,13 +21682,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(SUBshiftLL x y [c])) yes no) @@ -21805,14 +21707,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(SUBshiftRL x y [c])) yes no) @@ -21833,14 +21733,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(SUBshiftRA x y [c])) yes no) @@ -21861,14 +21759,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no) @@ -21889,14 +21785,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no) @@ -21917,14 +21811,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no) @@ -21945,14 +21837,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ADD x y)) yes no) @@ -21972,13 +21862,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(MULA x y a)) yes no) @@ -21999,8 +21887,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -22008,7 +21895,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ADDconst [c] x)) yes no) @@ -22028,13 +21914,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ADDshiftLL x y [c])) yes no) @@ -22055,14 +21939,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ADDshiftRL x y [c])) yes no) @@ -22083,14 +21965,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ADDshiftRA x y [c])) yes no) @@ -22111,14 +21991,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no) @@ -22139,14 +22017,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no) @@ -22167,14 +22043,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no) @@ -22195,14 +22069,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(AND x y)) yes no) @@ -22222,13 +22094,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ANDconst [c] x)) yes no) @@ -22248,13 +22118,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ANDshiftLL x y [c])) yes no) @@ -22275,14 +22143,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ANDshiftRL x y [c])) yes no) @@ -22303,14 +22169,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ANDshiftRA x y [c])) yes no) @@ -22331,14 +22195,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no) @@ -22359,14 +22221,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no) @@ -22387,14 +22247,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no) @@ -22415,14 +22273,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(XOR x y)) yes no) @@ -22442,13 +22298,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(XORconst [c] x)) yes no) @@ -22468,13 +22322,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(XORshiftLL x y [c])) yes no) @@ -22495,14 +22347,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(XORshiftRL x y [c])) yes no) @@ -22523,14 +22373,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(XORshiftRA x y [c])) yes no) @@ -22551,14 +22399,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(XORshiftLLreg x y z)) yes no) @@ -22579,14 +22425,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(XORshiftRLreg x y z)) yes no) @@ -22607,14 +22451,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] l:(XORshiftRAreg x y z)) yes no) @@ -22635,58 +22477,46 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } case BlockARMGT: // match: (GT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GT (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GT (InvertFlags cmp) yes no) @@ -22694,10 +22524,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMInvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) b.AddControl(cmp) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(SUB x y)) yes no) @@ -22717,13 +22545,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(MULS x y a)) yes no) @@ -22744,8 +22570,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -22753,7 +22578,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(SUBconst [c] x)) yes no) @@ -22773,13 +22597,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(SUBshiftLL x y [c])) yes no) @@ -22800,14 +22622,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(SUBshiftRL x y [c])) yes no) @@ -22828,14 +22648,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(SUBshiftRA x y [c])) yes no) @@ -22856,14 +22674,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no) @@ -22884,14 +22700,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no) @@ -22912,14 +22726,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no) @@ -22940,14 +22752,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ADD x y)) yes no) @@ -22967,13 +22777,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ADDconst [c] x)) yes no) @@ -22993,13 +22801,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ADDshiftLL x y [c])) yes no) @@ -23020,14 +22826,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ADDshiftRL x y [c])) yes no) @@ -23048,14 +22852,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ADDshiftRA x y [c])) yes no) @@ -23076,14 +22878,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no) @@ -23104,14 +22904,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no) @@ -23132,14 +22930,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no) @@ -23160,14 +22956,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(AND x y)) yes no) @@ -23187,13 +22981,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(MULA x y a)) yes no) @@ -23214,8 +23006,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -23223,7 +23014,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ANDconst [c] x)) yes no) @@ -23243,13 +23033,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ANDshiftLL x y [c])) yes no) @@ -23270,14 +23058,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ANDshiftRL x y [c])) yes no) @@ -23298,14 +23084,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ANDshiftRA x y [c])) yes no) @@ -23326,14 +23110,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no) @@ -23354,14 +23136,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no) @@ -23382,14 +23162,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no) @@ -23410,14 +23188,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(XOR x y)) yes no) @@ -23437,13 +23213,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(XORconst [c] x)) yes no) @@ -23463,13 +23237,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(XORshiftLL x y [c])) yes no) @@ -23490,14 +23262,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(XORshiftRL x y [c])) yes no) @@ -23518,14 +23288,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(XORshiftRA x y [c])) yes no) @@ -23546,14 +23314,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(XORshiftLLreg x y z)) yes no) @@ -23574,14 +23340,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(XORshiftRLreg x y z)) yes no) @@ -23602,14 +23366,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] l:(XORshiftRAreg x y z)) yes no) @@ -23630,14 +23392,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } case BlockIf: @@ -23646,10 +23406,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) b.AddControl(cc) - b.Aux = nil return true } // match: (If (NotEqual cc) yes no) @@ -23657,10 +23415,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMNotEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessThan cc) yes no) @@ -23668,10 +23424,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMLessThan { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessThanU cc) yes no) @@ -23679,10 +23433,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMLessThanU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARMULT - b.ResetControls() + b.Reset(BlockARMULT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessEqual cc) yes no) @@ -23690,10 +23442,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMLessEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessEqualU cc) yes no) @@ -23701,10 +23451,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMLessEqualU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARMULE - b.ResetControls() + b.Reset(BlockARMULE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterThan cc) yes no) @@ -23712,10 +23460,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMGreaterThan { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterThanU cc) yes no) @@ -23723,10 +23469,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMGreaterThanU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARMUGT - b.ResetControls() + b.Reset(BlockARMUGT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterEqual cc) yes no) @@ -23734,10 +23478,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMGreaterEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterEqualU cc) yes no) @@ -23745,65 +23487,51 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMGreaterEqualU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARMUGE - b.ResetControls() + b.Reset(BlockARMUGE) b.AddControl(cc) - b.Aux = nil return true } // match: (If cond yes no) // result: (NE (CMPconst [0] cond) yes no) for { cond := b.Controls[0] - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(cond.Pos, OpARMCMPconst, types.TypeFlags) v0.AuxInt = 0 v0.AddArg(cond) b.AddControl(v0) - b.Aux = nil return true } case BlockARMLE: // match: (LE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LE (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -23812,10 +23540,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMInvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) b.AddControl(cmp) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(SUB x y)) yes no) @@ -23835,13 +23561,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(MULS x y a)) yes no) @@ -23862,8 +23586,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -23871,7 +23594,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(SUBconst [c] x)) yes no) @@ -23891,13 +23613,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(SUBshiftLL x y [c])) yes no) @@ -23918,14 +23638,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(SUBshiftRL x y [c])) yes no) @@ -23946,14 +23664,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(SUBshiftRA x y [c])) yes no) @@ -23974,14 +23690,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no) @@ -24002,14 +23716,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no) @@ -24030,14 +23742,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no) @@ -24058,14 +23768,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ADD x y)) yes no) @@ -24085,13 +23793,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(MULA x y a)) yes no) @@ -24112,8 +23818,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -24121,7 +23826,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ADDconst [c] x)) yes no) @@ -24141,13 +23845,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ADDshiftLL x y [c])) yes no) @@ -24168,14 +23870,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ADDshiftRL x y [c])) yes no) @@ -24196,14 +23896,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ADDshiftRA x y [c])) yes no) @@ -24224,14 +23922,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no) @@ -24252,14 +23948,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no) @@ -24280,14 +23974,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no) @@ -24308,14 +24000,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(AND x y)) yes no) @@ -24335,13 +24025,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ANDconst [c] x)) yes no) @@ -24361,13 +24049,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ANDshiftLL x y [c])) yes no) @@ -24388,14 +24074,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ANDshiftRL x y [c])) yes no) @@ -24416,14 +24100,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ANDshiftRA x y [c])) yes no) @@ -24444,14 +24126,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no) @@ -24472,14 +24152,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no) @@ -24500,14 +24178,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no) @@ -24528,14 +24204,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(XOR x y)) yes no) @@ -24555,13 +24229,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(XORconst [c] x)) yes no) @@ -24581,13 +24253,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(XORshiftLL x y [c])) yes no) @@ -24608,14 +24278,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(XORshiftRL x y [c])) yes no) @@ -24636,14 +24304,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(XORshiftRA x y [c])) yes no) @@ -24664,14 +24330,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(XORshiftLLreg x y z)) yes no) @@ -24692,14 +24356,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(XORshiftRLreg x y z)) yes no) @@ -24720,14 +24382,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] l:(XORshiftRAreg x y z)) yes no) @@ -24748,57 +24408,45 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } case BlockARMLT: // match: (LT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LT (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LT (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LT (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LT (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -24807,10 +24455,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMInvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) b.AddControl(cmp) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(SUB x y)) yes no) @@ -24830,13 +24476,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(MULS x y a)) yes no) @@ -24857,8 +24501,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -24866,7 +24509,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(SUBconst [c] x)) yes no) @@ -24886,13 +24528,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(SUBshiftLL x y [c])) yes no) @@ -24913,14 +24553,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(SUBshiftRL x y [c])) yes no) @@ -24941,14 +24579,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(SUBshiftRA x y [c])) yes no) @@ -24969,14 +24605,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no) @@ -24997,14 +24631,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no) @@ -25025,14 +24657,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no) @@ -25053,14 +24683,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ADD x y)) yes no) @@ -25080,13 +24708,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(MULA x y a)) yes no) @@ -25107,8 +24733,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -25116,7 +24741,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ADDconst [c] x)) yes no) @@ -25136,13 +24760,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ADDshiftLL x y [c])) yes no) @@ -25163,14 +24785,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ADDshiftRL x y [c])) yes no) @@ -25191,14 +24811,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ADDshiftRA x y [c])) yes no) @@ -25219,14 +24837,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no) @@ -25247,14 +24863,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no) @@ -25275,14 +24889,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no) @@ -25303,14 +24915,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(AND x y)) yes no) @@ -25330,13 +24940,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ANDconst [c] x)) yes no) @@ -25356,13 +24964,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ANDshiftLL x y [c])) yes no) @@ -25383,14 +24989,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ANDshiftRL x y [c])) yes no) @@ -25411,14 +25015,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ANDshiftRA x y [c])) yes no) @@ -25439,14 +25041,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no) @@ -25467,14 +25067,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no) @@ -25495,14 +25093,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no) @@ -25523,14 +25119,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(XOR x y)) yes no) @@ -25550,13 +25144,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(XORconst [c] x)) yes no) @@ -25576,13 +25168,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(XORshiftLL x y [c])) yes no) @@ -25603,14 +25193,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(XORshiftRL x y [c])) yes no) @@ -25631,14 +25219,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(XORshiftRA x y [c])) yes no) @@ -25659,14 +25245,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(XORshiftLLreg x y z)) yes no) @@ -25687,14 +25271,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(XORshiftRLreg x y z)) yes no) @@ -25715,14 +25297,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] l:(XORshiftRAreg x y z)) yes no) @@ -25743,14 +25323,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } case BlockARMNE: @@ -25766,10 +25344,8 @@ func rewriteBlockARM(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockARMEQ - b.ResetControls() + b.Reset(BlockARMEQ) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPconst [0] (NotEqual cc)) yes no) @@ -25784,10 +25360,8 @@ func rewriteBlockARM(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPconst [0] (LessThan cc)) yes no) @@ -25802,10 +25376,8 @@ func rewriteBlockARM(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockARMLT - b.ResetControls() + b.Reset(BlockARMLT) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPconst [0] (LessThanU cc)) yes no) @@ -25820,10 +25392,8 @@ func rewriteBlockARM(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockARMULT - b.ResetControls() + b.Reset(BlockARMULT) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPconst [0] (LessEqual cc)) yes no) @@ -25838,10 +25408,8 @@ func rewriteBlockARM(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockARMLE - b.ResetControls() + b.Reset(BlockARMLE) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPconst [0] (LessEqualU cc)) yes no) @@ -25856,10 +25424,8 @@ func rewriteBlockARM(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockARMULE - b.ResetControls() + b.Reset(BlockARMULE) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPconst [0] (GreaterThan cc)) yes no) @@ -25874,10 +25440,8 @@ func rewriteBlockARM(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockARMGT - b.ResetControls() + b.Reset(BlockARMGT) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPconst [0] (GreaterThanU cc)) yes no) @@ -25892,10 +25456,8 @@ func rewriteBlockARM(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockARMUGT - b.ResetControls() + b.Reset(BlockARMUGT) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPconst [0] (GreaterEqual cc)) yes no) @@ -25910,10 +25472,8 @@ func rewriteBlockARM(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockARMGE - b.ResetControls() + b.Reset(BlockARMGE) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPconst [0] (GreaterEqualU cc)) yes no) @@ -25928,51 +25488,39 @@ func rewriteBlockARM(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockARMUGE - b.ResetControls() + b.Reset(BlockARMUGE) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (NE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (InvertFlags cmp) yes no) @@ -25980,10 +25528,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMInvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(SUB x y)) yes no) @@ -26003,13 +25549,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(MULS x y a)) yes no) @@ -26030,8 +25574,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -26039,7 +25582,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(SUBconst [c] x)) yes no) @@ -26059,13 +25601,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(SUBshiftLL x y [c])) yes no) @@ -26086,14 +25626,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(SUBshiftRL x y [c])) yes no) @@ -26114,14 +25652,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(SUBshiftRA x y [c])) yes no) @@ -26142,14 +25678,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no) @@ -26170,14 +25704,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no) @@ -26198,14 +25730,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no) @@ -26226,14 +25756,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ADD x y)) yes no) @@ -26253,13 +25781,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(MULA x y a)) yes no) @@ -26280,8 +25806,7 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type) @@ -26289,7 +25814,6 @@ func rewriteBlockARM(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ADDconst [c] x)) yes no) @@ -26309,13 +25833,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ADDshiftLL x y [c])) yes no) @@ -26336,14 +25858,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ADDshiftRL x y [c])) yes no) @@ -26364,14 +25884,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ADDshiftRA x y [c])) yes no) @@ -26392,14 +25910,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no) @@ -26420,14 +25936,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no) @@ -26448,14 +25962,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no) @@ -26476,14 +25988,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(AND x y)) yes no) @@ -26503,13 +26013,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ANDconst [c] x)) yes no) @@ -26529,13 +26037,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ANDshiftLL x y [c])) yes no) @@ -26556,14 +26062,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ANDshiftRL x y [c])) yes no) @@ -26584,14 +26088,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ANDshiftRA x y [c])) yes no) @@ -26612,14 +26114,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no) @@ -26640,14 +26140,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no) @@ -26668,14 +26166,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no) @@ -26696,14 +26192,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(XOR x y)) yes no) @@ -26723,13 +26217,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(XORconst [c] x)) yes no) @@ -26749,13 +26241,11 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(XORshiftLL x y [c])) yes no) @@ -26776,14 +26266,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(XORshiftRL x y [c])) yes no) @@ -26804,14 +26292,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(XORshiftRA x y [c])) yes no) @@ -26832,14 +26318,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(XORshiftLLreg x y z)) yes no) @@ -26860,14 +26344,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(XORshiftRLreg x y z)) yes no) @@ -26888,14 +26370,12 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] l:(XORshiftRAreg x y z)) yes no) @@ -26916,57 +26396,45 @@ func rewriteBlockARM(b *Block) bool { if !(l.Uses == 1) { break } - b.Kind = BlockARMNE - b.ResetControls() + b.Reset(BlockARMNE) v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) v0.AddArg(z) b.AddControl(v0) - b.Aux = nil return true } case BlockARMUGE: // match: (UGE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGE (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGE (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGE (InvertFlags cmp) yes no) @@ -26974,54 +26442,42 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMInvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARMULE - b.ResetControls() + b.Reset(BlockARMULE) b.AddControl(cmp) - b.Aux = nil return true } case BlockARMUGT: // match: (UGT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGT (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGT (InvertFlags cmp) yes no) @@ -27029,52 +26485,40 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMInvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARMULT - b.ResetControls() + b.Reset(BlockARMULT) b.AddControl(cmp) - b.Aux = nil return true } case BlockARMULE: // match: (ULE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -27083,53 +26527,41 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMInvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARMUGE - b.ResetControls() + b.Reset(BlockARMUGE) b.AddControl(cmp) - b.Aux = nil return true } case BlockARMULT: // match: (ULT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULT (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULT (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULT (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARMFlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULT (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARMFlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -27138,10 +26570,8 @@ func rewriteBlockARM(b *Block) bool { for b.Controls[0].Op == OpARMInvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARMUGT - b.ResetControls() + b.Reset(BlockARMUGT) b.AddControl(cmp) - b.Aux = nil return true } } diff --git a/src/cmd/compile/internal/ssa/rewriteARM64.go b/src/cmd/compile/internal/ssa/rewriteARM64.go index 66db390e59..dfb5554f62 100644 --- a/src/cmd/compile/internal/ssa/rewriteARM64.go +++ b/src/cmd/compile/internal/ssa/rewriteARM64.go @@ -33299,13 +33299,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] z:(AND x y)) yes no) @@ -33325,13 +33323,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPWconst [0] z:(AND x y)) yes no) @@ -33351,13 +33347,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] x:(ANDconst [c] y)) yes no) @@ -33377,13 +33371,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] x:(ADDconst [c] y)) yes no) @@ -33403,13 +33395,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPWconst [0] x:(ADDconst [c] y)) yes no) @@ -33429,13 +33419,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] z:(ADD x y)) yes no) @@ -33455,13 +33443,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPWconst [0] z:(ADD x y)) yes no) @@ -33481,13 +33467,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMP x z:(NEG y)) yes no) @@ -33505,13 +33489,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPW x z:(NEG y)) yes no) @@ -33529,13 +33511,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] x) yes no) @@ -33546,10 +33526,8 @@ func rewriteBlockARM64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockARM64Z - b.ResetControls() + b.Reset(BlockARM64Z) b.AddControl(x) - b.Aux = nil return true } // match: (EQ (CMPWconst [0] x) yes no) @@ -33560,10 +33538,8 @@ func rewriteBlockARM64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockARM64ZW - b.ResetControls() + b.Reset(BlockARM64ZW) b.AddControl(x) - b.Aux = nil return true } // match: (EQ (CMPconst [0] z:(MADD a x y)) yes no) @@ -33584,8 +33560,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -33593,7 +33568,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] z:(MSUB a x y)) yes no) @@ -33614,8 +33588,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -33623,7 +33596,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPWconst [0] z:(MADDW a x y)) yes no) @@ -33644,8 +33616,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -33653,7 +33624,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPWconst [0] z:(MSUBW a x y)) yes no) @@ -33674,8 +33644,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -33683,7 +33652,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (TSTconst [c] x) yes no) @@ -33696,8 +33664,7 @@ func rewriteBlockARM64(b *Block) bool { if !(oneBit(c)) { break } - b.Kind = BlockARM64TBZ - b.ResetControls() + b.Reset(BlockARM64TBZ) b.AddControl(x) b.Aux = ntz(c) return true @@ -33712,8 +33679,7 @@ func rewriteBlockARM64(b *Block) bool { if !(oneBit(int64(uint32(c)))) { break } - b.Kind = BlockARM64TBZ - b.ResetControls() + b.Reset(BlockARM64TBZ) b.AddControl(x) b.Aux = ntz(int64(uint32(c))) return true @@ -33721,44 +33687,34 @@ func rewriteBlockARM64(b *Block) bool { // match: (EQ (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (EQ (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -33767,10 +33723,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64FGE: @@ -33779,10 +33733,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64FLE - b.ResetControls() + b.Reset(BlockARM64FLE) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64FGT: @@ -33791,10 +33743,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64FLT - b.ResetControls() + b.Reset(BlockARM64FLT) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64FLE: @@ -33803,10 +33753,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64FGE - b.ResetControls() + b.Reset(BlockARM64FGE) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64FLT: @@ -33815,10 +33763,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64FGT - b.ResetControls() + b.Reset(BlockARM64FGT) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64GE: @@ -33839,13 +33785,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] z:(AND x y)) yes no) @@ -33865,13 +33809,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPWconst [0] z:(AND x y)) yes no) @@ -33891,13 +33833,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] x:(ANDconst [c] y)) yes no) @@ -33917,13 +33857,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] x:(ADDconst [c] y)) yes no) @@ -33943,13 +33881,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPWconst [0] x:(ADDconst [c] y)) yes no) @@ -33969,13 +33905,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] z:(ADD x y)) yes no) @@ -33995,13 +33929,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPWconst [0] z:(ADD x y)) yes no) @@ -34021,13 +33953,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMP x z:(NEG y)) yes no) @@ -34045,13 +33975,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPW x z:(NEG y)) yes no) @@ -34069,13 +33997,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] z:(MADD a x y)) yes no) @@ -34096,8 +34022,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -34105,7 +34030,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] z:(MSUB a x y)) yes no) @@ -34126,8 +34050,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -34135,7 +34058,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPWconst [0] z:(MADDW a x y)) yes no) @@ -34156,8 +34078,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -34165,7 +34086,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPWconst [0] z:(MSUBW a x y)) yes no) @@ -34186,8 +34106,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -34195,7 +34114,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPWconst [0] x) yes no) @@ -34206,8 +34124,7 @@ func rewriteBlockARM64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockARM64TBZ - b.ResetControls() + b.Reset(BlockARM64TBZ) b.AddControl(x) b.Aux = int64(31) return true @@ -34220,8 +34137,7 @@ func rewriteBlockARM64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockARM64TBZ - b.ResetControls() + b.Reset(BlockARM64TBZ) b.AddControl(x) b.Aux = int64(63) return true @@ -34229,43 +34145,33 @@ func rewriteBlockARM64(b *Block) bool { // match: (GE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GE (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (InvertFlags cmp) yes no) @@ -34273,10 +34179,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64GT: @@ -34297,13 +34201,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] z:(AND x y)) yes no) @@ -34323,13 +34225,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPWconst [0] z:(AND x y)) yes no) @@ -34349,13 +34249,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] x:(ANDconst [c] y)) yes no) @@ -34375,13 +34273,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] x:(ADDconst [c] y)) yes no) @@ -34401,13 +34297,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPWconst [0] x:(ADDconst [c] y)) yes no) @@ -34427,13 +34321,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] z:(ADD x y)) yes no) @@ -34453,13 +34345,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPWconst [0] z:(ADD x y)) yes no) @@ -34479,13 +34369,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMP x z:(NEG y)) yes no) @@ -34503,13 +34391,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPW x z:(NEG y)) yes no) @@ -34527,13 +34413,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] z:(MADD a x y)) yes no) @@ -34554,8 +34438,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -34563,7 +34446,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] z:(MSUB a x y)) yes no) @@ -34584,8 +34466,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -34593,7 +34474,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPWconst [0] z:(MADDW a x y)) yes no) @@ -34614,8 +34494,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -34623,7 +34502,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPWconst [0] z:(MSUBW a x y)) yes no) @@ -34644,8 +34522,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -34653,50 +34530,39 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GT (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GT (InvertFlags cmp) yes no) @@ -34704,10 +34570,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) b.AddControl(cmp) - b.Aux = nil return true } case BlockIf: @@ -34716,10 +34580,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64Equal { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) b.AddControl(cc) - b.Aux = nil return true } // match: (If (NotEqual cc) yes no) @@ -34727,10 +34589,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64NotEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessThan cc) yes no) @@ -34738,10 +34598,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessThan { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessThanU cc) yes no) @@ -34749,10 +34607,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessThanU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64ULT - b.ResetControls() + b.Reset(BlockARM64ULT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessEqual cc) yes no) @@ -34760,10 +34616,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessEqualU cc) yes no) @@ -34771,10 +34625,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessEqualU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64ULE - b.ResetControls() + b.Reset(BlockARM64ULE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterThan cc) yes no) @@ -34782,10 +34634,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterThan { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterThanU cc) yes no) @@ -34793,10 +34643,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterThanU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64UGT - b.ResetControls() + b.Reset(BlockARM64UGT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterEqual cc) yes no) @@ -34804,10 +34652,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterEqualU cc) yes no) @@ -34815,10 +34661,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterEqualU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64UGE - b.ResetControls() + b.Reset(BlockARM64UGE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessThanF cc) yes no) @@ -34826,10 +34670,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessThanF { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64FLT - b.ResetControls() + b.Reset(BlockARM64FLT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessEqualF cc) yes no) @@ -34837,10 +34679,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessEqualF { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64FLE - b.ResetControls() + b.Reset(BlockARM64FLE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterThanF cc) yes no) @@ -34848,10 +34688,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterThanF { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64FGT - b.ResetControls() + b.Reset(BlockARM64FGT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterEqualF cc) yes no) @@ -34859,20 +34697,16 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterEqualF { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64FGE - b.ResetControls() + b.Reset(BlockARM64FGE) b.AddControl(cc) - b.Aux = nil return true } // match: (If cond yes no) // result: (NZ cond yes no) for { cond := b.Controls[0] - b.Kind = BlockARM64NZ - b.ResetControls() + b.Reset(BlockARM64NZ) b.AddControl(cond) - b.Aux = nil return true } case BlockARM64LE: @@ -34893,13 +34727,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] z:(AND x y)) yes no) @@ -34919,13 +34751,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPWconst [0] z:(AND x y)) yes no) @@ -34945,13 +34775,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] x:(ANDconst [c] y)) yes no) @@ -34971,13 +34799,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] x:(ADDconst [c] y)) yes no) @@ -34997,13 +34823,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPWconst [0] x:(ADDconst [c] y)) yes no) @@ -35023,13 +34847,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] z:(ADD x y)) yes no) @@ -35049,13 +34871,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPWconst [0] z:(ADD x y)) yes no) @@ -35075,13 +34895,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMP x z:(NEG y)) yes no) @@ -35099,13 +34917,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPW x z:(NEG y)) yes no) @@ -35123,13 +34939,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] z:(MADD a x y)) yes no) @@ -35150,8 +34964,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -35159,7 +34972,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] z:(MSUB a x y)) yes no) @@ -35180,8 +34992,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -35189,7 +35000,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPWconst [0] z:(MADDW a x y)) yes no) @@ -35210,8 +35020,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -35219,7 +35028,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPWconst [0] z:(MSUBW a x y)) yes no) @@ -35240,8 +35048,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -35249,48 +35056,37 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LE (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -35299,10 +35095,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64LT: @@ -35323,13 +35117,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] z:(AND x y)) yes no) @@ -35349,13 +35141,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPWconst [0] z:(AND x y)) yes no) @@ -35375,13 +35165,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] x:(ANDconst [c] y)) yes no) @@ -35401,13 +35189,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] x:(ADDconst [c] y)) yes no) @@ -35427,13 +35213,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPWconst [0] x:(ADDconst [c] y)) yes no) @@ -35453,13 +35237,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] z:(ADD x y)) yes no) @@ -35479,13 +35261,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPWconst [0] z:(ADD x y)) yes no) @@ -35505,13 +35285,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMP x z:(NEG y)) yes no) @@ -35529,13 +35307,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPW x z:(NEG y)) yes no) @@ -35553,13 +35329,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] z:(MADD a x y)) yes no) @@ -35580,8 +35354,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -35589,7 +35362,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] z:(MSUB a x y)) yes no) @@ -35610,8 +35382,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -35619,7 +35390,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPWconst [0] z:(MADDW a x y)) yes no) @@ -35640,8 +35410,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -35649,7 +35418,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPWconst [0] z:(MSUBW a x y)) yes no) @@ -35670,8 +35438,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -35679,7 +35446,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPWconst [0] x) yes no) @@ -35690,8 +35456,7 @@ func rewriteBlockARM64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockARM64TBNZ - b.ResetControls() + b.Reset(BlockARM64TBNZ) b.AddControl(x) b.Aux = int64(31) return true @@ -35704,8 +35469,7 @@ func rewriteBlockARM64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockARM64TBNZ - b.ResetControls() + b.Reset(BlockARM64TBNZ) b.AddControl(x) b.Aux = int64(63) return true @@ -35713,43 +35477,33 @@ func rewriteBlockARM64(b *Block) bool { // match: (LT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LT (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LT (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LT (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LT (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -35758,10 +35512,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64NE: @@ -35782,13 +35534,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] z:(AND x y)) yes no) @@ -35808,13 +35558,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPWconst [0] z:(AND x y)) yes no) @@ -35834,13 +35582,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] x:(ANDconst [c] y)) yes no) @@ -35860,13 +35606,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] x:(ADDconst [c] y)) yes no) @@ -35886,13 +35630,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPWconst [0] x:(ADDconst [c] y)) yes no) @@ -35912,13 +35654,11 @@ func rewriteBlockARM64(b *Block) bool { if !(x.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] z:(ADD x y)) yes no) @@ -35938,13 +35678,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPWconst [0] z:(ADD x y)) yes no) @@ -35964,13 +35702,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMP x z:(NEG y)) yes no) @@ -35988,13 +35724,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPW x z:(NEG y)) yes no) @@ -36012,13 +35746,11 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] x) yes no) @@ -36029,10 +35761,8 @@ func rewriteBlockARM64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockARM64NZ - b.ResetControls() + b.Reset(BlockARM64NZ) b.AddControl(x) - b.Aux = nil return true } // match: (NE (CMPWconst [0] x) yes no) @@ -36043,10 +35773,8 @@ func rewriteBlockARM64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockARM64NZW - b.ResetControls() + b.Reset(BlockARM64NZW) b.AddControl(x) - b.Aux = nil return true } // match: (NE (CMPconst [0] z:(MADD a x y)) yes no) @@ -36067,8 +35795,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -36076,7 +35803,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] z:(MSUB a x y)) yes no) @@ -36097,8 +35823,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type) @@ -36106,7 +35831,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPWconst [0] z:(MADDW a x y)) yes no) @@ -36127,8 +35851,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -36136,7 +35859,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPWconst [0] z:(MSUBW a x y)) yes no) @@ -36157,8 +35879,7 @@ func rewriteBlockARM64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags) v0.AddArg(a) v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type) @@ -36166,7 +35887,6 @@ func rewriteBlockARM64(b *Block) bool { v1.AddArg(y) v0.AddArg(v1) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (TSTconst [c] x) yes no) @@ -36179,8 +35899,7 @@ func rewriteBlockARM64(b *Block) bool { if !(oneBit(c)) { break } - b.Kind = BlockARM64TBNZ - b.ResetControls() + b.Reset(BlockARM64TBNZ) b.AddControl(x) b.Aux = ntz(c) return true @@ -36195,8 +35914,7 @@ func rewriteBlockARM64(b *Block) bool { if !(oneBit(int64(uint32(c)))) { break } - b.Kind = BlockARM64TBNZ - b.ResetControls() + b.Reset(BlockARM64TBNZ) b.AddControl(x) b.Aux = ntz(int64(uint32(c))) return true @@ -36204,42 +35922,32 @@ func rewriteBlockARM64(b *Block) bool { // match: (NE (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (NE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (InvertFlags cmp) yes no) @@ -36247,10 +35955,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64NZ: @@ -36259,10 +35965,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64Equal { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64EQ - b.ResetControls() + b.Reset(BlockARM64EQ) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (NotEqual cc) yes no) @@ -36270,10 +35974,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64NotEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64NE - b.ResetControls() + b.Reset(BlockARM64NE) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (LessThan cc) yes no) @@ -36281,10 +35983,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessThan { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64LT - b.ResetControls() + b.Reset(BlockARM64LT) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (LessThanU cc) yes no) @@ -36292,10 +35992,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessThanU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64ULT - b.ResetControls() + b.Reset(BlockARM64ULT) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (LessEqual cc) yes no) @@ -36303,10 +36001,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64LE - b.ResetControls() + b.Reset(BlockARM64LE) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (LessEqualU cc) yes no) @@ -36314,10 +36010,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessEqualU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64ULE - b.ResetControls() + b.Reset(BlockARM64ULE) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (GreaterThan cc) yes no) @@ -36325,10 +36019,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterThan { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64GT - b.ResetControls() + b.Reset(BlockARM64GT) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (GreaterThanU cc) yes no) @@ -36336,10 +36028,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterThanU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64UGT - b.ResetControls() + b.Reset(BlockARM64UGT) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (GreaterEqual cc) yes no) @@ -36347,10 +36037,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64GE - b.ResetControls() + b.Reset(BlockARM64GE) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (GreaterEqualU cc) yes no) @@ -36358,10 +36046,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterEqualU { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64UGE - b.ResetControls() + b.Reset(BlockARM64UGE) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (LessThanF cc) yes no) @@ -36369,10 +36055,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessThanF { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64FLT - b.ResetControls() + b.Reset(BlockARM64FLT) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (LessEqualF cc) yes no) @@ -36380,10 +36064,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64LessEqualF { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64FLE - b.ResetControls() + b.Reset(BlockARM64FLE) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (GreaterThanF cc) yes no) @@ -36391,10 +36073,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterThanF { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64FGT - b.ResetControls() + b.Reset(BlockARM64FGT) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (GreaterEqualF cc) yes no) @@ -36402,10 +36082,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64GreaterEqualF { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockARM64FGE - b.ResetControls() + b.Reset(BlockARM64FGE) b.AddControl(cc) - b.Aux = nil return true } // match: (NZ (ANDconst [c] x) yes no) @@ -36418,8 +36096,7 @@ func rewriteBlockARM64(b *Block) bool { if !(oneBit(c)) { break } - b.Kind = BlockARM64TBNZ - b.ResetControls() + b.Reset(BlockARM64TBNZ) b.AddControl(x) b.Aux = ntz(c) return true @@ -36431,9 +36108,7 @@ func rewriteBlockARM64(b *Block) bool { if v_0.AuxInt != 0 { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -36446,9 +36121,7 @@ func rewriteBlockARM64(b *Block) bool { if !(c != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case BlockARM64NZW: @@ -36462,8 +36135,7 @@ func rewriteBlockARM64(b *Block) bool { if !(oneBit(int64(uint32(c)))) { break } - b.Kind = BlockARM64TBNZ - b.ResetControls() + b.Reset(BlockARM64TBNZ) b.AddControl(x) b.Aux = ntz(int64(uint32(c))) return true @@ -36477,9 +36149,7 @@ func rewriteBlockARM64(b *Block) bool { if !(int32(c) == 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -36492,52 +36162,40 @@ func rewriteBlockARM64(b *Block) bool { if !(int32(c) != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } case BlockARM64UGE: // match: (UGE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGE (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGE (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGE (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGE (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGE (InvertFlags cmp) yes no) @@ -36545,54 +36203,42 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64ULE - b.ResetControls() + b.Reset(BlockARM64ULE) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64UGT: // match: (UGT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagLT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagLT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGT (FlagGT_ULT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (UGT (FlagGT_UGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (UGT (InvertFlags cmp) yes no) @@ -36600,52 +36246,40 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64ULT - b.ResetControls() + b.Reset(BlockARM64ULT) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64ULE: // match: (ULE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULE (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULE (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -36654,53 +36288,41 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64UGE - b.ResetControls() + b.Reset(BlockARM64UGE) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64ULT: // match: (ULT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULT (FlagLT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagLT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULT (FlagLT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagLT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (ULT (FlagGT_ULT) yes no) // result: (First yes no) for b.Controls[0].Op == OpARM64FlagGT_ULT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ULT (FlagGT_UGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpARM64FlagGT_UGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -36709,10 +36331,8 @@ func rewriteBlockARM64(b *Block) bool { for b.Controls[0].Op == OpARM64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockARM64UGT - b.ResetControls() + b.Reset(BlockARM64UGT) b.AddControl(cmp) - b.Aux = nil return true } case BlockARM64Z: @@ -36726,8 +36346,7 @@ func rewriteBlockARM64(b *Block) bool { if !(oneBit(c)) { break } - b.Kind = BlockARM64TBZ - b.ResetControls() + b.Reset(BlockARM64TBZ) b.AddControl(x) b.Aux = ntz(c) return true @@ -36739,9 +36358,7 @@ func rewriteBlockARM64(b *Block) bool { if v_0.AuxInt != 0 { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (Z (MOVDconst [c]) yes no) @@ -36753,9 +36370,7 @@ func rewriteBlockARM64(b *Block) bool { if !(c != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -36770,8 +36385,7 @@ func rewriteBlockARM64(b *Block) bool { if !(oneBit(int64(uint32(c)))) { break } - b.Kind = BlockARM64TBZ - b.ResetControls() + b.Reset(BlockARM64TBZ) b.AddControl(x) b.Aux = ntz(int64(uint32(c))) return true @@ -36785,9 +36399,7 @@ func rewriteBlockARM64(b *Block) bool { if !(int32(c) == 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (ZW (MOVDconst [c]) yes no) @@ -36799,9 +36411,7 @@ func rewriteBlockARM64(b *Block) bool { if !(int32(c) != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } diff --git a/src/cmd/compile/internal/ssa/rewriteMIPS.go b/src/cmd/compile/internal/ssa/rewriteMIPS.go index 3ae2a72457..72e596517f 100644 --- a/src/cmd/compile/internal/ssa/rewriteMIPS.go +++ b/src/cmd/compile/internal/ssa/rewriteMIPS.go @@ -9002,10 +9002,8 @@ func rewriteBlockMIPS(b *Block) bool { for b.Controls[0].Op == OpMIPSFPFlagTrue { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockMIPSFPF - b.ResetControls() + b.Reset(BlockMIPSFPF) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (FPFlagFalse cmp) yes no) @@ -9013,10 +9011,8 @@ func rewriteBlockMIPS(b *Block) bool { for b.Controls[0].Op == OpMIPSFPFlagFalse { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockMIPSFPT - b.ResetControls() + b.Reset(BlockMIPSFPT) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no) @@ -9031,10 +9027,8 @@ func rewriteBlockMIPS(b *Block) bool { break } _ = cmp.Args[1] - b.Kind = BlockMIPSNE - b.ResetControls() + b.Reset(BlockMIPSNE) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no) @@ -9049,10 +9043,8 @@ func rewriteBlockMIPS(b *Block) bool { break } _ = cmp.Args[1] - b.Kind = BlockMIPSNE - b.ResetControls() + b.Reset(BlockMIPSNE) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no) @@ -9066,10 +9058,8 @@ func rewriteBlockMIPS(b *Block) bool { if cmp.Op != OpMIPSSGTconst { break } - b.Kind = BlockMIPSNE - b.ResetControls() + b.Reset(BlockMIPSNE) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no) @@ -9083,10 +9073,8 @@ func rewriteBlockMIPS(b *Block) bool { if cmp.Op != OpMIPSSGTUconst { break } - b.Kind = BlockMIPSNE - b.ResetControls() + b.Reset(BlockMIPSNE) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (XORconst [1] cmp:(SGTzero _)) yes no) @@ -9100,10 +9088,8 @@ func rewriteBlockMIPS(b *Block) bool { if cmp.Op != OpMIPSSGTzero { break } - b.Kind = BlockMIPSNE - b.ResetControls() + b.Reset(BlockMIPSNE) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (XORconst [1] cmp:(SGTUzero _)) yes no) @@ -9117,10 +9103,8 @@ func rewriteBlockMIPS(b *Block) bool { if cmp.Op != OpMIPSSGTUzero { break } - b.Kind = BlockMIPSNE - b.ResetControls() + b.Reset(BlockMIPSNE) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (SGTUconst [1] x) yes no) @@ -9131,10 +9115,8 @@ func rewriteBlockMIPS(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockMIPSNE - b.ResetControls() + b.Reset(BlockMIPSNE) b.AddControl(x) - b.Aux = nil return true } // match: (EQ (SGTUzero x) yes no) @@ -9142,10 +9124,8 @@ func rewriteBlockMIPS(b *Block) bool { for b.Controls[0].Op == OpMIPSSGTUzero { v_0 := b.Controls[0] x := v_0.Args[0] - b.Kind = BlockMIPSEQ - b.ResetControls() + b.Reset(BlockMIPSEQ) b.AddControl(x) - b.Aux = nil return true } // match: (EQ (SGTconst [0] x) yes no) @@ -9156,10 +9136,8 @@ func rewriteBlockMIPS(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockMIPSGEZ - b.ResetControls() + b.Reset(BlockMIPSGEZ) b.AddControl(x) - b.Aux = nil return true } // match: (EQ (SGTzero x) yes no) @@ -9167,10 +9145,8 @@ func rewriteBlockMIPS(b *Block) bool { for b.Controls[0].Op == OpMIPSSGTzero { v_0 := b.Controls[0] x := v_0.Args[0] - b.Kind = BlockMIPSLEZ - b.ResetControls() + b.Reset(BlockMIPSLEZ) b.AddControl(x) - b.Aux = nil return true } // match: (EQ (MOVWconst [0]) yes no) @@ -9180,9 +9156,7 @@ func rewriteBlockMIPS(b *Block) bool { if v_0.AuxInt != 0 { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (EQ (MOVWconst [c]) yes no) @@ -9194,9 +9168,7 @@ func rewriteBlockMIPS(b *Block) bool { if !(c != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -9210,9 +9182,7 @@ func rewriteBlockMIPS(b *Block) bool { if !(int32(c) >= 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GEZ (MOVWconst [c]) yes no) @@ -9224,9 +9194,7 @@ func rewriteBlockMIPS(b *Block) bool { if !(int32(c) < 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -9240,9 +9208,7 @@ func rewriteBlockMIPS(b *Block) bool { if !(int32(c) > 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GTZ (MOVWconst [c]) yes no) @@ -9254,9 +9220,7 @@ func rewriteBlockMIPS(b *Block) bool { if !(int32(c) <= 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -9265,10 +9229,8 @@ func rewriteBlockMIPS(b *Block) bool { // result: (NE cond yes no) for { cond := b.Controls[0] - b.Kind = BlockMIPSNE - b.ResetControls() + b.Reset(BlockMIPSNE) b.AddControl(cond) - b.Aux = nil return true } case BlockMIPSLEZ: @@ -9281,9 +9243,7 @@ func rewriteBlockMIPS(b *Block) bool { if !(int32(c) <= 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LEZ (MOVWconst [c]) yes no) @@ -9295,9 +9255,7 @@ func rewriteBlockMIPS(b *Block) bool { if !(int32(c) > 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -9311,9 +9269,7 @@ func rewriteBlockMIPS(b *Block) bool { if !(int32(c) < 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LTZ (MOVWconst [c]) yes no) @@ -9325,9 +9281,7 @@ func rewriteBlockMIPS(b *Block) bool { if !(int32(c) >= 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -9337,10 +9291,8 @@ func rewriteBlockMIPS(b *Block) bool { for b.Controls[0].Op == OpMIPSFPFlagTrue { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockMIPSFPT - b.ResetControls() + b.Reset(BlockMIPSFPT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (FPFlagFalse cmp) yes no) @@ -9348,10 +9300,8 @@ func rewriteBlockMIPS(b *Block) bool { for b.Controls[0].Op == OpMIPSFPFlagFalse { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockMIPSFPF - b.ResetControls() + b.Reset(BlockMIPSFPF) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (XORconst [1] cmp:(SGT _ _)) yes no) @@ -9366,10 +9316,8 @@ func rewriteBlockMIPS(b *Block) bool { break } _ = cmp.Args[1] - b.Kind = BlockMIPSEQ - b.ResetControls() + b.Reset(BlockMIPSEQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no) @@ -9384,10 +9332,8 @@ func rewriteBlockMIPS(b *Block) bool { break } _ = cmp.Args[1] - b.Kind = BlockMIPSEQ - b.ResetControls() + b.Reset(BlockMIPSEQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (XORconst [1] cmp:(SGTconst _)) yes no) @@ -9401,10 +9347,8 @@ func rewriteBlockMIPS(b *Block) bool { if cmp.Op != OpMIPSSGTconst { break } - b.Kind = BlockMIPSEQ - b.ResetControls() + b.Reset(BlockMIPSEQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no) @@ -9418,10 +9362,8 @@ func rewriteBlockMIPS(b *Block) bool { if cmp.Op != OpMIPSSGTUconst { break } - b.Kind = BlockMIPSEQ - b.ResetControls() + b.Reset(BlockMIPSEQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (XORconst [1] cmp:(SGTzero _)) yes no) @@ -9435,10 +9377,8 @@ func rewriteBlockMIPS(b *Block) bool { if cmp.Op != OpMIPSSGTzero { break } - b.Kind = BlockMIPSEQ - b.ResetControls() + b.Reset(BlockMIPSEQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (XORconst [1] cmp:(SGTUzero _)) yes no) @@ -9452,10 +9392,8 @@ func rewriteBlockMIPS(b *Block) bool { if cmp.Op != OpMIPSSGTUzero { break } - b.Kind = BlockMIPSEQ - b.ResetControls() + b.Reset(BlockMIPSEQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (SGTUconst [1] x) yes no) @@ -9466,10 +9404,8 @@ func rewriteBlockMIPS(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockMIPSEQ - b.ResetControls() + b.Reset(BlockMIPSEQ) b.AddControl(x) - b.Aux = nil return true } // match: (NE (SGTUzero x) yes no) @@ -9477,10 +9413,8 @@ func rewriteBlockMIPS(b *Block) bool { for b.Controls[0].Op == OpMIPSSGTUzero { v_0 := b.Controls[0] x := v_0.Args[0] - b.Kind = BlockMIPSNE - b.ResetControls() + b.Reset(BlockMIPSNE) b.AddControl(x) - b.Aux = nil return true } // match: (NE (SGTconst [0] x) yes no) @@ -9491,10 +9425,8 @@ func rewriteBlockMIPS(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockMIPSLTZ - b.ResetControls() + b.Reset(BlockMIPSLTZ) b.AddControl(x) - b.Aux = nil return true } // match: (NE (SGTzero x) yes no) @@ -9502,10 +9434,8 @@ func rewriteBlockMIPS(b *Block) bool { for b.Controls[0].Op == OpMIPSSGTzero { v_0 := b.Controls[0] x := v_0.Args[0] - b.Kind = BlockMIPSGTZ - b.ResetControls() + b.Reset(BlockMIPSGTZ) b.AddControl(x) - b.Aux = nil return true } // match: (NE (MOVWconst [0]) yes no) @@ -9515,9 +9445,7 @@ func rewriteBlockMIPS(b *Block) bool { if v_0.AuxInt != 0 { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -9530,9 +9458,7 @@ func rewriteBlockMIPS(b *Block) bool { if !(c != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } } diff --git a/src/cmd/compile/internal/ssa/rewriteMIPS64.go b/src/cmd/compile/internal/ssa/rewriteMIPS64.go index 226dc00952..c9cc5ce4f9 100644 --- a/src/cmd/compile/internal/ssa/rewriteMIPS64.go +++ b/src/cmd/compile/internal/ssa/rewriteMIPS64.go @@ -9747,10 +9747,8 @@ func rewriteBlockMIPS64(b *Block) bool { for b.Controls[0].Op == OpMIPS64FPFlagTrue { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockMIPS64FPF - b.ResetControls() + b.Reset(BlockMIPS64FPF) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (FPFlagFalse cmp) yes no) @@ -9758,10 +9756,8 @@ func rewriteBlockMIPS64(b *Block) bool { for b.Controls[0].Op == OpMIPS64FPFlagFalse { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockMIPS64FPT - b.ResetControls() + b.Reset(BlockMIPS64FPT) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no) @@ -9776,10 +9772,8 @@ func rewriteBlockMIPS64(b *Block) bool { break } _ = cmp.Args[1] - b.Kind = BlockMIPS64NE - b.ResetControls() + b.Reset(BlockMIPS64NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no) @@ -9794,10 +9788,8 @@ func rewriteBlockMIPS64(b *Block) bool { break } _ = cmp.Args[1] - b.Kind = BlockMIPS64NE - b.ResetControls() + b.Reset(BlockMIPS64NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no) @@ -9811,10 +9803,8 @@ func rewriteBlockMIPS64(b *Block) bool { if cmp.Op != OpMIPS64SGTconst { break } - b.Kind = BlockMIPS64NE - b.ResetControls() + b.Reset(BlockMIPS64NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no) @@ -9828,10 +9818,8 @@ func rewriteBlockMIPS64(b *Block) bool { if cmp.Op != OpMIPS64SGTUconst { break } - b.Kind = BlockMIPS64NE - b.ResetControls() + b.Reset(BlockMIPS64NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (SGTUconst [1] x) yes no) @@ -9842,10 +9830,8 @@ func rewriteBlockMIPS64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockMIPS64NE - b.ResetControls() + b.Reset(BlockMIPS64NE) b.AddControl(x) - b.Aux = nil return true } // match: (EQ (SGTU x (MOVVconst [0])) yes no) @@ -9858,10 +9844,8 @@ func rewriteBlockMIPS64(b *Block) bool { if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 { break } - b.Kind = BlockMIPS64EQ - b.ResetControls() + b.Reset(BlockMIPS64EQ) b.AddControl(x) - b.Aux = nil return true } // match: (EQ (SGTconst [0] x) yes no) @@ -9872,10 +9856,8 @@ func rewriteBlockMIPS64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockMIPS64GEZ - b.ResetControls() + b.Reset(BlockMIPS64GEZ) b.AddControl(x) - b.Aux = nil return true } // match: (EQ (SGT x (MOVVconst [0])) yes no) @@ -9888,10 +9870,8 @@ func rewriteBlockMIPS64(b *Block) bool { if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 { break } - b.Kind = BlockMIPS64LEZ - b.ResetControls() + b.Reset(BlockMIPS64LEZ) b.AddControl(x) - b.Aux = nil return true } // match: (EQ (MOVVconst [0]) yes no) @@ -9901,9 +9881,7 @@ func rewriteBlockMIPS64(b *Block) bool { if v_0.AuxInt != 0 { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (EQ (MOVVconst [c]) yes no) @@ -9915,9 +9893,7 @@ func rewriteBlockMIPS64(b *Block) bool { if !(c != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -9931,9 +9907,7 @@ func rewriteBlockMIPS64(b *Block) bool { if !(c >= 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GEZ (MOVVconst [c]) yes no) @@ -9945,9 +9919,7 @@ func rewriteBlockMIPS64(b *Block) bool { if !(c < 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -9961,9 +9933,7 @@ func rewriteBlockMIPS64(b *Block) bool { if !(c > 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GTZ (MOVVconst [c]) yes no) @@ -9975,9 +9945,7 @@ func rewriteBlockMIPS64(b *Block) bool { if !(c <= 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -9986,10 +9954,8 @@ func rewriteBlockMIPS64(b *Block) bool { // result: (NE cond yes no) for { cond := b.Controls[0] - b.Kind = BlockMIPS64NE - b.ResetControls() + b.Reset(BlockMIPS64NE) b.AddControl(cond) - b.Aux = nil return true } case BlockMIPS64LEZ: @@ -10002,9 +9968,7 @@ func rewriteBlockMIPS64(b *Block) bool { if !(c <= 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LEZ (MOVVconst [c]) yes no) @@ -10016,9 +9980,7 @@ func rewriteBlockMIPS64(b *Block) bool { if !(c > 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -10032,9 +9994,7 @@ func rewriteBlockMIPS64(b *Block) bool { if !(c < 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LTZ (MOVVconst [c]) yes no) @@ -10046,9 +10006,7 @@ func rewriteBlockMIPS64(b *Block) bool { if !(c >= 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -10058,10 +10016,8 @@ func rewriteBlockMIPS64(b *Block) bool { for b.Controls[0].Op == OpMIPS64FPFlagTrue { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockMIPS64FPT - b.ResetControls() + b.Reset(BlockMIPS64FPT) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (FPFlagFalse cmp) yes no) @@ -10069,10 +10025,8 @@ func rewriteBlockMIPS64(b *Block) bool { for b.Controls[0].Op == OpMIPS64FPFlagFalse { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockMIPS64FPF - b.ResetControls() + b.Reset(BlockMIPS64FPF) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (XORconst [1] cmp:(SGT _ _)) yes no) @@ -10087,10 +10041,8 @@ func rewriteBlockMIPS64(b *Block) bool { break } _ = cmp.Args[1] - b.Kind = BlockMIPS64EQ - b.ResetControls() + b.Reset(BlockMIPS64EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no) @@ -10105,10 +10057,8 @@ func rewriteBlockMIPS64(b *Block) bool { break } _ = cmp.Args[1] - b.Kind = BlockMIPS64EQ - b.ResetControls() + b.Reset(BlockMIPS64EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (XORconst [1] cmp:(SGTconst _)) yes no) @@ -10122,10 +10072,8 @@ func rewriteBlockMIPS64(b *Block) bool { if cmp.Op != OpMIPS64SGTconst { break } - b.Kind = BlockMIPS64EQ - b.ResetControls() + b.Reset(BlockMIPS64EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no) @@ -10139,10 +10087,8 @@ func rewriteBlockMIPS64(b *Block) bool { if cmp.Op != OpMIPS64SGTUconst { break } - b.Kind = BlockMIPS64EQ - b.ResetControls() + b.Reset(BlockMIPS64EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (SGTUconst [1] x) yes no) @@ -10153,10 +10099,8 @@ func rewriteBlockMIPS64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockMIPS64EQ - b.ResetControls() + b.Reset(BlockMIPS64EQ) b.AddControl(x) - b.Aux = nil return true } // match: (NE (SGTU x (MOVVconst [0])) yes no) @@ -10169,10 +10113,8 @@ func rewriteBlockMIPS64(b *Block) bool { if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 { break } - b.Kind = BlockMIPS64NE - b.ResetControls() + b.Reset(BlockMIPS64NE) b.AddControl(x) - b.Aux = nil return true } // match: (NE (SGTconst [0] x) yes no) @@ -10183,10 +10125,8 @@ func rewriteBlockMIPS64(b *Block) bool { break } x := v_0.Args[0] - b.Kind = BlockMIPS64LTZ - b.ResetControls() + b.Reset(BlockMIPS64LTZ) b.AddControl(x) - b.Aux = nil return true } // match: (NE (SGT x (MOVVconst [0])) yes no) @@ -10199,10 +10139,8 @@ func rewriteBlockMIPS64(b *Block) bool { if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 { break } - b.Kind = BlockMIPS64GTZ - b.ResetControls() + b.Reset(BlockMIPS64GTZ) b.AddControl(x) - b.Aux = nil return true } // match: (NE (MOVVconst [0]) yes no) @@ -10212,9 +10150,7 @@ func rewriteBlockMIPS64(b *Block) bool { if v_0.AuxInt != 0 { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -10227,9 +10163,7 @@ func rewriteBlockMIPS64(b *Block) bool { if !(c != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } } diff --git a/src/cmd/compile/internal/ssa/rewritePPC64.go b/src/cmd/compile/internal/ssa/rewritePPC64.go index 7743a2855e..7f49d98bd1 100644 --- a/src/cmd/compile/internal/ssa/rewritePPC64.go +++ b/src/cmd/compile/internal/ssa/rewritePPC64.go @@ -26481,13 +26481,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64EQ - b.ResetControls() + b.Reset(BlockPPC64EQ) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no) @@ -26503,38 +26501,30 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64EQ - b.ResetControls() + b.Reset(BlockPPC64EQ) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpPPC64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (EQ (FlagLT) yes no) // result: (First no yes) for b.Controls[0].Op == OpPPC64FlagLT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (EQ (FlagGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpPPC64FlagGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -26543,10 +26533,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockPPC64EQ - b.ResetControls() + b.Reset(BlockPPC64EQ) b.AddControl(cmp) - b.Aux = nil return true } // match: (EQ (CMPconst [0] (ANDconst [c] x)) yes no) @@ -26562,13 +26550,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64EQ - b.ResetControls() + b.Reset(BlockPPC64EQ) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no) @@ -26584,13 +26570,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64EQ - b.ResetControls() + b.Reset(BlockPPC64EQ) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] z:(AND x y)) yes no) @@ -26610,13 +26594,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64EQ - b.ResetControls() + b.Reset(BlockPPC64EQ) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] z:(OR x y)) yes no) @@ -26636,13 +26618,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64EQ - b.ResetControls() + b.Reset(BlockPPC64EQ) v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (EQ (CMPconst [0] z:(XOR x y)) yes no) @@ -26662,39 +26642,31 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64EQ - b.ResetControls() + b.Reset(BlockPPC64EQ) v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } case BlockPPC64GE: // match: (GE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpPPC64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (FlagLT) yes no) // result: (First no yes) for b.Controls[0].Op == OpPPC64FlagLT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GE (FlagGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpPPC64FlagGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GE (InvertFlags cmp) yes no) @@ -26702,10 +26674,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockPPC64LE - b.ResetControls() + b.Reset(BlockPPC64LE) b.AddControl(cmp) - b.Aux = nil return true } // match: (GE (CMPconst [0] (ANDconst [c] x)) yes no) @@ -26721,13 +26691,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64GE - b.ResetControls() + b.Reset(BlockPPC64GE) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPWconst [0] (ANDconst [c] x)) yes no) @@ -26743,13 +26711,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64GE - b.ResetControls() + b.Reset(BlockPPC64GE) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] z:(AND x y)) yes no) @@ -26769,13 +26735,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64GE - b.ResetControls() + b.Reset(BlockPPC64GE) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] z:(OR x y)) yes no) @@ -26795,13 +26759,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64GE - b.ResetControls() + b.Reset(BlockPPC64GE) v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GE (CMPconst [0] z:(XOR x y)) yes no) @@ -26821,40 +26783,32 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64GE - b.ResetControls() + b.Reset(BlockPPC64GE) v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } case BlockPPC64GT: // match: (GT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpPPC64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagLT) yes no) // result: (First no yes) for b.Controls[0].Op == OpPPC64FlagLT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (GT (FlagGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpPPC64FlagGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (GT (InvertFlags cmp) yes no) @@ -26862,10 +26816,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockPPC64LT - b.ResetControls() + b.Reset(BlockPPC64LT) b.AddControl(cmp) - b.Aux = nil return true } // match: (GT (CMPconst [0] (ANDconst [c] x)) yes no) @@ -26881,13 +26833,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64GT - b.ResetControls() + b.Reset(BlockPPC64GT) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPWconst [0] (ANDconst [c] x)) yes no) @@ -26903,13 +26853,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64GT - b.ResetControls() + b.Reset(BlockPPC64GT) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] z:(AND x y)) yes no) @@ -26929,13 +26877,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64GT - b.ResetControls() + b.Reset(BlockPPC64GT) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] z:(OR x y)) yes no) @@ -26955,13 +26901,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64GT - b.ResetControls() + b.Reset(BlockPPC64GT) v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (GT (CMPconst [0] z:(XOR x y)) yes no) @@ -26981,13 +26925,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64GT - b.ResetControls() + b.Reset(BlockPPC64GT) v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } case BlockIf: @@ -26996,10 +26938,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64Equal { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockPPC64EQ - b.ResetControls() + b.Reset(BlockPPC64EQ) b.AddControl(cc) - b.Aux = nil return true } // match: (If (NotEqual cc) yes no) @@ -27007,10 +26947,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64NotEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockPPC64NE - b.ResetControls() + b.Reset(BlockPPC64NE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessThan cc) yes no) @@ -27018,10 +26956,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64LessThan { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockPPC64LT - b.ResetControls() + b.Reset(BlockPPC64LT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (LessEqual cc) yes no) @@ -27029,10 +26965,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64LessEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockPPC64LE - b.ResetControls() + b.Reset(BlockPPC64LE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterThan cc) yes no) @@ -27040,10 +26974,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64GreaterThan { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockPPC64GT - b.ResetControls() + b.Reset(BlockPPC64GT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (GreaterEqual cc) yes no) @@ -27051,10 +26983,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64GreaterEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockPPC64GE - b.ResetControls() + b.Reset(BlockPPC64GE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (FLessThan cc) yes no) @@ -27062,10 +26992,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64FLessThan { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockPPC64FLT - b.ResetControls() + b.Reset(BlockPPC64FLT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (FLessEqual cc) yes no) @@ -27073,10 +27001,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64FLessEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockPPC64FLE - b.ResetControls() + b.Reset(BlockPPC64FLE) b.AddControl(cc) - b.Aux = nil return true } // match: (If (FGreaterThan cc) yes no) @@ -27084,10 +27010,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64FGreaterThan { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockPPC64FGT - b.ResetControls() + b.Reset(BlockPPC64FGT) b.AddControl(cc) - b.Aux = nil return true } // match: (If (FGreaterEqual cc) yes no) @@ -27095,48 +27019,38 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64FGreaterEqual { v_0 := b.Controls[0] cc := v_0.Args[0] - b.Kind = BlockPPC64FGE - b.ResetControls() + b.Reset(BlockPPC64FGE) b.AddControl(cc) - b.Aux = nil return true } // match: (If cond yes no) // result: (NE (CMPWconst [0] cond) yes no) for { cond := b.Controls[0] - b.Kind = BlockPPC64NE - b.ResetControls() + b.Reset(BlockPPC64NE) v0 := b.NewValue0(cond.Pos, OpPPC64CMPWconst, types.TypeFlags) v0.AuxInt = 0 v0.AddArg(cond) b.AddControl(v0) - b.Aux = nil return true } case BlockPPC64LE: // match: (LE (FlagEQ) yes no) // result: (First yes no) for b.Controls[0].Op == OpPPC64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagLT) yes no) // result: (First yes no) for b.Controls[0].Op == OpPPC64FlagLT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LE (FlagGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpPPC64FlagGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -27145,10 +27059,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockPPC64GE - b.ResetControls() + b.Reset(BlockPPC64GE) b.AddControl(cmp) - b.Aux = nil return true } // match: (LE (CMPconst [0] (ANDconst [c] x)) yes no) @@ -27164,13 +27076,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64LE - b.ResetControls() + b.Reset(BlockPPC64LE) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPWconst [0] (ANDconst [c] x)) yes no) @@ -27186,13 +27096,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64LE - b.ResetControls() + b.Reset(BlockPPC64LE) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] z:(AND x y)) yes no) @@ -27212,13 +27120,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64LE - b.ResetControls() + b.Reset(BlockPPC64LE) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] z:(OR x y)) yes no) @@ -27238,13 +27144,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64LE - b.ResetControls() + b.Reset(BlockPPC64LE) v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LE (CMPconst [0] z:(XOR x y)) yes no) @@ -27264,39 +27168,31 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64LE - b.ResetControls() + b.Reset(BlockPPC64LE) v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } case BlockPPC64LT: // match: (LT (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpPPC64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (LT (FlagLT) yes no) // result: (First yes no) for b.Controls[0].Op == OpPPC64FlagLT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (LT (FlagGT) yes no) // result: (First no yes) for b.Controls[0].Op == OpPPC64FlagGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -27305,10 +27201,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockPPC64GT - b.ResetControls() + b.Reset(BlockPPC64GT) b.AddControl(cmp) - b.Aux = nil return true } // match: (LT (CMPconst [0] (ANDconst [c] x)) yes no) @@ -27324,13 +27218,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64LT - b.ResetControls() + b.Reset(BlockPPC64LT) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPWconst [0] (ANDconst [c] x)) yes no) @@ -27346,13 +27238,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64LT - b.ResetControls() + b.Reset(BlockPPC64LT) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] z:(AND x y)) yes no) @@ -27372,13 +27262,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64LT - b.ResetControls() + b.Reset(BlockPPC64LT) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] z:(OR x y)) yes no) @@ -27398,13 +27286,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64LT - b.ResetControls() + b.Reset(BlockPPC64LT) v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (LT (CMPconst [0] z:(XOR x y)) yes no) @@ -27424,13 +27310,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64LT - b.ResetControls() + b.Reset(BlockPPC64LT) v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } case BlockPPC64NE: @@ -27446,10 +27330,8 @@ func rewriteBlockPPC64(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockPPC64EQ - b.ResetControls() + b.Reset(BlockPPC64EQ) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPWconst [0] (NotEqual cc)) yes no) @@ -27464,10 +27346,8 @@ func rewriteBlockPPC64(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockPPC64NE - b.ResetControls() + b.Reset(BlockPPC64NE) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPWconst [0] (LessThan cc)) yes no) @@ -27482,10 +27362,8 @@ func rewriteBlockPPC64(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockPPC64LT - b.ResetControls() + b.Reset(BlockPPC64LT) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPWconst [0] (LessEqual cc)) yes no) @@ -27500,10 +27378,8 @@ func rewriteBlockPPC64(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockPPC64LE - b.ResetControls() + b.Reset(BlockPPC64LE) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPWconst [0] (GreaterThan cc)) yes no) @@ -27518,10 +27394,8 @@ func rewriteBlockPPC64(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockPPC64GT - b.ResetControls() + b.Reset(BlockPPC64GT) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPWconst [0] (GreaterEqual cc)) yes no) @@ -27536,10 +27410,8 @@ func rewriteBlockPPC64(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockPPC64GE - b.ResetControls() + b.Reset(BlockPPC64GE) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPWconst [0] (FLessThan cc)) yes no) @@ -27554,10 +27426,8 @@ func rewriteBlockPPC64(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockPPC64FLT - b.ResetControls() + b.Reset(BlockPPC64FLT) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPWconst [0] (FLessEqual cc)) yes no) @@ -27572,10 +27442,8 @@ func rewriteBlockPPC64(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockPPC64FLE - b.ResetControls() + b.Reset(BlockPPC64FLE) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPWconst [0] (FGreaterThan cc)) yes no) @@ -27590,10 +27458,8 @@ func rewriteBlockPPC64(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockPPC64FGT - b.ResetControls() + b.Reset(BlockPPC64FGT) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPWconst [0] (FGreaterEqual cc)) yes no) @@ -27608,10 +27474,8 @@ func rewriteBlockPPC64(b *Block) bool { break } cc := v_0_0.Args[0] - b.Kind = BlockPPC64FGE - b.ResetControls() + b.Reset(BlockPPC64FGE) b.AddControl(cc) - b.Aux = nil return true } // match: (NE (CMPconst [0] (ANDconst [c] x)) yes no) @@ -27627,13 +27491,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64NE - b.ResetControls() + b.Reset(BlockPPC64NE) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no) @@ -27649,38 +27511,30 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64NE - b.ResetControls() + b.Reset(BlockPPC64NE) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (FlagEQ) yes no) // result: (First no yes) for b.Controls[0].Op == OpPPC64FlagEQ { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } // match: (NE (FlagLT) yes no) // result: (First yes no) for b.Controls[0].Op == OpPPC64FlagLT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (FlagGT) yes no) // result: (First yes no) for b.Controls[0].Op == OpPPC64FlagGT { - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (NE (InvertFlags cmp) yes no) @@ -27688,10 +27542,8 @@ func rewriteBlockPPC64(b *Block) bool { for b.Controls[0].Op == OpPPC64InvertFlags { v_0 := b.Controls[0] cmp := v_0.Args[0] - b.Kind = BlockPPC64NE - b.ResetControls() + b.Reset(BlockPPC64NE) b.AddControl(cmp) - b.Aux = nil return true } // match: (NE (CMPconst [0] (ANDconst [c] x)) yes no) @@ -27707,13 +27559,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64NE - b.ResetControls() + b.Reset(BlockPPC64NE) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no) @@ -27729,13 +27579,11 @@ func rewriteBlockPPC64(b *Block) bool { } c := v_0_0.AuxInt x := v_0_0.Args[0] - b.Kind = BlockPPC64NE - b.ResetControls() + b.Reset(BlockPPC64NE) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags) v0.AuxInt = c v0.AddArg(x) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] z:(AND x y)) yes no) @@ -27755,13 +27603,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64NE - b.ResetControls() + b.Reset(BlockPPC64NE) v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] z:(OR x y)) yes no) @@ -27781,13 +27627,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64NE - b.ResetControls() + b.Reset(BlockPPC64NE) v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } // match: (NE (CMPconst [0] z:(XOR x y)) yes no) @@ -27807,13 +27651,11 @@ func rewriteBlockPPC64(b *Block) bool { if !(z.Uses == 1) { break } - b.Kind = BlockPPC64NE - b.ResetControls() + b.Reset(BlockPPC64NE) v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags) v0.AddArg(x) v0.AddArg(y) b.AddControl(v0) - b.Aux = nil return true } } diff --git a/src/cmd/compile/internal/ssa/rewriteS390X.go b/src/cmd/compile/internal/ssa/rewriteS390X.go index 9db0cc42e9..b9ec76474b 100644 --- a/src/cmd/compile/internal/ssa/rewriteS390X.go +++ b/src/cmd/compile/internal/ssa/rewriteS390X.go @@ -36478,8 +36478,7 @@ func rewriteBlockS390X(b *Block) bool { if !(x != 0 && c.(s390x.CCMask) == s390x.Equal) { break } - b.Kind = BlockS390XBRC - b.ResetControls() + b.Reset(BlockS390XBRC) b.AddControl(cmp) b.Aux = d b.swapSuccessors() @@ -36512,8 +36511,7 @@ func rewriteBlockS390X(b *Block) bool { if !(x != 0 && c.(s390x.CCMask) == s390x.NotEqual) { break } - b.Kind = BlockS390XBRC - b.ResetControls() + b.Reset(BlockS390XBRC) b.AddControl(cmp) b.Aux = d return true @@ -36524,8 +36522,7 @@ func rewriteBlockS390X(b *Block) bool { v_0 := b.Controls[0] cmp := v_0.Args[0] c := b.Aux - b.Kind = BlockS390XBRC - b.ResetControls() + b.Reset(BlockS390XBRC) b.AddControl(cmp) b.Aux = c.(s390x.CCMask).ReverseComparison() return true @@ -36538,9 +36535,7 @@ func rewriteBlockS390X(b *Block) bool { if !(c.(s390x.CCMask)&s390x.Equal != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (BRC {c} (FlagLT) yes no) @@ -36551,9 +36546,7 @@ func rewriteBlockS390X(b *Block) bool { if !(c.(s390x.CCMask)&s390x.Less != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (BRC {c} (FlagGT) yes no) @@ -36564,9 +36557,7 @@ func rewriteBlockS390X(b *Block) bool { if !(c.(s390x.CCMask)&s390x.Greater != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (BRC {c} (FlagOV) yes no) @@ -36577,9 +36568,7 @@ func rewriteBlockS390X(b *Block) bool { if !(c.(s390x.CCMask)&s390x.Unordered != 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (BRC {c} (FlagEQ) yes no) @@ -36590,9 +36579,7 @@ func rewriteBlockS390X(b *Block) bool { if !(c.(s390x.CCMask)&s390x.Equal == 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -36604,9 +36591,7 @@ func rewriteBlockS390X(b *Block) bool { if !(c.(s390x.CCMask)&s390x.Less == 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -36618,9 +36603,7 @@ func rewriteBlockS390X(b *Block) bool { if !(c.(s390x.CCMask)&s390x.Greater == 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -36632,9 +36615,7 @@ func rewriteBlockS390X(b *Block) bool { if !(c.(s390x.CCMask)&s390x.Unordered == 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true } @@ -36643,8 +36624,7 @@ func rewriteBlockS390X(b *Block) bool { // result: (BRC {s390x.NotEqual} (CMPWconst [0] (MOVBZreg cond)) yes no) for { cond := b.Controls[0] - b.Kind = BlockS390XBRC - b.ResetControls() + b.Reset(BlockS390XBRC) v0 := b.NewValue0(cond.Pos, OpS390XCMPWconst, types.TypeFlags) v0.AuxInt = 0 v1 := b.NewValue0(cond.Pos, OpS390XMOVBZreg, typ.Bool) diff --git a/src/cmd/compile/internal/ssa/rewritegeneric.go b/src/cmd/compile/internal/ssa/rewritegeneric.go index 091dff60be..d7e7974e2b 100644 --- a/src/cmd/compile/internal/ssa/rewritegeneric.go +++ b/src/cmd/compile/internal/ssa/rewritegeneric.go @@ -47414,10 +47414,8 @@ func rewriteBlockgeneric(b *Block) bool { for b.Controls[0].Op == OpNot { v_0 := b.Controls[0] cond := v_0.Args[0] - b.Kind = BlockIf - b.ResetControls() + b.Reset(BlockIf) b.AddControl(cond) - b.Aux = nil b.swapSuccessors() return true } @@ -47430,9 +47428,7 @@ func rewriteBlockgeneric(b *Block) bool { if !(c == 1) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) return true } // match: (If (ConstBool [c]) yes no) @@ -47444,9 +47440,7 @@ func rewriteBlockgeneric(b *Block) bool { if !(c == 0) { break } - b.Kind = BlockFirst - b.ResetControls() - b.Aux = nil + b.Reset(BlockFirst) b.swapSuccessors() return true }