mirror of https://github.com/golang/go.git
cmd/compile: reduce amount of code generated for block rewrite rules
Add a Reset method to blocks that allows us to reduce the amount of code we generate for block rewrite rules. Thanks to Cherry for suggesting a similar fix to this in CL 196557. Compilebench result: name old time/op new time/op delta Template 211ms ± 1% 211ms ± 1% -0.30% (p=0.028 n=19+20) Unicode 83.7ms ± 3% 83.0ms ± 2% -0.79% (p=0.029 n=18+19) GoTypes 757ms ± 1% 755ms ± 1% -0.31% (p=0.034 n=19+19) Compiler 3.51s ± 1% 3.50s ± 1% -0.20% (p=0.013 n=18+18) SSA 11.7s ± 1% 11.7s ± 1% -0.38% (p=0.000 n=19+19) Flate 131ms ± 1% 130ms ± 1% -0.32% (p=0.024 n=18+18) GoParser 162ms ± 1% 162ms ± 1% ~ (p=0.059 n=20+18) Reflect 471ms ± 0% 470ms ± 0% -0.24% (p=0.045 n=20+17) Tar 187ms ± 1% 186ms ± 1% ~ (p=0.157 n=20+20) XML 255ms ± 1% 255ms ± 1% ~ (p=0.461 n=19+20) LinkCompiler 754ms ± 2% 755ms ± 2% ~ (p=0.919 n=17+17) ExternalLinkCompiler 2.82s ±16% 2.37s ±10% -15.94% (p=0.000 n=20+20) LinkWithoutDebugCompiler 439ms ± 4% 442ms ± 6% ~ (p=0.461 n=18+19) StdCmd 25.8s ± 2% 25.5s ± 1% -0.95% (p=0.000 n=20+20) name old user-time/op new user-time/op delta Template 240ms ± 8% 238ms ± 7% ~ (p=0.301 n=20+20) Unicode 107ms ±18% 104ms ±13% ~ (p=0.149 n=20+20) GoTypes 883ms ± 3% 888ms ± 2% ~ (p=0.211 n=20+20) Compiler 4.22s ± 1% 4.20s ± 1% ~ (p=0.077 n=20+18) SSA 14.1s ± 1% 14.1s ± 2% ~ (p=0.192 n=20+20) Flate 145ms ±10% 148ms ± 5% ~ (p=0.126 n=20+18) GoParser 186ms ± 7% 186ms ± 7% ~ (p=0.779 n=20+20) Reflect 538ms ± 3% 541ms ± 3% ~ (p=0.192 n=20+20) Tar 218ms ± 4% 217ms ± 6% ~ (p=0.835 n=19+20) XML 298ms ± 5% 298ms ± 5% ~ (p=0.749 n=19+20) LinkCompiler 818ms ± 5% 825ms ± 8% ~ (p=0.461 n=20+20) ExternalLinkCompiler 1.55s ± 4% 1.53s ± 5% ~ (p=0.063 n=20+18) LinkWithoutDebugCompiler 460ms ±12% 460ms ± 7% ~ (p=0.925 n=20+20) name old object-bytes new object-bytes delta Template 554kB ± 0% 554kB ± 0% ~ (all equal) Unicode 215kB ± 0% 215kB ± 0% ~ (all equal) GoTypes 2.01MB ± 0% 2.01MB ± 0% ~ (all equal) Compiler 7.97MB ± 0% 7.97MB ± 0% +0.00% (p=0.000 n=20+20) SSA 26.8MB ± 0% 26.9MB ± 0% +0.27% (p=0.000 n=20+20) Flate 340kB ± 0% 340kB ± 0% ~ (all equal) GoParser 434kB ± 0% 434kB ± 0% ~ (all equal) Reflect 1.34MB ± 0% 1.34MB ± 0% ~ (all equal) Tar 480kB ± 0% 480kB ± 0% ~ (all equal) XML 622kB ± 0% 622kB ± 0% ~ (all equal) name old export-bytes new export-bytes delta Template 20.4kB ± 0% 20.4kB ± 0% ~ (all equal) Unicode 8.21kB ± 0% 8.21kB ± 0% ~ (all equal) GoTypes 36.6kB ± 0% 36.6kB ± 0% ~ (all equal) Compiler 115kB ± 0% 115kB ± 0% +0.08% (p=0.000 n=20+20) SSA 141kB ± 0% 141kB ± 0% +0.07% (p=0.000 n=20+20) Flate 5.11kB ± 0% 5.11kB ± 0% ~ (all equal) GoParser 8.93kB ± 0% 8.93kB ± 0% ~ (all equal) Reflect 11.8kB ± 0% 11.8kB ± 0% ~ (all equal) Tar 10.9kB ± 0% 10.9kB ± 0% ~ (all equal) XML 17.4kB ± 0% 17.4kB ± 0% ~ (all equal) name old text-bytes new text-bytes delta HelloSize 742kB ± 0% 742kB ± 0% ~ (all equal) CmdGoSize 10.7MB ± 0% 10.7MB ± 0% ~ (all equal) name old data-bytes new data-bytes delta HelloSize 10.7kB ± 0% 10.7kB ± 0% ~ (all equal) CmdGoSize 312kB ± 0% 312kB ± 0% ~ (all equal) name old bss-bytes new bss-bytes delta HelloSize 122kB ± 0% 122kB ± 0% ~ (all equal) CmdGoSize 146kB ± 0% 146kB ± 0% ~ (all equal) name old exe-bytes new exe-bytes delta HelloSize 1.10MB ± 0% 1.10MB ± 0% ~ (all equal) CmdGoSize 14.9MB ± 0% 14.9MB ± 0% ~ (all equal) Change-Id: Ic89a8e62423b3d9fd9391159e0663acf450803b5 Reviewed-on: https://go-review.googlesource.com/c/go/+/198419 Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
This commit is contained in:
parent
cfe2320429
commit
c7d81bc086
|
|
@ -211,6 +211,15 @@ func (b *Block) CopyControls(from *Block) {
|
|||
}
|
||||
}
|
||||
|
||||
// Reset sets the block to the provided kind and clears all the blocks control
|
||||
// and auxilliary values. Other properties of the block, such as its successors,
|
||||
// predecessors and values are left unmodified.
|
||||
func (b *Block) Reset(kind BlockKind) {
|
||||
b.Kind = kind
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
}
|
||||
|
||||
// AddEdgeTo adds an edge from block b to block c. Used during building of the
|
||||
// SSA graph; do not use on an already-completed SSA graph.
|
||||
func (b *Block) AddEdgeTo(c *Block) {
|
||||
|
|
|
|||
|
|
@ -816,8 +816,7 @@ func genBlockRewrite(rule Rule, arch arch, data blockData) *RuleRewrite {
|
|||
}
|
||||
|
||||
blockName, _ := getBlockInfo(outop, arch)
|
||||
rr.add(stmtf("b.Kind = %s", blockName))
|
||||
rr.add(stmtf("b.ResetControls()"))
|
||||
rr.add(stmtf("b.Reset(%s)", blockName))
|
||||
for i, control := range t[:outdata.controls] {
|
||||
// Select a source position for any new control values.
|
||||
// TODO: does it always make sense to use the source position
|
||||
|
|
@ -835,8 +834,6 @@ func genBlockRewrite(rule Rule, arch arch, data blockData) *RuleRewrite {
|
|||
}
|
||||
if aux != "" {
|
||||
rr.add(stmtf("b.Aux = %s", aux))
|
||||
} else {
|
||||
rr.add(stmtf("b.Aux = nil"))
|
||||
}
|
||||
|
||||
succChanged := false
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -9002,10 +9002,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPSFPFlagTrue {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockMIPSFPF
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSFPF)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (FPFlagFalse cmp) yes no)
|
||||
|
|
@ -9013,10 +9011,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPSFPFlagFalse {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockMIPSFPT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSFPT)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no)
|
||||
|
|
@ -9031,10 +9027,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
break
|
||||
}
|
||||
_ = cmp.Args[1]
|
||||
b.Kind = BlockMIPSNE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSNE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no)
|
||||
|
|
@ -9049,10 +9043,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
break
|
||||
}
|
||||
_ = cmp.Args[1]
|
||||
b.Kind = BlockMIPSNE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSNE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no)
|
||||
|
|
@ -9066,10 +9058,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if cmp.Op != OpMIPSSGTconst {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPSNE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSNE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no)
|
||||
|
|
@ -9083,10 +9073,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if cmp.Op != OpMIPSSGTUconst {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPSNE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSNE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (XORconst [1] cmp:(SGTzero _)) yes no)
|
||||
|
|
@ -9100,10 +9088,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if cmp.Op != OpMIPSSGTzero {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPSNE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSNE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (XORconst [1] cmp:(SGTUzero _)) yes no)
|
||||
|
|
@ -9117,10 +9103,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if cmp.Op != OpMIPSSGTUzero {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPSNE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSNE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (SGTUconst [1] x) yes no)
|
||||
|
|
@ -9131,10 +9115,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
break
|
||||
}
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPSNE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSNE)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (SGTUzero x) yes no)
|
||||
|
|
@ -9142,10 +9124,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPSSGTUzero {
|
||||
v_0 := b.Controls[0]
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPSEQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSEQ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (SGTconst [0] x) yes no)
|
||||
|
|
@ -9156,10 +9136,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
break
|
||||
}
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPSGEZ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSGEZ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (SGTzero x) yes no)
|
||||
|
|
@ -9167,10 +9145,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPSSGTzero {
|
||||
v_0 := b.Controls[0]
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPSLEZ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSLEZ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (MOVWconst [0]) yes no)
|
||||
|
|
@ -9180,9 +9156,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if v_0.AuxInt != 0 {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (EQ (MOVWconst [c]) yes no)
|
||||
|
|
@ -9194,9 +9168,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if !(c != 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -9210,9 +9182,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if !(int32(c) >= 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (GEZ (MOVWconst [c]) yes no)
|
||||
|
|
@ -9224,9 +9194,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if !(int32(c) < 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -9240,9 +9208,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if !(int32(c) > 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (GTZ (MOVWconst [c]) yes no)
|
||||
|
|
@ -9254,9 +9220,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if !(int32(c) <= 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -9265,10 +9229,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
// result: (NE cond yes no)
|
||||
for {
|
||||
cond := b.Controls[0]
|
||||
b.Kind = BlockMIPSNE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSNE)
|
||||
b.AddControl(cond)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
case BlockMIPSLEZ:
|
||||
|
|
@ -9281,9 +9243,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if !(int32(c) <= 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (LEZ (MOVWconst [c]) yes no)
|
||||
|
|
@ -9295,9 +9255,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if !(int32(c) > 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -9311,9 +9269,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if !(int32(c) < 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (LTZ (MOVWconst [c]) yes no)
|
||||
|
|
@ -9325,9 +9281,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if !(int32(c) >= 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -9337,10 +9291,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPSFPFlagTrue {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockMIPSFPT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSFPT)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (FPFlagFalse cmp) yes no)
|
||||
|
|
@ -9348,10 +9300,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPSFPFlagFalse {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockMIPSFPF
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSFPF)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (XORconst [1] cmp:(SGT _ _)) yes no)
|
||||
|
|
@ -9366,10 +9316,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
break
|
||||
}
|
||||
_ = cmp.Args[1]
|
||||
b.Kind = BlockMIPSEQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSEQ)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no)
|
||||
|
|
@ -9384,10 +9332,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
break
|
||||
}
|
||||
_ = cmp.Args[1]
|
||||
b.Kind = BlockMIPSEQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSEQ)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (XORconst [1] cmp:(SGTconst _)) yes no)
|
||||
|
|
@ -9401,10 +9347,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if cmp.Op != OpMIPSSGTconst {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPSEQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSEQ)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no)
|
||||
|
|
@ -9418,10 +9362,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if cmp.Op != OpMIPSSGTUconst {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPSEQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSEQ)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (XORconst [1] cmp:(SGTzero _)) yes no)
|
||||
|
|
@ -9435,10 +9377,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if cmp.Op != OpMIPSSGTzero {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPSEQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSEQ)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (XORconst [1] cmp:(SGTUzero _)) yes no)
|
||||
|
|
@ -9452,10 +9392,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if cmp.Op != OpMIPSSGTUzero {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPSEQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSEQ)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (SGTUconst [1] x) yes no)
|
||||
|
|
@ -9466,10 +9404,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
break
|
||||
}
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPSEQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSEQ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (SGTUzero x) yes no)
|
||||
|
|
@ -9477,10 +9413,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPSSGTUzero {
|
||||
v_0 := b.Controls[0]
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPSNE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSNE)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (SGTconst [0] x) yes no)
|
||||
|
|
@ -9491,10 +9425,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
break
|
||||
}
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPSLTZ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSLTZ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (SGTzero x) yes no)
|
||||
|
|
@ -9502,10 +9434,8 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPSSGTzero {
|
||||
v_0 := b.Controls[0]
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPSGTZ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPSGTZ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (MOVWconst [0]) yes no)
|
||||
|
|
@ -9515,9 +9445,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if v_0.AuxInt != 0 {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -9530,9 +9458,7 @@ func rewriteBlockMIPS(b *Block) bool {
|
|||
if !(c != 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9747,10 +9747,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPS64FPFlagTrue {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockMIPS64FPF
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64FPF)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (FPFlagFalse cmp) yes no)
|
||||
|
|
@ -9758,10 +9756,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPS64FPFlagFalse {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockMIPS64FPT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64FPT)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no)
|
||||
|
|
@ -9776,10 +9772,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
_ = cmp.Args[1]
|
||||
b.Kind = BlockMIPS64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64NE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no)
|
||||
|
|
@ -9794,10 +9788,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
_ = cmp.Args[1]
|
||||
b.Kind = BlockMIPS64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64NE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no)
|
||||
|
|
@ -9811,10 +9803,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if cmp.Op != OpMIPS64SGTconst {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPS64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64NE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no)
|
||||
|
|
@ -9828,10 +9818,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if cmp.Op != OpMIPS64SGTUconst {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPS64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64NE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (SGTUconst [1] x) yes no)
|
||||
|
|
@ -9842,10 +9830,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPS64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64NE)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (SGTU x (MOVVconst [0])) yes no)
|
||||
|
|
@ -9858,10 +9844,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPS64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64EQ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (SGTconst [0] x) yes no)
|
||||
|
|
@ -9872,10 +9856,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPS64GEZ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64GEZ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (SGT x (MOVVconst [0])) yes no)
|
||||
|
|
@ -9888,10 +9870,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPS64LEZ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64LEZ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (MOVVconst [0]) yes no)
|
||||
|
|
@ -9901,9 +9881,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if v_0.AuxInt != 0 {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (EQ (MOVVconst [c]) yes no)
|
||||
|
|
@ -9915,9 +9893,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if !(c != 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -9931,9 +9907,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if !(c >= 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (GEZ (MOVVconst [c]) yes no)
|
||||
|
|
@ -9945,9 +9919,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if !(c < 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -9961,9 +9933,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if !(c > 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (GTZ (MOVVconst [c]) yes no)
|
||||
|
|
@ -9975,9 +9945,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if !(c <= 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -9986,10 +9954,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
// result: (NE cond yes no)
|
||||
for {
|
||||
cond := b.Controls[0]
|
||||
b.Kind = BlockMIPS64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64NE)
|
||||
b.AddControl(cond)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
case BlockMIPS64LEZ:
|
||||
|
|
@ -10002,9 +9968,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if !(c <= 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (LEZ (MOVVconst [c]) yes no)
|
||||
|
|
@ -10016,9 +9980,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if !(c > 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -10032,9 +9994,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if !(c < 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (LTZ (MOVVconst [c]) yes no)
|
||||
|
|
@ -10046,9 +10006,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if !(c >= 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -10058,10 +10016,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPS64FPFlagTrue {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockMIPS64FPT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64FPT)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (FPFlagFalse cmp) yes no)
|
||||
|
|
@ -10069,10 +10025,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpMIPS64FPFlagFalse {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockMIPS64FPF
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64FPF)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (XORconst [1] cmp:(SGT _ _)) yes no)
|
||||
|
|
@ -10087,10 +10041,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
_ = cmp.Args[1]
|
||||
b.Kind = BlockMIPS64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64EQ)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no)
|
||||
|
|
@ -10105,10 +10057,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
_ = cmp.Args[1]
|
||||
b.Kind = BlockMIPS64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64EQ)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (XORconst [1] cmp:(SGTconst _)) yes no)
|
||||
|
|
@ -10122,10 +10072,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if cmp.Op != OpMIPS64SGTconst {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPS64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64EQ)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no)
|
||||
|
|
@ -10139,10 +10087,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if cmp.Op != OpMIPS64SGTUconst {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPS64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64EQ)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (SGTUconst [1] x) yes no)
|
||||
|
|
@ -10153,10 +10099,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPS64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64EQ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (SGTU x (MOVVconst [0])) yes no)
|
||||
|
|
@ -10169,10 +10113,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPS64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64NE)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (SGTconst [0] x) yes no)
|
||||
|
|
@ -10183,10 +10125,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
x := v_0.Args[0]
|
||||
b.Kind = BlockMIPS64LTZ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64LTZ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (SGT x (MOVVconst [0])) yes no)
|
||||
|
|
@ -10199,10 +10139,8 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 0 {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockMIPS64GTZ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockMIPS64GTZ)
|
||||
b.AddControl(x)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (MOVVconst [0]) yes no)
|
||||
|
|
@ -10212,9 +10150,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if v_0.AuxInt != 0 {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -10227,9 +10163,7 @@ func rewriteBlockMIPS64(b *Block) bool {
|
|||
if !(c != 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26481,13 +26481,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64EQ)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -26503,38 +26501,30 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64EQ)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (FlagEQ) yes no)
|
||||
// result: (First yes no)
|
||||
for b.Controls[0].Op == OpPPC64FlagEQ {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (EQ (FlagLT) yes no)
|
||||
// result: (First no yes)
|
||||
for b.Controls[0].Op == OpPPC64FlagLT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
// match: (EQ (FlagGT) yes no)
|
||||
// result: (First no yes)
|
||||
for b.Controls[0].Op == OpPPC64FlagGT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -26543,10 +26533,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64InvertFlags {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockPPC64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64EQ)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (CMPconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -26562,13 +26550,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64EQ)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -26584,13 +26570,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64EQ)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
|
||||
|
|
@ -26610,13 +26594,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64EQ)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (CMPconst [0] z:(OR x y)) yes no)
|
||||
|
|
@ -26636,13 +26618,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64EQ)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (EQ (CMPconst [0] z:(XOR x y)) yes no)
|
||||
|
|
@ -26662,39 +26642,31 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64EQ)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
case BlockPPC64GE:
|
||||
// match: (GE (FlagEQ) yes no)
|
||||
// result: (First yes no)
|
||||
for b.Controls[0].Op == OpPPC64FlagEQ {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (GE (FlagLT) yes no)
|
||||
// result: (First no yes)
|
||||
for b.Controls[0].Op == OpPPC64FlagLT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
// match: (GE (FlagGT) yes no)
|
||||
// result: (First yes no)
|
||||
for b.Controls[0].Op == OpPPC64FlagGT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (GE (InvertFlags cmp) yes no)
|
||||
|
|
@ -26702,10 +26674,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64InvertFlags {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockPPC64LE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (GE (CMPconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -26721,13 +26691,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64GE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (GE (CMPWconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -26743,13 +26711,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64GE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (GE (CMPconst [0] z:(AND x y)) yes no)
|
||||
|
|
@ -26769,13 +26735,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64GE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (GE (CMPconst [0] z:(OR x y)) yes no)
|
||||
|
|
@ -26795,13 +26759,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64GE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (GE (CMPconst [0] z:(XOR x y)) yes no)
|
||||
|
|
@ -26821,40 +26783,32 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64GE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
case BlockPPC64GT:
|
||||
// match: (GT (FlagEQ) yes no)
|
||||
// result: (First no yes)
|
||||
for b.Controls[0].Op == OpPPC64FlagEQ {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
// match: (GT (FlagLT) yes no)
|
||||
// result: (First no yes)
|
||||
for b.Controls[0].Op == OpPPC64FlagLT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
// match: (GT (FlagGT) yes no)
|
||||
// result: (First yes no)
|
||||
for b.Controls[0].Op == OpPPC64FlagGT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (GT (InvertFlags cmp) yes no)
|
||||
|
|
@ -26862,10 +26816,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64InvertFlags {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockPPC64LT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LT)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (GT (CMPconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -26881,13 +26833,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64GT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GT)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (GT (CMPWconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -26903,13 +26853,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64GT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GT)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (GT (CMPconst [0] z:(AND x y)) yes no)
|
||||
|
|
@ -26929,13 +26877,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64GT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GT)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (GT (CMPconst [0] z:(OR x y)) yes no)
|
||||
|
|
@ -26955,13 +26901,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64GT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GT)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (GT (CMPconst [0] z:(XOR x y)) yes no)
|
||||
|
|
@ -26981,13 +26925,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64GT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GT)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
case BlockIf:
|
||||
|
|
@ -26996,10 +26938,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64Equal {
|
||||
v_0 := b.Controls[0]
|
||||
cc := v_0.Args[0]
|
||||
b.Kind = BlockPPC64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64EQ)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (If (NotEqual cc) yes no)
|
||||
|
|
@ -27007,10 +26947,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64NotEqual {
|
||||
v_0 := b.Controls[0]
|
||||
cc := v_0.Args[0]
|
||||
b.Kind = BlockPPC64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64NE)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (If (LessThan cc) yes no)
|
||||
|
|
@ -27018,10 +26956,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64LessThan {
|
||||
v_0 := b.Controls[0]
|
||||
cc := v_0.Args[0]
|
||||
b.Kind = BlockPPC64LT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LT)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (If (LessEqual cc) yes no)
|
||||
|
|
@ -27029,10 +26965,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64LessEqual {
|
||||
v_0 := b.Controls[0]
|
||||
cc := v_0.Args[0]
|
||||
b.Kind = BlockPPC64LE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LE)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (If (GreaterThan cc) yes no)
|
||||
|
|
@ -27040,10 +26974,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64GreaterThan {
|
||||
v_0 := b.Controls[0]
|
||||
cc := v_0.Args[0]
|
||||
b.Kind = BlockPPC64GT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GT)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (If (GreaterEqual cc) yes no)
|
||||
|
|
@ -27051,10 +26983,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64GreaterEqual {
|
||||
v_0 := b.Controls[0]
|
||||
cc := v_0.Args[0]
|
||||
b.Kind = BlockPPC64GE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GE)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (If (FLessThan cc) yes no)
|
||||
|
|
@ -27062,10 +26992,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64FLessThan {
|
||||
v_0 := b.Controls[0]
|
||||
cc := v_0.Args[0]
|
||||
b.Kind = BlockPPC64FLT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64FLT)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (If (FLessEqual cc) yes no)
|
||||
|
|
@ -27073,10 +27001,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64FLessEqual {
|
||||
v_0 := b.Controls[0]
|
||||
cc := v_0.Args[0]
|
||||
b.Kind = BlockPPC64FLE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64FLE)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (If (FGreaterThan cc) yes no)
|
||||
|
|
@ -27084,10 +27010,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64FGreaterThan {
|
||||
v_0 := b.Controls[0]
|
||||
cc := v_0.Args[0]
|
||||
b.Kind = BlockPPC64FGT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64FGT)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (If (FGreaterEqual cc) yes no)
|
||||
|
|
@ -27095,48 +27019,38 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64FGreaterEqual {
|
||||
v_0 := b.Controls[0]
|
||||
cc := v_0.Args[0]
|
||||
b.Kind = BlockPPC64FGE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64FGE)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (If cond yes no)
|
||||
// result: (NE (CMPWconst [0] cond) yes no)
|
||||
for {
|
||||
cond := b.Controls[0]
|
||||
b.Kind = BlockPPC64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64NE)
|
||||
v0 := b.NewValue0(cond.Pos, OpPPC64CMPWconst, types.TypeFlags)
|
||||
v0.AuxInt = 0
|
||||
v0.AddArg(cond)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
case BlockPPC64LE:
|
||||
// match: (LE (FlagEQ) yes no)
|
||||
// result: (First yes no)
|
||||
for b.Controls[0].Op == OpPPC64FlagEQ {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (LE (FlagLT) yes no)
|
||||
// result: (First yes no)
|
||||
for b.Controls[0].Op == OpPPC64FlagLT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (LE (FlagGT) yes no)
|
||||
// result: (First no yes)
|
||||
for b.Controls[0].Op == OpPPC64FlagGT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -27145,10 +27059,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64InvertFlags {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockPPC64GE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (LE (CMPconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -27164,13 +27076,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64LE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (LE (CMPWconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -27186,13 +27096,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64LE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (LE (CMPconst [0] z:(AND x y)) yes no)
|
||||
|
|
@ -27212,13 +27120,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64LE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (LE (CMPconst [0] z:(OR x y)) yes no)
|
||||
|
|
@ -27238,13 +27144,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64LE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (LE (CMPconst [0] z:(XOR x y)) yes no)
|
||||
|
|
@ -27264,39 +27168,31 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64LE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
case BlockPPC64LT:
|
||||
// match: (LT (FlagEQ) yes no)
|
||||
// result: (First no yes)
|
||||
for b.Controls[0].Op == OpPPC64FlagEQ {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
// match: (LT (FlagLT) yes no)
|
||||
// result: (First yes no)
|
||||
for b.Controls[0].Op == OpPPC64FlagLT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (LT (FlagGT) yes no)
|
||||
// result: (First no yes)
|
||||
for b.Controls[0].Op == OpPPC64FlagGT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -27305,10 +27201,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64InvertFlags {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockPPC64GT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GT)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (LT (CMPconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -27324,13 +27218,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64LT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LT)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (LT (CMPWconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -27346,13 +27238,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64LT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LT)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (LT (CMPconst [0] z:(AND x y)) yes no)
|
||||
|
|
@ -27372,13 +27262,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64LT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LT)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (LT (CMPconst [0] z:(OR x y)) yes no)
|
||||
|
|
@ -27398,13 +27286,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64LT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LT)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (LT (CMPconst [0] z:(XOR x y)) yes no)
|
||||
|
|
@ -27424,13 +27310,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64LT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LT)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
case BlockPPC64NE:
|
||||
|
|
@ -27446,10 +27330,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
cc := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64EQ
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64EQ)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPWconst [0] (NotEqual cc)) yes no)
|
||||
|
|
@ -27464,10 +27346,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
cc := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64NE)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPWconst [0] (LessThan cc)) yes no)
|
||||
|
|
@ -27482,10 +27362,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
cc := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64LT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LT)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPWconst [0] (LessEqual cc)) yes no)
|
||||
|
|
@ -27500,10 +27378,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
cc := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64LE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64LE)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPWconst [0] (GreaterThan cc)) yes no)
|
||||
|
|
@ -27518,10 +27394,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
cc := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64GT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GT)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPWconst [0] (GreaterEqual cc)) yes no)
|
||||
|
|
@ -27536,10 +27410,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
cc := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64GE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64GE)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPWconst [0] (FLessThan cc)) yes no)
|
||||
|
|
@ -27554,10 +27426,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
cc := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64FLT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64FLT)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPWconst [0] (FLessEqual cc)) yes no)
|
||||
|
|
@ -27572,10 +27442,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
cc := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64FLE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64FLE)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPWconst [0] (FGreaterThan cc)) yes no)
|
||||
|
|
@ -27590,10 +27458,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
cc := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64FGT
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64FGT)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPWconst [0] (FGreaterEqual cc)) yes no)
|
||||
|
|
@ -27608,10 +27474,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
break
|
||||
}
|
||||
cc := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64FGE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64FGE)
|
||||
b.AddControl(cc)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -27627,13 +27491,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64NE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -27649,38 +27511,30 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64NE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (FlagEQ) yes no)
|
||||
// result: (First no yes)
|
||||
for b.Controls[0].Op == OpPPC64FlagEQ {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
// match: (NE (FlagLT) yes no)
|
||||
// result: (First yes no)
|
||||
for b.Controls[0].Op == OpPPC64FlagLT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (NE (FlagGT) yes no)
|
||||
// result: (First yes no)
|
||||
for b.Controls[0].Op == OpPPC64FlagGT {
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (NE (InvertFlags cmp) yes no)
|
||||
|
|
@ -27688,10 +27542,8 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
for b.Controls[0].Op == OpPPC64InvertFlags {
|
||||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
b.Kind = BlockPPC64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64NE)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -27707,13 +27559,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64NE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no)
|
||||
|
|
@ -27729,13 +27579,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
}
|
||||
c := v_0_0.AuxInt
|
||||
x := v_0_0.Args[0]
|
||||
b.Kind = BlockPPC64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64NE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
|
||||
v0.AuxInt = c
|
||||
v0.AddArg(x)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPconst [0] z:(AND x y)) yes no)
|
||||
|
|
@ -27755,13 +27603,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64NE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPconst [0] z:(OR x y)) yes no)
|
||||
|
|
@ -27781,13 +27627,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64NE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
// match: (NE (CMPconst [0] z:(XOR x y)) yes no)
|
||||
|
|
@ -27807,13 +27651,11 @@ func rewriteBlockPPC64(b *Block) bool {
|
|||
if !(z.Uses == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockPPC64NE
|
||||
b.ResetControls()
|
||||
b.Reset(BlockPPC64NE)
|
||||
v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
|
||||
v0.AddArg(x)
|
||||
v0.AddArg(y)
|
||||
b.AddControl(v0)
|
||||
b.Aux = nil
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36478,8 +36478,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
if !(x != 0 && c.(s390x.CCMask) == s390x.Equal) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockS390XBRC
|
||||
b.ResetControls()
|
||||
b.Reset(BlockS390XBRC)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = d
|
||||
b.swapSuccessors()
|
||||
|
|
@ -36512,8 +36511,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
if !(x != 0 && c.(s390x.CCMask) == s390x.NotEqual) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockS390XBRC
|
||||
b.ResetControls()
|
||||
b.Reset(BlockS390XBRC)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = d
|
||||
return true
|
||||
|
|
@ -36524,8 +36522,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
v_0 := b.Controls[0]
|
||||
cmp := v_0.Args[0]
|
||||
c := b.Aux
|
||||
b.Kind = BlockS390XBRC
|
||||
b.ResetControls()
|
||||
b.Reset(BlockS390XBRC)
|
||||
b.AddControl(cmp)
|
||||
b.Aux = c.(s390x.CCMask).ReverseComparison()
|
||||
return true
|
||||
|
|
@ -36538,9 +36535,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
if !(c.(s390x.CCMask)&s390x.Equal != 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (BRC {c} (FlagLT) yes no)
|
||||
|
|
@ -36551,9 +36546,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
if !(c.(s390x.CCMask)&s390x.Less != 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (BRC {c} (FlagGT) yes no)
|
||||
|
|
@ -36564,9 +36557,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
if !(c.(s390x.CCMask)&s390x.Greater != 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (BRC {c} (FlagOV) yes no)
|
||||
|
|
@ -36577,9 +36568,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
if !(c.(s390x.CCMask)&s390x.Unordered != 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (BRC {c} (FlagEQ) yes no)
|
||||
|
|
@ -36590,9 +36579,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
if !(c.(s390x.CCMask)&s390x.Equal == 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -36604,9 +36591,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
if !(c.(s390x.CCMask)&s390x.Less == 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -36618,9 +36603,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
if !(c.(s390x.CCMask)&s390x.Greater == 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -36632,9 +36615,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
if !(c.(s390x.CCMask)&s390x.Unordered == 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -36643,8 +36624,7 @@ func rewriteBlockS390X(b *Block) bool {
|
|||
// result: (BRC {s390x.NotEqual} (CMPWconst [0] (MOVBZreg <typ.Bool> cond)) yes no)
|
||||
for {
|
||||
cond := b.Controls[0]
|
||||
b.Kind = BlockS390XBRC
|
||||
b.ResetControls()
|
||||
b.Reset(BlockS390XBRC)
|
||||
v0 := b.NewValue0(cond.Pos, OpS390XCMPWconst, types.TypeFlags)
|
||||
v0.AuxInt = 0
|
||||
v1 := b.NewValue0(cond.Pos, OpS390XMOVBZreg, typ.Bool)
|
||||
|
|
|
|||
|
|
@ -47414,10 +47414,8 @@ func rewriteBlockgeneric(b *Block) bool {
|
|||
for b.Controls[0].Op == OpNot {
|
||||
v_0 := b.Controls[0]
|
||||
cond := v_0.Args[0]
|
||||
b.Kind = BlockIf
|
||||
b.ResetControls()
|
||||
b.Reset(BlockIf)
|
||||
b.AddControl(cond)
|
||||
b.Aux = nil
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
@ -47430,9 +47428,7 @@ func rewriteBlockgeneric(b *Block) bool {
|
|||
if !(c == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
return true
|
||||
}
|
||||
// match: (If (ConstBool [c]) yes no)
|
||||
|
|
@ -47444,9 +47440,7 @@ func rewriteBlockgeneric(b *Block) bool {
|
|||
if !(c == 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.ResetControls()
|
||||
b.Aux = nil
|
||||
b.Reset(BlockFirst)
|
||||
b.swapSuccessors()
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue