]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add streamlined Block Reset+AddControl routines
authorJosh Bleecher Snyder <josharian@gmail.com>
Sun, 1 Mar 2020 21:09:09 +0000 (13:09 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 2 Mar 2020 17:40:00 +0000 (17:40 +0000)
For use in rewrite rules. Shrinks cmd/compile:

compile 20082104  19967416  -114688 -0.571%

Passes toolstash-check -all.

Change-Id: Ic856508b27ec5b7fb9b6ca63e955a7139ae7dc30
Reviewed-on: https://go-review.googlesource.com/c/go/+/221780
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
12 files changed:
src/cmd/compile/internal/ssa/block.go
src/cmd/compile/internal/ssa/gen/rulegen.go
src/cmd/compile/internal/ssa/rewrite386.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
src/cmd/compile/internal/ssa/rewriteARM.go
src/cmd/compile/internal/ssa/rewriteARM64.go
src/cmd/compile/internal/ssa/rewriteMIPS.go
src/cmd/compile/internal/ssa/rewriteMIPS64.go
src/cmd/compile/internal/ssa/rewritePPC64.go
src/cmd/compile/internal/ssa/rewriteRISCV64.go
src/cmd/compile/internal/ssa/rewriteS390X.go
src/cmd/compile/internal/ssa/rewritegeneric.go

index eadd5700ba71f2bd1488dc075b4ce7ec2da22cef..205fcfc707430011b092aea48f465df93acadf7f 100644 (file)
@@ -232,6 +232,34 @@ func (b *Block) Reset(kind BlockKind) {
        b.AuxInt = 0
 }
 
+// resetWithControl resets b and adds control v.
+// It is equivalent to b.Reset(kind); b.AddControl(v),
+// except that it is one call instead of two and avoids a bounds check.
+// It is intended for use by rewrite rules, where this matters.
+func (b *Block) resetWithControl(kind BlockKind, v *Value) {
+       b.Kind = kind
+       b.ResetControls()
+       b.Aux = nil
+       b.AuxInt = 0
+       b.Controls[0] = v
+       v.Uses++
+}
+
+// resetWithControl2 resets b and adds controls v and w.
+// It is equivalent to b.Reset(kind); b.AddControl(v); b.AddControl(w),
+// except that it is one call instead of three and avoids two bounds checks.
+// It is intended for use by rewrite rules, where this matters.
+func (b *Block) resetWithControl2(kind BlockKind, v, w *Value) {
+       b.Kind = kind
+       b.ResetControls()
+       b.Aux = nil
+       b.AuxInt = 0
+       b.Controls[0] = v
+       b.Controls[1] = w
+       v.Uses++
+       w.Uses++
+}
+
 // 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) {
index 53c6bdbf6567875eda591826c19d2f0807037645..759336fb2b459075d83ce6387bc5e8990f8e3350 100644 (file)
@@ -891,7 +891,7 @@ func genBlockRewrite(rule Rule, arch arch, data blockData) *RuleRewrite {
        }
 
        blockName, _ := getBlockInfo(outop, arch)
-       rr.add(stmtf("b.Reset(%s)", blockName))
+       var genControls [2]string
        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
@@ -904,9 +904,19 @@ func genBlockRewrite(rule Rule, arch arch, data blockData) *RuleRewrite {
                }
 
                // Generate a new control value (or copy an existing value).
-               v := genResult0(rr, arch, control, false, false, newpos)
-               rr.add(stmtf("b.AddControl(%s)", v))
+               genControls[i] = genResult0(rr, arch, control, false, false, newpos)
        }
+       switch outdata.controls {
+       case 0:
+               rr.add(stmtf("b.Reset(%s)", blockName))
+       case 1:
+               rr.add(stmtf("b.resetWithControl(%s, %s)", blockName, genControls[0]))
+       case 2:
+               rr.add(stmtf("b.resetWithControl2(%s, %s, %s)", blockName, genControls[0], genControls[1]))
+       default:
+               log.Fatalf("too many controls: %d", outdata.controls)
+       }
+
        if auxint != "" {
                rr.add(stmtf("b.AuxInt = %s", auxint))
        }
index bff76e9029373755a46ca86bc8d35880b8aadcad..b83c65da8699a8a78db20e90b2ae3700fd6232f9 100644 (file)
@@ -15967,8 +15967,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386EQ, cmp)
                        return true
                }
                // match: (EQ (FlagEQ) yes no)
@@ -16011,8 +16010,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386LE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386LE, cmp)
                        return true
                }
                // match: (GE (FlagEQ) yes no)
@@ -16053,8 +16051,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386LT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386LT, cmp)
                        return true
                }
                // match: (GT (FlagEQ) yes no)
@@ -16096,8 +16093,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETL {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386LT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386LT, cmp)
                        return true
                }
                // match: (If (SETLE cmp) yes no)
@@ -16105,8 +16101,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETLE {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386LE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386LE, cmp)
                        return true
                }
                // match: (If (SETG cmp) yes no)
@@ -16114,8 +16109,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETG {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386GT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386GT, cmp)
                        return true
                }
                // match: (If (SETGE cmp) yes no)
@@ -16123,8 +16117,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETGE {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386GE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386GE, cmp)
                        return true
                }
                // match: (If (SETEQ cmp) yes no)
@@ -16132,8 +16125,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETEQ {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386EQ, cmp)
                        return true
                }
                // match: (If (SETNE cmp) yes no)
@@ -16141,8 +16133,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETNE {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386NE, cmp)
                        return true
                }
                // match: (If (SETB cmp) yes no)
@@ -16150,8 +16141,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETB {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386ULT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386ULT, cmp)
                        return true
                }
                // match: (If (SETBE cmp) yes no)
@@ -16159,8 +16149,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETBE {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386ULE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386ULE, cmp)
                        return true
                }
                // match: (If (SETA cmp) yes no)
@@ -16168,8 +16157,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETA {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386UGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386UGT, cmp)
                        return true
                }
                // match: (If (SETAE cmp) yes no)
@@ -16177,8 +16165,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETAE {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386UGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386UGE, cmp)
                        return true
                }
                // match: (If (SETO cmp) yes no)
@@ -16186,8 +16173,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETO {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386OS)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386OS, cmp)
                        return true
                }
                // match: (If (SETGF cmp) yes no)
@@ -16195,8 +16181,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETGF {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386UGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386UGT, cmp)
                        return true
                }
                // match: (If (SETGEF cmp) yes no)
@@ -16204,8 +16189,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETGEF {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386UGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386UGE, cmp)
                        return true
                }
                // match: (If (SETEQF cmp) yes no)
@@ -16213,8 +16197,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETEQF {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386EQF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386EQF, cmp)
                        return true
                }
                // match: (If (SETNEF cmp) yes no)
@@ -16222,18 +16205,16 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386SETNEF {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386NEF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386NEF, cmp)
                        return true
                }
                // match: (If cond yes no)
                // result: (NE (TESTB cond cond) yes no)
                for {
                        cond := b.Controls[0]
-                       b.Reset(Block386NE)
                        v0 := b.NewValue0(cond.Pos, Op386TESTB, types.TypeFlags)
                        v0.AddArg2(cond, cond)
-                       b.AddControl(v0)
+                       b.resetWithControl(Block386NE, v0)
                        return true
                }
        case Block386LE:
@@ -16242,8 +16223,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386GE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386GE, cmp)
                        return true
                }
                // match: (LE (FlagEQ) yes no)
@@ -16284,8 +16264,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386GT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386GT, cmp)
                        return true
                }
                // match: (LT (FlagEQ) yes no)
@@ -16336,8 +16315,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETL || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386LT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386LT, cmp)
                        return true
                }
                // match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
@@ -16354,8 +16332,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETLE || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386LE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386LE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no)
@@ -16372,8 +16349,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETG || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386GT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386GT, cmp)
                        return true
                }
                // match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
@@ -16390,8 +16366,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETGE || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386GE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386GE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
@@ -16408,8 +16383,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETEQ || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386EQ, cmp)
                        return true
                }
                // match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
@@ -16426,8 +16400,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETNE || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386NE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no)
@@ -16444,8 +16417,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETB || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386ULT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386ULT, cmp)
                        return true
                }
                // match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
@@ -16462,8 +16434,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETBE || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386ULE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386ULE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no)
@@ -16480,8 +16451,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETA || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386UGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386UGT, cmp)
                        return true
                }
                // match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
@@ -16498,8 +16468,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETAE || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386UGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386UGE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no)
@@ -16516,8 +16485,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETO || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386OS)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386OS, cmp)
                        return true
                }
                // match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no)
@@ -16534,8 +16502,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETGF || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386UGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386UGT, cmp)
                        return true
                }
                // match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
@@ -16552,8 +16519,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETGEF || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386UGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386UGE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
@@ -16570,8 +16536,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETEQF || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386EQF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386EQF, cmp)
                        return true
                }
                // match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
@@ -16588,8 +16553,7 @@ func rewriteBlock386(b *Block) bool {
                        if v_0_1.Op != Op386SETNEF || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(Block386NEF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386NEF, cmp)
                        return true
                }
                // match: (NE (InvertFlags cmp) yes no)
@@ -16597,8 +16561,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386NE, cmp)
                        return true
                }
                // match: (NE (FlagEQ) yes no)
@@ -16638,8 +16601,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386ULE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386ULE, cmp)
                        return true
                }
                // match: (UGE (FlagEQ) yes no)
@@ -16680,8 +16642,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386ULT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386ULT, cmp)
                        return true
                }
                // match: (UGT (FlagEQ) yes no)
@@ -16723,8 +16684,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386UGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386UGE, cmp)
                        return true
                }
                // match: (ULE (FlagEQ) yes no)
@@ -16765,8 +16725,7 @@ func rewriteBlock386(b *Block) bool {
                for b.Controls[0].Op == Op386InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(Block386UGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(Block386UGT, cmp)
                        return true
                }
                // match: (ULT (FlagEQ) yes no)
index a30c609a684b7957dfbdf4232c3e4ceb9fb9bdbc..a0d422b372ec1dcc9a2b6a1a706eb81bf39d1d02 100644 (file)
@@ -38434,10 +38434,9 @@ func rewriteBlockAMD64(b *Block) bool {
                                        continue
                                }
                                y := v_0_1
-                               b.Reset(BlockAMD64UGE)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTL, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64UGE, v0)
                                return true
                        }
                        break
@@ -38459,10 +38458,9 @@ func rewriteBlockAMD64(b *Block) bool {
                                        continue
                                }
                                y := v_0_1
-                               b.Reset(BlockAMD64UGE)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQ, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64UGE, v0)
                                return true
                        }
                        break
@@ -38477,11 +38475,10 @@ func rewriteBlockAMD64(b *Block) bool {
                        if !(isUint32PowerOfTwo(c)) {
                                break
                        }
-                       b.Reset(BlockAMD64UGE)
                        v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags)
                        v0.AuxInt = log2uint32(c)
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockAMD64UGE, v0)
                        return true
                }
                // match: (EQ (TESTQconst [c] x))
@@ -38494,11 +38491,10 @@ func rewriteBlockAMD64(b *Block) bool {
                        if !(isUint64PowerOfTwo(c)) {
                                break
                        }
-                       b.Reset(BlockAMD64UGE)
                        v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                        v0.AuxInt = log2(c)
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockAMD64UGE, v0)
                        return true
                }
                // match: (EQ (TESTQ (MOVQconst [c]) x))
@@ -38518,11 +38514,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(isUint64PowerOfTwo(c)) {
                                        continue
                                }
-                               b.Reset(BlockAMD64UGE)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                                v0.AuxInt = log2(c)
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64UGE, v0)
                                return true
                        }
                        break
@@ -38549,11 +38544,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64UGE)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                                v0.AuxInt = 63
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64UGE, v0)
                                return true
                        }
                        break
@@ -38580,11 +38574,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64UGE)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                                v0.AuxInt = 31
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64UGE, v0)
                                return true
                        }
                        break
@@ -38611,11 +38604,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64UGE)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                                v0.AuxInt = 0
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64UGE, v0)
                                return true
                        }
                        break
@@ -38642,11 +38634,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64UGE)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags)
                                v0.AuxInt = 0
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64UGE, v0)
                                return true
                        }
                        break
@@ -38669,11 +38660,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64UGE)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                                v0.AuxInt = 63
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64UGE, v0)
                                return true
                        }
                        break
@@ -38696,11 +38686,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64UGE)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags)
                                v0.AuxInt = 31
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64UGE, v0)
                                return true
                        }
                        break
@@ -38710,8 +38699,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64EQ, cmp)
                        return true
                }
                // match: (EQ (FlagEQ) yes no)
@@ -38754,8 +38742,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64LE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64LE, cmp)
                        return true
                }
                // match: (GE (FlagEQ) yes no)
@@ -38796,8 +38783,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64LT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64LT, cmp)
                        return true
                }
                // match: (GT (FlagEQ) yes no)
@@ -38839,8 +38825,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETL {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64LT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64LT, cmp)
                        return true
                }
                // match: (If (SETLE cmp) yes no)
@@ -38848,8 +38833,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETLE {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64LE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64LE, cmp)
                        return true
                }
                // match: (If (SETG cmp) yes no)
@@ -38857,8 +38841,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETG {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64GT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64GT, cmp)
                        return true
                }
                // match: (If (SETGE cmp) yes no)
@@ -38866,8 +38849,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETGE {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64GE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64GE, cmp)
                        return true
                }
                // match: (If (SETEQ cmp) yes no)
@@ -38875,8 +38857,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETEQ {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64EQ, cmp)
                        return true
                }
                // match: (If (SETNE cmp) yes no)
@@ -38884,8 +38865,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETNE {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64NE, cmp)
                        return true
                }
                // match: (If (SETB cmp) yes no)
@@ -38893,8 +38873,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETB {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64ULT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64ULT, cmp)
                        return true
                }
                // match: (If (SETBE cmp) yes no)
@@ -38902,8 +38881,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETBE {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64ULE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64ULE, cmp)
                        return true
                }
                // match: (If (SETA cmp) yes no)
@@ -38911,8 +38889,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETA {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64UGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64UGT, cmp)
                        return true
                }
                // match: (If (SETAE cmp) yes no)
@@ -38920,8 +38897,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETAE {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64UGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64UGE, cmp)
                        return true
                }
                // match: (If (SETO cmp) yes no)
@@ -38929,8 +38905,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETO {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64OS)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64OS, cmp)
                        return true
                }
                // match: (If (SETGF cmp) yes no)
@@ -38938,8 +38913,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETGF {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64UGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64UGT, cmp)
                        return true
                }
                // match: (If (SETGEF cmp) yes no)
@@ -38947,8 +38921,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETGEF {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64UGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64UGE, cmp)
                        return true
                }
                // match: (If (SETEQF cmp) yes no)
@@ -38956,8 +38929,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETEQF {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64EQF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64EQF, cmp)
                        return true
                }
                // match: (If (SETNEF cmp) yes no)
@@ -38965,18 +38937,16 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64SETNEF {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64NEF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64NEF, cmp)
                        return true
                }
                // match: (If cond yes no)
                // result: (NE (TESTB cond cond) yes no)
                for {
                        cond := b.Controls[0]
-                       b.Reset(BlockAMD64NE)
                        v0 := b.NewValue0(cond.Pos, OpAMD64TESTB, types.TypeFlags)
                        v0.AddArg2(cond, cond)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockAMD64NE, v0)
                        return true
                }
        case BlockAMD64LE:
@@ -38985,8 +38955,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64GE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64GE, cmp)
                        return true
                }
                // match: (LE (FlagEQ) yes no)
@@ -39027,8 +38996,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64GT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64GT, cmp)
                        return true
                }
                // match: (LT (FlagEQ) yes no)
@@ -39079,8 +39047,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETL || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64LT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64LT, cmp)
                        return true
                }
                // match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
@@ -39097,8 +39064,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETLE || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64LE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64LE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no)
@@ -39115,8 +39081,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETG || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64GT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64GT, cmp)
                        return true
                }
                // match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
@@ -39133,8 +39098,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETGE || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64GE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64GE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
@@ -39151,8 +39115,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETEQ || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64EQ, cmp)
                        return true
                }
                // match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
@@ -39169,8 +39132,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETNE || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64NE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no)
@@ -39187,8 +39149,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETB || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64ULT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64ULT, cmp)
                        return true
                }
                // match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
@@ -39205,8 +39166,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETBE || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64ULE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64ULE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no)
@@ -39223,8 +39183,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETA || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64UGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64UGT, cmp)
                        return true
                }
                // match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
@@ -39241,8 +39200,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETAE || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64UGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64UGE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no)
@@ -39259,8 +39217,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETO || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64OS)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64OS, cmp)
                        return true
                }
                // match: (NE (TESTL (SHLL (MOVLconst [1]) x) y))
@@ -39280,10 +39237,9 @@ func rewriteBlockAMD64(b *Block) bool {
                                        continue
                                }
                                y := v_0_1
-                               b.Reset(BlockAMD64ULT)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTL, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64ULT, v0)
                                return true
                        }
                        break
@@ -39305,10 +39261,9 @@ func rewriteBlockAMD64(b *Block) bool {
                                        continue
                                }
                                y := v_0_1
-                               b.Reset(BlockAMD64ULT)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQ, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64ULT, v0)
                                return true
                        }
                        break
@@ -39323,11 +39278,10 @@ func rewriteBlockAMD64(b *Block) bool {
                        if !(isUint32PowerOfTwo(c)) {
                                break
                        }
-                       b.Reset(BlockAMD64ULT)
                        v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags)
                        v0.AuxInt = log2uint32(c)
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockAMD64ULT, v0)
                        return true
                }
                // match: (NE (TESTQconst [c] x))
@@ -39340,11 +39294,10 @@ func rewriteBlockAMD64(b *Block) bool {
                        if !(isUint64PowerOfTwo(c)) {
                                break
                        }
-                       b.Reset(BlockAMD64ULT)
                        v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                        v0.AuxInt = log2(c)
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockAMD64ULT, v0)
                        return true
                }
                // match: (NE (TESTQ (MOVQconst [c]) x))
@@ -39364,11 +39317,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(isUint64PowerOfTwo(c)) {
                                        continue
                                }
-                               b.Reset(BlockAMD64ULT)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                                v0.AuxInt = log2(c)
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64ULT, v0)
                                return true
                        }
                        break
@@ -39395,11 +39347,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64ULT)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                                v0.AuxInt = 63
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64ULT, v0)
                                return true
                        }
                        break
@@ -39426,11 +39377,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64ULT)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                                v0.AuxInt = 31
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64ULT, v0)
                                return true
                        }
                        break
@@ -39457,11 +39407,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64ULT)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                                v0.AuxInt = 0
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64ULT, v0)
                                return true
                        }
                        break
@@ -39488,11 +39437,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64ULT)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags)
                                v0.AuxInt = 0
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64ULT, v0)
                                return true
                        }
                        break
@@ -39515,11 +39463,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64ULT)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTQconst, types.TypeFlags)
                                v0.AuxInt = 63
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64ULT, v0)
                                return true
                        }
                        break
@@ -39542,11 +39489,10 @@ func rewriteBlockAMD64(b *Block) bool {
                                if !(z1 == z2) {
                                        continue
                                }
-                               b.Reset(BlockAMD64ULT)
                                v0 := b.NewValue0(v_0.Pos, OpAMD64BTLconst, types.TypeFlags)
                                v0.AuxInt = 31
                                v0.AddArg(x)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockAMD64ULT, v0)
                                return true
                        }
                        break
@@ -39565,8 +39511,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETGF || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64UGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64UGT, cmp)
                        return true
                }
                // match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
@@ -39583,8 +39528,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETGEF || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64UGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64UGE, cmp)
                        return true
                }
                // match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
@@ -39601,8 +39545,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETEQF || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64EQF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64EQF, cmp)
                        return true
                }
                // match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
@@ -39619,8 +39562,7 @@ func rewriteBlockAMD64(b *Block) bool {
                        if v_0_1.Op != OpAMD64SETNEF || cmp != v_0_1.Args[0] {
                                break
                        }
-                       b.Reset(BlockAMD64NEF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64NEF, cmp)
                        return true
                }
                // match: (NE (InvertFlags cmp) yes no)
@@ -39628,8 +39570,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64NE, cmp)
                        return true
                }
                // match: (NE (FlagEQ) yes no)
@@ -39713,8 +39654,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64ULE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64ULE, cmp)
                        return true
                }
                // match: (UGE (FlagEQ) yes no)
@@ -39755,8 +39695,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64ULT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64ULT, cmp)
                        return true
                }
                // match: (UGT (FlagEQ) yes no)
@@ -39798,8 +39737,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64UGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64UGE, cmp)
                        return true
                }
                // match: (ULE (FlagEQ) yes no)
@@ -39888,8 +39826,7 @@ func rewriteBlockAMD64(b *Block) bool {
                for b.Controls[0].Op == OpAMD64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockAMD64UGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockAMD64UGT, cmp)
                        return true
                }
                // match: (ULT (FlagEQ) yes no)
index bf1cf2d183712cd0c6582caed9c5e32380090782..52ab5224346879b1f42d8fbc6d035cab615a1b9e 100644 (file)
@@ -16828,8 +16828,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMInvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARMEQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARMEQ, cmp)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(SUB x y)) yes no)
@@ -16849,10 +16848,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(MULS x y a)) yes no)
@@ -16873,12 +16871,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(SUBconst [c] x)) yes no)
@@ -16898,11 +16895,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
@@ -16923,11 +16919,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
@@ -16948,11 +16943,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
@@ -16973,11 +16967,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
@@ -16998,10 +16991,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
@@ -17022,10 +17014,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
@@ -17046,10 +17037,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ADD x y)) yes no)
@@ -17073,10 +17063,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMEQ)
                                v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMEQ, v0)
                                return true
                        }
                        break
@@ -17099,12 +17088,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ADDconst [c] x)) yes no)
@@ -17124,11 +17112,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
@@ -17149,11 +17136,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
@@ -17174,11 +17160,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
@@ -17199,11 +17184,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
@@ -17224,10 +17208,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
@@ -17248,10 +17231,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
@@ -17272,10 +17254,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(AND x y)) yes no)
@@ -17299,10 +17280,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMEQ)
                                v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMEQ, v0)
                                return true
                        }
                        break
@@ -17324,11 +17304,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
@@ -17349,11 +17328,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
@@ -17374,11 +17352,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
@@ -17399,11 +17376,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
@@ -17424,10 +17400,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
@@ -17448,10 +17423,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
@@ -17472,10 +17446,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(XOR x y)) yes no)
@@ -17499,10 +17472,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMEQ)
                                v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMEQ, v0)
                                return true
                        }
                        break
@@ -17524,11 +17496,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
@@ -17549,11 +17520,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
@@ -17574,11 +17544,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
@@ -17599,11 +17568,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
@@ -17624,10 +17592,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
@@ -17648,10 +17615,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
@@ -17672,10 +17638,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMEQ)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMEQ, v0)
                        return true
                }
        case BlockARMGE:
@@ -17716,8 +17681,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMInvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARMLE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARMLE, cmp)
                        return true
                }
                // match: (GE (CMPconst [0] l:(SUB x y)) yes no)
@@ -17737,10 +17701,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(MULS x y a)) yes no)
@@ -17761,12 +17724,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(SUBconst [c] x)) yes no)
@@ -17786,11 +17748,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
@@ -17811,11 +17772,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
@@ -17836,11 +17796,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
@@ -17861,11 +17820,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
@@ -17886,10 +17844,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
@@ -17910,10 +17867,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
@@ -17934,10 +17890,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ADD x y)) yes no)
@@ -17961,10 +17916,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMGE)
                                v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMGE, v0)
                                return true
                        }
                        break
@@ -17987,12 +17941,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ADDconst [c] x)) yes no)
@@ -18012,11 +17965,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
@@ -18037,11 +17989,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
@@ -18062,11 +18013,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
@@ -18087,11 +18037,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
@@ -18112,10 +18061,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
@@ -18136,10 +18084,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
@@ -18160,10 +18107,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(AND x y)) yes no)
@@ -18187,10 +18133,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMGE)
                                v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMGE, v0)
                                return true
                        }
                        break
@@ -18212,11 +18157,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
@@ -18237,11 +18181,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
@@ -18262,11 +18205,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
@@ -18287,11 +18229,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
@@ -18312,10 +18253,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
@@ -18336,10 +18276,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
@@ -18360,10 +18299,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(XOR x y)) yes no)
@@ -18387,10 +18325,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMGE)
                                v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMGE, v0)
                                return true
                        }
                        break
@@ -18412,11 +18349,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
@@ -18437,11 +18373,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
@@ -18462,11 +18397,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
@@ -18487,11 +18421,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
@@ -18512,10 +18445,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
@@ -18536,10 +18468,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
@@ -18560,10 +18491,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGE, v0)
                        return true
                }
        case BlockARMGT:
@@ -18605,8 +18535,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMInvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARMLT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARMLT, cmp)
                        return true
                }
                // match: (GT (CMPconst [0] l:(SUB x y)) yes no)
@@ -18626,10 +18555,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(MULS x y a)) yes no)
@@ -18650,12 +18578,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(SUBconst [c] x)) yes no)
@@ -18675,11 +18602,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
@@ -18700,11 +18626,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
@@ -18725,11 +18650,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
@@ -18750,11 +18674,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
@@ -18775,10 +18698,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
@@ -18799,10 +18721,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
@@ -18823,10 +18744,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ADD x y)) yes no)
@@ -18850,10 +18770,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMGT)
                                v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMGT, v0)
                                return true
                        }
                        break
@@ -18875,11 +18794,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
@@ -18900,11 +18818,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
@@ -18925,11 +18842,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
@@ -18950,11 +18866,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
@@ -18975,10 +18890,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
@@ -18999,10 +18913,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
@@ -19023,10 +18936,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(AND x y)) yes no)
@@ -19050,10 +18962,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMGT)
                                v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMGT, v0)
                                return true
                        }
                        break
@@ -19076,12 +18987,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ANDconst [c] x)) yes no)
@@ -19101,11 +19011,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
@@ -19126,11 +19035,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
@@ -19151,11 +19059,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
@@ -19176,11 +19083,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
@@ -19201,10 +19107,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
@@ -19225,10 +19130,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
@@ -19249,10 +19153,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(XOR x y)) yes no)
@@ -19276,10 +19179,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMGT)
                                v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMGT, v0)
                                return true
                        }
                        break
@@ -19301,11 +19203,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
@@ -19326,11 +19227,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
@@ -19351,11 +19251,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
@@ -19376,11 +19275,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
@@ -19401,10 +19299,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
@@ -19425,10 +19322,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
@@ -19449,10 +19345,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMGT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMGT, v0)
                        return true
                }
        case BlockIf:
@@ -19461,8 +19356,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARMEQ)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMEQ, cc)
                        return true
                }
                // match: (If (NotEqual cc) yes no)
@@ -19470,8 +19364,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMNotEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARMNE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMNE, cc)
                        return true
                }
                // match: (If (LessThan cc) yes no)
@@ -19479,8 +19372,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMLessThan {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARMLT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMLT, cc)
                        return true
                }
                // match: (If (LessThanU cc) yes no)
@@ -19488,8 +19380,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMLessThanU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARMULT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMULT, cc)
                        return true
                }
                // match: (If (LessEqual cc) yes no)
@@ -19497,8 +19388,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMLessEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARMLE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMLE, cc)
                        return true
                }
                // match: (If (LessEqualU cc) yes no)
@@ -19506,8 +19396,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMLessEqualU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARMULE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMULE, cc)
                        return true
                }
                // match: (If (GreaterThan cc) yes no)
@@ -19515,8 +19404,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMGreaterThan {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARMGT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMGT, cc)
                        return true
                }
                // match: (If (GreaterThanU cc) yes no)
@@ -19524,8 +19412,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMGreaterThanU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARMUGT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMUGT, cc)
                        return true
                }
                // match: (If (GreaterEqual cc) yes no)
@@ -19533,8 +19420,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMGreaterEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARMGE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMGE, cc)
                        return true
                }
                // match: (If (GreaterEqualU cc) yes no)
@@ -19542,19 +19428,17 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMGreaterEqualU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARMUGE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMUGE, cc)
                        return true
                }
                // match: (If cond yes no)
                // result: (NE (CMPconst [0] cond) yes no)
                for {
                        cond := b.Controls[0]
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(cond.Pos, OpARMCMPconst, types.TypeFlags)
                        v0.AuxInt = 0
                        v0.AddArg(cond)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
        case BlockARMLE:
@@ -19595,8 +19479,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMInvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARMGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARMGE, cmp)
                        return true
                }
                // match: (LE (CMPconst [0] l:(SUB x y)) yes no)
@@ -19616,10 +19499,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(MULS x y a)) yes no)
@@ -19640,12 +19522,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(SUBconst [c] x)) yes no)
@@ -19665,11 +19546,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
@@ -19690,11 +19570,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
@@ -19715,11 +19594,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
@@ -19740,11 +19618,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
@@ -19765,10 +19642,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
@@ -19789,10 +19665,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
@@ -19813,10 +19688,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ADD x y)) yes no)
@@ -19840,10 +19714,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMLE)
                                v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMLE, v0)
                                return true
                        }
                        break
@@ -19866,12 +19739,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ADDconst [c] x)) yes no)
@@ -19891,11 +19763,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
@@ -19916,11 +19787,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
@@ -19941,11 +19811,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
@@ -19966,11 +19835,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
@@ -19991,10 +19859,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
@@ -20015,10 +19882,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
@@ -20039,10 +19905,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(AND x y)) yes no)
@@ -20066,10 +19931,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMLE)
                                v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMLE, v0)
                                return true
                        }
                        break
@@ -20091,11 +19955,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
@@ -20116,11 +19979,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
@@ -20141,11 +20003,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
@@ -20166,11 +20027,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
@@ -20191,10 +20051,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
@@ -20215,10 +20074,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
@@ -20239,10 +20097,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(XOR x y)) yes no)
@@ -20266,10 +20123,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMLE)
                                v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMLE, v0)
                                return true
                        }
                        break
@@ -20291,11 +20147,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
@@ -20316,11 +20171,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
@@ -20341,11 +20195,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
@@ -20366,11 +20219,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
@@ -20391,10 +20243,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
@@ -20415,10 +20266,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
@@ -20439,10 +20289,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLE, v0)
                        return true
                }
        case BlockARMLT:
@@ -20484,8 +20333,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMInvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARMGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARMGT, cmp)
                        return true
                }
                // match: (LT (CMPconst [0] l:(SUB x y)) yes no)
@@ -20505,10 +20353,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(MULS x y a)) yes no)
@@ -20529,12 +20376,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(SUBconst [c] x)) yes no)
@@ -20554,11 +20400,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
@@ -20579,11 +20424,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
@@ -20604,11 +20448,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
@@ -20629,11 +20472,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
@@ -20654,10 +20496,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
@@ -20678,10 +20519,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
@@ -20702,10 +20542,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ADD x y)) yes no)
@@ -20729,10 +20568,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMLT)
                                v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMLT, v0)
                                return true
                        }
                        break
@@ -20755,12 +20593,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ADDconst [c] x)) yes no)
@@ -20780,11 +20617,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
@@ -20805,11 +20641,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
@@ -20830,11 +20665,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
@@ -20855,11 +20689,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
@@ -20880,10 +20713,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
@@ -20904,10 +20736,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
@@ -20928,10 +20759,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(AND x y)) yes no)
@@ -20955,10 +20785,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMLT)
                                v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMLT, v0)
                                return true
                        }
                        break
@@ -20980,11 +20809,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
@@ -21005,11 +20833,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
@@ -21030,11 +20857,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
@@ -21055,11 +20881,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
@@ -21080,10 +20905,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
@@ -21104,10 +20928,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
@@ -21128,10 +20951,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(XOR x y)) yes no)
@@ -21155,10 +20977,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMLT)
                                v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMLT, v0)
                                return true
                        }
                        break
@@ -21180,11 +21001,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
@@ -21205,11 +21025,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
@@ -21230,11 +21049,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
@@ -21255,11 +21073,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
@@ -21280,10 +21097,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
@@ -21304,10 +21120,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
@@ -21328,10 +21143,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMLT)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMLT, v0)
                        return true
                }
        case BlockARMNE:
@@ -21347,8 +21161,7 @@ func rewriteBlockARM(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockARMEQ)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMEQ, cc)
                        return true
                }
                // match: (NE (CMPconst [0] (NotEqual cc)) yes no)
@@ -21363,8 +21176,7 @@ func rewriteBlockARM(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockARMNE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMNE, cc)
                        return true
                }
                // match: (NE (CMPconst [0] (LessThan cc)) yes no)
@@ -21379,8 +21191,7 @@ func rewriteBlockARM(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockARMLT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMLT, cc)
                        return true
                }
                // match: (NE (CMPconst [0] (LessThanU cc)) yes no)
@@ -21395,8 +21206,7 @@ func rewriteBlockARM(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockARMULT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMULT, cc)
                        return true
                }
                // match: (NE (CMPconst [0] (LessEqual cc)) yes no)
@@ -21411,8 +21221,7 @@ func rewriteBlockARM(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockARMLE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMLE, cc)
                        return true
                }
                // match: (NE (CMPconst [0] (LessEqualU cc)) yes no)
@@ -21427,8 +21236,7 @@ func rewriteBlockARM(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockARMULE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMULE, cc)
                        return true
                }
                // match: (NE (CMPconst [0] (GreaterThan cc)) yes no)
@@ -21443,8 +21251,7 @@ func rewriteBlockARM(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockARMGT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMGT, cc)
                        return true
                }
                // match: (NE (CMPconst [0] (GreaterThanU cc)) yes no)
@@ -21459,8 +21266,7 @@ func rewriteBlockARM(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockARMUGT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMUGT, cc)
                        return true
                }
                // match: (NE (CMPconst [0] (GreaterEqual cc)) yes no)
@@ -21475,8 +21281,7 @@ func rewriteBlockARM(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockARMGE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMGE, cc)
                        return true
                }
                // match: (NE (CMPconst [0] (GreaterEqualU cc)) yes no)
@@ -21491,8 +21296,7 @@ func rewriteBlockARM(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockARMUGE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARMUGE, cc)
                        return true
                }
                // match: (NE (FlagEQ) yes no)
@@ -21531,8 +21335,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMInvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARMNE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARMNE, cmp)
                        return true
                }
                // match: (NE (CMPconst [0] l:(SUB x y)) yes no)
@@ -21552,10 +21355,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(MULS x y a)) yes no)
@@ -21576,12 +21378,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(SUBconst [c] x)) yes no)
@@ -21601,11 +21402,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
@@ -21626,11 +21426,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
@@ -21651,11 +21450,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
@@ -21676,11 +21474,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
@@ -21701,10 +21498,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
@@ -21725,10 +21521,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
@@ -21749,10 +21544,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMPshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ADD x y)) yes no)
@@ -21776,10 +21570,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMNE)
                                v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMNE, v0)
                                return true
                        }
                        break
@@ -21802,12 +21595,11 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARMMUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ADDconst [c] x)) yes no)
@@ -21827,11 +21619,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
@@ -21852,11 +21643,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
@@ -21877,11 +21667,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
@@ -21902,11 +21691,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
@@ -21927,10 +21715,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
@@ -21951,10 +21738,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
@@ -21975,10 +21761,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMCMNshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(AND x y)) yes no)
@@ -22002,10 +21787,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMNE)
                                v0 := b.NewValue0(v_0.Pos, OpARMTST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMNE, v0)
                                return true
                        }
                        break
@@ -22027,11 +21811,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
@@ -22052,11 +21835,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
@@ -22077,11 +21859,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
@@ -22102,11 +21883,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
@@ -22127,10 +21907,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
@@ -22151,10 +21930,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
@@ -22175,10 +21953,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTSTshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(XOR x y)) yes no)
@@ -22202,10 +21979,9 @@ func rewriteBlockARM(b *Block) bool {
                                if !(l.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARMNE)
                                v0 := b.NewValue0(v_0.Pos, OpARMTEQ, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARMNE, v0)
                                return true
                        }
                        break
@@ -22227,11 +22003,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
@@ -22252,11 +22027,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
@@ -22277,11 +22051,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRL, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
@@ -22302,11 +22075,10 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRA, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
@@ -22327,10 +22099,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftLLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
@@ -22351,10 +22122,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRLreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
@@ -22375,10 +22145,9 @@ func rewriteBlockARM(b *Block) bool {
                        if !(l.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARMNE)
                        v0 := b.NewValue0(v_0.Pos, OpARMTEQshiftRAreg, types.TypeFlags)
                        v0.AddArg3(x, y, z)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARMNE, v0)
                        return true
                }
        case BlockARMUGE:
@@ -22419,8 +22188,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMInvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARMULE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARMULE, cmp)
                        return true
                }
        case BlockARMUGT:
@@ -22462,8 +22230,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMInvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARMULT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARMULT, cmp)
                        return true
                }
        case BlockARMULE:
@@ -22504,8 +22271,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMInvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARMUGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARMUGE, cmp)
                        return true
                }
        case BlockARMULT:
@@ -22547,8 +22313,7 @@ func rewriteBlockARM(b *Block) bool {
                for b.Controls[0].Op == OpARMInvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARMUGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARMUGT, cmp)
                        return true
                }
        }
index a6b13497acabd85f344357612ebf9f0e82755607..99beedcea1e5db6fb513c799a19fcb69212bff1a 100644 (file)
@@ -25854,11 +25854,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64EQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] z:(AND x y)) yes no)
@@ -25882,10 +25881,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64EQ)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64EQ, v0)
                                return true
                        }
                        break
@@ -25911,10 +25909,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64EQ)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64EQ, v0)
                                return true
                        }
                        break
@@ -25936,11 +25933,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64EQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] x:(ADDconst [c] y)) yes no)
@@ -25960,11 +25956,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64EQ, v0)
                        return true
                }
                // match: (EQ (CMPWconst [0] x:(ADDconst [c] y)) yes no)
@@ -25984,11 +25979,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64EQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] z:(ADD x y)) yes no)
@@ -26012,10 +26006,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64EQ)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64EQ, v0)
                                return true
                        }
                        break
@@ -26041,10 +26034,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64EQ)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64EQ, v0)
                                return true
                        }
                        break
@@ -26064,10 +26056,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64EQ, v0)
                        return true
                }
                // match: (EQ (CMPW x z:(NEG y)) yes no)
@@ -26085,10 +26076,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64EQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] x) yes no)
@@ -26099,8 +26089,7 @@ func rewriteBlockARM64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockARM64Z)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64Z, x)
                        return true
                }
                // match: (EQ (CMPWconst [0] x) yes no)
@@ -26111,8 +26100,7 @@ func rewriteBlockARM64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockARM64ZW)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64ZW, x)
                        return true
                }
                // match: (EQ (CMPconst [0] z:(MADD a x y)) yes no)
@@ -26133,12 +26121,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64EQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] z:(MSUB a x y)) yes no)
@@ -26159,12 +26146,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64EQ, v0)
                        return true
                }
                // match: (EQ (CMPWconst [0] z:(MADDW a x y)) yes no)
@@ -26185,12 +26171,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64EQ, v0)
                        return true
                }
                // match: (EQ (CMPWconst [0] z:(MSUBW a x y)) yes no)
@@ -26211,12 +26196,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64EQ, v0)
                        return true
                }
                // match: (EQ (TSTconst [c] x) yes no)
@@ -26229,8 +26213,7 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(oneBit(c)) {
                                break
                        }
-                       b.Reset(BlockARM64TBZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBZ, x)
                        b.Aux = ntz(c)
                        return true
                }
@@ -26244,8 +26227,7 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(oneBit(int64(uint32(c)))) {
                                break
                        }
-                       b.Reset(BlockARM64TBZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBZ, x)
                        b.Aux = ntz(int64(uint32(c)))
                        return true
                }
@@ -26288,8 +26270,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64EQ, cmp)
                        return true
                }
        case BlockARM64FGE:
@@ -26298,8 +26279,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64FLE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64FLE, cmp)
                        return true
                }
        case BlockARM64FGT:
@@ -26308,8 +26288,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64FLT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64FLT, cmp)
                        return true
                }
        case BlockARM64FLE:
@@ -26318,8 +26297,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64FGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64FGE, cmp)
                        return true
                }
        case BlockARM64FLT:
@@ -26328,8 +26306,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64FGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64FGT, cmp)
                        return true
                }
        case BlockARM64GE:
@@ -26350,11 +26327,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] z:(AND x y)) yes no)
@@ -26378,10 +26354,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64GE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64GE, v0)
                                return true
                        }
                        break
@@ -26407,10 +26382,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64GE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64GE, v0)
                                return true
                        }
                        break
@@ -26432,11 +26406,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] x:(ADDconst [c] y)) yes no)
@@ -26456,11 +26429,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GE, v0)
                        return true
                }
                // match: (GE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
@@ -26480,11 +26452,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] z:(ADD x y)) yes no)
@@ -26508,10 +26479,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64GE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64GE, v0)
                                return true
                        }
                        break
@@ -26537,10 +26507,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64GE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64GE, v0)
                                return true
                        }
                        break
@@ -26560,10 +26529,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GE, v0)
                        return true
                }
                // match: (GE (CMPW x z:(NEG y)) yes no)
@@ -26581,10 +26549,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] z:(MADD a x y)) yes no)
@@ -26605,12 +26572,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] z:(MSUB a x y)) yes no)
@@ -26631,12 +26597,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GE, v0)
                        return true
                }
                // match: (GE (CMPWconst [0] z:(MADDW a x y)) yes no)
@@ -26657,12 +26622,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GE, v0)
                        return true
                }
                // match: (GE (CMPWconst [0] z:(MSUBW a x y)) yes no)
@@ -26683,12 +26647,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GE, v0)
                        return true
                }
                // match: (GE (CMPWconst [0] x) yes no)
@@ -26699,8 +26662,7 @@ func rewriteBlockARM64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockARM64TBZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBZ, x)
                        b.Aux = int64(31)
                        return true
                }
@@ -26712,8 +26674,7 @@ func rewriteBlockARM64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockARM64TBZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBZ, x)
                        b.Aux = int64(63)
                        return true
                }
@@ -26754,8 +26715,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64LE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64LE, cmp)
                        return true
                }
        case BlockARM64GT:
@@ -26776,11 +26736,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] z:(AND x y)) yes no)
@@ -26804,10 +26763,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64GT)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64GT, v0)
                                return true
                        }
                        break
@@ -26833,10 +26791,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64GT)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64GT, v0)
                                return true
                        }
                        break
@@ -26858,11 +26815,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] x:(ADDconst [c] y)) yes no)
@@ -26882,11 +26838,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GT, v0)
                        return true
                }
                // match: (GT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
@@ -26906,11 +26861,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] z:(ADD x y)) yes no)
@@ -26934,10 +26888,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64GT)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64GT, v0)
                                return true
                        }
                        break
@@ -26963,10 +26916,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64GT)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64GT, v0)
                                return true
                        }
                        break
@@ -26986,10 +26938,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GT, v0)
                        return true
                }
                // match: (GT (CMPW x z:(NEG y)) yes no)
@@ -27007,10 +26958,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] z:(MADD a x y)) yes no)
@@ -27031,12 +26981,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] z:(MSUB a x y)) yes no)
@@ -27057,12 +27006,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GT, v0)
                        return true
                }
                // match: (GT (CMPWconst [0] z:(MADDW a x y)) yes no)
@@ -27083,12 +27031,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GT, v0)
                        return true
                }
                // match: (GT (CMPWconst [0] z:(MSUBW a x y)) yes no)
@@ -27109,12 +27056,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64GT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64GT, v0)
                        return true
                }
                // match: (GT (FlagEQ) yes no)
@@ -27155,8 +27101,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64LT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64LT, cmp)
                        return true
                }
        case BlockIf:
@@ -27165,8 +27110,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64Equal {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64EQ)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64EQ, cc)
                        return true
                }
                // match: (If (NotEqual cc) yes no)
@@ -27174,8 +27118,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64NotEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64NE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64NE, cc)
                        return true
                }
                // match: (If (LessThan cc) yes no)
@@ -27183,8 +27126,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessThan {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64LT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64LT, cc)
                        return true
                }
                // match: (If (LessThanU cc) yes no)
@@ -27192,8 +27134,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessThanU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64ULT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64ULT, cc)
                        return true
                }
                // match: (If (LessEqual cc) yes no)
@@ -27201,8 +27142,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64LE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64LE, cc)
                        return true
                }
                // match: (If (LessEqualU cc) yes no)
@@ -27210,8 +27150,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessEqualU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64ULE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64ULE, cc)
                        return true
                }
                // match: (If (GreaterThan cc) yes no)
@@ -27219,8 +27158,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterThan {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64GT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64GT, cc)
                        return true
                }
                // match: (If (GreaterThanU cc) yes no)
@@ -27228,8 +27166,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterThanU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64UGT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64UGT, cc)
                        return true
                }
                // match: (If (GreaterEqual cc) yes no)
@@ -27237,8 +27174,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64GE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64GE, cc)
                        return true
                }
                // match: (If (GreaterEqualU cc) yes no)
@@ -27246,8 +27182,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterEqualU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64UGE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64UGE, cc)
                        return true
                }
                // match: (If (LessThanF cc) yes no)
@@ -27255,8 +27190,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessThanF {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64FLT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64FLT, cc)
                        return true
                }
                // match: (If (LessEqualF cc) yes no)
@@ -27264,8 +27198,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessEqualF {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64FLE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64FLE, cc)
                        return true
                }
                // match: (If (GreaterThanF cc) yes no)
@@ -27273,8 +27206,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterThanF {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64FGT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64FGT, cc)
                        return true
                }
                // match: (If (GreaterEqualF cc) yes no)
@@ -27282,16 +27214,14 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterEqualF {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64FGE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64FGE, cc)
                        return true
                }
                // match: (If cond yes no)
                // result: (NZ cond yes no)
                for {
                        cond := b.Controls[0]
-                       b.Reset(BlockARM64NZ)
-                       b.AddControl(cond)
+                       b.resetWithControl(BlockARM64NZ, cond)
                        return true
                }
        case BlockARM64LE:
@@ -27312,11 +27242,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] z:(AND x y)) yes no)
@@ -27340,10 +27269,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64LE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64LE, v0)
                                return true
                        }
                        break
@@ -27369,10 +27297,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64LE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64LE, v0)
                                return true
                        }
                        break
@@ -27394,11 +27321,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] x:(ADDconst [c] y)) yes no)
@@ -27418,11 +27344,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LE, v0)
                        return true
                }
                // match: (LE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
@@ -27442,11 +27367,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] z:(ADD x y)) yes no)
@@ -27470,10 +27394,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64LE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64LE, v0)
                                return true
                        }
                        break
@@ -27499,10 +27422,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64LE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64LE, v0)
                                return true
                        }
                        break
@@ -27522,10 +27444,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LE, v0)
                        return true
                }
                // match: (LE (CMPW x z:(NEG y)) yes no)
@@ -27543,10 +27464,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] z:(MADD a x y)) yes no)
@@ -27567,12 +27487,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] z:(MSUB a x y)) yes no)
@@ -27593,12 +27512,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LE, v0)
                        return true
                }
                // match: (LE (CMPWconst [0] z:(MADDW a x y)) yes no)
@@ -27619,12 +27537,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LE, v0)
                        return true
                }
                // match: (LE (CMPWconst [0] z:(MSUBW a x y)) yes no)
@@ -27645,12 +27562,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LE, v0)
                        return true
                }
                // match: (LE (FlagEQ) yes no)
@@ -27690,8 +27606,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64GE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64GE, cmp)
                        return true
                }
        case BlockARM64LT:
@@ -27712,11 +27627,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] z:(AND x y)) yes no)
@@ -27740,10 +27654,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64LT)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64LT, v0)
                                return true
                        }
                        break
@@ -27769,10 +27682,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64LT)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64LT, v0)
                                return true
                        }
                        break
@@ -27794,11 +27706,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] x:(ADDconst [c] y)) yes no)
@@ -27818,11 +27729,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LT, v0)
                        return true
                }
                // match: (LT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
@@ -27842,11 +27752,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] z:(ADD x y)) yes no)
@@ -27870,10 +27779,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64LT)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64LT, v0)
                                return true
                        }
                        break
@@ -27899,10 +27807,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64LT)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64LT, v0)
                                return true
                        }
                        break
@@ -27922,10 +27829,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LT, v0)
                        return true
                }
                // match: (LT (CMPW x z:(NEG y)) yes no)
@@ -27943,10 +27849,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] z:(MADD a x y)) yes no)
@@ -27967,12 +27872,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] z:(MSUB a x y)) yes no)
@@ -27993,12 +27897,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LT, v0)
                        return true
                }
                // match: (LT (CMPWconst [0] z:(MADDW a x y)) yes no)
@@ -28019,12 +27922,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LT, v0)
                        return true
                }
                // match: (LT (CMPWconst [0] z:(MSUBW a x y)) yes no)
@@ -28045,12 +27947,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64LT)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64LT, v0)
                        return true
                }
                // match: (LT (CMPWconst [0] x) yes no)
@@ -28061,8 +27962,7 @@ func rewriteBlockARM64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockARM64TBNZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBNZ, x)
                        b.Aux = int64(31)
                        return true
                }
@@ -28074,8 +27974,7 @@ func rewriteBlockARM64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockARM64TBNZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBNZ, x)
                        b.Aux = int64(63)
                        return true
                }
@@ -28117,8 +28016,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64GT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64GT, cmp)
                        return true
                }
        case BlockARM64NE:
@@ -28139,11 +28037,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64NE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64NE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] z:(AND x y)) yes no)
@@ -28167,10 +28064,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64NE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64NE, v0)
                                return true
                        }
                        break
@@ -28196,10 +28092,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64NE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64NE, v0)
                                return true
                        }
                        break
@@ -28221,11 +28116,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64NE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64NE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] x:(ADDconst [c] y)) yes no)
@@ -28245,11 +28139,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64NE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64NE, v0)
                        return true
                }
                // match: (NE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
@@ -28269,11 +28162,10 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(x.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64NE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64NE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] z:(ADD x y)) yes no)
@@ -28297,10 +28189,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64NE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64NE, v0)
                                return true
                        }
                        break
@@ -28326,10 +28217,9 @@ func rewriteBlockARM64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockARM64NE)
                                v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockARM64NE, v0)
                                return true
                        }
                        break
@@ -28349,10 +28239,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64NE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64NE, v0)
                        return true
                }
                // match: (NE (CMPW x z:(NEG y)) yes no)
@@ -28370,10 +28259,9 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64NE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v0.AddArg2(x, y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64NE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] x) yes no)
@@ -28384,8 +28272,7 @@ func rewriteBlockARM64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockARM64NZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64NZ, x)
                        return true
                }
                // match: (NE (CMPWconst [0] x) yes no)
@@ -28396,8 +28283,7 @@ func rewriteBlockARM64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockARM64NZW)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64NZW, x)
                        return true
                }
                // match: (NE (CMPconst [0] z:(MADD a x y)) yes no)
@@ -28418,12 +28304,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64NE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64NE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] z:(MSUB a x y)) yes no)
@@ -28444,12 +28329,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64NE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64NE, v0)
                        return true
                }
                // match: (NE (CMPWconst [0] z:(MADDW a x y)) yes no)
@@ -28470,12 +28354,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64NE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64NE, v0)
                        return true
                }
                // match: (NE (CMPWconst [0] z:(MSUBW a x y)) yes no)
@@ -28496,12 +28379,11 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(z.Uses == 1) {
                                break
                        }
-                       b.Reset(BlockARM64NE)
                        v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
                        v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
                        v1.AddArg2(x, y)
                        v0.AddArg2(a, v1)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockARM64NE, v0)
                        return true
                }
                // match: (NE (TSTconst [c] x) yes no)
@@ -28514,8 +28396,7 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(oneBit(c)) {
                                break
                        }
-                       b.Reset(BlockARM64TBNZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBNZ, x)
                        b.Aux = ntz(c)
                        return true
                }
@@ -28529,8 +28410,7 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(oneBit(int64(uint32(c)))) {
                                break
                        }
-                       b.Reset(BlockARM64TBNZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBNZ, x)
                        b.Aux = ntz(int64(uint32(c)))
                        return true
                }
@@ -28570,8 +28450,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64NE, cmp)
                        return true
                }
        case BlockARM64NZ:
@@ -28580,8 +28459,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64Equal {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64EQ)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64EQ, cc)
                        return true
                }
                // match: (NZ (NotEqual cc) yes no)
@@ -28589,8 +28467,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64NotEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64NE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64NE, cc)
                        return true
                }
                // match: (NZ (LessThan cc) yes no)
@@ -28598,8 +28475,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessThan {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64LT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64LT, cc)
                        return true
                }
                // match: (NZ (LessThanU cc) yes no)
@@ -28607,8 +28483,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessThanU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64ULT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64ULT, cc)
                        return true
                }
                // match: (NZ (LessEqual cc) yes no)
@@ -28616,8 +28491,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64LE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64LE, cc)
                        return true
                }
                // match: (NZ (LessEqualU cc) yes no)
@@ -28625,8 +28499,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessEqualU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64ULE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64ULE, cc)
                        return true
                }
                // match: (NZ (GreaterThan cc) yes no)
@@ -28634,8 +28507,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterThan {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64GT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64GT, cc)
                        return true
                }
                // match: (NZ (GreaterThanU cc) yes no)
@@ -28643,8 +28515,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterThanU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64UGT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64UGT, cc)
                        return true
                }
                // match: (NZ (GreaterEqual cc) yes no)
@@ -28652,8 +28523,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64GE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64GE, cc)
                        return true
                }
                // match: (NZ (GreaterEqualU cc) yes no)
@@ -28661,8 +28531,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterEqualU {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64UGE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64UGE, cc)
                        return true
                }
                // match: (NZ (LessThanF cc) yes no)
@@ -28670,8 +28539,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessThanF {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64FLT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64FLT, cc)
                        return true
                }
                // match: (NZ (LessEqualF cc) yes no)
@@ -28679,8 +28547,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64LessEqualF {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64FLE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64FLE, cc)
                        return true
                }
                // match: (NZ (GreaterThanF cc) yes no)
@@ -28688,8 +28555,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterThanF {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64FGT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64FGT, cc)
                        return true
                }
                // match: (NZ (GreaterEqualF cc) yes no)
@@ -28697,8 +28563,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64GreaterEqualF {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockARM64FGE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockARM64FGE, cc)
                        return true
                }
                // match: (NZ (ANDconst [c] x) yes no)
@@ -28711,8 +28576,7 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(oneBit(c)) {
                                break
                        }
-                       b.Reset(BlockARM64TBNZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBNZ, x)
                        b.Aux = ntz(c)
                        return true
                }
@@ -28750,8 +28614,7 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(oneBit(int64(uint32(c)))) {
                                break
                        }
-                       b.Reset(BlockARM64TBNZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBNZ, x)
                        b.Aux = ntz(int64(uint32(c)))
                        return true
                }
@@ -28818,8 +28681,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64ULE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64ULE, cmp)
                        return true
                }
        case BlockARM64UGT:
@@ -28861,8 +28723,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64ULT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64ULT, cmp)
                        return true
                }
        case BlockARM64ULE:
@@ -28903,8 +28764,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64UGE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64UGE, cmp)
                        return true
                }
        case BlockARM64ULT:
@@ -28946,8 +28806,7 @@ func rewriteBlockARM64(b *Block) bool {
                for b.Controls[0].Op == OpARM64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockARM64UGT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockARM64UGT, cmp)
                        return true
                }
        case BlockARM64Z:
@@ -28961,8 +28820,7 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(oneBit(c)) {
                                break
                        }
-                       b.Reset(BlockARM64TBZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBZ, x)
                        b.Aux = ntz(c)
                        return true
                }
@@ -29000,8 +28858,7 @@ func rewriteBlockARM64(b *Block) bool {
                        if !(oneBit(int64(uint32(c)))) {
                                break
                        }
-                       b.Reset(BlockARM64TBZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockARM64TBZ, x)
                        b.Aux = ntz(int64(uint32(c)))
                        return true
                }
index e036885a16bc1bb6e1d8f17d55f552d5d2fcd5e1..83bb92fc35ec34ba26448f8aff9aa8424f0dd493 100644 (file)
@@ -7247,8 +7247,7 @@ func rewriteBlockMIPS(b *Block) bool {
                for b.Controls[0].Op == OpMIPSFPFlagTrue {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockMIPSFPF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSFPF, cmp)
                        return true
                }
                // match: (EQ (FPFlagFalse cmp) yes no)
@@ -7256,8 +7255,7 @@ func rewriteBlockMIPS(b *Block) bool {
                for b.Controls[0].Op == OpMIPSFPFlagFalse {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockMIPSFPT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSFPT, cmp)
                        return true
                }
                // match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no)
@@ -7272,8 +7270,7 @@ func rewriteBlockMIPS(b *Block) bool {
                                break
                        }
                        _ = cmp.Args[1]
-                       b.Reset(BlockMIPSNE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSNE, cmp)
                        return true
                }
                // match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no)
@@ -7288,8 +7285,7 @@ func rewriteBlockMIPS(b *Block) bool {
                                break
                        }
                        _ = cmp.Args[1]
-                       b.Reset(BlockMIPSNE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSNE, cmp)
                        return true
                }
                // match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no)
@@ -7303,8 +7299,7 @@ func rewriteBlockMIPS(b *Block) bool {
                        if cmp.Op != OpMIPSSGTconst {
                                break
                        }
-                       b.Reset(BlockMIPSNE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSNE, cmp)
                        return true
                }
                // match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no)
@@ -7318,8 +7313,7 @@ func rewriteBlockMIPS(b *Block) bool {
                        if cmp.Op != OpMIPSSGTUconst {
                                break
                        }
-                       b.Reset(BlockMIPSNE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSNE, cmp)
                        return true
                }
                // match: (EQ (XORconst [1] cmp:(SGTzero _)) yes no)
@@ -7333,8 +7327,7 @@ func rewriteBlockMIPS(b *Block) bool {
                        if cmp.Op != OpMIPSSGTzero {
                                break
                        }
-                       b.Reset(BlockMIPSNE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSNE, cmp)
                        return true
                }
                // match: (EQ (XORconst [1] cmp:(SGTUzero _)) yes no)
@@ -7348,8 +7341,7 @@ func rewriteBlockMIPS(b *Block) bool {
                        if cmp.Op != OpMIPSSGTUzero {
                                break
                        }
-                       b.Reset(BlockMIPSNE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSNE, cmp)
                        return true
                }
                // match: (EQ (SGTUconst [1] x) yes no)
@@ -7360,8 +7352,7 @@ func rewriteBlockMIPS(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPSNE)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPSNE, x)
                        return true
                }
                // match: (EQ (SGTUzero x) yes no)
@@ -7369,8 +7360,7 @@ func rewriteBlockMIPS(b *Block) bool {
                for b.Controls[0].Op == OpMIPSSGTUzero {
                        v_0 := b.Controls[0]
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPSEQ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPSEQ, x)
                        return true
                }
                // match: (EQ (SGTconst [0] x) yes no)
@@ -7381,8 +7371,7 @@ func rewriteBlockMIPS(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPSGEZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPSGEZ, x)
                        return true
                }
                // match: (EQ (SGTzero x) yes no)
@@ -7390,8 +7379,7 @@ func rewriteBlockMIPS(b *Block) bool {
                for b.Controls[0].Op == OpMIPSSGTzero {
                        v_0 := b.Controls[0]
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPSLEZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPSLEZ, x)
                        return true
                }
                // match: (EQ (MOVWconst [0]) yes no)
@@ -7474,8 +7462,7 @@ func rewriteBlockMIPS(b *Block) bool {
                // result: (NE cond yes no)
                for {
                        cond := b.Controls[0]
-                       b.Reset(BlockMIPSNE)
-                       b.AddControl(cond)
+                       b.resetWithControl(BlockMIPSNE, cond)
                        return true
                }
        case BlockMIPSLEZ:
@@ -7536,8 +7523,7 @@ func rewriteBlockMIPS(b *Block) bool {
                for b.Controls[0].Op == OpMIPSFPFlagTrue {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockMIPSFPT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSFPT, cmp)
                        return true
                }
                // match: (NE (FPFlagFalse cmp) yes no)
@@ -7545,8 +7531,7 @@ func rewriteBlockMIPS(b *Block) bool {
                for b.Controls[0].Op == OpMIPSFPFlagFalse {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockMIPSFPF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSFPF, cmp)
                        return true
                }
                // match: (NE (XORconst [1] cmp:(SGT _ _)) yes no)
@@ -7561,8 +7546,7 @@ func rewriteBlockMIPS(b *Block) bool {
                                break
                        }
                        _ = cmp.Args[1]
-                       b.Reset(BlockMIPSEQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSEQ, cmp)
                        return true
                }
                // match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no)
@@ -7577,8 +7561,7 @@ func rewriteBlockMIPS(b *Block) bool {
                                break
                        }
                        _ = cmp.Args[1]
-                       b.Reset(BlockMIPSEQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSEQ, cmp)
                        return true
                }
                // match: (NE (XORconst [1] cmp:(SGTconst _)) yes no)
@@ -7592,8 +7575,7 @@ func rewriteBlockMIPS(b *Block) bool {
                        if cmp.Op != OpMIPSSGTconst {
                                break
                        }
-                       b.Reset(BlockMIPSEQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSEQ, cmp)
                        return true
                }
                // match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no)
@@ -7607,8 +7589,7 @@ func rewriteBlockMIPS(b *Block) bool {
                        if cmp.Op != OpMIPSSGTUconst {
                                break
                        }
-                       b.Reset(BlockMIPSEQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSEQ, cmp)
                        return true
                }
                // match: (NE (XORconst [1] cmp:(SGTzero _)) yes no)
@@ -7622,8 +7603,7 @@ func rewriteBlockMIPS(b *Block) bool {
                        if cmp.Op != OpMIPSSGTzero {
                                break
                        }
-                       b.Reset(BlockMIPSEQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSEQ, cmp)
                        return true
                }
                // match: (NE (XORconst [1] cmp:(SGTUzero _)) yes no)
@@ -7637,8 +7617,7 @@ func rewriteBlockMIPS(b *Block) bool {
                        if cmp.Op != OpMIPSSGTUzero {
                                break
                        }
-                       b.Reset(BlockMIPSEQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPSEQ, cmp)
                        return true
                }
                // match: (NE (SGTUconst [1] x) yes no)
@@ -7649,8 +7628,7 @@ func rewriteBlockMIPS(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPSEQ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPSEQ, x)
                        return true
                }
                // match: (NE (SGTUzero x) yes no)
@@ -7658,8 +7636,7 @@ func rewriteBlockMIPS(b *Block) bool {
                for b.Controls[0].Op == OpMIPSSGTUzero {
                        v_0 := b.Controls[0]
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPSNE)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPSNE, x)
                        return true
                }
                // match: (NE (SGTconst [0] x) yes no)
@@ -7670,8 +7647,7 @@ func rewriteBlockMIPS(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPSLTZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPSLTZ, x)
                        return true
                }
                // match: (NE (SGTzero x) yes no)
@@ -7679,8 +7655,7 @@ func rewriteBlockMIPS(b *Block) bool {
                for b.Controls[0].Op == OpMIPSSGTzero {
                        v_0 := b.Controls[0]
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPSGTZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPSGTZ, x)
                        return true
                }
                // match: (NE (MOVWconst [0]) yes no)
index 4413c535d617d83b456467e15e9e4956601b8163..c8d72363b3b5cee8dba7ef74853b6b9142cdd532 100644 (file)
@@ -7743,8 +7743,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                for b.Controls[0].Op == OpMIPS64FPFlagTrue {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockMIPS64FPF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64FPF, cmp)
                        return true
                }
                // match: (EQ (FPFlagFalse cmp) yes no)
@@ -7752,8 +7751,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                for b.Controls[0].Op == OpMIPS64FPFlagFalse {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockMIPS64FPT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64FPT, cmp)
                        return true
                }
                // match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no)
@@ -7768,8 +7766,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                                break
                        }
                        _ = cmp.Args[1]
-                       b.Reset(BlockMIPS64NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64NE, cmp)
                        return true
                }
                // match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no)
@@ -7784,8 +7781,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                                break
                        }
                        _ = cmp.Args[1]
-                       b.Reset(BlockMIPS64NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64NE, cmp)
                        return true
                }
                // match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no)
@@ -7799,8 +7795,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                        if cmp.Op != OpMIPS64SGTconst {
                                break
                        }
-                       b.Reset(BlockMIPS64NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64NE, cmp)
                        return true
                }
                // match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no)
@@ -7814,8 +7809,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                        if cmp.Op != OpMIPS64SGTUconst {
                                break
                        }
-                       b.Reset(BlockMIPS64NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64NE, cmp)
                        return true
                }
                // match: (EQ (SGTUconst [1] x) yes no)
@@ -7826,8 +7820,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPS64NE)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPS64NE, x)
                        return true
                }
                // match: (EQ (SGTU x (MOVVconst [0])) yes no)
@@ -7840,8 +7833,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                        if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 {
                                break
                        }
-                       b.Reset(BlockMIPS64EQ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPS64EQ, x)
                        return true
                }
                // match: (EQ (SGTconst [0] x) yes no)
@@ -7852,8 +7844,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPS64GEZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPS64GEZ, x)
                        return true
                }
                // match: (EQ (SGT x (MOVVconst [0])) yes no)
@@ -7866,8 +7857,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                        if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 {
                                break
                        }
-                       b.Reset(BlockMIPS64LEZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPS64LEZ, x)
                        return true
                }
                // match: (EQ (MOVVconst [0]) yes no)
@@ -7950,8 +7940,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                // result: (NE cond yes no)
                for {
                        cond := b.Controls[0]
-                       b.Reset(BlockMIPS64NE)
-                       b.AddControl(cond)
+                       b.resetWithControl(BlockMIPS64NE, cond)
                        return true
                }
        case BlockMIPS64LEZ:
@@ -8012,8 +8001,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                for b.Controls[0].Op == OpMIPS64FPFlagTrue {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockMIPS64FPT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64FPT, cmp)
                        return true
                }
                // match: (NE (FPFlagFalse cmp) yes no)
@@ -8021,8 +8009,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                for b.Controls[0].Op == OpMIPS64FPFlagFalse {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockMIPS64FPF)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64FPF, cmp)
                        return true
                }
                // match: (NE (XORconst [1] cmp:(SGT _ _)) yes no)
@@ -8037,8 +8024,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                                break
                        }
                        _ = cmp.Args[1]
-                       b.Reset(BlockMIPS64EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64EQ, cmp)
                        return true
                }
                // match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no)
@@ -8053,8 +8039,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                                break
                        }
                        _ = cmp.Args[1]
-                       b.Reset(BlockMIPS64EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64EQ, cmp)
                        return true
                }
                // match: (NE (XORconst [1] cmp:(SGTconst _)) yes no)
@@ -8068,8 +8053,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                        if cmp.Op != OpMIPS64SGTconst {
                                break
                        }
-                       b.Reset(BlockMIPS64EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64EQ, cmp)
                        return true
                }
                // match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no)
@@ -8083,8 +8067,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                        if cmp.Op != OpMIPS64SGTUconst {
                                break
                        }
-                       b.Reset(BlockMIPS64EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockMIPS64EQ, cmp)
                        return true
                }
                // match: (NE (SGTUconst [1] x) yes no)
@@ -8095,8 +8078,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPS64EQ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPS64EQ, x)
                        return true
                }
                // match: (NE (SGTU x (MOVVconst [0])) yes no)
@@ -8109,8 +8091,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                        if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 {
                                break
                        }
-                       b.Reset(BlockMIPS64NE)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPS64NE, x)
                        return true
                }
                // match: (NE (SGTconst [0] x) yes no)
@@ -8121,8 +8102,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                                break
                        }
                        x := v_0.Args[0]
-                       b.Reset(BlockMIPS64LTZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPS64LTZ, x)
                        return true
                }
                // match: (NE (SGT x (MOVVconst [0])) yes no)
@@ -8135,8 +8115,7 @@ func rewriteBlockMIPS64(b *Block) bool {
                        if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 {
                                break
                        }
-                       b.Reset(BlockMIPS64GTZ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockMIPS64GTZ, x)
                        return true
                }
                // match: (NE (MOVVconst [0]) yes no)
index 279fed4edb71ddba964562b239ed21b8dc77e829..1bdd8ee23a0f5eb620a15085d06833b263a55f31 100644 (file)
@@ -15159,11 +15159,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64EQ, v0)
                        return true
                }
                // match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no)
@@ -15179,11 +15178,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64EQ, v0)
                        return true
                }
                // match: (EQ (FlagEQ) yes no)
@@ -15211,8 +15209,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockPPC64EQ)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockPPC64EQ, cmp)
                        return true
                }
                // match: (EQ (CMPconst [0] (ANDconst [c] x)) yes no)
@@ -15228,11 +15225,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64EQ, v0)
                        return true
                }
                // match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no)
@@ -15248,11 +15244,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64EQ)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64EQ, v0)
                        return true
                }
                // match: (EQ (CMPconst [0] z:(AND x y)) yes no)
@@ -15276,10 +15271,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64EQ)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64EQ, v0)
                                return true
                        }
                        break
@@ -15305,10 +15299,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64EQ)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64EQ, v0)
                                return true
                        }
                        break
@@ -15334,10 +15327,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64EQ)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64EQ, v0)
                                return true
                        }
                        break
@@ -15367,8 +15359,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockPPC64LE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockPPC64LE, cmp)
                        return true
                }
                // match: (GE (CMPconst [0] (ANDconst [c] x)) yes no)
@@ -15384,11 +15375,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64GE)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64GE, v0)
                        return true
                }
                // match: (GE (CMPWconst [0] (ANDconst [c] x)) yes no)
@@ -15404,11 +15394,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64GE)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64GE, v0)
                        return true
                }
                // match: (GE (CMPconst [0] z:(AND x y)) yes no)
@@ -15432,10 +15421,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64GE)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64GE, v0)
                                return true
                        }
                        break
@@ -15461,10 +15449,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64GE)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64GE, v0)
                                return true
                        }
                        break
@@ -15490,10 +15477,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64GE)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64GE, v0)
                                return true
                        }
                        break
@@ -15524,8 +15510,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockPPC64LT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockPPC64LT, cmp)
                        return true
                }
                // match: (GT (CMPconst [0] (ANDconst [c] x)) yes no)
@@ -15541,11 +15526,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64GT)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64GT, v0)
                        return true
                }
                // match: (GT (CMPWconst [0] (ANDconst [c] x)) yes no)
@@ -15561,11 +15545,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64GT)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64GT, v0)
                        return true
                }
                // match: (GT (CMPconst [0] z:(AND x y)) yes no)
@@ -15589,10 +15572,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64GT)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64GT, v0)
                                return true
                        }
                        break
@@ -15618,10 +15600,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64GT)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64GT, v0)
                                return true
                        }
                        break
@@ -15647,10 +15628,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64GT)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64GT, v0)
                                return true
                        }
                        break
@@ -15661,8 +15641,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64Equal {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockPPC64EQ)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64EQ, cc)
                        return true
                }
                // match: (If (NotEqual cc) yes no)
@@ -15670,8 +15649,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64NotEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockPPC64NE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64NE, cc)
                        return true
                }
                // match: (If (LessThan cc) yes no)
@@ -15679,8 +15657,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64LessThan {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockPPC64LT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64LT, cc)
                        return true
                }
                // match: (If (LessEqual cc) yes no)
@@ -15688,8 +15665,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64LessEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockPPC64LE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64LE, cc)
                        return true
                }
                // match: (If (GreaterThan cc) yes no)
@@ -15697,8 +15673,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64GreaterThan {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockPPC64GT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64GT, cc)
                        return true
                }
                // match: (If (GreaterEqual cc) yes no)
@@ -15706,8 +15681,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64GreaterEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockPPC64GE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64GE, cc)
                        return true
                }
                // match: (If (FLessThan cc) yes no)
@@ -15715,8 +15689,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64FLessThan {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockPPC64FLT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64FLT, cc)
                        return true
                }
                // match: (If (FLessEqual cc) yes no)
@@ -15724,8 +15697,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64FLessEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockPPC64FLE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64FLE, cc)
                        return true
                }
                // match: (If (FGreaterThan cc) yes no)
@@ -15733,8 +15705,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64FGreaterThan {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockPPC64FGT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64FGT, cc)
                        return true
                }
                // match: (If (FGreaterEqual cc) yes no)
@@ -15742,19 +15713,17 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64FGreaterEqual {
                        v_0 := b.Controls[0]
                        cc := v_0.Args[0]
-                       b.Reset(BlockPPC64FGE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64FGE, cc)
                        return true
                }
                // match: (If cond yes no)
                // result: (NE (CMPWconst [0] cond) yes no)
                for {
                        cond := b.Controls[0]
-                       b.Reset(BlockPPC64NE)
                        v0 := b.NewValue0(cond.Pos, OpPPC64CMPWconst, types.TypeFlags)
                        v0.AuxInt = 0
                        v0.AddArg(cond)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64NE, v0)
                        return true
                }
        case BlockPPC64LE:
@@ -15782,8 +15751,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockPPC64GE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockPPC64GE, cmp)
                        return true
                }
                // match: (LE (CMPconst [0] (ANDconst [c] x)) yes no)
@@ -15799,11 +15767,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64LE)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64LE, v0)
                        return true
                }
                // match: (LE (CMPWconst [0] (ANDconst [c] x)) yes no)
@@ -15819,11 +15786,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64LE)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64LE, v0)
                        return true
                }
                // match: (LE (CMPconst [0] z:(AND x y)) yes no)
@@ -15847,10 +15813,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64LE)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64LE, v0)
                                return true
                        }
                        break
@@ -15876,10 +15841,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64LE)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64LE, v0)
                                return true
                        }
                        break
@@ -15905,10 +15869,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64LE)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64LE, v0)
                                return true
                        }
                        break
@@ -15939,8 +15902,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockPPC64GT)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockPPC64GT, cmp)
                        return true
                }
                // match: (LT (CMPconst [0] (ANDconst [c] x)) yes no)
@@ -15956,11 +15918,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64LT)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64LT, v0)
                        return true
                }
                // match: (LT (CMPWconst [0] (ANDconst [c] x)) yes no)
@@ -15976,11 +15937,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64LT)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64LT, v0)
                        return true
                }
                // match: (LT (CMPconst [0] z:(AND x y)) yes no)
@@ -16004,10 +15964,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64LT)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64LT, v0)
                                return true
                        }
                        break
@@ -16033,10 +15992,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64LT)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64LT, v0)
                                return true
                        }
                        break
@@ -16062,10 +16020,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64LT)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64LT, v0)
                                return true
                        }
                        break
@@ -16083,8 +16040,7 @@ func rewriteBlockPPC64(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockPPC64EQ)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64EQ, cc)
                        return true
                }
                // match: (NE (CMPWconst [0] (NotEqual cc)) yes no)
@@ -16099,8 +16055,7 @@ func rewriteBlockPPC64(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockPPC64NE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64NE, cc)
                        return true
                }
                // match: (NE (CMPWconst [0] (LessThan cc)) yes no)
@@ -16115,8 +16070,7 @@ func rewriteBlockPPC64(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockPPC64LT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64LT, cc)
                        return true
                }
                // match: (NE (CMPWconst [0] (LessEqual cc)) yes no)
@@ -16131,8 +16085,7 @@ func rewriteBlockPPC64(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockPPC64LE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64LE, cc)
                        return true
                }
                // match: (NE (CMPWconst [0] (GreaterThan cc)) yes no)
@@ -16147,8 +16100,7 @@ func rewriteBlockPPC64(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockPPC64GT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64GT, cc)
                        return true
                }
                // match: (NE (CMPWconst [0] (GreaterEqual cc)) yes no)
@@ -16163,8 +16115,7 @@ func rewriteBlockPPC64(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockPPC64GE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64GE, cc)
                        return true
                }
                // match: (NE (CMPWconst [0] (FLessThan cc)) yes no)
@@ -16179,8 +16130,7 @@ func rewriteBlockPPC64(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockPPC64FLT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64FLT, cc)
                        return true
                }
                // match: (NE (CMPWconst [0] (FLessEqual cc)) yes no)
@@ -16195,8 +16145,7 @@ func rewriteBlockPPC64(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockPPC64FLE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64FLE, cc)
                        return true
                }
                // match: (NE (CMPWconst [0] (FGreaterThan cc)) yes no)
@@ -16211,8 +16160,7 @@ func rewriteBlockPPC64(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockPPC64FGT)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64FGT, cc)
                        return true
                }
                // match: (NE (CMPWconst [0] (FGreaterEqual cc)) yes no)
@@ -16227,8 +16175,7 @@ func rewriteBlockPPC64(b *Block) bool {
                                break
                        }
                        cc := v_0_0.Args[0]
-                       b.Reset(BlockPPC64FGE)
-                       b.AddControl(cc)
+                       b.resetWithControl(BlockPPC64FGE, cc)
                        return true
                }
                // match: (NE (CMPconst [0] (ANDconst [c] x)) yes no)
@@ -16244,11 +16191,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64NE)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64NE, v0)
                        return true
                }
                // match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no)
@@ -16264,11 +16210,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64NE)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64NE, v0)
                        return true
                }
                // match: (NE (FlagEQ) yes no)
@@ -16295,8 +16240,7 @@ func rewriteBlockPPC64(b *Block) bool {
                for b.Controls[0].Op == OpPPC64InvertFlags {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
-                       b.Reset(BlockPPC64NE)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockPPC64NE, cmp)
                        return true
                }
                // match: (NE (CMPconst [0] (ANDconst [c] x)) yes no)
@@ -16312,11 +16256,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64NE)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64NE, v0)
                        return true
                }
                // match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no)
@@ -16332,11 +16275,10 @@ func rewriteBlockPPC64(b *Block) bool {
                        }
                        c := v_0_0.AuxInt
                        x := v_0_0.Args[0]
-                       b.Reset(BlockPPC64NE)
                        v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
                        v0.AuxInt = c
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockPPC64NE, v0)
                        return true
                }
                // match: (NE (CMPconst [0] z:(AND x y)) yes no)
@@ -16360,10 +16302,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64NE)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64NE, v0)
                                return true
                        }
                        break
@@ -16389,10 +16330,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64NE)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64NE, v0)
                                return true
                        }
                        break
@@ -16418,10 +16358,9 @@ func rewriteBlockPPC64(b *Block) bool {
                                if !(z.Uses == 1) {
                                        continue
                                }
-                               b.Reset(BlockPPC64NE)
                                v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
                                v0.AddArg2(x, y)
-                               b.AddControl(v0)
+                               b.resetWithControl(BlockPPC64NE, v0)
                                return true
                        }
                        break
index f20f744456ab567a96de44865e2a6670d76483b6..2e0b34de8d5fc6e5e3879195c888c5e75df3cd8f 100644 (file)
@@ -4258,8 +4258,7 @@ func rewriteBlockRISCV64(b *Block) bool {
                // result: (BNE cond yes no)
                for {
                        cond := b.Controls[0]
-                       b.Reset(BlockRISCV64BNE)
-                       b.AddControl(cond)
+                       b.resetWithControl(BlockRISCV64BNE, cond)
                        return true
                }
        }
index 874bac1fdec7cbcf3df9876a3bb37b74617f0fc4..2ac8a6f05ed4a355c4b4b26d9c26e887170af561 100644 (file)
@@ -19046,9 +19046,7 @@ func rewriteBlockS390X(b *Block) bool {
                        y := v_0.Args[1]
                        x := v_0.Args[0]
                        c := b.Aux
-                       b.Reset(BlockS390XCGRJ)
-                       b.AddControl(x)
-                       b.AddControl(y)
+                       b.resetWithControl2(BlockS390XCGRJ, x, y)
                        b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
                        return true
                }
@@ -19059,9 +19057,7 @@ func rewriteBlockS390X(b *Block) bool {
                        y := v_0.Args[1]
                        x := v_0.Args[0]
                        c := b.Aux
-                       b.Reset(BlockS390XCRJ)
-                       b.AddControl(x)
-                       b.AddControl(y)
+                       b.resetWithControl2(BlockS390XCRJ, x, y)
                        b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
                        return true
                }
@@ -19072,9 +19068,7 @@ func rewriteBlockS390X(b *Block) bool {
                        y := v_0.Args[1]
                        x := v_0.Args[0]
                        c := b.Aux
-                       b.Reset(BlockS390XCLGRJ)
-                       b.AddControl(x)
-                       b.AddControl(y)
+                       b.resetWithControl2(BlockS390XCLGRJ, x, y)
                        b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
                        return true
                }
@@ -19085,9 +19079,7 @@ func rewriteBlockS390X(b *Block) bool {
                        y := v_0.Args[1]
                        x := v_0.Args[0]
                        c := b.Aux
-                       b.Reset(BlockS390XCLRJ)
-                       b.AddControl(x)
-                       b.AddControl(y)
+                       b.resetWithControl2(BlockS390XCLRJ, x, y)
                        b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
                        return true
                }
@@ -19102,8 +19094,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(is8Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XCGIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCGIJ, x)
                        b.AuxInt = int64(int8(y))
                        b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
                        return true
@@ -19119,8 +19110,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(is8Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XCIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCIJ, x)
                        b.AuxInt = int64(int8(y))
                        b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
                        return true
@@ -19136,8 +19126,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(isU8Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XCLGIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCLGIJ, x)
                        b.AuxInt = int64(int8(y))
                        b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
                        return true
@@ -19153,8 +19142,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(isU8Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XCLIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCLIJ, x)
                        b.AuxInt = int64(int8(y))
                        b.Aux = c.(s390x.CCMask) &^ s390x.Unordered
                        return true
@@ -19170,8 +19158,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.Less {
                                break
                        }
-                       b.Reset(BlockS390XCGIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCGIJ, x)
                        b.AuxInt = 127
                        b.Aux = s390x.LessOrEqual
                        return true
@@ -19187,8 +19174,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.Less {
                                break
                        }
-                       b.Reset(BlockS390XCIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCIJ, x)
                        b.AuxInt = 127
                        b.Aux = s390x.LessOrEqual
                        return true
@@ -19204,8 +19190,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.LessOrEqual {
                                break
                        }
-                       b.Reset(BlockS390XCGIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCGIJ, x)
                        b.AuxInt = -128
                        b.Aux = s390x.Less
                        return true
@@ -19221,8 +19206,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.LessOrEqual {
                                break
                        }
-                       b.Reset(BlockS390XCIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCIJ, x)
                        b.AuxInt = -128
                        b.Aux = s390x.Less
                        return true
@@ -19238,8 +19222,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.Greater {
                                break
                        }
-                       b.Reset(BlockS390XCGIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCGIJ, x)
                        b.AuxInt = -128
                        b.Aux = s390x.GreaterOrEqual
                        return true
@@ -19255,8 +19238,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.Greater {
                                break
                        }
-                       b.Reset(BlockS390XCIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCIJ, x)
                        b.AuxInt = -128
                        b.Aux = s390x.GreaterOrEqual
                        return true
@@ -19272,8 +19254,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.GreaterOrEqual {
                                break
                        }
-                       b.Reset(BlockS390XCGIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCGIJ, x)
                        b.AuxInt = 127
                        b.Aux = s390x.Greater
                        return true
@@ -19289,8 +19270,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.GreaterOrEqual {
                                break
                        }
-                       b.Reset(BlockS390XCIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCIJ, x)
                        b.AuxInt = 127
                        b.Aux = s390x.Greater
                        return true
@@ -19306,8 +19286,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.Less {
                                break
                        }
-                       b.Reset(BlockS390XCLIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCLIJ, x)
                        b.AuxInt = -1
                        b.Aux = s390x.LessOrEqual
                        return true
@@ -19323,8 +19302,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.Less {
                                break
                        }
-                       b.Reset(BlockS390XCLGIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCLGIJ, x)
                        b.AuxInt = -1
                        b.Aux = s390x.LessOrEqual
                        return true
@@ -19340,8 +19318,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.GreaterOrEqual {
                                break
                        }
-                       b.Reset(BlockS390XCLIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCLIJ, x)
                        b.AuxInt = -1
                        b.Aux = s390x.Greater
                        return true
@@ -19357,8 +19334,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.Aux != s390x.GreaterOrEqual {
                                break
                        }
-                       b.Reset(BlockS390XCLGIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCLGIJ, x)
                        b.AuxInt = -1
                        b.Aux = s390x.Greater
                        return true
@@ -19369,8 +19345,7 @@ func rewriteBlockS390X(b *Block) bool {
                        v_0 := b.Controls[0]
                        cmp := v_0.Args[0]
                        c := b.Aux
-                       b.Reset(BlockS390XBRC)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockS390XBRC, cmp)
                        b.Aux = c.(s390x.CCMask).ReverseComparison()
                        return true
                }
@@ -19566,8 +19541,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(is8Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XCGIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCGIJ, x)
                        b.AuxInt = int64(int8(y))
                        b.Aux = c
                        return true
@@ -19583,8 +19557,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(is8Bit(x)) {
                                break
                        }
-                       b.Reset(BlockS390XCGIJ)
-                       b.AddControl(y)
+                       b.resetWithControl(BlockS390XCGIJ, y)
                        b.AuxInt = int64(int8(x))
                        b.Aux = c.(s390x.CCMask).ReverseComparison()
                        return true
@@ -19600,11 +19573,10 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(!is8Bit(y) && is32Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XBRC)
                        v0 := b.NewValue0(x.Pos, OpS390XCMPconst, types.TypeFlags)
                        v0.AuxInt = int64(int32(y))
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockS390XBRC, v0)
                        b.Aux = c
                        return true
                }
@@ -19619,11 +19591,10 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(!is8Bit(x) && is32Bit(x)) {
                                break
                        }
-                       b.Reset(BlockS390XBRC)
                        v0 := b.NewValue0(v_0.Pos, OpS390XCMPconst, types.TypeFlags)
                        v0.AuxInt = int64(int32(x))
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockS390XBRC, v0)
                        b.Aux = c.(s390x.CCMask).ReverseComparison()
                        return true
                }
@@ -19662,8 +19633,7 @@ func rewriteBlockS390X(b *Block) bool {
                        x := v_0.Args[0]
                        y := b.AuxInt
                        c := b.Aux
-                       b.Reset(BlockS390XCIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCIJ, x)
                        b.AuxInt = y
                        b.Aux = c
                        return true
@@ -19675,8 +19645,7 @@ func rewriteBlockS390X(b *Block) bool {
                        x := v_0.Args[0]
                        y := b.AuxInt
                        c := b.Aux
-                       b.Reset(BlockS390XCIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCIJ, x)
                        b.AuxInt = y
                        b.Aux = c
                        return true
@@ -19887,8 +19856,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(isU8Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XCLGIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCLGIJ, x)
                        b.AuxInt = int64(int8(y))
                        b.Aux = c
                        return true
@@ -19904,8 +19872,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(isU8Bit(x)) {
                                break
                        }
-                       b.Reset(BlockS390XCLGIJ)
-                       b.AddControl(y)
+                       b.resetWithControl(BlockS390XCLGIJ, y)
                        b.AuxInt = int64(int8(x))
                        b.Aux = c.(s390x.CCMask).ReverseComparison()
                        return true
@@ -19921,11 +19888,10 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(!isU8Bit(y) && isU32Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XBRC)
                        v0 := b.NewValue0(x.Pos, OpS390XCMPUconst, types.TypeFlags)
                        v0.AuxInt = int64(int32(y))
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockS390XBRC, v0)
                        b.Aux = c
                        return true
                }
@@ -19940,11 +19906,10 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(!isU8Bit(x) && isU32Bit(x)) {
                                break
                        }
-                       b.Reset(BlockS390XBRC)
                        v0 := b.NewValue0(v_0.Pos, OpS390XCMPUconst, types.TypeFlags)
                        v0.AuxInt = int64(int32(x))
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockS390XBRC, v0)
                        b.Aux = c.(s390x.CCMask).ReverseComparison()
                        return true
                }
@@ -19995,8 +19960,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if b.AuxInt != 0 || b.Aux != s390x.LessOrGreater || !(int32(x) != 0) {
                                break
                        }
-                       b.Reset(BlockS390XBRC)
-                       b.AddControl(cmp)
+                       b.resetWithControl(BlockS390XBRC, cmp)
                        b.Aux = d
                        return true
                }
@@ -20007,8 +19971,7 @@ func rewriteBlockS390X(b *Block) bool {
                        x := v_0.Args[0]
                        y := b.AuxInt
                        c := b.Aux
-                       b.Reset(BlockS390XCLIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCLIJ, x)
                        b.AuxInt = y
                        b.Aux = c
                        return true
@@ -20020,8 +19983,7 @@ func rewriteBlockS390X(b *Block) bool {
                        x := v_0.Args[0]
                        y := b.AuxInt
                        c := b.Aux
-                       b.Reset(BlockS390XCLIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCLIJ, x)
                        b.AuxInt = y
                        b.Aux = c
                        return true
@@ -20144,8 +20106,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(isU8Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XCLIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCLIJ, x)
                        b.AuxInt = int64(int8(y))
                        b.Aux = c
                        return true
@@ -20161,8 +20122,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(isU8Bit(x)) {
                                break
                        }
-                       b.Reset(BlockS390XCLIJ)
-                       b.AddControl(y)
+                       b.resetWithControl(BlockS390XCLIJ, y)
                        b.AuxInt = int64(int8(x))
                        b.Aux = c.(s390x.CCMask).ReverseComparison()
                        return true
@@ -20178,11 +20138,10 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(!isU8Bit(y) && isU32Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XBRC)
                        v0 := b.NewValue0(x.Pos, OpS390XCMPWUconst, types.TypeFlags)
                        v0.AuxInt = int64(int32(y))
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockS390XBRC, v0)
                        b.Aux = c
                        return true
                }
@@ -20197,11 +20156,10 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(!isU8Bit(x) && isU32Bit(x)) {
                                break
                        }
-                       b.Reset(BlockS390XBRC)
                        v0 := b.NewValue0(v_0.Pos, OpS390XCMPWUconst, types.TypeFlags)
                        v0.AuxInt = int64(int32(x))
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockS390XBRC, v0)
                        b.Aux = c.(s390x.CCMask).ReverseComparison()
                        return true
                }
@@ -20244,8 +20202,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(is8Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XCIJ)
-                       b.AddControl(x)
+                       b.resetWithControl(BlockS390XCIJ, x)
                        b.AuxInt = int64(int8(y))
                        b.Aux = c
                        return true
@@ -20261,8 +20218,7 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(is8Bit(x)) {
                                break
                        }
-                       b.Reset(BlockS390XCIJ)
-                       b.AddControl(y)
+                       b.resetWithControl(BlockS390XCIJ, y)
                        b.AuxInt = int64(int8(x))
                        b.Aux = c.(s390x.CCMask).ReverseComparison()
                        return true
@@ -20278,11 +20234,10 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(!is8Bit(y) && is32Bit(y)) {
                                break
                        }
-                       b.Reset(BlockS390XBRC)
                        v0 := b.NewValue0(x.Pos, OpS390XCMPWconst, types.TypeFlags)
                        v0.AuxInt = int64(int32(y))
                        v0.AddArg(x)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockS390XBRC, v0)
                        b.Aux = c
                        return true
                }
@@ -20297,11 +20252,10 @@ func rewriteBlockS390X(b *Block) bool {
                        if !(!is8Bit(x) && is32Bit(x)) {
                                break
                        }
-                       b.Reset(BlockS390XBRC)
                        v0 := b.NewValue0(v_0.Pos, OpS390XCMPWconst, types.TypeFlags)
                        v0.AuxInt = int64(int32(x))
                        v0.AddArg(y)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockS390XBRC, v0)
                        b.Aux = c.(s390x.CCMask).ReverseComparison()
                        return true
                }
@@ -20337,10 +20291,9 @@ func rewriteBlockS390X(b *Block) bool {
                // result: (CLIJ {s390x.LessOrGreater} (MOVBZreg <typ.Bool> cond) [0] yes no)
                for {
                        cond := b.Controls[0]
-                       b.Reset(BlockS390XCLIJ)
                        v0 := b.NewValue0(cond.Pos, OpS390XMOVBZreg, typ.Bool)
                        v0.AddArg(cond)
-                       b.AddControl(v0)
+                       b.resetWithControl(BlockS390XCLIJ, v0)
                        b.AuxInt = 0
                        b.Aux = s390x.LessOrGreater
                        return true
index 0089df46b9f6abc06466d483cfc9e223579bed54..e0541f8710f32cdbf69b9060417f9c72a1f1888d 100644 (file)
@@ -21806,8 +21806,7 @@ func rewriteBlockgeneric(b *Block) bool {
                for b.Controls[0].Op == OpNot {
                        v_0 := b.Controls[0]
                        cond := v_0.Args[0]
-                       b.Reset(BlockIf)
-                       b.AddControl(cond)
+                       b.resetWithControl(BlockIf, cond)
                        b.swapSuccessors()
                        return true
                }