cmd/compile: add specialized Value reset for OpCopy

This:

* Simplifies and shortens the generated code for rewrite rules.
* Shrinks cmd/compile by 86k (0.4%) and makes it easier to compile.
* Removes the stmt boundary code wrangling from Value.reset,
  in favor of doing it in the one place where it actually does some work,
  namely the writebarrier pass. (This was ascertained by inspecting the
  code for cases in which notStmtBoundary values were generated.)

Passes toolstash-check -all.

Change-Id: I25671d4c4bbd772f235195d11da090878ea2cc07
Reviewed-on: https://go-review.googlesource.com/c/go/+/221421
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Josh Bleecher Snyder 2019-10-30 10:29:47 -07:00
parent ab7ecea0c8
commit d7c073ecbf
17 changed files with 820 additions and 2220 deletions

View File

@ -1093,9 +1093,7 @@ func genResult0(rr *RuleRewrite, arch arch, result string, top, move bool, pos s
// It in not safe in general to move a variable between blocks
// (and particularly not a phi node).
// Introduce a copy.
rr.add(stmtf("v.reset(OpCopy)"))
rr.add(stmtf("v.Type = %s.Type", result))
rr.add(stmtf("v.AddArg(%s)", result))
rr.add(stmtf("v.copyOf(%s)", result))
}
return result
}
@ -1123,8 +1121,7 @@ func genResult0(rr *RuleRewrite, arch arch, result string, top, move bool, pos s
rr.add(declf(v, "b.NewValue0(%s, Op%s%s, %s)", pos, oparch, op.name, typ))
if move && top {
// Rewrite original into a copy
rr.add(stmtf("v.reset(OpCopy)"))
rr.add(stmtf("v.AddArg(%s)", v))
rr.add(stmtf("v.copyOf(%s)", v))
}
}

View File

@ -66,12 +66,9 @@ func nextGoodStatementIndex(v *Value, i int, b *Block) int {
return i
}
// notStmtBoundary indicates which value opcodes can never be a statement
// boundary because they don't correspond to a user's understanding of a
// statement boundary. Called from *Value.reset(), and *Func.newValue(),
// located here to keep all the statement boundary heuristics in one place.
// Note: *Value.reset() filters out OpCopy because of how that is used in
// rewrite.
// notStmtBoundary reports whether a value with opcode op can never be a statement
// boundary. Such values don't correspond to a user's understanding of a
// statement boundary.
func notStmtBoundary(op Op) bool {
switch op {
case OpCopy, OpPhi, OpVarKill, OpVarDef, OpVarLive, OpUnknown, OpFwdRef, OpArg:

View File

@ -1235,9 +1235,7 @@ func rewriteValue386_Op386ADDLconst(v *Value) bool {
if !(int32(c) == 0) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ADDLconst [c] (MOVLconst [d]))
@ -1950,9 +1948,7 @@ func rewriteValue386_Op386ANDL(v *Value) bool {
if x != v_1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -1994,9 +1990,7 @@ func rewriteValue386_Op386ANDLconst(v *Value) bool {
if !(int32(c) == -1) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ANDLconst [c] (MOVLconst [d]))
@ -2706,8 +2700,7 @@ func rewriteValue386_Op386CMPBconst(v *Value) bool {
}
b = l.Block
v0 := b.NewValue0(l.Pos, Op386CMPBconstload, types.TypeFlags)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = makeValAndOff(c, off)
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -3015,8 +3008,7 @@ func rewriteValue386_Op386CMPLconst(v *Value) bool {
}
b = l.Block
v0 := b.NewValue0(l.Pos, Op386CMPLconstload, types.TypeFlags)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = makeValAndOff(c, off)
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -3309,8 +3301,7 @@ func rewriteValue386_Op386CMPWconst(v *Value) bool {
}
b = l.Block
v0 := b.NewValue0(l.Pos, Op386CMPWconstload, types.TypeFlags)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = makeValAndOff(c, off)
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -4054,8 +4045,7 @@ func rewriteValue386_Op386MOVBLSX(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(x.Pos, Op386MOVBLSXload, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -4151,8 +4141,7 @@ func rewriteValue386_Op386MOVBLZX(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(x.Pos, Op386MOVBload, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -4176,8 +4165,7 @@ func rewriteValue386_Op386MOVBLZX(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(v.Pos, Op386MOVBloadidx1, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg3(ptr, idx, mem)
@ -5127,9 +5115,7 @@ func rewriteValue386_Op386MOVLload(v *Value) bool {
if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVLload [off1] {sym} (ADDLconst [off2] ptr) mem)
@ -7495,8 +7481,7 @@ func rewriteValue386_Op386MOVWLSX(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(x.Pos, Op386MOVWLSXload, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -7592,8 +7577,7 @@ func rewriteValue386_Op386MOVWLZX(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(x.Pos, Op386MOVWload, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -7617,8 +7601,7 @@ func rewriteValue386_Op386MOVWLZX(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(v.Pos, Op386MOVWloadidx1, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg3(ptr, idx, mem)
@ -7642,8 +7625,7 @@ func rewriteValue386_Op386MOVWLZX(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(v.Pos, Op386MOVWloadidx2, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg3(ptr, idx, mem)
@ -8899,9 +8881,7 @@ func rewriteValue386_Op386MULLconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MULLconst [3] x)
@ -9750,9 +9730,7 @@ func rewriteValue386_Op386ORL(v *Value) bool {
if x != v_1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ORL x0:(MOVBload [i0] {s} p mem) s0:(SHLLconst [8] x1:(MOVBload [i1] {s} p mem)))
@ -9786,8 +9764,7 @@ func rewriteValue386_Op386ORL(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(x1.Pos, Op386MOVWload, typ.UInt16)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = i0
v0.Aux = s
v0.AddArg2(p, mem)
@ -9850,8 +9827,7 @@ func rewriteValue386_Op386ORL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x2.Pos, Op386MOVLload, typ.UInt32)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = i0
v0.Aux = s
v0.AddArg2(p, mem)
@ -9898,8 +9874,7 @@ func rewriteValue386_Op386ORL(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(v.Pos, Op386MOVWloadidx1, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = i0
v0.Aux = s
v0.AddArg3(p, idx, mem)
@ -9974,8 +9949,7 @@ func rewriteValue386_Op386ORL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(v.Pos, Op386MOVLloadidx1, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = i0
v0.Aux = s
v0.AddArg3(p, idx, mem)
@ -10000,9 +9974,7 @@ func rewriteValue386_Op386ORLconst(v *Value) bool {
if !(int32(c) == 0) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ORLconst [c] _)
@ -10489,9 +10461,7 @@ func rewriteValue386_Op386ROLBconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -10519,9 +10489,7 @@ func rewriteValue386_Op386ROLLconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -10549,9 +10517,7 @@ func rewriteValue386_Op386ROLWconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -10583,9 +10549,7 @@ func rewriteValue386_Op386SARBconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SARBconst [c] (MOVLconst [d]))
@ -10641,9 +10605,7 @@ func rewriteValue386_Op386SARLconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SARLconst [c] (MOVLconst [d]))
@ -10687,9 +10649,7 @@ func rewriteValue386_Op386SARWconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SARWconst [c] (MOVLconst [d]))
@ -11469,9 +11429,7 @@ func rewriteValue386_Op386SHLLconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -11522,9 +11480,7 @@ func rewriteValue386_Op386SHRBconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -11568,9 +11524,7 @@ func rewriteValue386_Op386SHRLconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -11621,9 +11575,7 @@ func rewriteValue386_Op386SHRWconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -11747,9 +11699,7 @@ func rewriteValue386_Op386SUBLconst(v *Value) bool {
if !(int32(c) == 0) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SUBLconst [c] x)
@ -12419,9 +12369,7 @@ func rewriteValue386_Op386XORLconst(v *Value) bool {
if !(int32(c) == 0) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (XORLconst [c] (MOVLconst [d]))
@ -14043,9 +13991,7 @@ func rewriteValue386_OpMove(v *Value) bool {
break
}
mem := v_2
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Move [1] dst src mem)
@ -15773,9 +15719,7 @@ func rewriteValue386_OpZero(v *Value) bool {
break
}
mem := v_1
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Zero [1] destptr mem)

File diff suppressed because it is too large Load Diff

View File

@ -1938,9 +1938,7 @@ func rewriteValueARM_OpARMADDconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ADDconst [c] x)
@ -2440,9 +2438,7 @@ func rewriteValueARM_OpARMAND(v *Value) bool {
if x != v_1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (AND x (MVN y))
@ -2534,9 +2530,7 @@ func rewriteValueARM_OpARMANDconst(v *Value) bool {
if !(int32(c) == -1) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ANDconst [c] x)
@ -2644,9 +2638,7 @@ func rewriteValueARM_OpARMANDshiftLL(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
return false
@ -2737,9 +2729,7 @@ func rewriteValueARM_OpARMANDshiftRA(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
return false
@ -2830,9 +2820,7 @@ func rewriteValueARM_OpARMANDshiftRL(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
return false
@ -3025,9 +3013,7 @@ func rewriteValueARM_OpARMBICconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (BICconst [c] _)
@ -3723,9 +3709,7 @@ func rewriteValueARM_OpARMCMOVWHSconst(v *Value) bool {
if v_1.Op != OpARMFlagLT_ULT {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (CMOVWHSconst _ (FlagLT_UGT) [c])
@ -3746,9 +3730,7 @@ func rewriteValueARM_OpARMCMOVWHSconst(v *Value) bool {
if v_1.Op != OpARMFlagGT_ULT {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (CMOVWHSconst _ (FlagGT_UGT) [c])
@ -3810,9 +3792,7 @@ func rewriteValueARM_OpARMCMOVWLSconst(v *Value) bool {
if v_1.Op != OpARMFlagLT_UGT {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (CMOVWLSconst _ (FlagGT_ULT) [c])
@ -3833,9 +3813,7 @@ func rewriteValueARM_OpARMCMOVWLSconst(v *Value) bool {
if v_1.Op != OpARMFlagGT_UGT {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (CMOVWLSconst x (InvertFlags flags) [c])
@ -5779,9 +5757,7 @@ func rewriteValueARM_OpARMMOVDload(v *Value) bool {
if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -5928,9 +5904,7 @@ func rewriteValueARM_OpARMMOVFload(v *Value) bool {
if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -6747,9 +6721,7 @@ func rewriteValueARM_OpARMMOVWload(v *Value) bool {
if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWload [0] {sym} (ADD ptr idx) mem)
@ -6879,9 +6851,7 @@ func rewriteValueARM_OpARMMOVWloadidx(v *Value) bool {
if !(isSamePtr(ptr, ptr2)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWloadidx ptr (MOVWconst [c]) mem)
@ -7028,9 +6998,7 @@ func rewriteValueARM_OpARMMOVWloadshiftLL(v *Value) bool {
if !(c == d && isSamePtr(ptr, ptr2)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWloadshiftLL ptr (MOVWconst [c]) [d] mem)
@ -7074,9 +7042,7 @@ func rewriteValueARM_OpARMMOVWloadshiftRA(v *Value) bool {
if !(c == d && isSamePtr(ptr, ptr2)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWloadshiftRA ptr (MOVWconst [c]) [d] mem)
@ -7120,9 +7086,7 @@ func rewriteValueARM_OpARMMOVWloadshiftRL(v *Value) bool {
if !(c == d && isSamePtr(ptr, ptr2)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWloadshiftRL ptr (MOVWconst [c]) [d] mem)
@ -7575,9 +7539,7 @@ func rewriteValueARM_OpARMMUL(v *Value) bool {
if v_1.Op != OpARMMOVWconst || v_1.AuxInt != 1 {
continue
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
break
@ -7783,9 +7745,7 @@ func rewriteValueARM_OpARMMULA(v *Value) bool {
break
}
a := v_2
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MULA x (MOVWconst [1]) a)
@ -7976,9 +7936,7 @@ func rewriteValueARM_OpARMMULA(v *Value) bool {
break
}
a := v_2
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MULA (MOVWconst [1]) x a)
@ -8241,9 +8199,7 @@ func rewriteValueARM_OpARMMULS(v *Value) bool {
break
}
a := v_2
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MULS x (MOVWconst [1]) a)
@ -8434,9 +8390,7 @@ func rewriteValueARM_OpARMMULS(v *Value) bool {
break
}
a := v_2
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MULS (MOVWconst [1]) x a)
@ -9084,9 +9038,7 @@ func rewriteValueARM_OpARMOR(v *Value) bool {
if x != v_1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -9100,9 +9052,7 @@ func rewriteValueARM_OpARMORconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ORconst [c] _)
@ -9244,9 +9194,7 @@ func rewriteValueARM_OpARMORshiftLL(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
return false
@ -9337,9 +9285,7 @@ func rewriteValueARM_OpARMORshiftRA(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
return false
@ -9446,9 +9392,7 @@ func rewriteValueARM_OpARMORshiftRL(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
return false
@ -11952,9 +11896,7 @@ func rewriteValueARM_OpARMSUBconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SUBconst [c] x)
@ -13253,9 +13195,7 @@ func rewriteValueARM_OpARMXORconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (XORconst [c] (MOVWconst [d]))
@ -15168,9 +15108,7 @@ func rewriteValueARM_OpMove(v *Value) bool {
break
}
mem := v_2
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Move [1] dst src mem)
@ -16402,9 +16340,7 @@ func rewriteValueARM_OpSelect0(v *Value) bool {
if v_0_1.Op != OpARMMOVWconst || v_0_1.AuxInt != 1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (Select0 (CALLudiv x (MOVWconst [c])))
@ -16637,9 +16573,7 @@ func rewriteValueARM_OpZero(v *Value) bool {
break
}
mem := v_1
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Zero [1] ptr mem)

View File

@ -1613,9 +1613,7 @@ func rewriteValueARM64_OpARM64ADDconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ADDconst [c] (MOVDconst [d]))
@ -1915,9 +1913,7 @@ func rewriteValueARM64_OpARM64AND(v *Value) bool {
if x != v_1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (AND x (MVN y))
@ -2022,9 +2018,7 @@ func rewriteValueARM64_OpARM64ANDconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ANDconst [c] (MOVDconst [d]))
@ -2179,9 +2173,7 @@ func rewriteValueARM64_OpARM64ANDshiftLL(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
return false
@ -2235,9 +2227,7 @@ func rewriteValueARM64_OpARM64ANDshiftRA(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
return false
@ -2291,9 +2281,7 @@ func rewriteValueARM64_OpARM64ANDshiftRL(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
return false
@ -3504,9 +3492,7 @@ func rewriteValueARM64_OpARM64CSEL(v *Value) bool {
if !(ccARM64Eval(cc, flag) > 0) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (CSEL {cc} _ y flag)
@ -3519,9 +3505,7 @@ func rewriteValueARM64_OpARM64CSEL(v *Value) bool {
if !(ccARM64Eval(cc, flag) < 0) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (CSEL {cc} x y (CMPWconst [0] boolval))
@ -3591,9 +3575,7 @@ func rewriteValueARM64_OpARM64CSEL0(v *Value) bool {
if !(ccARM64Eval(cc, flag) > 0) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (CSEL0 {cc} _ flag)
@ -4094,8 +4076,7 @@ func rewriteValueARM64_OpARM64FMOVDfpgp(v *Value) bool {
sym := v_0.Aux
b = b.Func.Entry
v0 := b.NewValue0(v.Pos, OpArg, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
return true
@ -4116,8 +4097,7 @@ func rewriteValueARM64_OpARM64FMOVDgpfp(v *Value) bool {
sym := v_0.Aux
b = b.Func.Entry
v0 := b.NewValue0(v.Pos, OpArg, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
return true
@ -5474,9 +5454,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool {
if v_2.Op != OpARM64MOVDconst || v_2.AuxInt != 0 {
break
}
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MADD a x (MOVDconst [1]))
@ -5652,9 +5630,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool {
if v_1.Op != OpARM64MOVDconst || v_1.AuxInt != 0 {
break
}
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MADD a (MOVDconst [1]) x)
@ -5880,9 +5856,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool {
if !(int32(c) == 0) {
break
}
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MADDW a x (MOVDconst [c]))
@ -6073,9 +6047,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool {
if !(int32(c) == 0) {
break
}
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MADDW a (MOVDconst [c]) x)
@ -6284,9 +6256,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool {
if v_1.Op != OpARM64MOVDconst || v_1.AuxInt != -1 {
continue
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
break
@ -6521,9 +6491,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool {
if !(int32(c) == -1) {
continue
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
break
@ -13868,9 +13836,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool {
if v_2.Op != OpARM64MOVDconst || v_2.AuxInt != 0 {
break
}
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MSUB a x (MOVDconst [1]))
@ -14046,9 +14012,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool {
if v_1.Op != OpARM64MOVDconst || v_1.AuxInt != 0 {
break
}
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MSUB a (MOVDconst [1]) x)
@ -14274,9 +14238,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool {
if !(int32(c) == 0) {
break
}
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MSUBW a x (MOVDconst [c]))
@ -14467,9 +14429,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool {
if !(int32(c) == 0) {
break
}
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (MSUBW a (MOVDconst [c]) x)
@ -14720,9 +14680,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool {
if v_1.Op != OpARM64MOVDconst || v_1.AuxInt != 1 {
continue
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
break
@ -14972,9 +14930,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool {
if !(int32(c) == 1) {
continue
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
break
@ -15506,9 +15462,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
if x != v_1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (OR x (MVN y))
@ -16005,8 +15959,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3)
v0 := b.NewValue0(x3.Pos, OpARM64MOVWUload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.Aux = s
v1 := b.NewValue0(x3.Pos, OpOffPtr, p.Type)
v1.AuxInt = i0
@ -16097,8 +16050,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3)
v0 := b.NewValue0(x2.Pos, OpARM64MOVWUloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AddArg3(ptr0, idx0, mem)
return true
}
@ -16186,8 +16138,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3)
v0 := b.NewValue0(v.Pos, OpARM64MOVWUloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AddArg3(ptr, idx, mem)
return true
}
@ -16359,8 +16310,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4, x5, x6, x7)
v0 := b.NewValue0(x7.Pos, OpARM64MOVDload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.Aux = s
v1 := b.NewValue0(x7.Pos, OpOffPtr, p.Type)
v1.AuxInt = i0
@ -16519,8 +16469,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4, x5, x6, x7)
v0 := b.NewValue0(x6.Pos, OpARM64MOVDloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AddArg3(ptr0, idx0, mem)
return true
}
@ -16692,8 +16641,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4, x5, x6, x7)
v0 := b.NewValue0(v.Pos, OpARM64MOVDloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AddArg3(ptr, idx, mem)
return true
}
@ -16781,8 +16729,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3)
v0 := b.NewValue0(x3.Pos, OpARM64REVW, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x3.Pos, OpARM64MOVWUload, t)
v1.Aux = s
v2 := b.NewValue0(x3.Pos, OpOffPtr, p.Type)
@ -16875,8 +16822,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3)
v0 := b.NewValue0(x3.Pos, OpARM64REVW, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x3.Pos, OpARM64MOVWUloadidx, t)
v1.AddArg3(ptr0, idx0, mem)
v0.AddArg(v1)
@ -16966,8 +16912,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3)
v0 := b.NewValue0(v.Pos, OpARM64REVW, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(v.Pos, OpARM64MOVWUloadidx, t)
v1.AddArg3(ptr, idx, mem)
v0.AddArg(v1)
@ -17141,8 +17086,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4, x5, x6, x7)
v0 := b.NewValue0(x7.Pos, OpARM64REV, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x7.Pos, OpARM64MOVDload, t)
v1.Aux = s
v2 := b.NewValue0(x7.Pos, OpOffPtr, p.Type)
@ -17303,8 +17247,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4, x5, x6, x7)
v0 := b.NewValue0(x7.Pos, OpARM64REV, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x7.Pos, OpARM64MOVDloadidx, t)
v1.AddArg3(ptr0, idx0, mem)
v0.AddArg(v1)
@ -17478,8 +17421,7 @@ func rewriteValueARM64_OpARM64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4, x5, x6, x7)
v0 := b.NewValue0(v.Pos, OpARM64REV, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(v.Pos, OpARM64MOVDloadidx, t)
v1.AddArg3(ptr, idx, mem)
v0.AddArg(v1)
@ -17692,9 +17634,7 @@ func rewriteValueARM64_OpARM64ORconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ORconst [-1] _)
@ -17803,9 +17743,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: ( ORshiftLL [c] (SRLconst x [64-c]) x)
@ -17951,8 +17889,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(x1.Pos, OpARM64MOVHUload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.Aux = s
v1 := b.NewValue0(x1.Pos, OpOffPtr, p.Type)
v1.AuxInt = i0
@ -18004,8 +17941,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(x1.Pos, OpARM64MOVHUloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AddArg3(ptr0, idx0, mem)
return true
}
@ -18048,8 +17984,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(v.Pos, OpARM64MOVHUloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AddArg3(ptr, idx, mem)
return true
}
@ -18108,8 +18043,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x2.Pos, OpARM64MOVWUload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.Aux = s
v1 := b.NewValue0(x2.Pos, OpOffPtr, p.Type)
v1.AuxInt = i0
@ -18175,8 +18109,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x2.Pos, OpARM64MOVWUloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AddArg3(ptr0, idx0, mem)
return true
}
@ -18236,8 +18169,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(v.Pos, OpARM64MOVWUloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AddArg3(ptr, idx, mem)
return true
}
@ -18295,8 +18227,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x2.Pos, OpARM64MOVWUloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x2.Pos, OpARM64SLLconst, idx0.Type)
v1.AuxInt = 1
v1.AddArg(idx0)
@ -18400,8 +18331,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4)
v0 := b.NewValue0(x4.Pos, OpARM64MOVDload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.Aux = s
v1 := b.NewValue0(x4.Pos, OpOffPtr, p.Type)
v1.AuxInt = i0
@ -18501,8 +18431,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4)
v0 := b.NewValue0(x4.Pos, OpARM64MOVDloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AddArg3(ptr0, idx0, mem)
return true
}
@ -18596,8 +18525,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4)
v0 := b.NewValue0(x4.Pos, OpARM64MOVDloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x4.Pos, OpARM64SLLconst, idx0.Type)
v1.AuxInt = 2
v1.AddArg(idx0)
@ -18700,8 +18628,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4)
v0 := b.NewValue0(v.Pos, OpARM64MOVDloadidx, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AddArg3(ptr, idx, mem)
return true
}
@ -18743,8 +18670,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(x1.Pos, OpARM64REV16W, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x1.Pos, OpARM64MOVHUload, t)
v1.AuxInt = i0
v1.Aux = s
@ -18796,8 +18722,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(x0.Pos, OpARM64REV16W, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x0.Pos, OpARM64MOVHUloadidx, t)
v1.AddArg3(ptr0, idx0, mem)
v0.AddArg(v1)
@ -18842,8 +18767,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(v.Pos, OpARM64REV16W, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(v.Pos, OpARM64MOVHUloadidx, t)
v1.AddArg3(ptr, idx, mem)
v0.AddArg(v1)
@ -18908,8 +18832,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x2.Pos, OpARM64REVW, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x2.Pos, OpARM64MOVWUload, t)
v1.Aux = s
v2 := b.NewValue0(x2.Pos, OpOffPtr, p.Type)
@ -18981,8 +18904,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x1.Pos, OpARM64REVW, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x1.Pos, OpARM64MOVWUloadidx, t)
v1.AddArg3(ptr0, idx0, mem)
v0.AddArg(v1)
@ -19048,8 +18970,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(v.Pos, OpARM64REVW, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(v.Pos, OpARM64MOVWUloadidx, t)
v1.AddArg3(ptr, idx, mem)
v0.AddArg(v1)
@ -19156,8 +19077,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4)
v0 := b.NewValue0(x4.Pos, OpARM64REV, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x4.Pos, OpARM64MOVDload, t)
v1.Aux = s
v2 := b.NewValue0(x4.Pos, OpOffPtr, p.Type)
@ -19263,8 +19183,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4)
v0 := b.NewValue0(x3.Pos, OpARM64REV, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x3.Pos, OpARM64MOVDloadidx, t)
v1.AddArg3(ptr0, idx0, mem)
v0.AddArg(v1)
@ -19372,8 +19291,7 @@ func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4)
v0 := b.NewValue0(v.Pos, OpARM64REV, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(v.Pos, OpARM64MOVDloadidx, t)
v1.AddArg3(ptr, idx, mem)
v0.AddArg(v1)
@ -19430,9 +19348,7 @@ func rewriteValueARM64_OpARM64ORshiftRA(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
return false
@ -19486,9 +19402,7 @@ func rewriteValueARM64_OpARM64ORshiftRL(v *Value) bool {
if x != y.Args[0] || !(c == d) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: ( ORshiftRL [c] (SLLconst x [64-c]) x)
@ -20455,9 +20369,7 @@ func rewriteValueARM64_OpARM64SUBconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SUBconst [c] (MOVDconst [d]))
@ -21035,9 +20947,7 @@ func rewriteValueARM64_OpARM64UDIV(v *Value) bool {
if v_1.Op != OpARM64MOVDconst || v_1.AuxInt != 1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (UDIV x (MOVDconst [c]))
@ -21089,9 +20999,7 @@ func rewriteValueARM64_OpARM64UDIVW(v *Value) bool {
if !(uint32(c) == 1) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (UDIVW x (MOVDconst [c]))
@ -21666,9 +21574,7 @@ func rewriteValueARM64_OpARM64XORconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (XORconst [-1] x)
@ -23648,9 +23554,7 @@ func rewriteValueARM64_OpMove(v *Value) bool {
break
}
mem := v_2
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Move [1] dst src mem)
@ -25446,9 +25350,7 @@ func rewriteValueARM64_OpZero(v *Value) bool {
break
}
mem := v_1
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Zero [1] ptr mem)

View File

@ -2094,9 +2094,7 @@ func rewriteValueMIPS_OpMIPSADDconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ADDconst [c] (MOVWconst [d]))
@ -2168,9 +2166,7 @@ func rewriteValueMIPS_OpMIPSAND(v *Value) bool {
if x != v_1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (AND (SGTUconst [1] x) (SGTUconst [1] y))
@ -2215,9 +2211,7 @@ func rewriteValueMIPS_OpMIPSANDconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ANDconst [c] (MOVWconst [d]))
@ -2259,9 +2253,7 @@ func rewriteValueMIPS_OpMIPSCMOVZ(v *Value) bool {
if v_2.Op != OpMIPSMOVWconst || v_2.AuxInt != 0 {
break
}
v.reset(OpCopy)
v.Type = f.Type
v.AddArg(f)
v.copyOf(f)
return true
}
// match: (CMOVZ a _ (MOVWconst [c]))
@ -2276,9 +2268,7 @@ func rewriteValueMIPS_OpMIPSCMOVZ(v *Value) bool {
if !(c != 0) {
break
}
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
// match: (CMOVZ a (MOVWconst [0]) c)
@ -2320,9 +2310,7 @@ func rewriteValueMIPS_OpMIPSCMOVZzero(v *Value) bool {
if !(c != 0) {
break
}
v.reset(OpCopy)
v.Type = a.Type
v.AddArg(a)
v.copyOf(a)
return true
}
return false
@ -2484,8 +2472,7 @@ func rewriteValueMIPS_OpMIPSMOVBUreg(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(x.Pos, OpMIPSMOVBUload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -2632,8 +2619,7 @@ func rewriteValueMIPS_OpMIPSMOVBreg(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(x.Pos, OpMIPSMOVBload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -2936,9 +2922,7 @@ func rewriteValueMIPS_OpMIPSMOVDload(v *Value) bool {
if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -3060,9 +3044,7 @@ func rewriteValueMIPS_OpMIPSMOVFload(v *Value) bool {
if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -3257,8 +3239,7 @@ func rewriteValueMIPS_OpMIPSMOVHUreg(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(x.Pos, OpMIPSMOVHUload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -3451,8 +3432,7 @@ func rewriteValueMIPS_OpMIPSMOVHreg(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(x.Pos, OpMIPSMOVHload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -3721,9 +3701,7 @@ func rewriteValueMIPS_OpMIPSMOVWload(v *Value) bool {
if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -3913,9 +3891,7 @@ func rewriteValueMIPS_OpMIPSMUL(v *Value) bool {
continue
}
x := v_1
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
break
@ -4053,9 +4029,7 @@ func rewriteValueMIPS_OpMIPSOR(v *Value) bool {
if x != v_1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (OR (SGTUzero x) (SGTUzero y))
@ -4089,9 +4063,7 @@ func rewriteValueMIPS_OpMIPSORconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ORconst [-1] _)
@ -4712,9 +4684,7 @@ func rewriteValueMIPS_OpMIPSSUBconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SUBconst [c] (MOVWconst [d]))
@ -4800,9 +4770,7 @@ func rewriteValueMIPS_OpMIPSXORconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (XORconst [-1] x)
@ -4977,9 +4945,7 @@ func rewriteValueMIPS_OpMove(v *Value) bool {
break
}
mem := v_2
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Move [1] dst src mem)
@ -6699,9 +6665,7 @@ func rewriteValueMIPS_OpSelect1(v *Value) bool {
continue
}
x := v_0_1
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
break
@ -6962,9 +6926,7 @@ func rewriteValueMIPS_OpZero(v *Value) bool {
break
}
mem := v_1
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Zero [1] ptr mem)

View File

@ -2327,9 +2327,7 @@ func rewriteValueMIPS64_OpMIPS64ADDVconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ADDVconst [c] (MOVVconst [d]))
@ -2412,9 +2410,7 @@ func rewriteValueMIPS64_OpMIPS64AND(v *Value) bool {
if x != v_1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -2438,9 +2434,7 @@ func rewriteValueMIPS64_OpMIPS64ANDconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ANDconst [c] (MOVVconst [d]))
@ -4290,9 +4284,7 @@ func rewriteValueMIPS64_OpMIPS64OR(v *Value) bool {
if x != v_1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -4306,9 +4298,7 @@ func rewriteValueMIPS64_OpMIPS64ORconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ORconst [-1] _)
@ -4867,9 +4857,7 @@ func rewriteValueMIPS64_OpMIPS64SUBVconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SUBVconst [c] (MOVVconst [d]))
@ -4967,9 +4955,7 @@ func rewriteValueMIPS64_OpMIPS64XORconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (XORconst [-1] x)
@ -5190,9 +5176,7 @@ func rewriteValueMIPS64_OpMove(v *Value) bool {
break
}
mem := v_2
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Move [1] dst src mem)
@ -7104,9 +7088,7 @@ func rewriteValueMIPS64_OpSelect1(v *Value) bool {
if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 1 {
continue
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
break
@ -7149,9 +7131,7 @@ func rewriteValueMIPS64_OpSelect1(v *Value) bool {
if v_0_1.Op != OpMIPS64MOVVconst || v_0_1.AuxInt != 1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (Select1 (DIVVU x (MOVVconst [c])))
@ -7369,9 +7349,7 @@ func rewriteValueMIPS64_OpZero(v *Value) bool {
break
}
mem := v_1
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Zero [1] ptr mem)

View File

@ -3424,9 +3424,7 @@ func rewriteValuePPC64_OpMove(v *Value) bool {
break
}
mem := v_2
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Move [1] dst src mem)
@ -3999,9 +3997,7 @@ func rewriteValuePPC64_OpPPC64ADDconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ADDconst [c] (MOVDaddr [d] {sym} x))
@ -4094,9 +4090,7 @@ func rewriteValuePPC64_OpPPC64AND(v *Value) bool {
if y.Op != OpPPC64MOVWZreg || !(c&0xFFFFFFFF == 0xFFFFFFFF) {
continue
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
break
@ -4164,9 +4158,7 @@ func rewriteValuePPC64_OpPPC64ANDconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ANDconst [0] _)
@ -4188,9 +4180,7 @@ func rewriteValuePPC64_OpPPC64ANDconst(v *Value) bool {
if y.Op != OpPPC64MOVBZreg || !(c&0xFF == 0xFF) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ANDconst [0xFF] y:(MOVBreg _))
@ -4203,9 +4193,7 @@ func rewriteValuePPC64_OpPPC64ANDconst(v *Value) bool {
if y.Op != OpPPC64MOVBreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ANDconst [c] y:(MOVHZreg _))
@ -4217,9 +4205,7 @@ func rewriteValuePPC64_OpPPC64ANDconst(v *Value) bool {
if y.Op != OpPPC64MOVHZreg || !(c&0xFFFF == 0xFFFF) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ANDconst [0xFFFF] y:(MOVHreg _))
@ -4232,9 +4218,7 @@ func rewriteValuePPC64_OpPPC64ANDconst(v *Value) bool {
if y.Op != OpPPC64MOVHreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ANDconst [c] (MOVBreg x))
@ -5464,9 +5448,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagEQ {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ISEL [2] _ y (FlagLT))
@ -5479,9 +5461,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagLT {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ISEL [2] _ y (FlagGT))
@ -5494,9 +5474,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagGT {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ISEL [6] _ y (FlagEQ))
@ -5509,9 +5487,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagEQ {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ISEL [6] x _ (FlagLT))
@ -5524,9 +5500,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagLT {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ISEL [6] x _ (FlagGT))
@ -5539,9 +5513,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagGT {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ISEL [0] _ y (FlagEQ))
@ -5554,9 +5526,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagEQ {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ISEL [0] _ y (FlagGT))
@ -5569,9 +5539,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagGT {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ISEL [0] x _ (FlagLT))
@ -5584,9 +5552,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagLT {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ISEL [5] _ x (FlagEQ))
@ -5599,9 +5565,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagEQ {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ISEL [5] _ x (FlagLT))
@ -5614,9 +5578,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagLT {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ISEL [5] y _ (FlagGT))
@ -5629,9 +5591,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagGT {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ISEL [1] _ y (FlagEQ))
@ -5644,9 +5604,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagEQ {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ISEL [1] _ y (FlagLT))
@ -5659,9 +5617,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagLT {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ISEL [1] x _ (FlagGT))
@ -5674,9 +5630,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagGT {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ISEL [4] x _ (FlagEQ))
@ -5689,9 +5643,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagEQ {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ISEL [4] x _ (FlagGT))
@ -5704,9 +5656,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagGT {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ISEL [4] _ y (FlagLT))
@ -5719,9 +5669,7 @@ func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
if v_2.Op != OpPPC64FlagLT {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (ISEL [n] x y (InvertFlags bool))
@ -6173,8 +6121,7 @@ func rewriteValuePPC64_OpPPC64MFVSRD(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(x.Pos, OpPPC64MOVDload, typ.Int64)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -6311,9 +6258,7 @@ func rewriteValuePPC64_OpPPC64MOVBZreg(v *Value) bool {
if !(uint64(c) <= 0xFF) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVBZreg (SRWconst [c] (MOVBZreg x)))
@ -6393,9 +6338,7 @@ func rewriteValuePPC64_OpPPC64MOVBZreg(v *Value) bool {
if y.Op != OpPPC64MOVBZreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVBZreg (MOVBreg x))
@ -6417,9 +6360,7 @@ func rewriteValuePPC64_OpPPC64MOVBZreg(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVBZreg x:(MOVBZloadidx _ _ _))
@ -6430,9 +6371,7 @@ func rewriteValuePPC64_OpPPC64MOVBZreg(v *Value) bool {
break
}
_ = x.Args[2]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVBZreg x:(Arg <t>))
@ -6447,9 +6386,7 @@ func rewriteValuePPC64_OpPPC64MOVBZreg(v *Value) bool {
if !(is8BitInt(t) && !isSigned(t)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVBZreg (MOVDconst [c]))
@ -6481,9 +6418,7 @@ func rewriteValuePPC64_OpPPC64MOVBreg(v *Value) bool {
if !(uint64(c) <= 0x7F) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVBreg (SRAWconst [c] (MOVBreg x)))
@ -6597,9 +6532,7 @@ func rewriteValuePPC64_OpPPC64MOVBreg(v *Value) bool {
if y.Op != OpPPC64MOVBreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVBreg (MOVBZreg x))
@ -6625,9 +6558,7 @@ func rewriteValuePPC64_OpPPC64MOVBreg(v *Value) bool {
if !(is8BitInt(t) && isSigned(t)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVBreg (MOVDconst [c]))
@ -8234,9 +8165,7 @@ func rewriteValuePPC64_OpPPC64MOVHZreg(v *Value) bool {
if !(uint64(c) <= 0xFFFF) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVHZreg (SRWconst [c] (MOVBZreg x)))
@ -8335,9 +8264,7 @@ func rewriteValuePPC64_OpPPC64MOVHZreg(v *Value) bool {
if y.Op != OpPPC64MOVHZreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVHZreg y:(MOVBZreg _))
@ -8347,9 +8274,7 @@ func rewriteValuePPC64_OpPPC64MOVHZreg(v *Value) bool {
if y.Op != OpPPC64MOVBZreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVHZreg y:(MOVHBRload _ _))
@ -8360,9 +8285,7 @@ func rewriteValuePPC64_OpPPC64MOVHZreg(v *Value) bool {
break
}
_ = y.Args[1]
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVHZreg y:(MOVHreg x))
@ -8385,9 +8308,7 @@ func rewriteValuePPC64_OpPPC64MOVHZreg(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVHZreg x:(MOVBZloadidx _ _ _))
@ -8398,9 +8319,7 @@ func rewriteValuePPC64_OpPPC64MOVHZreg(v *Value) bool {
break
}
_ = x.Args[2]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVHZreg x:(MOVHZload _ _))
@ -8411,9 +8330,7 @@ func rewriteValuePPC64_OpPPC64MOVHZreg(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVHZreg x:(MOVHZloadidx _ _ _))
@ -8424,9 +8341,7 @@ func rewriteValuePPC64_OpPPC64MOVHZreg(v *Value) bool {
break
}
_ = x.Args[2]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVHZreg x:(Arg <t>))
@ -8441,9 +8356,7 @@ func rewriteValuePPC64_OpPPC64MOVHZreg(v *Value) bool {
if !((is8BitInt(t) || is16BitInt(t)) && !isSigned(t)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVHZreg (MOVDconst [c]))
@ -8588,9 +8501,7 @@ func rewriteValuePPC64_OpPPC64MOVHreg(v *Value) bool {
if !(uint64(c) <= 0x7FFF) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVHreg (SRAWconst [c] (MOVBreg x)))
@ -8723,9 +8634,7 @@ func rewriteValuePPC64_OpPPC64MOVHreg(v *Value) bool {
if y.Op != OpPPC64MOVHreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVHreg y:(MOVBreg _))
@ -8735,9 +8644,7 @@ func rewriteValuePPC64_OpPPC64MOVHreg(v *Value) bool {
if y.Op != OpPPC64MOVBreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVHreg y:(MOVHZreg x))
@ -8760,9 +8667,7 @@ func rewriteValuePPC64_OpPPC64MOVHreg(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVHreg x:(MOVHloadidx _ _ _))
@ -8773,9 +8678,7 @@ func rewriteValuePPC64_OpPPC64MOVHreg(v *Value) bool {
break
}
_ = x.Args[2]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVHreg x:(Arg <t>))
@ -8790,9 +8693,7 @@ func rewriteValuePPC64_OpPPC64MOVHreg(v *Value) bool {
if !((is8BitInt(t) || is16BitInt(t)) && isSigned(t)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVHreg (MOVDconst [c]))
@ -9356,9 +9257,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
if !(uint64(c) <= 0xFFFFFFFF) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVWZreg y:(AND (MOVDconst [c]) _))
@ -9380,9 +9279,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
if !(uint64(c) <= 0xFFFFFFFF) {
continue
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
break
@ -9485,9 +9382,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
if y.Op != OpPPC64MOVWZreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVWZreg y:(MOVHZreg _))
@ -9497,9 +9392,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
if y.Op != OpPPC64MOVHZreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVWZreg y:(MOVBZreg _))
@ -9509,9 +9402,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
if y.Op != OpPPC64MOVBZreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVWZreg y:(MOVHBRload _ _))
@ -9522,9 +9413,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
break
}
_ = y.Args[1]
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVWZreg y:(MOVWBRload _ _))
@ -9535,9 +9424,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
break
}
_ = y.Args[1]
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVWZreg y:(MOVWreg x))
@ -9560,9 +9447,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWZreg x:(MOVBZloadidx _ _ _))
@ -9573,9 +9458,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
break
}
_ = x.Args[2]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWZreg x:(MOVHZload _ _))
@ -9586,9 +9469,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWZreg x:(MOVHZloadidx _ _ _))
@ -9599,9 +9480,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
break
}
_ = x.Args[2]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWZreg x:(MOVWZload _ _))
@ -9612,9 +9491,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWZreg x:(MOVWZloadidx _ _ _))
@ -9625,9 +9502,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
break
}
_ = x.Args[2]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWZreg x:(Arg <t>))
@ -9642,9 +9517,7 @@ func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
if !((is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && !isSigned(t)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWZreg (MOVDconst [c]))
@ -9789,9 +9662,7 @@ func rewriteValuePPC64_OpPPC64MOVWreg(v *Value) bool {
if !(uint64(c) <= 0xFFFF) {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVWreg y:(AND (MOVDconst [c]) _))
@ -9813,9 +9684,7 @@ func rewriteValuePPC64_OpPPC64MOVWreg(v *Value) bool {
if !(uint64(c) <= 0x7FFFFFFF) {
continue
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
break
@ -9935,9 +9804,7 @@ func rewriteValuePPC64_OpPPC64MOVWreg(v *Value) bool {
if y.Op != OpPPC64MOVWreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVWreg y:(MOVHreg _))
@ -9947,9 +9814,7 @@ func rewriteValuePPC64_OpPPC64MOVWreg(v *Value) bool {
if y.Op != OpPPC64MOVHreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVWreg y:(MOVBreg _))
@ -9959,9 +9824,7 @@ func rewriteValuePPC64_OpPPC64MOVWreg(v *Value) bool {
if y.Op != OpPPC64MOVBreg {
break
}
v.reset(OpCopy)
v.Type = y.Type
v.AddArg(y)
v.copyOf(y)
return true
}
// match: (MOVWreg y:(MOVWZreg x))
@ -9984,9 +9847,7 @@ func rewriteValuePPC64_OpPPC64MOVWreg(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWreg x:(MOVHloadidx _ _ _))
@ -9997,9 +9858,7 @@ func rewriteValuePPC64_OpPPC64MOVWreg(v *Value) bool {
break
}
_ = x.Args[2]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWreg x:(MOVWload _ _))
@ -10010,9 +9869,7 @@ func rewriteValuePPC64_OpPPC64MOVWreg(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWreg x:(MOVWloadidx _ _ _))
@ -10023,9 +9880,7 @@ func rewriteValuePPC64_OpPPC64MOVWreg(v *Value) bool {
break
}
_ = x.Args[2]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWreg x:(Arg <t>))
@ -10040,9 +9895,7 @@ func rewriteValuePPC64_OpPPC64MOVWreg(v *Value) bool {
if !((is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && isSigned(t)) {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (MOVWreg (MOVDconst [c]))
@ -10343,8 +10196,7 @@ func rewriteValuePPC64_OpPPC64MTVSRD(v *Value) bool {
}
b = x.Block
v0 := b.NewValue0(x.Pos, OpPPC64FMOVDload, typ.Float64)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = off
v0.Aux = sym
v0.AddArg2(ptr, mem)
@ -10637,8 +10489,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(x1.Pos, OpPPC64MOVHZload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = i0
v0.Aux = s
v0.AddArg2(p, mem)
@ -10678,8 +10529,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(x1.Pos, OpPPC64MOVHZload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = i0
v0.Aux = s
v0.AddArg2(p, mem)
@ -10719,8 +10569,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
v1.AuxInt = i0
v1.Aux = s
@ -10762,8 +10611,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
v1.AuxInt = i0
v1.Aux = s
@ -10811,8 +10659,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(x1.Pos, OpPPC64SLDconst, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = n1
v1 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
v2 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
@ -10863,8 +10710,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1)
v0 := b.NewValue0(x1.Pos, OpPPC64SLDconst, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = n1
v1 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
v2 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
@ -10933,8 +10779,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x0.Pos, OpPPC64MOVWZload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = i0
v0.Aux = s
v0.AddArg2(p, mem)
@ -10999,8 +10844,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x0.Pos, OpPPC64MOVWZload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = i0
v0.Aux = s
v0.AddArg2(p, mem)
@ -11066,8 +10910,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x0.Pos, OpPPC64MOVWBRload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
v1.AuxInt = i0
v1.Aux = s
@ -11135,8 +10978,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x0.Pos, OpPPC64MOVWBRload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
v1.AuxInt = i0
v1.Aux = s
@ -11204,8 +11046,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x2.Pos, OpPPC64MOVWBRload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x2.Pos, OpPPC64MOVDaddr, typ.Uintptr)
v1.AuxInt = i0
v1.Aux = s
@ -11273,8 +11114,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x2.Pos, OpPPC64MOVWBRload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x2.Pos, OpPPC64MOVDaddr, typ.Uintptr)
v1.AuxInt = i0
v1.Aux = s
@ -11346,8 +11186,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x0.Pos, OpPPC64SLDconst, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = 32
v1 := b.NewValue0(x0.Pos, OpPPC64MOVWBRload, t)
v2 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
@ -11422,8 +11261,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2)
v0 := b.NewValue0(x0.Pos, OpPPC64SLDconst, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = 32
v1 := b.NewValue0(x0.Pos, OpPPC64MOVWBRload, t)
v2 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
@ -11541,8 +11379,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x4, x5, x6, x7)
v0 := b.NewValue0(x0.Pos, OpPPC64MOVDload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v0.AuxInt = i0
v0.Aux = s
v0.AddArg2(p, mem)
@ -11658,8 +11495,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x0, x1, x2, x3, x4)
v0 := b.NewValue0(x4.Pos, OpPPC64MOVDBRload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x4.Pos, OpPPC64MOVDaddr, typ.Uintptr)
v1.AuxInt = i0
v1.Aux = s
@ -11777,8 +11613,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x3, x4, x5, x6, x7)
v0 := b.NewValue0(x3.Pos, OpPPC64MOVDBRload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x3.Pos, OpPPC64MOVDaddr, typ.Uintptr)
v1.AuxInt = i0
v1.Aux = s
@ -11896,8 +11731,7 @@ func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
}
b = mergePoint(b, x3, x4, x5, x6, x7)
v0 := b.NewValue0(x3.Pos, OpPPC64MOVDBRload, t)
v.reset(OpCopy)
v.AddArg(v0)
v.copyOf(v0)
v1 := b.NewValue0(x3.Pos, OpPPC64MOVDaddr, typ.Uintptr)
v1.AuxInt = i0
v1.Aux = s
@ -11922,9 +11756,7 @@ func rewriteValuePPC64_OpPPC64ORN(v *Value) bool {
if v_1.Op != OpPPC64MOVDconst || v_1.AuxInt != -1 {
break
}
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -11962,9 +11794,7 @@ func rewriteValuePPC64_OpPPC64ORconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -12223,9 +12053,7 @@ func rewriteValuePPC64_OpPPC64XORconst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -15075,9 +14903,7 @@ func rewriteValuePPC64_OpZero(v *Value) bool {
break
}
mem := v_1
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Zero [1] destptr mem)

View File

@ -1864,9 +1864,7 @@ func rewriteValueRISCV64_OpMove(v *Value) bool {
break
}
mem := v_2
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Move [1] dst src mem)
@ -2289,9 +2287,7 @@ func rewriteValueRISCV64_OpRISCV64ADDI(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
return false
@ -4081,9 +4077,7 @@ func rewriteValueRISCV64_OpZero(v *Value) bool {
break
}
mem := v_1
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Zero [1] ptr mem)

File diff suppressed because it is too large Load Diff

View File

@ -1853,9 +1853,7 @@ func rewriteValueWasm_OpMove(v *Value) bool {
break
}
mem := v_2
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Move [1] dst src mem)
@ -3099,9 +3097,7 @@ func rewriteValueWasm_OpSignExt16to32(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SignExt16to32 x)
@ -3143,9 +3139,7 @@ func rewriteValueWasm_OpSignExt16to64(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SignExt16to64 x)
@ -3187,9 +3181,7 @@ func rewriteValueWasm_OpSignExt32to64(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SignExt32to64 x)
@ -3231,9 +3223,7 @@ func rewriteValueWasm_OpSignExt8to16(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SignExt8to16 x)
@ -3275,9 +3265,7 @@ func rewriteValueWasm_OpSignExt8to32(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SignExt8to32 x)
@ -3319,9 +3307,7 @@ func rewriteValueWasm_OpSignExt8to64(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (SignExt8to64 x)
@ -3596,9 +3582,7 @@ func rewriteValueWasm_OpWasmI64AddConst(v *Value) bool {
break
}
x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (I64AddConst [off] (LoweredAddr {sym} [off2] base))
@ -4350,9 +4334,7 @@ func rewriteValueWasm_OpZero(v *Value) bool {
break
}
mem := v_1
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
v.copyOf(mem)
return true
}
// match: (Zero [1] destptr mem)
@ -4610,9 +4592,7 @@ func rewriteValueWasm_OpZeroExt16to32(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ZeroExt16to32 x)
@ -4638,9 +4618,7 @@ func rewriteValueWasm_OpZeroExt16to64(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ZeroExt16to64 x)
@ -4666,9 +4644,7 @@ func rewriteValueWasm_OpZeroExt32to64(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ZeroExt32to64 x)
@ -4694,9 +4670,7 @@ func rewriteValueWasm_OpZeroExt8to16(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ZeroExt8to16 x)
@ -4722,9 +4696,7 @@ func rewriteValueWasm_OpZeroExt8to32(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ZeroExt8to32 x)
@ -4750,9 +4722,7 @@ func rewriteValueWasm_OpZeroExt8to64(v *Value) bool {
break
}
_ = x.Args[1]
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
v.copyOf(x)
return true
}
// match: (ZeroExt8to64 x)

View File

@ -41,9 +41,7 @@ func rewriteValuedec_OpComplexImag(v *Value) bool {
break
}
imag := v_0.Args[1]
v.reset(OpCopy)
v.Type = imag.Type
v.AddArg(imag)
v.copyOf(imag)
return true
}
return false
@ -58,9 +56,7 @@ func rewriteValuedec_OpComplexReal(v *Value) bool {
}
_ = v_0.Args[1]
real := v_0.Args[0]
v.reset(OpCopy)
v.Type = real.Type
v.AddArg(real)
v.copyOf(real)
return true
}
return false
@ -74,9 +70,7 @@ func rewriteValuedec_OpIData(v *Value) bool {
break
}
data := v_0.Args[1]
v.reset(OpCopy)
v.Type = data.Type
v.AddArg(data)
v.copyOf(data)
return true
}
return false
@ -91,9 +85,7 @@ func rewriteValuedec_OpITab(v *Value) bool {
}
_ = v_0.Args[1]
itab := v_0.Args[0]
v.reset(OpCopy)
v.Type = itab.Type
v.AddArg(itab)
v.copyOf(itab)
return true
}
return false
@ -225,9 +217,7 @@ func rewriteValuedec_OpSliceCap(v *Value) bool {
break
}
cap := v_0.Args[2]
v.reset(OpCopy)
v.Type = cap.Type
v.AddArg(cap)
v.copyOf(cap)
return true
}
return false
@ -242,9 +232,7 @@ func rewriteValuedec_OpSliceLen(v *Value) bool {
}
_ = v_0.Args[2]
len := v_0.Args[1]
v.reset(OpCopy)
v.Type = len.Type
v.AddArg(len)
v.copyOf(len)
return true
}
return false
@ -259,9 +247,7 @@ func rewriteValuedec_OpSlicePtr(v *Value) bool {
}
_ = v_0.Args[2]
ptr := v_0.Args[0]
v.reset(OpCopy)
v.Type = ptr.Type
v.AddArg(ptr)
v.copyOf(ptr)
return true
}
return false
@ -406,9 +392,7 @@ func rewriteValuedec_OpStringLen(v *Value) bool {
break
}
len := v_0.Args[1]
v.reset(OpCopy)
v.Type = len.Type
v.AddArg(len)
v.copyOf(len)
return true
}
return false
@ -423,9 +407,7 @@ func rewriteValuedec_OpStringPtr(v *Value) bool {
}
_ = v_0.Args[1]
ptr := v_0.Args[0]
v.reset(OpCopy)
v.Type = ptr.Type
v.AddArg(ptr)
v.copyOf(ptr)
return true
}
return false

View File

@ -441,9 +441,7 @@ func rewriteValuedec64_OpInt64Hi(v *Value) bool {
}
_ = v_0.Args[1]
hi := v_0.Args[0]
v.reset(OpCopy)
v.Type = hi.Type
v.AddArg(hi)
v.copyOf(hi)
return true
}
return false
@ -457,9 +455,7 @@ func rewriteValuedec64_OpInt64Lo(v *Value) bool {
break
}
lo := v_0.Args[1]
v.reset(OpCopy)
v.Type = lo.Type
v.AddArg(lo)
v.copyOf(lo)
return true
}
return false
@ -2174,9 +2170,7 @@ func rewriteValuedec64_OpTrunc64to32(v *Value) bool {
break
}
lo := v_0.Args[1]
v.reset(OpCopy)
v.Type = lo.Type
v.AddArg(lo)
v.copyOf(lo)
return true
}
return false

File diff suppressed because it is too large Load Diff

View File

@ -310,17 +310,29 @@ func (v *Value) resetArgs() {
v.Args = v.argstorage[:0]
}
// reset is called from most rewrite rules.
// Allowing it to be inlined increases the size
// of cmd/compile by almost 10%, and slows it down.
//go:noinline
func (v *Value) reset(op Op) {
v.Op = op
if op != OpCopy && notStmtBoundary(op) {
// Special case for OpCopy because of how it is used in rewrite
v.Pos = v.Pos.WithNotStmt()
}
v.resetArgs()
v.AuxInt = 0
v.Aux = nil
}
// copyOf is called from rewrite rules.
// It modifies v to be (Copy a).
//go:noinline
func (v *Value) copyOf(a *Value) {
v.Op = OpCopy
v.resetArgs()
v.AddArg(a)
v.AuxInt = 0
v.Aux = nil
v.Type = a.Type
}
// copyInto makes a new value identical to v and adds it to the end of b.
// unlike copyIntoWithXPos this does not check for v.Pos being a statement.
func (v *Value) copyInto(b *Block) *Value {

View File

@ -347,6 +347,7 @@ func writebarrier(f *Func) {
bEnd.Values = append(bEnd.Values, last)
last.Block = bEnd
last.reset(OpPhi)
last.Pos = last.Pos.WithNotStmt()
last.Type = types.TypeMem
last.AddArg(memThen)
last.AddArg(memElse)