in src/cmd/compile/internal/ssa/rewritegeneric.go [17621:18938]
func rewriteValuegeneric_OpOrB(v *Value) bool {
v_1 := v.Args[1]
v_0 := v.Args[0]
b := v.Block
// match: (OrB (Less64 (Const64 [c]) x) (Less64 x (Const64 [d])))
// cond: c >= d
// result: (Less64U (Const64 <x.Type> [c-d]) (Sub64 <x.Type> x (Const64 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess64 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst64 {
continue
}
c := auxIntToInt64(v_0_0.AuxInt)
if v_1.Op != OpLess64 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst64 {
continue
}
d := auxIntToInt64(v_1_1.AuxInt)
if !(c >= d) {
continue
}
v.reset(OpLess64U)
v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
v0.AuxInt = int64ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
v2.AuxInt = int64ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq64 (Const64 [c]) x) (Less64 x (Const64 [d])))
// cond: c >= d
// result: (Leq64U (Const64 <x.Type> [c-d]) (Sub64 <x.Type> x (Const64 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq64 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst64 {
continue
}
c := auxIntToInt64(v_0_0.AuxInt)
if v_1.Op != OpLess64 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst64 {
continue
}
d := auxIntToInt64(v_1_1.AuxInt)
if !(c >= d) {
continue
}
v.reset(OpLeq64U)
v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
v0.AuxInt = int64ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
v2.AuxInt = int64ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less32 (Const32 [c]) x) (Less32 x (Const32 [d])))
// cond: c >= d
// result: (Less32U (Const32 <x.Type> [c-d]) (Sub32 <x.Type> x (Const32 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess32 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst32 {
continue
}
c := auxIntToInt32(v_0_0.AuxInt)
if v_1.Op != OpLess32 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst32 {
continue
}
d := auxIntToInt32(v_1_1.AuxInt)
if !(c >= d) {
continue
}
v.reset(OpLess32U)
v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
v0.AuxInt = int32ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
v2.AuxInt = int32ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq32 (Const32 [c]) x) (Less32 x (Const32 [d])))
// cond: c >= d
// result: (Leq32U (Const32 <x.Type> [c-d]) (Sub32 <x.Type> x (Const32 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq32 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst32 {
continue
}
c := auxIntToInt32(v_0_0.AuxInt)
if v_1.Op != OpLess32 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst32 {
continue
}
d := auxIntToInt32(v_1_1.AuxInt)
if !(c >= d) {
continue
}
v.reset(OpLeq32U)
v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
v0.AuxInt = int32ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
v2.AuxInt = int32ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less16 (Const16 [c]) x) (Less16 x (Const16 [d])))
// cond: c >= d
// result: (Less16U (Const16 <x.Type> [c-d]) (Sub16 <x.Type> x (Const16 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess16 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst16 {
continue
}
c := auxIntToInt16(v_0_0.AuxInt)
if v_1.Op != OpLess16 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst16 {
continue
}
d := auxIntToInt16(v_1_1.AuxInt)
if !(c >= d) {
continue
}
v.reset(OpLess16U)
v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
v0.AuxInt = int16ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
v2.AuxInt = int16ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq16 (Const16 [c]) x) (Less16 x (Const16 [d])))
// cond: c >= d
// result: (Leq16U (Const16 <x.Type> [c-d]) (Sub16 <x.Type> x (Const16 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq16 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst16 {
continue
}
c := auxIntToInt16(v_0_0.AuxInt)
if v_1.Op != OpLess16 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst16 {
continue
}
d := auxIntToInt16(v_1_1.AuxInt)
if !(c >= d) {
continue
}
v.reset(OpLeq16U)
v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
v0.AuxInt = int16ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
v2.AuxInt = int16ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less8 (Const8 [c]) x) (Less8 x (Const8 [d])))
// cond: c >= d
// result: (Less8U (Const8 <x.Type> [c-d]) (Sub8 <x.Type> x (Const8 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess8 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst8 {
continue
}
c := auxIntToInt8(v_0_0.AuxInt)
if v_1.Op != OpLess8 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst8 {
continue
}
d := auxIntToInt8(v_1_1.AuxInt)
if !(c >= d) {
continue
}
v.reset(OpLess8U)
v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
v0.AuxInt = int8ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
v2.AuxInt = int8ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq8 (Const8 [c]) x) (Less8 x (Const8 [d])))
// cond: c >= d
// result: (Leq8U (Const8 <x.Type> [c-d]) (Sub8 <x.Type> x (Const8 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq8 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst8 {
continue
}
c := auxIntToInt8(v_0_0.AuxInt)
if v_1.Op != OpLess8 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst8 {
continue
}
d := auxIntToInt8(v_1_1.AuxInt)
if !(c >= d) {
continue
}
v.reset(OpLeq8U)
v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
v0.AuxInt = int8ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
v2.AuxInt = int8ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less64 (Const64 [c]) x) (Leq64 x (Const64 [d])))
// cond: c >= d+1 && d+1 > d
// result: (Less64U (Const64 <x.Type> [c-d-1]) (Sub64 <x.Type> x (Const64 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess64 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst64 {
continue
}
c := auxIntToInt64(v_0_0.AuxInt)
if v_1.Op != OpLeq64 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst64 {
continue
}
d := auxIntToInt64(v_1_1.AuxInt)
if !(c >= d+1 && d+1 > d) {
continue
}
v.reset(OpLess64U)
v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
v0.AuxInt = int64ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
v2.AuxInt = int64ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq64 (Const64 [c]) x) (Leq64 x (Const64 [d])))
// cond: c >= d+1 && d+1 > d
// result: (Leq64U (Const64 <x.Type> [c-d-1]) (Sub64 <x.Type> x (Const64 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq64 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst64 {
continue
}
c := auxIntToInt64(v_0_0.AuxInt)
if v_1.Op != OpLeq64 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst64 {
continue
}
d := auxIntToInt64(v_1_1.AuxInt)
if !(c >= d+1 && d+1 > d) {
continue
}
v.reset(OpLeq64U)
v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
v0.AuxInt = int64ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
v2.AuxInt = int64ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less32 (Const32 [c]) x) (Leq32 x (Const32 [d])))
// cond: c >= d+1 && d+1 > d
// result: (Less32U (Const32 <x.Type> [c-d-1]) (Sub32 <x.Type> x (Const32 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess32 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst32 {
continue
}
c := auxIntToInt32(v_0_0.AuxInt)
if v_1.Op != OpLeq32 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst32 {
continue
}
d := auxIntToInt32(v_1_1.AuxInt)
if !(c >= d+1 && d+1 > d) {
continue
}
v.reset(OpLess32U)
v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
v0.AuxInt = int32ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
v2.AuxInt = int32ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq32 (Const32 [c]) x) (Leq32 x (Const32 [d])))
// cond: c >= d+1 && d+1 > d
// result: (Leq32U (Const32 <x.Type> [c-d-1]) (Sub32 <x.Type> x (Const32 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq32 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst32 {
continue
}
c := auxIntToInt32(v_0_0.AuxInt)
if v_1.Op != OpLeq32 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst32 {
continue
}
d := auxIntToInt32(v_1_1.AuxInt)
if !(c >= d+1 && d+1 > d) {
continue
}
v.reset(OpLeq32U)
v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
v0.AuxInt = int32ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
v2.AuxInt = int32ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less16 (Const16 [c]) x) (Leq16 x (Const16 [d])))
// cond: c >= d+1 && d+1 > d
// result: (Less16U (Const16 <x.Type> [c-d-1]) (Sub16 <x.Type> x (Const16 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess16 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst16 {
continue
}
c := auxIntToInt16(v_0_0.AuxInt)
if v_1.Op != OpLeq16 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst16 {
continue
}
d := auxIntToInt16(v_1_1.AuxInt)
if !(c >= d+1 && d+1 > d) {
continue
}
v.reset(OpLess16U)
v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
v0.AuxInt = int16ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
v2.AuxInt = int16ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq16 (Const16 [c]) x) (Leq16 x (Const16 [d])))
// cond: c >= d+1 && d+1 > d
// result: (Leq16U (Const16 <x.Type> [c-d-1]) (Sub16 <x.Type> x (Const16 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq16 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst16 {
continue
}
c := auxIntToInt16(v_0_0.AuxInt)
if v_1.Op != OpLeq16 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst16 {
continue
}
d := auxIntToInt16(v_1_1.AuxInt)
if !(c >= d+1 && d+1 > d) {
continue
}
v.reset(OpLeq16U)
v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
v0.AuxInt = int16ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
v2.AuxInt = int16ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less8 (Const8 [c]) x) (Leq8 x (Const8 [d])))
// cond: c >= d+1 && d+1 > d
// result: (Less8U (Const8 <x.Type> [c-d-1]) (Sub8 <x.Type> x (Const8 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess8 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst8 {
continue
}
c := auxIntToInt8(v_0_0.AuxInt)
if v_1.Op != OpLeq8 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst8 {
continue
}
d := auxIntToInt8(v_1_1.AuxInt)
if !(c >= d+1 && d+1 > d) {
continue
}
v.reset(OpLess8U)
v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
v0.AuxInt = int8ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
v2.AuxInt = int8ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq8 (Const8 [c]) x) (Leq8 x (Const8 [d])))
// cond: c >= d+1 && d+1 > d
// result: (Leq8U (Const8 <x.Type> [c-d-1]) (Sub8 <x.Type> x (Const8 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq8 {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst8 {
continue
}
c := auxIntToInt8(v_0_0.AuxInt)
if v_1.Op != OpLeq8 {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst8 {
continue
}
d := auxIntToInt8(v_1_1.AuxInt)
if !(c >= d+1 && d+1 > d) {
continue
}
v.reset(OpLeq8U)
v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
v0.AuxInt = int8ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
v2.AuxInt = int8ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less64U (Const64 [c]) x) (Less64U x (Const64 [d])))
// cond: uint64(c) >= uint64(d)
// result: (Less64U (Const64 <x.Type> [c-d]) (Sub64 <x.Type> x (Const64 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess64U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst64 {
continue
}
c := auxIntToInt64(v_0_0.AuxInt)
if v_1.Op != OpLess64U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst64 {
continue
}
d := auxIntToInt64(v_1_1.AuxInt)
if !(uint64(c) >= uint64(d)) {
continue
}
v.reset(OpLess64U)
v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
v0.AuxInt = int64ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
v2.AuxInt = int64ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq64U (Const64 [c]) x) (Less64U x (Const64 [d])))
// cond: uint64(c) >= uint64(d)
// result: (Leq64U (Const64 <x.Type> [c-d]) (Sub64 <x.Type> x (Const64 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq64U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst64 {
continue
}
c := auxIntToInt64(v_0_0.AuxInt)
if v_1.Op != OpLess64U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst64 {
continue
}
d := auxIntToInt64(v_1_1.AuxInt)
if !(uint64(c) >= uint64(d)) {
continue
}
v.reset(OpLeq64U)
v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
v0.AuxInt = int64ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
v2.AuxInt = int64ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less32U (Const32 [c]) x) (Less32U x (Const32 [d])))
// cond: uint32(c) >= uint32(d)
// result: (Less32U (Const32 <x.Type> [c-d]) (Sub32 <x.Type> x (Const32 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess32U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst32 {
continue
}
c := auxIntToInt32(v_0_0.AuxInt)
if v_1.Op != OpLess32U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst32 {
continue
}
d := auxIntToInt32(v_1_1.AuxInt)
if !(uint32(c) >= uint32(d)) {
continue
}
v.reset(OpLess32U)
v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
v0.AuxInt = int32ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
v2.AuxInt = int32ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq32U (Const32 [c]) x) (Less32U x (Const32 [d])))
// cond: uint32(c) >= uint32(d)
// result: (Leq32U (Const32 <x.Type> [c-d]) (Sub32 <x.Type> x (Const32 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq32U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst32 {
continue
}
c := auxIntToInt32(v_0_0.AuxInt)
if v_1.Op != OpLess32U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst32 {
continue
}
d := auxIntToInt32(v_1_1.AuxInt)
if !(uint32(c) >= uint32(d)) {
continue
}
v.reset(OpLeq32U)
v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
v0.AuxInt = int32ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
v2.AuxInt = int32ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less16U (Const16 [c]) x) (Less16U x (Const16 [d])))
// cond: uint16(c) >= uint16(d)
// result: (Less16U (Const16 <x.Type> [c-d]) (Sub16 <x.Type> x (Const16 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess16U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst16 {
continue
}
c := auxIntToInt16(v_0_0.AuxInt)
if v_1.Op != OpLess16U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst16 {
continue
}
d := auxIntToInt16(v_1_1.AuxInt)
if !(uint16(c) >= uint16(d)) {
continue
}
v.reset(OpLess16U)
v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
v0.AuxInt = int16ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
v2.AuxInt = int16ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq16U (Const16 [c]) x) (Less16U x (Const16 [d])))
// cond: uint16(c) >= uint16(d)
// result: (Leq16U (Const16 <x.Type> [c-d]) (Sub16 <x.Type> x (Const16 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq16U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst16 {
continue
}
c := auxIntToInt16(v_0_0.AuxInt)
if v_1.Op != OpLess16U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst16 {
continue
}
d := auxIntToInt16(v_1_1.AuxInt)
if !(uint16(c) >= uint16(d)) {
continue
}
v.reset(OpLeq16U)
v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
v0.AuxInt = int16ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
v2.AuxInt = int16ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less8U (Const8 [c]) x) (Less8U x (Const8 [d])))
// cond: uint8(c) >= uint8(d)
// result: (Less8U (Const8 <x.Type> [c-d]) (Sub8 <x.Type> x (Const8 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess8U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst8 {
continue
}
c := auxIntToInt8(v_0_0.AuxInt)
if v_1.Op != OpLess8U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst8 {
continue
}
d := auxIntToInt8(v_1_1.AuxInt)
if !(uint8(c) >= uint8(d)) {
continue
}
v.reset(OpLess8U)
v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
v0.AuxInt = int8ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
v2.AuxInt = int8ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq8U (Const8 [c]) x) (Less8U x (Const8 [d])))
// cond: uint8(c) >= uint8(d)
// result: (Leq8U (Const8 <x.Type> [c-d]) (Sub8 <x.Type> x (Const8 <x.Type> [d])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq8U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst8 {
continue
}
c := auxIntToInt8(v_0_0.AuxInt)
if v_1.Op != OpLess8U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst8 {
continue
}
d := auxIntToInt8(v_1_1.AuxInt)
if !(uint8(c) >= uint8(d)) {
continue
}
v.reset(OpLeq8U)
v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
v0.AuxInt = int8ToAuxInt(c - d)
v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
v2.AuxInt = int8ToAuxInt(d)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less64U (Const64 [c]) x) (Leq64U x (Const64 [d])))
// cond: uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)
// result: (Less64U (Const64 <x.Type> [c-d-1]) (Sub64 <x.Type> x (Const64 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess64U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst64 {
continue
}
c := auxIntToInt64(v_0_0.AuxInt)
if v_1.Op != OpLeq64U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst64 {
continue
}
d := auxIntToInt64(v_1_1.AuxInt)
if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
continue
}
v.reset(OpLess64U)
v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
v0.AuxInt = int64ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
v2.AuxInt = int64ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq64U (Const64 [c]) x) (Leq64U x (Const64 [d])))
// cond: uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)
// result: (Leq64U (Const64 <x.Type> [c-d-1]) (Sub64 <x.Type> x (Const64 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq64U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst64 {
continue
}
c := auxIntToInt64(v_0_0.AuxInt)
if v_1.Op != OpLeq64U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst64 {
continue
}
d := auxIntToInt64(v_1_1.AuxInt)
if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
continue
}
v.reset(OpLeq64U)
v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
v0.AuxInt = int64ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
v2.AuxInt = int64ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less32U (Const32 [c]) x) (Leq32U x (Const32 [d])))
// cond: uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)
// result: (Less32U (Const32 <x.Type> [c-d-1]) (Sub32 <x.Type> x (Const32 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess32U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst32 {
continue
}
c := auxIntToInt32(v_0_0.AuxInt)
if v_1.Op != OpLeq32U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst32 {
continue
}
d := auxIntToInt32(v_1_1.AuxInt)
if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
continue
}
v.reset(OpLess32U)
v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
v0.AuxInt = int32ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
v2.AuxInt = int32ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq32U (Const32 [c]) x) (Leq32U x (Const32 [d])))
// cond: uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)
// result: (Leq32U (Const32 <x.Type> [c-d-1]) (Sub32 <x.Type> x (Const32 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq32U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst32 {
continue
}
c := auxIntToInt32(v_0_0.AuxInt)
if v_1.Op != OpLeq32U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst32 {
continue
}
d := auxIntToInt32(v_1_1.AuxInt)
if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
continue
}
v.reset(OpLeq32U)
v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
v0.AuxInt = int32ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
v2.AuxInt = int32ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less16U (Const16 [c]) x) (Leq16U x (Const16 [d])))
// cond: uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)
// result: (Less16U (Const16 <x.Type> [c-d-1]) (Sub16 <x.Type> x (Const16 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess16U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst16 {
continue
}
c := auxIntToInt16(v_0_0.AuxInt)
if v_1.Op != OpLeq16U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst16 {
continue
}
d := auxIntToInt16(v_1_1.AuxInt)
if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
continue
}
v.reset(OpLess16U)
v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
v0.AuxInt = int16ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
v2.AuxInt = int16ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq16U (Const16 [c]) x) (Leq16U x (Const16 [d])))
// cond: uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)
// result: (Leq16U (Const16 <x.Type> [c-d-1]) (Sub16 <x.Type> x (Const16 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq16U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst16 {
continue
}
c := auxIntToInt16(v_0_0.AuxInt)
if v_1.Op != OpLeq16U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst16 {
continue
}
d := auxIntToInt16(v_1_1.AuxInt)
if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
continue
}
v.reset(OpLeq16U)
v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
v0.AuxInt = int16ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
v2.AuxInt = int16ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Less8U (Const8 [c]) x) (Leq8U x (Const8 [d])))
// cond: uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)
// result: (Less8U (Const8 <x.Type> [c-d-1]) (Sub8 <x.Type> x (Const8 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLess8U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst8 {
continue
}
c := auxIntToInt8(v_0_0.AuxInt)
if v_1.Op != OpLeq8U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst8 {
continue
}
d := auxIntToInt8(v_1_1.AuxInt)
if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
continue
}
v.reset(OpLess8U)
v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
v0.AuxInt = int8ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
v2.AuxInt = int8ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
// match: (OrB (Leq8U (Const8 [c]) x) (Leq8U x (Const8 [d])))
// cond: uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)
// result: (Leq8U (Const8 <x.Type> [c-d-1]) (Sub8 <x.Type> x (Const8 <x.Type> [d+1])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpLeq8U {
continue
}
x := v_0.Args[1]
v_0_0 := v_0.Args[0]
if v_0_0.Op != OpConst8 {
continue
}
c := auxIntToInt8(v_0_0.AuxInt)
if v_1.Op != OpLeq8U {
continue
}
_ = v_1.Args[1]
if x != v_1.Args[0] {
continue
}
v_1_1 := v_1.Args[1]
if v_1_1.Op != OpConst8 {
continue
}
d := auxIntToInt8(v_1_1.AuxInt)
if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
continue
}
v.reset(OpLeq8U)
v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
v0.AuxInt = int8ToAuxInt(c - d - 1)
v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
v2.AuxInt = int8ToAuxInt(d + 1)
v1.AddArg2(x, v2)
v.AddArg2(v0, v1)
return true
}
break
}
return false
}