blob: 67f07e65dcc5260520c51542bfcc5eb1f593f608 [file] [log] [blame]
// autogenerated from gen/generic.rules: do not edit!
// generated with: cd gen; go run *.go
package ssa
import "math"
var _ = math.MinInt8 // in case not otherwise used
func rewriteValuegeneric(v *Value, config *Config) bool {
switch v.Op {
case OpAdd16:
return rewriteValuegeneric_OpAdd16(v, config)
case OpAdd32:
return rewriteValuegeneric_OpAdd32(v, config)
case OpAdd64:
return rewriteValuegeneric_OpAdd64(v, config)
case OpAdd8:
return rewriteValuegeneric_OpAdd8(v, config)
case OpAnd16:
return rewriteValuegeneric_OpAnd16(v, config)
case OpAnd32:
return rewriteValuegeneric_OpAnd32(v, config)
case OpAnd64:
return rewriteValuegeneric_OpAnd64(v, config)
case OpAnd8:
return rewriteValuegeneric_OpAnd8(v, config)
case OpArg:
return rewriteValuegeneric_OpArg(v, config)
case OpArrayIndex:
return rewriteValuegeneric_OpArrayIndex(v, config)
case OpCom16:
return rewriteValuegeneric_OpCom16(v, config)
case OpCom32:
return rewriteValuegeneric_OpCom32(v, config)
case OpCom64:
return rewriteValuegeneric_OpCom64(v, config)
case OpCom8:
return rewriteValuegeneric_OpCom8(v, config)
case OpComplexImag:
return rewriteValuegeneric_OpComplexImag(v, config)
case OpComplexReal:
return rewriteValuegeneric_OpComplexReal(v, config)
case OpConstInterface:
return rewriteValuegeneric_OpConstInterface(v, config)
case OpConstSlice:
return rewriteValuegeneric_OpConstSlice(v, config)
case OpConstString:
return rewriteValuegeneric_OpConstString(v, config)
case OpConvert:
return rewriteValuegeneric_OpConvert(v, config)
case OpEq16:
return rewriteValuegeneric_OpEq16(v, config)
case OpEq32:
return rewriteValuegeneric_OpEq32(v, config)
case OpEq64:
return rewriteValuegeneric_OpEq64(v, config)
case OpEq8:
return rewriteValuegeneric_OpEq8(v, config)
case OpEqInter:
return rewriteValuegeneric_OpEqInter(v, config)
case OpEqPtr:
return rewriteValuegeneric_OpEqPtr(v, config)
case OpEqSlice:
return rewriteValuegeneric_OpEqSlice(v, config)
case OpGeq16:
return rewriteValuegeneric_OpGeq16(v, config)
case OpGeq16U:
return rewriteValuegeneric_OpGeq16U(v, config)
case OpGeq32:
return rewriteValuegeneric_OpGeq32(v, config)
case OpGeq32U:
return rewriteValuegeneric_OpGeq32U(v, config)
case OpGeq64:
return rewriteValuegeneric_OpGeq64(v, config)
case OpGeq64U:
return rewriteValuegeneric_OpGeq64U(v, config)
case OpGeq8:
return rewriteValuegeneric_OpGeq8(v, config)
case OpGeq8U:
return rewriteValuegeneric_OpGeq8U(v, config)
case OpGreater16:
return rewriteValuegeneric_OpGreater16(v, config)
case OpGreater16U:
return rewriteValuegeneric_OpGreater16U(v, config)
case OpGreater32:
return rewriteValuegeneric_OpGreater32(v, config)
case OpGreater32U:
return rewriteValuegeneric_OpGreater32U(v, config)
case OpGreater64:
return rewriteValuegeneric_OpGreater64(v, config)
case OpGreater64U:
return rewriteValuegeneric_OpGreater64U(v, config)
case OpGreater8:
return rewriteValuegeneric_OpGreater8(v, config)
case OpGreater8U:
return rewriteValuegeneric_OpGreater8U(v, config)
case OpIData:
return rewriteValuegeneric_OpIData(v, config)
case OpITab:
return rewriteValuegeneric_OpITab(v, config)
case OpIsInBounds:
return rewriteValuegeneric_OpIsInBounds(v, config)
case OpIsSliceInBounds:
return rewriteValuegeneric_OpIsSliceInBounds(v, config)
case OpLeq16:
return rewriteValuegeneric_OpLeq16(v, config)
case OpLeq16U:
return rewriteValuegeneric_OpLeq16U(v, config)
case OpLeq32:
return rewriteValuegeneric_OpLeq32(v, config)
case OpLeq32U:
return rewriteValuegeneric_OpLeq32U(v, config)
case OpLeq64:
return rewriteValuegeneric_OpLeq64(v, config)
case OpLeq64U:
return rewriteValuegeneric_OpLeq64U(v, config)
case OpLeq8:
return rewriteValuegeneric_OpLeq8(v, config)
case OpLeq8U:
return rewriteValuegeneric_OpLeq8U(v, config)
case OpLess16:
return rewriteValuegeneric_OpLess16(v, config)
case OpLess16U:
return rewriteValuegeneric_OpLess16U(v, config)
case OpLess32:
return rewriteValuegeneric_OpLess32(v, config)
case OpLess32U:
return rewriteValuegeneric_OpLess32U(v, config)
case OpLess64:
return rewriteValuegeneric_OpLess64(v, config)
case OpLess64U:
return rewriteValuegeneric_OpLess64U(v, config)
case OpLess8:
return rewriteValuegeneric_OpLess8(v, config)
case OpLess8U:
return rewriteValuegeneric_OpLess8U(v, config)
case OpLoad:
return rewriteValuegeneric_OpLoad(v, config)
case OpLsh16x16:
return rewriteValuegeneric_OpLsh16x16(v, config)
case OpLsh16x32:
return rewriteValuegeneric_OpLsh16x32(v, config)
case OpLsh16x64:
return rewriteValuegeneric_OpLsh16x64(v, config)
case OpLsh16x8:
return rewriteValuegeneric_OpLsh16x8(v, config)
case OpLsh32x16:
return rewriteValuegeneric_OpLsh32x16(v, config)
case OpLsh32x32:
return rewriteValuegeneric_OpLsh32x32(v, config)
case OpLsh32x64:
return rewriteValuegeneric_OpLsh32x64(v, config)
case OpLsh32x8:
return rewriteValuegeneric_OpLsh32x8(v, config)
case OpLsh64x16:
return rewriteValuegeneric_OpLsh64x16(v, config)
case OpLsh64x32:
return rewriteValuegeneric_OpLsh64x32(v, config)
case OpLsh64x64:
return rewriteValuegeneric_OpLsh64x64(v, config)
case OpLsh64x8:
return rewriteValuegeneric_OpLsh64x8(v, config)
case OpLsh8x16:
return rewriteValuegeneric_OpLsh8x16(v, config)
case OpLsh8x32:
return rewriteValuegeneric_OpLsh8x32(v, config)
case OpLsh8x64:
return rewriteValuegeneric_OpLsh8x64(v, config)
case OpLsh8x8:
return rewriteValuegeneric_OpLsh8x8(v, config)
case OpMul16:
return rewriteValuegeneric_OpMul16(v, config)
case OpMul32:
return rewriteValuegeneric_OpMul32(v, config)
case OpMul64:
return rewriteValuegeneric_OpMul64(v, config)
case OpMul8:
return rewriteValuegeneric_OpMul8(v, config)
case OpNeq16:
return rewriteValuegeneric_OpNeq16(v, config)
case OpNeq32:
return rewriteValuegeneric_OpNeq32(v, config)
case OpNeq64:
return rewriteValuegeneric_OpNeq64(v, config)
case OpNeq8:
return rewriteValuegeneric_OpNeq8(v, config)
case OpNeqInter:
return rewriteValuegeneric_OpNeqInter(v, config)
case OpNeqPtr:
return rewriteValuegeneric_OpNeqPtr(v, config)
case OpNeqSlice:
return rewriteValuegeneric_OpNeqSlice(v, config)
case OpOr16:
return rewriteValuegeneric_OpOr16(v, config)
case OpOr32:
return rewriteValuegeneric_OpOr32(v, config)
case OpOr64:
return rewriteValuegeneric_OpOr64(v, config)
case OpOr8:
return rewriteValuegeneric_OpOr8(v, config)
case OpPtrIndex:
return rewriteValuegeneric_OpPtrIndex(v, config)
case OpRsh16Ux16:
return rewriteValuegeneric_OpRsh16Ux16(v, config)
case OpRsh16Ux32:
return rewriteValuegeneric_OpRsh16Ux32(v, config)
case OpRsh16Ux64:
return rewriteValuegeneric_OpRsh16Ux64(v, config)
case OpRsh16Ux8:
return rewriteValuegeneric_OpRsh16Ux8(v, config)
case OpRsh16x16:
return rewriteValuegeneric_OpRsh16x16(v, config)
case OpRsh16x32:
return rewriteValuegeneric_OpRsh16x32(v, config)
case OpRsh16x64:
return rewriteValuegeneric_OpRsh16x64(v, config)
case OpRsh16x8:
return rewriteValuegeneric_OpRsh16x8(v, config)
case OpRsh32Ux16:
return rewriteValuegeneric_OpRsh32Ux16(v, config)
case OpRsh32Ux32:
return rewriteValuegeneric_OpRsh32Ux32(v, config)
case OpRsh32Ux64:
return rewriteValuegeneric_OpRsh32Ux64(v, config)
case OpRsh32Ux8:
return rewriteValuegeneric_OpRsh32Ux8(v, config)
case OpRsh32x16:
return rewriteValuegeneric_OpRsh32x16(v, config)
case OpRsh32x32:
return rewriteValuegeneric_OpRsh32x32(v, config)
case OpRsh32x64:
return rewriteValuegeneric_OpRsh32x64(v, config)
case OpRsh32x8:
return rewriteValuegeneric_OpRsh32x8(v, config)
case OpRsh64Ux16:
return rewriteValuegeneric_OpRsh64Ux16(v, config)
case OpRsh64Ux32:
return rewriteValuegeneric_OpRsh64Ux32(v, config)
case OpRsh64Ux64:
return rewriteValuegeneric_OpRsh64Ux64(v, config)
case OpRsh64Ux8:
return rewriteValuegeneric_OpRsh64Ux8(v, config)
case OpRsh64x16:
return rewriteValuegeneric_OpRsh64x16(v, config)
case OpRsh64x32:
return rewriteValuegeneric_OpRsh64x32(v, config)
case OpRsh64x64:
return rewriteValuegeneric_OpRsh64x64(v, config)
case OpRsh64x8:
return rewriteValuegeneric_OpRsh64x8(v, config)
case OpRsh8Ux16:
return rewriteValuegeneric_OpRsh8Ux16(v, config)
case OpRsh8Ux32:
return rewriteValuegeneric_OpRsh8Ux32(v, config)
case OpRsh8Ux64:
return rewriteValuegeneric_OpRsh8Ux64(v, config)
case OpRsh8Ux8:
return rewriteValuegeneric_OpRsh8Ux8(v, config)
case OpRsh8x16:
return rewriteValuegeneric_OpRsh8x16(v, config)
case OpRsh8x32:
return rewriteValuegeneric_OpRsh8x32(v, config)
case OpRsh8x64:
return rewriteValuegeneric_OpRsh8x64(v, config)
case OpRsh8x8:
return rewriteValuegeneric_OpRsh8x8(v, config)
case OpSliceCap:
return rewriteValuegeneric_OpSliceCap(v, config)
case OpSliceLen:
return rewriteValuegeneric_OpSliceLen(v, config)
case OpSlicePtr:
return rewriteValuegeneric_OpSlicePtr(v, config)
case OpStore:
return rewriteValuegeneric_OpStore(v, config)
case OpStringLen:
return rewriteValuegeneric_OpStringLen(v, config)
case OpStringPtr:
return rewriteValuegeneric_OpStringPtr(v, config)
case OpStructSelect:
return rewriteValuegeneric_OpStructSelect(v, config)
case OpSub16:
return rewriteValuegeneric_OpSub16(v, config)
case OpSub32:
return rewriteValuegeneric_OpSub32(v, config)
case OpSub64:
return rewriteValuegeneric_OpSub64(v, config)
case OpSub8:
return rewriteValuegeneric_OpSub8(v, config)
case OpXor16:
return rewriteValuegeneric_OpXor16(v, config)
case OpXor32:
return rewriteValuegeneric_OpXor32(v, config)
case OpXor64:
return rewriteValuegeneric_OpXor64(v, config)
case OpXor8:
return rewriteValuegeneric_OpXor8(v, config)
}
return false
}
func rewriteValuegeneric_OpAdd16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Add16 (Const16 [c]) (Const16 [d]))
// cond:
// result: (Const16 [c+d])
{
if v.Args[0].Op != OpConst16 {
goto end359c546ef662b7990116329cb30d6892
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto end359c546ef662b7990116329cb30d6892
}
d := v.Args[1].AuxInt
v.Op = OpConst16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c + d
return true
}
goto end359c546ef662b7990116329cb30d6892
end359c546ef662b7990116329cb30d6892:
;
// match: (Add16 x (Const16 <t> [c]))
// cond: x.Op != OpConst16
// result: (Add16 (Const16 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end89b69a89778f375b0ebbc683b0c63176
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst16) {
goto end89b69a89778f375b0ebbc683b0c63176
}
v.Op = OpAdd16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst16, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end89b69a89778f375b0ebbc683b0c63176
end89b69a89778f375b0ebbc683b0c63176:
;
return false
}
func rewriteValuegeneric_OpAdd32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Add32 (Const32 [c]) (Const32 [d]))
// cond:
// result: (Const32 [c+d])
{
if v.Args[0].Op != OpConst32 {
goto enda3edaa9a512bd1d7a95f002c890bfb88
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto enda3edaa9a512bd1d7a95f002c890bfb88
}
d := v.Args[1].AuxInt
v.Op = OpConst32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c + d
return true
}
goto enda3edaa9a512bd1d7a95f002c890bfb88
enda3edaa9a512bd1d7a95f002c890bfb88:
;
// match: (Add32 x (Const32 <t> [c]))
// cond: x.Op != OpConst32
// result: (Add32 (Const32 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto end28a8c474bfa6968950dce0ed73b14a0b
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst32) {
goto end28a8c474bfa6968950dce0ed73b14a0b
}
v.Op = OpAdd32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst32, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end28a8c474bfa6968950dce0ed73b14a0b
end28a8c474bfa6968950dce0ed73b14a0b:
;
return false
}
func rewriteValuegeneric_OpAdd64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Add64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (Const64 [c+d])
{
if v.Args[0].Op != OpConst64 {
goto end8c46df6f85a11cb1d594076b0e467908
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end8c46df6f85a11cb1d594076b0e467908
}
d := v.Args[1].AuxInt
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c + d
return true
}
goto end8c46df6f85a11cb1d594076b0e467908
end8c46df6f85a11cb1d594076b0e467908:
;
// match: (Add64 x (Const64 <t> [c]))
// cond: x.Op != OpConst64
// result: (Add64 (Const64 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end39caa6cf1044f5c47ddbeb062d1a13bd
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst64) {
goto end39caa6cf1044f5c47ddbeb062d1a13bd
}
v.Op = OpAdd64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end39caa6cf1044f5c47ddbeb062d1a13bd
end39caa6cf1044f5c47ddbeb062d1a13bd:
;
return false
}
func rewriteValuegeneric_OpAdd8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Add8 (Const8 [c]) (Const8 [d]))
// cond:
// result: (Const8 [c+d])
{
if v.Args[0].Op != OpConst8 {
goto end60c66721511a442aade8e4da2fb326bd
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto end60c66721511a442aade8e4da2fb326bd
}
d := v.Args[1].AuxInt
v.Op = OpConst8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c + d
return true
}
goto end60c66721511a442aade8e4da2fb326bd
end60c66721511a442aade8e4da2fb326bd:
;
// match: (Add8 x (Const8 <t> [c]))
// cond: x.Op != OpConst8
// result: (Add8 (Const8 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end8c2901b8d12fa5c37f190783b4db8df5
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst8) {
goto end8c2901b8d12fa5c37f190783b4db8df5
}
v.Op = OpAdd8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst8, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end8c2901b8d12fa5c37f190783b4db8df5
end8c2901b8d12fa5c37f190783b4db8df5:
;
return false
}
func rewriteValuegeneric_OpAnd16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (And16 x x)
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1] != x {
goto end69ed6ee2a4fb0491b56c17f3c1926b10
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end69ed6ee2a4fb0491b56c17f3c1926b10
end69ed6ee2a4fb0491b56c17f3c1926b10:
;
return false
}
func rewriteValuegeneric_OpAnd32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (And32 x x)
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1] != x {
goto endbbe8c3c5b2ca8f013aa178d856f3a99c
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto endbbe8c3c5b2ca8f013aa178d856f3a99c
endbbe8c3c5b2ca8f013aa178d856f3a99c:
;
return false
}
func rewriteValuegeneric_OpAnd64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (And64 x x)
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1] != x {
goto endc9736bf24d2e5cd8d662e1bcf3164640
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto endc9736bf24d2e5cd8d662e1bcf3164640
endc9736bf24d2e5cd8d662e1bcf3164640:
;
return false
}
func rewriteValuegeneric_OpAnd8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (And8 x x)
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1] != x {
goto endeaf127389bd0d4b0e0e297830f8f463b
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto endeaf127389bd0d4b0e0e297830f8f463b
endeaf127389bd0d4b0e0e297830f8f463b:
;
return false
}
func rewriteValuegeneric_OpArg(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Arg {n} [off])
// cond: v.Type.IsString()
// result: (StringMake (Arg <config.fe.TypeBytePtr()> {n} [off]) (Arg <config.fe.TypeInt()> {n} [off+config.PtrSize]))
{
n := v.Aux
off := v.AuxInt
if !(v.Type.IsString()) {
goto end939d3f946bf61eb85b46b374e7afa9e9
}
v.Op = OpStringMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpArg, config.fe.TypeBytePtr())
v0.Aux = n
v0.AuxInt = off
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpArg, config.fe.TypeInt())
v1.Aux = n
v1.AuxInt = off + config.PtrSize
v.AddArg(v1)
return true
}
goto end939d3f946bf61eb85b46b374e7afa9e9
end939d3f946bf61eb85b46b374e7afa9e9:
;
// match: (Arg {n} [off])
// cond: v.Type.IsSlice()
// result: (SliceMake (Arg <config.fe.TypeBytePtr()> {n} [off]) (Arg <config.fe.TypeInt()> {n} [off+config.PtrSize]) (Arg <config.fe.TypeInt()> {n} [off+2*config.PtrSize]))
{
n := v.Aux
off := v.AuxInt
if !(v.Type.IsSlice()) {
goto endab4b93ad3b1cf55e5bf25d1fd9cd498e
}
v.Op = OpSliceMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpArg, config.fe.TypeBytePtr())
v0.Aux = n
v0.AuxInt = off
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpArg, config.fe.TypeInt())
v1.Aux = n
v1.AuxInt = off + config.PtrSize
v.AddArg(v1)
v2 := b.NewValue0(v.Line, OpArg, config.fe.TypeInt())
v2.Aux = n
v2.AuxInt = off + 2*config.PtrSize
v.AddArg(v2)
return true
}
goto endab4b93ad3b1cf55e5bf25d1fd9cd498e
endab4b93ad3b1cf55e5bf25d1fd9cd498e:
;
// match: (Arg {n} [off])
// cond: v.Type.IsInterface()
// result: (IMake (Arg <config.fe.TypeBytePtr()> {n} [off]) (Arg <config.fe.TypeBytePtr()> {n} [off+config.PtrSize]))
{
n := v.Aux
off := v.AuxInt
if !(v.Type.IsInterface()) {
goto end851de8e588a39e81b4e2aef06566bf3e
}
v.Op = OpIMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpArg, config.fe.TypeBytePtr())
v0.Aux = n
v0.AuxInt = off
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpArg, config.fe.TypeBytePtr())
v1.Aux = n
v1.AuxInt = off + config.PtrSize
v.AddArg(v1)
return true
}
goto end851de8e588a39e81b4e2aef06566bf3e
end851de8e588a39e81b4e2aef06566bf3e:
;
// match: (Arg {n} [off])
// cond: v.Type.IsComplex() && v.Type.Size() == 16
// result: (ComplexMake (Arg <config.fe.TypeFloat64()> {n} [off]) (Arg <config.fe.TypeFloat64()> {n} [off+8]))
{
n := v.Aux
off := v.AuxInt
if !(v.Type.IsComplex() && v.Type.Size() == 16) {
goto end0988fc6a62c810b2f4976cb6cf44387f
}
v.Op = OpComplexMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpArg, config.fe.TypeFloat64())
v0.Aux = n
v0.AuxInt = off
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpArg, config.fe.TypeFloat64())
v1.Aux = n
v1.AuxInt = off + 8
v.AddArg(v1)
return true
}
goto end0988fc6a62c810b2f4976cb6cf44387f
end0988fc6a62c810b2f4976cb6cf44387f:
;
// match: (Arg {n} [off])
// cond: v.Type.IsComplex() && v.Type.Size() == 8
// result: (ComplexMake (Arg <config.fe.TypeFloat32()> {n} [off]) (Arg <config.fe.TypeFloat32()> {n} [off+4]))
{
n := v.Aux
off := v.AuxInt
if !(v.Type.IsComplex() && v.Type.Size() == 8) {
goto enda348e93e0036873dd7089a2939c22e3e
}
v.Op = OpComplexMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpArg, config.fe.TypeFloat32())
v0.Aux = n
v0.AuxInt = off
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpArg, config.fe.TypeFloat32())
v1.Aux = n
v1.AuxInt = off + 4
v.AddArg(v1)
return true
}
goto enda348e93e0036873dd7089a2939c22e3e
enda348e93e0036873dd7089a2939c22e3e:
;
// match: (Arg <t>)
// cond: t.IsStruct() && t.NumFields() == 0 && config.fe.CanSSA(t)
// result: (StructMake0)
{
t := v.Type
if !(t.IsStruct() && t.NumFields() == 0 && config.fe.CanSSA(t)) {
goto ende233eeefa826638b0e541bcca531d701
}
v.Op = OpStructMake0
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
return true
}
goto ende233eeefa826638b0e541bcca531d701
ende233eeefa826638b0e541bcca531d701:
;
// match: (Arg <t> {n} [off])
// cond: t.IsStruct() && t.NumFields() == 1 && config.fe.CanSSA(t)
// result: (StructMake1 (Arg <t.FieldType(0)> {n} [off+t.FieldOff(0)]))
{
t := v.Type
n := v.Aux
off := v.AuxInt
if !(t.IsStruct() && t.NumFields() == 1 && config.fe.CanSSA(t)) {
goto ende953e77a0617051dd3f7ad4d58c9ab37
}
v.Op = OpStructMake1
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpArg, t.FieldType(0))
v0.Aux = n
v0.AuxInt = off + t.FieldOff(0)
v.AddArg(v0)
return true
}
goto ende953e77a0617051dd3f7ad4d58c9ab37
ende953e77a0617051dd3f7ad4d58c9ab37:
;
// match: (Arg <t> {n} [off])
// cond: t.IsStruct() && t.NumFields() == 2 && config.fe.CanSSA(t)
// result: (StructMake2 (Arg <t.FieldType(0)> {n} [off+t.FieldOff(0)]) (Arg <t.FieldType(1)> {n} [off+t.FieldOff(1)]))
{
t := v.Type
n := v.Aux
off := v.AuxInt
if !(t.IsStruct() && t.NumFields() == 2 && config.fe.CanSSA(t)) {
goto end9a008048978aabad9de0723212e60631
}
v.Op = OpStructMake2
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpArg, t.FieldType(0))
v0.Aux = n
v0.AuxInt = off + t.FieldOff(0)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpArg, t.FieldType(1))
v1.Aux = n
v1.AuxInt = off + t.FieldOff(1)
v.AddArg(v1)
return true
}
goto end9a008048978aabad9de0723212e60631
end9a008048978aabad9de0723212e60631:
;
// match: (Arg <t> {n} [off])
// cond: t.IsStruct() && t.NumFields() == 3 && config.fe.CanSSA(t)
// result: (StructMake3 (Arg <t.FieldType(0)> {n} [off+t.FieldOff(0)]) (Arg <t.FieldType(1)> {n} [off+t.FieldOff(1)]) (Arg <t.FieldType(2)> {n} [off+t.FieldOff(2)]))
{
t := v.Type
n := v.Aux
off := v.AuxInt
if !(t.IsStruct() && t.NumFields() == 3 && config.fe.CanSSA(t)) {
goto end0196e61dbeebc6402f3aa1e9a182210b
}
v.Op = OpStructMake3
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpArg, t.FieldType(0))
v0.Aux = n
v0.AuxInt = off + t.FieldOff(0)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpArg, t.FieldType(1))
v1.Aux = n
v1.AuxInt = off + t.FieldOff(1)
v.AddArg(v1)
v2 := b.NewValue0(v.Line, OpArg, t.FieldType(2))
v2.Aux = n
v2.AuxInt = off + t.FieldOff(2)
v.AddArg(v2)
return true
}
goto end0196e61dbeebc6402f3aa1e9a182210b
end0196e61dbeebc6402f3aa1e9a182210b:
;
// match: (Arg <t> {n} [off])
// cond: t.IsStruct() && t.NumFields() == 4 && config.fe.CanSSA(t)
// result: (StructMake4 (Arg <t.FieldType(0)> {n} [off+t.FieldOff(0)]) (Arg <t.FieldType(1)> {n} [off+t.FieldOff(1)]) (Arg <t.FieldType(2)> {n} [off+t.FieldOff(2)]) (Arg <t.FieldType(3)> {n} [off+t.FieldOff(3)]))
{
t := v.Type
n := v.Aux
off := v.AuxInt
if !(t.IsStruct() && t.NumFields() == 4 && config.fe.CanSSA(t)) {
goto end6bc133c93e50cb14c2e6cc9401850738
}
v.Op = OpStructMake4
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpArg, t.FieldType(0))
v0.Aux = n
v0.AuxInt = off + t.FieldOff(0)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpArg, t.FieldType(1))
v1.Aux = n
v1.AuxInt = off + t.FieldOff(1)
v.AddArg(v1)
v2 := b.NewValue0(v.Line, OpArg, t.FieldType(2))
v2.Aux = n
v2.AuxInt = off + t.FieldOff(2)
v.AddArg(v2)
v3 := b.NewValue0(v.Line, OpArg, t.FieldType(3))
v3.Aux = n
v3.AuxInt = off + t.FieldOff(3)
v.AddArg(v3)
return true
}
goto end6bc133c93e50cb14c2e6cc9401850738
end6bc133c93e50cb14c2e6cc9401850738:
;
return false
}
func rewriteValuegeneric_OpArrayIndex(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (ArrayIndex (Load ptr mem) idx)
// cond: b == v.Args[0].Block
// result: (Load (PtrIndex <v.Type.PtrTo()> ptr idx) mem)
{
if v.Args[0].Op != OpLoad {
goto end68b373270d9d605c420497edefaa71df
}
ptr := v.Args[0].Args[0]
mem := v.Args[0].Args[1]
idx := v.Args[1]
if !(b == v.Args[0].Block) {
goto end68b373270d9d605c420497edefaa71df
}
v.Op = OpLoad
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpPtrIndex, v.Type.PtrTo())
v0.AddArg(ptr)
v0.AddArg(idx)
v.AddArg(v0)
v.AddArg(mem)
return true
}
goto end68b373270d9d605c420497edefaa71df
end68b373270d9d605c420497edefaa71df:
;
return false
}
func rewriteValuegeneric_OpCom16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Com16 (Com16 x))
// cond:
// result: x
{
if v.Args[0].Op != OpCom16 {
goto end1ea17710dd4dd7ba4e710e0e4c7b5a56
}
x := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end1ea17710dd4dd7ba4e710e0e4c7b5a56
end1ea17710dd4dd7ba4e710e0e4c7b5a56:
;
return false
}
func rewriteValuegeneric_OpCom32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Com32 (Com32 x))
// cond:
// result: x
{
if v.Args[0].Op != OpCom32 {
goto end9a04ed536496e292c27bef4414128cbf
}
x := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end9a04ed536496e292c27bef4414128cbf
end9a04ed536496e292c27bef4414128cbf:
;
return false
}
func rewriteValuegeneric_OpCom64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Com64 (Com64 x))
// cond:
// result: x
{
if v.Args[0].Op != OpCom64 {
goto ended44e29d5968f0f7b86972b7bf417ab3
}
x := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto ended44e29d5968f0f7b86972b7bf417ab3
ended44e29d5968f0f7b86972b7bf417ab3:
;
return false
}
func rewriteValuegeneric_OpCom8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Com8 (Com8 x))
// cond:
// result: x
{
if v.Args[0].Op != OpCom8 {
goto end4d92ff3ba567d9afd38fc9ca113602ad
}
x := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end4d92ff3ba567d9afd38fc9ca113602ad
end4d92ff3ba567d9afd38fc9ca113602ad:
;
return false
}
func rewriteValuegeneric_OpComplexImag(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (ComplexImag (ComplexMake _ imag ))
// cond:
// result: imag
{
if v.Args[0].Op != OpComplexMake {
goto endec3009fd8727d03002021997936e091f
}
imag := v.Args[0].Args[1]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = imag.Type
v.AddArg(imag)
return true
}
goto endec3009fd8727d03002021997936e091f
endec3009fd8727d03002021997936e091f:
;
return false
}
func rewriteValuegeneric_OpComplexReal(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (ComplexReal (ComplexMake real _ ))
// cond:
// result: real
{
if v.Args[0].Op != OpComplexMake {
goto end8db3e16bd59af1adaa4b734c8adcc71d
}
real := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = real.Type
v.AddArg(real)
return true
}
goto end8db3e16bd59af1adaa4b734c8adcc71d
end8db3e16bd59af1adaa4b734c8adcc71d:
;
return false
}
func rewriteValuegeneric_OpConstInterface(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (ConstInterface)
// cond:
// result: (IMake (ConstNil <config.fe.TypeBytePtr()>) (ConstNil <config.fe.TypeBytePtr()>))
{
v.Op = OpIMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConstNil, config.fe.TypeBytePtr())
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpConstNil, config.fe.TypeBytePtr())
v.AddArg(v1)
return true
}
goto end0367bd8f20a320cc41568f2b28657f6b
end0367bd8f20a320cc41568f2b28657f6b:
;
return false
}
func rewriteValuegeneric_OpConstSlice(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (ConstSlice)
// cond: config.PtrSize == 4
// result: (SliceMake (ConstNil <config.fe.TypeBytePtr()>) (Const32 <config.fe.TypeInt()> [0]) (Const32 <config.fe.TypeInt()> [0]))
{
if !(config.PtrSize == 4) {
goto end9ba6baf9c7247b1f5ba4099c0c3910ce
}
v.Op = OpSliceMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConstNil, config.fe.TypeBytePtr())
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpConst32, config.fe.TypeInt())
v1.AuxInt = 0
v.AddArg(v1)
v2 := b.NewValue0(v.Line, OpConst32, config.fe.TypeInt())
v2.AuxInt = 0
v.AddArg(v2)
return true
}
goto end9ba6baf9c7247b1f5ba4099c0c3910ce
end9ba6baf9c7247b1f5ba4099c0c3910ce:
;
// match: (ConstSlice)
// cond: config.PtrSize == 8
// result: (SliceMake (ConstNil <config.fe.TypeBytePtr()>) (Const64 <config.fe.TypeInt()> [0]) (Const64 <config.fe.TypeInt()> [0]))
{
if !(config.PtrSize == 8) {
goto endabee2aa6bd3e3261628f677221ad2640
}
v.Op = OpSliceMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConstNil, config.fe.TypeBytePtr())
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpConst64, config.fe.TypeInt())
v1.AuxInt = 0
v.AddArg(v1)
v2 := b.NewValue0(v.Line, OpConst64, config.fe.TypeInt())
v2.AuxInt = 0
v.AddArg(v2)
return true
}
goto endabee2aa6bd3e3261628f677221ad2640
endabee2aa6bd3e3261628f677221ad2640:
;
return false
}
func rewriteValuegeneric_OpConstString(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (ConstString {s})
// cond: config.PtrSize == 4 && s.(string) == ""
// result: (StringMake (ConstNil) (Const32 <config.fe.TypeInt()> [0]))
{
s := v.Aux
if !(config.PtrSize == 4 && s.(string) == "") {
goto end85d5f388ba947643af63cdc68c1155a5
}
v.Op = OpStringMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConstNil, config.fe.TypeBytePtr())
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpConst32, config.fe.TypeInt())
v1.AuxInt = 0
v.AddArg(v1)
return true
}
goto end85d5f388ba947643af63cdc68c1155a5
end85d5f388ba947643af63cdc68c1155a5:
;
// match: (ConstString {s})
// cond: config.PtrSize == 8 && s.(string) == ""
// result: (StringMake (ConstNil) (Const64 <config.fe.TypeInt()> [0]))
{
s := v.Aux
if !(config.PtrSize == 8 && s.(string) == "") {
goto endc807259a5ed2760fbbd3dc7386641343
}
v.Op = OpStringMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConstNil, config.fe.TypeBytePtr())
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpConst64, config.fe.TypeInt())
v1.AuxInt = 0
v.AddArg(v1)
return true
}
goto endc807259a5ed2760fbbd3dc7386641343
endc807259a5ed2760fbbd3dc7386641343:
;
// match: (ConstString {s})
// cond: config.PtrSize == 4 && s.(string) != ""
// result: (StringMake (Addr <config.fe.TypeBytePtr()> {config.fe.StringData(s.(string))} (SB)) (Const32 <config.fe.TypeInt()> [int64(len(s.(string)))]))
{
s := v.Aux
if !(config.PtrSize == 4 && s.(string) != "") {
goto end107a700a4519d18f418602421444ddb6
}
v.Op = OpStringMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpAddr, config.fe.TypeBytePtr())
v0.Aux = config.fe.StringData(s.(string))
v1 := b.NewValue0(v.Line, OpSB, config.fe.TypeUintptr())
v0.AddArg(v1)
v.AddArg(v0)
v2 := b.NewValue0(v.Line, OpConst32, config.fe.TypeInt())
v2.AuxInt = int64(len(s.(string)))
v.AddArg(v2)
return true
}
goto end107a700a4519d18f418602421444ddb6
end107a700a4519d18f418602421444ddb6:
;
// match: (ConstString {s})
// cond: config.PtrSize == 8 && s.(string) != ""
// result: (StringMake (Addr <config.fe.TypeBytePtr()> {config.fe.StringData(s.(string))} (SB)) (Const64 <config.fe.TypeInt()> [int64(len(s.(string)))]))
{
s := v.Aux
if !(config.PtrSize == 8 && s.(string) != "") {
goto end7ce9db29d17866f26d21e6e12f442e54
}
v.Op = OpStringMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpAddr, config.fe.TypeBytePtr())
v0.Aux = config.fe.StringData(s.(string))
v1 := b.NewValue0(v.Line, OpSB, config.fe.TypeUintptr())
v0.AddArg(v1)
v.AddArg(v0)
v2 := b.NewValue0(v.Line, OpConst64, config.fe.TypeInt())
v2.AuxInt = int64(len(s.(string)))
v.AddArg(v2)
return true
}
goto end7ce9db29d17866f26d21e6e12f442e54
end7ce9db29d17866f26d21e6e12f442e54:
;
return false
}
func rewriteValuegeneric_OpConvert(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Convert (Add64 (Convert ptr mem) off) mem)
// cond:
// result: (Add64 ptr off)
{
if v.Args[0].Op != OpAdd64 {
goto endbbc9f1666b4d39a130e1b86f109e7c1b
}
if v.Args[0].Args[0].Op != OpConvert {
goto endbbc9f1666b4d39a130e1b86f109e7c1b
}
ptr := v.Args[0].Args[0].Args[0]
mem := v.Args[0].Args[0].Args[1]
off := v.Args[0].Args[1]
if v.Args[1] != mem {
goto endbbc9f1666b4d39a130e1b86f109e7c1b
}
v.Op = OpAdd64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(ptr)
v.AddArg(off)
return true
}
goto endbbc9f1666b4d39a130e1b86f109e7c1b
endbbc9f1666b4d39a130e1b86f109e7c1b:
;
// match: (Convert (Convert ptr mem) mem)
// cond:
// result: ptr
{
if v.Args[0].Op != OpConvert {
goto end98c5e0ca257eb216989171786f91b42d
}
ptr := v.Args[0].Args[0]
mem := v.Args[0].Args[1]
if v.Args[1] != mem {
goto end98c5e0ca257eb216989171786f91b42d
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = ptr.Type
v.AddArg(ptr)
return true
}
goto end98c5e0ca257eb216989171786f91b42d
end98c5e0ca257eb216989171786f91b42d:
;
return false
}
func rewriteValuegeneric_OpEq16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Eq16 x x)
// cond:
// result: (ConstBool [1])
{
x := v.Args[0]
if v.Args[1] != x {
goto end0c0fe5fdfba3821add3448fd3f1fc6b7
}
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 1
return true
}
goto end0c0fe5fdfba3821add3448fd3f1fc6b7
end0c0fe5fdfba3821add3448fd3f1fc6b7:
;
// match: (Eq16 (Const16 <t> [c]) (Add16 (Const16 <t> [d]) x))
// cond:
// result: (Eq16 (Const16 <t> [c-d]) x)
{
if v.Args[0].Op != OpConst16 {
goto end79c830afa265161fc0f0532c4c4e7f50
}
t := v.Args[0].Type
c := v.Args[0].AuxInt
if v.Args[1].Op != OpAdd16 {
goto end79c830afa265161fc0f0532c4c4e7f50
}
if v.Args[1].Args[0].Op != OpConst16 {
goto end79c830afa265161fc0f0532c4c4e7f50
}
if v.Args[1].Args[0].Type != v.Args[0].Type {
goto end79c830afa265161fc0f0532c4c4e7f50
}
d := v.Args[1].Args[0].AuxInt
x := v.Args[1].Args[1]
v.Op = OpEq16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst16, t)
v0.AuxInt = c - d
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end79c830afa265161fc0f0532c4c4e7f50
end79c830afa265161fc0f0532c4c4e7f50:
;
// match: (Eq16 x (Const16 <t> [c]))
// cond: x.Op != OpConst16
// result: (Eq16 (Const16 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end5d89fe1eeb145f14e11578f41282c904
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst16) {
goto end5d89fe1eeb145f14e11578f41282c904
}
v.Op = OpEq16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst16, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end5d89fe1eeb145f14e11578f41282c904
end5d89fe1eeb145f14e11578f41282c904:
;
// match: (Eq16 (Const16 [c]) (Const16 [d]))
// cond:
// result: (ConstBool [b2i(int16(c) == int16(d))])
{
if v.Args[0].Op != OpConst16 {
goto end4532e1d01c10d8906fe1da14f9dfaa88
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto end4532e1d01c10d8906fe1da14f9dfaa88
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int16(c) == int16(d))
return true
}
goto end4532e1d01c10d8906fe1da14f9dfaa88
end4532e1d01c10d8906fe1da14f9dfaa88:
;
return false
}
func rewriteValuegeneric_OpEq32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Eq32 x x)
// cond:
// result: (ConstBool [1])
{
x := v.Args[0]
if v.Args[1] != x {
goto end6da547ec4ee93d787434f3bda873e4a0
}
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 1
return true
}
goto end6da547ec4ee93d787434f3bda873e4a0
end6da547ec4ee93d787434f3bda873e4a0:
;
// match: (Eq32 (Const32 <t> [c]) (Add32 (Const32 <t> [d]) x))
// cond:
// result: (Eq32 (Const32 <t> [c-d]) x)
{
if v.Args[0].Op != OpConst32 {
goto end1a69730a32c6e432784dcdf643320ecd
}
t := v.Args[0].Type
c := v.Args[0].AuxInt
if v.Args[1].Op != OpAdd32 {
goto end1a69730a32c6e432784dcdf643320ecd
}
if v.Args[1].Args[0].Op != OpConst32 {
goto end1a69730a32c6e432784dcdf643320ecd
}
if v.Args[1].Args[0].Type != v.Args[0].Type {
goto end1a69730a32c6e432784dcdf643320ecd
}
d := v.Args[1].Args[0].AuxInt
x := v.Args[1].Args[1]
v.Op = OpEq32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst32, t)
v0.AuxInt = c - d
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end1a69730a32c6e432784dcdf643320ecd
end1a69730a32c6e432784dcdf643320ecd:
;
// match: (Eq32 x (Const32 <t> [c]))
// cond: x.Op != OpConst32
// result: (Eq32 (Const32 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto end0ca4ef4cf416ec3083d38667e263cf45
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst32) {
goto end0ca4ef4cf416ec3083d38667e263cf45
}
v.Op = OpEq32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst32, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end0ca4ef4cf416ec3083d38667e263cf45
end0ca4ef4cf416ec3083d38667e263cf45:
;
// match: (Eq32 (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(int32(c) == int32(d))])
{
if v.Args[0].Op != OpConst32 {
goto end00a2464e02c9ca00e8d0077acacbb5ad
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto end00a2464e02c9ca00e8d0077acacbb5ad
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int32(c) == int32(d))
return true
}
goto end00a2464e02c9ca00e8d0077acacbb5ad
end00a2464e02c9ca00e8d0077acacbb5ad:
;
return false
}
func rewriteValuegeneric_OpEq64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Eq64 x x)
// cond:
// result: (ConstBool [1])
{
x := v.Args[0]
if v.Args[1] != x {
goto endb1d471cc503ba8bb05440f01dbf33d81
}
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 1
return true
}
goto endb1d471cc503ba8bb05440f01dbf33d81
endb1d471cc503ba8bb05440f01dbf33d81:
;
// match: (Eq64 (Const64 <t> [c]) (Add64 (Const64 <t> [d]) x))
// cond:
// result: (Eq64 (Const64 <t> [c-d]) x)
{
if v.Args[0].Op != OpConst64 {
goto endffd67f3b83f6972cd459153d318f714d
}
t := v.Args[0].Type
c := v.Args[0].AuxInt
if v.Args[1].Op != OpAdd64 {
goto endffd67f3b83f6972cd459153d318f714d
}
if v.Args[1].Args[0].Op != OpConst64 {
goto endffd67f3b83f6972cd459153d318f714d
}
if v.Args[1].Args[0].Type != v.Args[0].Type {
goto endffd67f3b83f6972cd459153d318f714d
}
d := v.Args[1].Args[0].AuxInt
x := v.Args[1].Args[1]
v.Op = OpEq64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c - d
v.AddArg(v0)
v.AddArg(x)
return true
}
goto endffd67f3b83f6972cd459153d318f714d
endffd67f3b83f6972cd459153d318f714d:
;
// match: (Eq64 x (Const64 <t> [c]))
// cond: x.Op != OpConst64
// result: (Eq64 (Const64 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto endc2ecf8254dc736e97c5815362d0b477d
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst64) {
goto endc2ecf8254dc736e97c5815362d0b477d
}
v.Op = OpEq64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto endc2ecf8254dc736e97c5815362d0b477d
endc2ecf8254dc736e97c5815362d0b477d:
;
// match: (Eq64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(int64(c) == int64(d))])
{
if v.Args[0].Op != OpConst64 {
goto end405568a707dbbc86432e91f4ce7d97d7
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end405568a707dbbc86432e91f4ce7d97d7
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int64(c) == int64(d))
return true
}
goto end405568a707dbbc86432e91f4ce7d97d7
end405568a707dbbc86432e91f4ce7d97d7:
;
return false
}
func rewriteValuegeneric_OpEq8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Eq8 x x)
// cond:
// result: (ConstBool [1])
{
x := v.Args[0]
if v.Args[1] != x {
goto enda66da0d3e7e51624ee46527727c48a9a
}
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 1
return true
}
goto enda66da0d3e7e51624ee46527727c48a9a
enda66da0d3e7e51624ee46527727c48a9a:
;
// match: (Eq8 (Const8 <t> [c]) (Add8 (Const8 <t> [d]) x))
// cond:
// result: (Eq8 (Const8 <t> [c-d]) x)
{
if v.Args[0].Op != OpConst8 {
goto end6912961350bb485f56ef176522aa683b
}
t := v.Args[0].Type
c := v.Args[0].AuxInt
if v.Args[1].Op != OpAdd8 {
goto end6912961350bb485f56ef176522aa683b
}
if v.Args[1].Args[0].Op != OpConst8 {
goto end6912961350bb485f56ef176522aa683b
}
if v.Args[1].Args[0].Type != v.Args[0].Type {
goto end6912961350bb485f56ef176522aa683b
}
d := v.Args[1].Args[0].AuxInt
x := v.Args[1].Args[1]
v.Op = OpEq8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst8, t)
v0.AuxInt = c - d
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end6912961350bb485f56ef176522aa683b
end6912961350bb485f56ef176522aa683b:
;
// match: (Eq8 x (Const8 <t> [c]))
// cond: x.Op != OpConst8
// result: (Eq8 (Const8 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end70d0b569427b24e7a912a1aa8fab3b20
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst8) {
goto end70d0b569427b24e7a912a1aa8fab3b20
}
v.Op = OpEq8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst8, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end70d0b569427b24e7a912a1aa8fab3b20
end70d0b569427b24e7a912a1aa8fab3b20:
;
// match: (Eq8 (Const8 [c]) (Const8 [d]))
// cond:
// result: (ConstBool [b2i(int8(c) == int8(d))])
{
if v.Args[0].Op != OpConst8 {
goto endd49f3700ba2d1e500d3ab4fa34fd090d
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto endd49f3700ba2d1e500d3ab4fa34fd090d
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int8(c) == int8(d))
return true
}
goto endd49f3700ba2d1e500d3ab4fa34fd090d
endd49f3700ba2d1e500d3ab4fa34fd090d:
;
return false
}
func rewriteValuegeneric_OpEqInter(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (EqInter x y)
// cond:
// result: (EqPtr (ITab x) (ITab y))
{
x := v.Args[0]
y := v.Args[1]
v.Op = OpEqPtr
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpITab, config.fe.TypeBytePtr())
v0.AddArg(x)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpITab, config.fe.TypeBytePtr())
v1.AddArg(y)
v.AddArg(v1)
return true
}
goto end1cc40483caab33ece971ab7e6c8fdfca
end1cc40483caab33ece971ab7e6c8fdfca:
;
return false
}
func rewriteValuegeneric_OpEqPtr(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (EqPtr p (ConstNil))
// cond:
// result: (Not (IsNonNil p))
{
p := v.Args[0]
if v.Args[1].Op != OpConstNil {
goto ende701cdb6a2c1fff4d4b283b7f8f6178b
}
v.Op = OpNot
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpIsNonNil, config.fe.TypeBool())
v0.AddArg(p)
v.AddArg(v0)
return true
}
goto ende701cdb6a2c1fff4d4b283b7f8f6178b
ende701cdb6a2c1fff4d4b283b7f8f6178b:
;
// match: (EqPtr (ConstNil) p)
// cond:
// result: (Not (IsNonNil p))
{
if v.Args[0].Op != OpConstNil {
goto end7cdc0d5c38fbffe6287c8928803b038e
}
p := v.Args[1]
v.Op = OpNot
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpIsNonNil, config.fe.TypeBool())
v0.AddArg(p)
v.AddArg(v0)
return true
}
goto end7cdc0d5c38fbffe6287c8928803b038e
end7cdc0d5c38fbffe6287c8928803b038e:
;
return false
}
func rewriteValuegeneric_OpEqSlice(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (EqSlice x y)
// cond:
// result: (EqPtr (SlicePtr x) (SlicePtr y))
{
x := v.Args[0]
y := v.Args[1]
v.Op = OpEqPtr
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpSlicePtr, config.fe.TypeBytePtr())
v0.AddArg(x)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpSlicePtr, config.fe.TypeBytePtr())
v1.AddArg(y)
v.AddArg(v1)
return true
}
goto end9cd53ca57ee90aa09c54f8071c8e8769
end9cd53ca57ee90aa09c54f8071c8e8769:
;
return false
}
func rewriteValuegeneric_OpGeq16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Geq16 (Const16 [c]) (Const16 [d]))
// cond:
// result: (ConstBool [b2i(int16(c) >= int16(d))])
{
if v.Args[0].Op != OpConst16 {
goto endbac100e9f1065e7d2ff863951f686f4b
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto endbac100e9f1065e7d2ff863951f686f4b
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int16(c) >= int16(d))
return true
}
goto endbac100e9f1065e7d2ff863951f686f4b
endbac100e9f1065e7d2ff863951f686f4b:
;
return false
}
func rewriteValuegeneric_OpGeq16U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Geq16U (Const16 [c]) (Const16 [d]))
// cond:
// result: (ConstBool [b2i(uint16(c) >= uint16(d))])
{
if v.Args[0].Op != OpConst16 {
goto end11c6acbc5827fc9508424b0ffcf98b34
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto end11c6acbc5827fc9508424b0ffcf98b34
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint16(c) >= uint16(d))
return true
}
goto end11c6acbc5827fc9508424b0ffcf98b34
end11c6acbc5827fc9508424b0ffcf98b34:
;
return false
}
func rewriteValuegeneric_OpGeq32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Geq32 (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(int32(c) >= int32(d))])
{
if v.Args[0].Op != OpConst32 {
goto end89ced97524ac75045911ca7cf6d44b28
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto end89ced97524ac75045911ca7cf6d44b28
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int32(c) >= int32(d))
return true
}
goto end89ced97524ac75045911ca7cf6d44b28
end89ced97524ac75045911ca7cf6d44b28:
;
return false
}
func rewriteValuegeneric_OpGeq32U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Geq32U (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(uint32(c) >= uint32(d))])
{
if v.Args[0].Op != OpConst32 {
goto end92fbe85c7bbbf0db287932822bdde991
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto end92fbe85c7bbbf0db287932822bdde991
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint32(c) >= uint32(d))
return true
}
goto end92fbe85c7bbbf0db287932822bdde991
end92fbe85c7bbbf0db287932822bdde991:
;
return false
}
func rewriteValuegeneric_OpGeq64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Geq64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(int64(c) >= int64(d))])
{
if v.Args[0].Op != OpConst64 {
goto end08a5a4bff12a346befe05ad561b080ac
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end08a5a4bff12a346befe05ad561b080ac
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int64(c) >= int64(d))
return true
}
goto end08a5a4bff12a346befe05ad561b080ac
end08a5a4bff12a346befe05ad561b080ac:
;
return false
}
func rewriteValuegeneric_OpGeq64U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Geq64U (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(uint64(c) >= uint64(d))])
{
if v.Args[0].Op != OpConst64 {
goto endd72c497b6cc2b01d43a39ec12d5010b3
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto endd72c497b6cc2b01d43a39ec12d5010b3
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint64(c) >= uint64(d))
return true
}
goto endd72c497b6cc2b01d43a39ec12d5010b3
endd72c497b6cc2b01d43a39ec12d5010b3:
;
return false
}
func rewriteValuegeneric_OpGeq8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Geq8 (Const8 [c]) (Const8 [d]))
// cond:
// result: (ConstBool [b2i(int8(c) >= int8(d))])
{
if v.Args[0].Op != OpConst8 {
goto endea141068e84038c63cbdd87a8cb227d7
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto endea141068e84038c63cbdd87a8cb227d7
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int8(c) >= int8(d))
return true
}
goto endea141068e84038c63cbdd87a8cb227d7
endea141068e84038c63cbdd87a8cb227d7:
;
return false
}
func rewriteValuegeneric_OpGeq8U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Geq8U (Const8 [c]) (Const8 [d]))
// cond:
// result: (ConstBool [b2i(uint8(c) >= uint8(d))])
{
if v.Args[0].Op != OpConst8 {
goto end47c128ccdc54151a243c5856b0c52ef1
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto end47c128ccdc54151a243c5856b0c52ef1
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint8(c) >= uint8(d))
return true
}
goto end47c128ccdc54151a243c5856b0c52ef1
end47c128ccdc54151a243c5856b0c52ef1:
;
return false
}
func rewriteValuegeneric_OpGreater16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Greater16 (Const16 [c]) (Const16 [d]))
// cond:
// result: (ConstBool [b2i(int16(c) > int16(d))])
{
if v.Args[0].Op != OpConst16 {
goto end390bae49463ace4d703dd24e18920f66
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto end390bae49463ace4d703dd24e18920f66
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int16(c) > int16(d))
return true
}
goto end390bae49463ace4d703dd24e18920f66
end390bae49463ace4d703dd24e18920f66:
;
return false
}
func rewriteValuegeneric_OpGreater16U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Greater16U (Const16 [c]) (Const16 [d]))
// cond:
// result: (ConstBool [b2i(uint16(c) > uint16(d))])
{
if v.Args[0].Op != OpConst16 {
goto end89ba3caf5c156fa6d908ac04c058187b
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto end89ba3caf5c156fa6d908ac04c058187b
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint16(c) > uint16(d))
return true
}
goto end89ba3caf5c156fa6d908ac04c058187b
end89ba3caf5c156fa6d908ac04c058187b:
;
return false
}
func rewriteValuegeneric_OpGreater32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Greater32 (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(int32(c) > int32(d))])
{
if v.Args[0].Op != OpConst32 {
goto end86482a9dc6439e8470da5352dd74d68d
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto end86482a9dc6439e8470da5352dd74d68d
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int32(c) > int32(d))
return true
}
goto end86482a9dc6439e8470da5352dd74d68d
end86482a9dc6439e8470da5352dd74d68d:
;
return false
}
func rewriteValuegeneric_OpGreater32U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Greater32U (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(uint32(c) > uint32(d))])
{
if v.Args[0].Op != OpConst32 {
goto end1bf3f05c1e3599a969b8be1f5f6949e4
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto end1bf3f05c1e3599a969b8be1f5f6949e4
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint32(c) > uint32(d))
return true
}
goto end1bf3f05c1e3599a969b8be1f5f6949e4
end1bf3f05c1e3599a969b8be1f5f6949e4:
;
return false
}
func rewriteValuegeneric_OpGreater64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Greater64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(int64(c) > int64(d))])
{
if v.Args[0].Op != OpConst64 {
goto end96a82e893fda4882f23b6bab5f7fbff7
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end96a82e893fda4882f23b6bab5f7fbff7
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int64(c) > int64(d))
return true
}
goto end96a82e893fda4882f23b6bab5f7fbff7
end96a82e893fda4882f23b6bab5f7fbff7:
;
return false
}
func rewriteValuegeneric_OpGreater64U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Greater64U (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(uint64(c) > uint64(d))])
{
if v.Args[0].Op != OpConst64 {
goto end2d8f5ad85fbffeb92af985a888f6fa69
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end2d8f5ad85fbffeb92af985a888f6fa69
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint64(c) > uint64(d))
return true
}
goto end2d8f5ad85fbffeb92af985a888f6fa69
end2d8f5ad85fbffeb92af985a888f6fa69:
;
return false
}
func rewriteValuegeneric_OpGreater8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Greater8 (Const8 [c]) (Const8 [d]))
// cond:
// result: (ConstBool [b2i(int8(c) > int8(d))])
{
if v.Args[0].Op != OpConst8 {
goto ende221967c7516b7749109cf8343fe9c83
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto ende221967c7516b7749109cf8343fe9c83
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int8(c) > int8(d))
return true
}
goto ende221967c7516b7749109cf8343fe9c83
ende221967c7516b7749109cf8343fe9c83:
;
return false
}
func rewriteValuegeneric_OpGreater8U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Greater8U (Const8 [c]) (Const8 [d]))
// cond:
// result: (ConstBool [b2i(uint8(c) > uint8(d))])
{
if v.Args[0].Op != OpConst8 {
goto enda9398c8188156dd46689fa2939147525
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto enda9398c8188156dd46689fa2939147525
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint8(c) > uint8(d))
return true
}
goto enda9398c8188156dd46689fa2939147525
enda9398c8188156dd46689fa2939147525:
;
return false
}
func rewriteValuegeneric_OpIData(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (IData (IMake _ data))
// cond:
// result: data
{
if v.Args[0].Op != OpIMake {
goto endbfa1bb944cdc07933effb16a35152e12
}
data := v.Args[0].Args[1]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = data.Type
v.AddArg(data)
return true
}
goto endbfa1bb944cdc07933effb16a35152e12
endbfa1bb944cdc07933effb16a35152e12:
;
return false
}
func rewriteValuegeneric_OpITab(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (ITab (IMake itab _))
// cond:
// result: itab
{
if v.Args[0].Op != OpIMake {
goto endfcbb9414a776ff9c8512da3e0f4d8fbd
}
itab := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = itab.Type
v.AddArg(itab)
return true
}
goto endfcbb9414a776ff9c8512da3e0f4d8fbd
endfcbb9414a776ff9c8512da3e0f4d8fbd:
;
return false
}
func rewriteValuegeneric_OpIsInBounds(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (IsInBounds (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(inBounds32(c,d))])
{
if v.Args[0].Op != OpConst32 {
goto endf0a2ecfe84b293de6ff0919e45d19d9d
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto endf0a2ecfe84b293de6ff0919e45d19d9d
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(inBounds32(c, d))
return true
}
goto endf0a2ecfe84b293de6ff0919e45d19d9d
endf0a2ecfe84b293de6ff0919e45d19d9d:
;
// match: (IsInBounds (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(inBounds64(c,d))])
{
if v.Args[0].Op != OpConst64 {
goto end4b406f402c135f50f71effcc904ecb2b
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end4b406f402c135f50f71effcc904ecb2b
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(inBounds64(c, d))
return true
}
goto end4b406f402c135f50f71effcc904ecb2b
end4b406f402c135f50f71effcc904ecb2b:
;
return false
}
func rewriteValuegeneric_OpIsSliceInBounds(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (IsSliceInBounds (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(sliceInBounds32(c,d))])
{
if v.Args[0].Op != OpConst32 {
goto end5e84a230c28cac987437cfed8f432cc3
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto end5e84a230c28cac987437cfed8f432cc3
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(sliceInBounds32(c, d))
return true
}
goto end5e84a230c28cac987437cfed8f432cc3
end5e84a230c28cac987437cfed8f432cc3:
;
// match: (IsSliceInBounds (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(sliceInBounds64(c,d))])
{
if v.Args[0].Op != OpConst64 {
goto end3880a6fe20ad4152e98f76d84da233a7
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end3880a6fe20ad4152e98f76d84da233a7
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(sliceInBounds64(c, d))
return true
}
goto end3880a6fe20ad4152e98f76d84da233a7
end3880a6fe20ad4152e98f76d84da233a7:
;
return false
}
func rewriteValuegeneric_OpLeq16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Leq16 (Const16 [c]) (Const16 [d]))
// cond:
// result: (ConstBool [b2i(int16(c) <= int16(d))])
{
if v.Args[0].Op != OpConst16 {
goto end76b1c51f9b7cd7ee2f75b9f7057569de
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto end76b1c51f9b7cd7ee2f75b9f7057569de
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int16(c) <= int16(d))
return true
}
goto end76b1c51f9b7cd7ee2f75b9f7057569de
end76b1c51f9b7cd7ee2f75b9f7057569de:
;
return false
}
func rewriteValuegeneric_OpLeq16U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Leq16U (Const16 [c]) (Const16 [d]))
// cond:
// result: (ConstBool [b2i(uint16(c) <= uint16(d))])
{
if v.Args[0].Op != OpConst16 {
goto endf010fdf7f2c438ec18c33f493dd062aa
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto endf010fdf7f2c438ec18c33f493dd062aa
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint16(c) <= uint16(d))
return true
}
goto endf010fdf7f2c438ec18c33f493dd062aa
endf010fdf7f2c438ec18c33f493dd062aa:
;
return false
}
func rewriteValuegeneric_OpLeq32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Leq32 (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(int32(c) <= int32(d))])
{
if v.Args[0].Op != OpConst32 {
goto end6c7d61cfd188680bea8a5e23f08ca1de
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto end6c7d61cfd188680bea8a5e23f08ca1de
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int32(c) <= int32(d))
return true
}
goto end6c7d61cfd188680bea8a5e23f08ca1de
end6c7d61cfd188680bea8a5e23f08ca1de:
;
return false
}
func rewriteValuegeneric_OpLeq32U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Leq32U (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(uint32(c) <= uint32(d))])
{
if v.Args[0].Op != OpConst32 {
goto end4363555333511ee9b649b36f1a0ba34e
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto end4363555333511ee9b649b36f1a0ba34e
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint32(c) <= uint32(d))
return true
}
goto end4363555333511ee9b649b36f1a0ba34e
end4363555333511ee9b649b36f1a0ba34e:
;
return false
}
func rewriteValuegeneric_OpLeq64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Leq64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(int64(c) <= int64(d))])
{
if v.Args[0].Op != OpConst64 {
goto enddc865cd7ac2093abc7617bedbf371c22
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto enddc865cd7ac2093abc7617bedbf371c22
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int64(c) <= int64(d))
return true
}
goto enddc865cd7ac2093abc7617bedbf371c22
enddc865cd7ac2093abc7617bedbf371c22:
;
return false
}
func rewriteValuegeneric_OpLeq64U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Leq64U (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(uint64(c) <= uint64(d))])
{
if v.Args[0].Op != OpConst64 {
goto end412eadb168738ba92f3f0705d4495305
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end412eadb168738ba92f3f0705d4495305
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint64(c) <= uint64(d))
return true
}
goto end412eadb168738ba92f3f0705d4495305
end412eadb168738ba92f3f0705d4495305:
;
return false
}
func rewriteValuegeneric_OpLeq8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Leq8 (Const8 [c]) (Const8 [d]))
// cond:
// result: (ConstBool [b2i(int8(c) <= int8(d))])
{
if v.Args[0].Op != OpConst8 {
goto endb5a459da8e18c40abc0c7a20e71d0187
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto endb5a459da8e18c40abc0c7a20e71d0187
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int8(c) <= int8(d))
return true
}
goto endb5a459da8e18c40abc0c7a20e71d0187
endb5a459da8e18c40abc0c7a20e71d0187:
;
return false
}
func rewriteValuegeneric_OpLeq8U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Leq8U (Const8 [c]) (Const8 [d]))
// cond:
// result: (ConstBool [b2i(uint8(c) <= uint8(d))])
{
if v.Args[0].Op != OpConst8 {
goto endd6622d55fcdf3fa7b08e7511cd3b7d85
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto endd6622d55fcdf3fa7b08e7511cd3b7d85
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint8(c) <= uint8(d))
return true
}
goto endd6622d55fcdf3fa7b08e7511cd3b7d85
endd6622d55fcdf3fa7b08e7511cd3b7d85:
;
return false
}
func rewriteValuegeneric_OpLess16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Less16 (Const16 [c]) (Const16 [d]))
// cond:
// result: (ConstBool [b2i(int16(c) < int16(d))])
{
if v.Args[0].Op != OpConst16 {
goto end0dc915d089f05e79589ebb5c498cc360
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto end0dc915d089f05e79589ebb5c498cc360
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int16(c) < int16(d))
return true
}
goto end0dc915d089f05e79589ebb5c498cc360
end0dc915d089f05e79589ebb5c498cc360:
;
return false
}
func rewriteValuegeneric_OpLess16U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Less16U (Const16 [c]) (Const16 [d]))
// cond:
// result: (ConstBool [b2i(uint16(c) < uint16(d))])
{
if v.Args[0].Op != OpConst16 {
goto endd2bb8249443788690946fc184631a00a
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto endd2bb8249443788690946fc184631a00a
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint16(c) < uint16(d))
return true
}
goto endd2bb8249443788690946fc184631a00a
endd2bb8249443788690946fc184631a00a:
;
return false
}
func rewriteValuegeneric_OpLess32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Less32 (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(int32(c) < int32(d))])
{
if v.Args[0].Op != OpConst32 {
goto endc86f65e499688809d414f03539bec5bf
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto endc86f65e499688809d414f03539bec5bf
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int32(c) < int32(d))
return true
}
goto endc86f65e499688809d414f03539bec5bf
endc86f65e499688809d414f03539bec5bf:
;
return false
}
func rewriteValuegeneric_OpLess32U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Less32U (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(uint32(c) < uint32(d))])
{
if v.Args[0].Op != OpConst32 {
goto end2cc68b5247b1afb90a9d3923b28ff247
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto end2cc68b5247b1afb90a9d3923b28ff247
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint32(c) < uint32(d))
return true
}
goto end2cc68b5247b1afb90a9d3923b28ff247
end2cc68b5247b1afb90a9d3923b28ff247:
;
return false
}
func rewriteValuegeneric_OpLess64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Less64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(int64(c) < int64(d))])
{
if v.Args[0].Op != OpConst64 {
goto end505de73cd15125dbb59b05d8975d3128
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end505de73cd15125dbb59b05d8975d3128
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int64(c) < int64(d))
return true
}
goto end505de73cd15125dbb59b05d8975d3128
end505de73cd15125dbb59b05d8975d3128:
;
return false
}
func rewriteValuegeneric_OpLess64U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Less64U (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(uint64(c) < uint64(d))])
{
if v.Args[0].Op != OpConst64 {
goto endeb249ef36416cd1abf4f807026c059cd
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto endeb249ef36416cd1abf4f807026c059cd
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint64(c) < uint64(d))
return true
}
goto endeb249ef36416cd1abf4f807026c059cd
endeb249ef36416cd1abf4f807026c059cd:
;
return false
}
func rewriteValuegeneric_OpLess8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Less8 (Const8 [c]) (Const8 [d]))
// cond:
// result: (ConstBool [b2i(int8(c) < int8(d))])
{
if v.Args[0].Op != OpConst8 {
goto endef134de03bc8537ac1f38d5eccff7673
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto endef134de03bc8537ac1f38d5eccff7673
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int8(c) < int8(d))
return true
}
goto endef134de03bc8537ac1f38d5eccff7673
endef134de03bc8537ac1f38d5eccff7673:
;
return false
}
func rewriteValuegeneric_OpLess8U(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Less8U (Const8 [c]) (Const8 [d]))
// cond:
// result: (ConstBool [b2i(uint8(c) < uint8(d))])
{
if v.Args[0].Op != OpConst8 {
goto end263ecdc279924bff8771dd1ac3f42222
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto end263ecdc279924bff8771dd1ac3f42222
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(uint8(c) < uint8(d))
return true
}
goto end263ecdc279924bff8771dd1ac3f42222
end263ecdc279924bff8771dd1ac3f42222:
;
return false
}
func rewriteValuegeneric_OpLoad(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Load <t> _ _)
// cond: t.IsStruct() && t.NumFields() == 0 && config.fe.CanSSA(t)
// result: (StructMake0)
{
t := v.Type
if !(t.IsStruct() && t.NumFields() == 0 && config.fe.CanSSA(t)) {
goto end8d25f5c949948132921b6be29ede6bde
}
v.Op = OpStructMake0
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
return true
}
goto end8d25f5c949948132921b6be29ede6bde
end8d25f5c949948132921b6be29ede6bde:
;
// match: (Load <t> ptr mem)
// cond: t.IsStruct() && t.NumFields() == 1 && config.fe.CanSSA(t)
// result: (StructMake1 (Load <t.FieldType(0)> ptr mem))
{
t := v.Type
ptr := v.Args[0]
mem := v.Args[1]
if !(t.IsStruct() && t.NumFields() == 1 && config.fe.CanSSA(t)) {
goto endfe908e5a8617dd39df2f9b2b92e93ae5
}
v.Op = OpStructMake1
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpLoad, t.FieldType(0))
v0.AddArg(ptr)
v0.AddArg(mem)
v.AddArg(v0)
return true
}
goto endfe908e5a8617dd39df2f9b2b92e93ae5
endfe908e5a8617dd39df2f9b2b92e93ae5:
;
// match: (Load <t> ptr mem)
// cond: t.IsStruct() && t.NumFields() == 2 && config.fe.CanSSA(t)
// result: (StructMake2 (Load <t.FieldType(0)> ptr mem) (Load <t.FieldType(1)> (OffPtr <t.FieldType(1).PtrTo()> [t.FieldOff(1)] ptr) mem))
{
t := v.Type
ptr := v.Args[0]
mem := v.Args[1]
if !(t.IsStruct() && t.NumFields() == 2 && config.fe.CanSSA(t)) {
goto end20e20e64004b765012cfb80c575ef27b
}
v.Op = OpStructMake2
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpLoad, t.FieldType(0))
v0.AddArg(ptr)
v0.AddArg(mem)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpLoad, t.FieldType(1))
v2 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(1).PtrTo())
v2.AuxInt = t.FieldOff(1)
v2.AddArg(ptr)
v1.AddArg(v2)
v1.AddArg(mem)
v.AddArg(v1)
return true
}
goto end20e20e64004b765012cfb80c575ef27b
end20e20e64004b765012cfb80c575ef27b:
;
// match: (Load <t> ptr mem)
// cond: t.IsStruct() && t.NumFields() == 3 && config.fe.CanSSA(t)
// result: (StructMake3 (Load <t.FieldType(0)> ptr mem) (Load <t.FieldType(1)> (OffPtr <t.FieldType(1).PtrTo()> [t.FieldOff(1)] ptr) mem) (Load <t.FieldType(2)> (OffPtr <t.FieldType(2).PtrTo()> [t.FieldOff(2)] ptr) mem))
{
t := v.Type
ptr := v.Args[0]
mem := v.Args[1]
if !(t.IsStruct() && t.NumFields() == 3 && config.fe.CanSSA(t)) {
goto ende612bf71067ed67541735cdc8b5a3288
}
v.Op = OpStructMake3
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpLoad, t.FieldType(0))
v0.AddArg(ptr)
v0.AddArg(mem)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpLoad, t.FieldType(1))
v2 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(1).PtrTo())
v2.AuxInt = t.FieldOff(1)
v2.AddArg(ptr)
v1.AddArg(v2)
v1.AddArg(mem)
v.AddArg(v1)
v3 := b.NewValue0(v.Line, OpLoad, t.FieldType(2))
v4 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(2).PtrTo())
v4.AuxInt = t.FieldOff(2)
v4.AddArg(ptr)
v3.AddArg(v4)
v3.AddArg(mem)
v.AddArg(v3)
return true
}
goto ende612bf71067ed67541735cdc8b5a3288
ende612bf71067ed67541735cdc8b5a3288:
;
// match: (Load <t> ptr mem)
// cond: t.IsStruct() && t.NumFields() == 4 && config.fe.CanSSA(t)
// result: (StructMake4 (Load <t.FieldType(0)> ptr mem) (Load <t.FieldType(1)> (OffPtr <t.FieldType(1).PtrTo()> [t.FieldOff(1)] ptr) mem) (Load <t.FieldType(2)> (OffPtr <t.FieldType(2).PtrTo()> [t.FieldOff(2)] ptr) mem) (Load <t.FieldType(3)> (OffPtr <t.FieldType(3).PtrTo()> [t.FieldOff(3)] ptr) mem))
{
t := v.Type
ptr := v.Args[0]
mem := v.Args[1]
if !(t.IsStruct() && t.NumFields() == 4 && config.fe.CanSSA(t)) {
goto end46c66c64d9030f2cc9a7a767f67953d1
}
v.Op = OpStructMake4
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpLoad, t.FieldType(0))
v0.AddArg(ptr)
v0.AddArg(mem)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpLoad, t.FieldType(1))
v2 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(1).PtrTo())
v2.AuxInt = t.FieldOff(1)
v2.AddArg(ptr)
v1.AddArg(v2)
v1.AddArg(mem)
v.AddArg(v1)
v3 := b.NewValue0(v.Line, OpLoad, t.FieldType(2))
v4 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(2).PtrTo())
v4.AuxInt = t.FieldOff(2)
v4.AddArg(ptr)
v3.AddArg(v4)
v3.AddArg(mem)
v.AddArg(v3)
v5 := b.NewValue0(v.Line, OpLoad, t.FieldType(3))
v6 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(3).PtrTo())
v6.AuxInt = t.FieldOff(3)
v6.AddArg(ptr)
v5.AddArg(v6)
v5.AddArg(mem)
v.AddArg(v5)
return true
}
goto end46c66c64d9030f2cc9a7a767f67953d1
end46c66c64d9030f2cc9a7a767f67953d1:
;
// match: (Load <t> ptr mem)
// cond: t.IsComplex() && t.Size() == 8
// result: (ComplexMake (Load <config.fe.TypeFloat32()> ptr mem) (Load <config.fe.TypeFloat32()> (OffPtr <config.fe.TypeFloat32().PtrTo()> [4] ptr) mem) )
{
t := v.Type
ptr := v.Args[0]
mem := v.Args[1]
if !(t.IsComplex() && t.Size() == 8) {
goto end665854b31b828893d90b36bb462ff381
}
v.Op = OpComplexMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpLoad, config.fe.TypeFloat32())
v0.AddArg(ptr)
v0.AddArg(mem)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpLoad, config.fe.TypeFloat32())
v2 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeFloat32().PtrTo())
v2.AuxInt = 4
v2.AddArg(ptr)
v1.AddArg(v2)
v1.AddArg(mem)
v.AddArg(v1)
return true
}
goto end665854b31b828893d90b36bb462ff381
end665854b31b828893d90b36bb462ff381:
;
// match: (Load <t> ptr mem)
// cond: t.IsComplex() && t.Size() == 16
// result: (ComplexMake (Load <config.fe.TypeFloat64()> ptr mem) (Load <config.fe.TypeFloat64()> (OffPtr <config.fe.TypeFloat64().PtrTo()> [8] ptr) mem) )
{
t := v.Type
ptr := v.Args[0]
mem := v.Args[1]
if !(t.IsComplex() && t.Size() == 16) {
goto end1b106f89e0e3e26c613b957a7c98d8ad
}
v.Op = OpComplexMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpLoad, config.fe.TypeFloat64())
v0.AddArg(ptr)
v0.AddArg(mem)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpLoad, config.fe.TypeFloat64())
v2 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeFloat64().PtrTo())
v2.AuxInt = 8
v2.AddArg(ptr)
v1.AddArg(v2)
v1.AddArg(mem)
v.AddArg(v1)
return true
}
goto end1b106f89e0e3e26c613b957a7c98d8ad
end1b106f89e0e3e26c613b957a7c98d8ad:
;
// match: (Load <t> ptr mem)
// cond: t.IsString()
// result: (StringMake (Load <config.fe.TypeBytePtr()> ptr mem) (Load <config.fe.TypeInt()> (OffPtr <config.fe.TypeInt().PtrTo()> [config.PtrSize] ptr) mem))
{
t := v.Type
ptr := v.Args[0]
mem := v.Args[1]
if !(t.IsString()) {
goto enddd15a6f3d53a6ce7a19d4e181dd1c13a
}
v.Op = OpStringMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpLoad, config.fe.TypeBytePtr())
v0.AddArg(ptr)
v0.AddArg(mem)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpLoad, config.fe.TypeInt())
v2 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeInt().PtrTo())
v2.AuxInt = config.PtrSize
v2.AddArg(ptr)
v1.AddArg(v2)
v1.AddArg(mem)
v.AddArg(v1)
return true
}
goto enddd15a6f3d53a6ce7a19d4e181dd1c13a
enddd15a6f3d53a6ce7a19d4e181dd1c13a:
;
// match: (Load <t> ptr mem)
// cond: t.IsSlice()
// result: (SliceMake (Load <config.fe.TypeBytePtr()> ptr mem) (Load <config.fe.TypeInt()> (OffPtr <config.fe.TypeInt().PtrTo()> [config.PtrSize] ptr) mem) (Load <config.fe.TypeInt()> (OffPtr <config.fe.TypeInt().PtrTo()> [2*config.PtrSize] ptr) mem))
{
t := v.Type
ptr := v.Args[0]
mem := v.Args[1]
if !(t.IsSlice()) {
goto end65e8b0055aa7491b9b6066d9fe1b2c13
}
v.Op = OpSliceMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpLoad, config.fe.TypeBytePtr())
v0.AddArg(ptr)
v0.AddArg(mem)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpLoad, config.fe.TypeInt())
v2 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeInt().PtrTo())
v2.AuxInt = config.PtrSize
v2.AddArg(ptr)
v1.AddArg(v2)
v1.AddArg(mem)
v.AddArg(v1)
v3 := b.NewValue0(v.Line, OpLoad, config.fe.TypeInt())
v4 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeInt().PtrTo())
v4.AuxInt = 2 * config.PtrSize
v4.AddArg(ptr)
v3.AddArg(v4)
v3.AddArg(mem)
v.AddArg(v3)
return true
}
goto end65e8b0055aa7491b9b6066d9fe1b2c13
end65e8b0055aa7491b9b6066d9fe1b2c13:
;
// match: (Load <t> ptr mem)
// cond: t.IsInterface()
// result: (IMake (Load <config.fe.TypeBytePtr()> ptr mem) (Load <config.fe.TypeBytePtr()> (OffPtr <config.fe.TypeBytePtr().PtrTo()> [config.PtrSize] ptr) mem))
{
t := v.Type
ptr := v.Args[0]
mem := v.Args[1]
if !(t.IsInterface()) {
goto end12671c83ebe3ccbc8e53383765ee7675
}
v.Op = OpIMake
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpLoad, config.fe.TypeBytePtr())
v0.AddArg(ptr)
v0.AddArg(mem)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpLoad, config.fe.TypeBytePtr())
v2 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeBytePtr().PtrTo())
v2.AuxInt = config.PtrSize
v2.AddArg(ptr)
v1.AddArg(v2)
v1.AddArg(mem)
v.AddArg(v1)
return true
}
goto end12671c83ebe3ccbc8e53383765ee7675
end12671c83ebe3ccbc8e53383765ee7675:
;
return false
}
func rewriteValuegeneric_OpLsh16x16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh16x16 <t> x (Const16 [c]))
// cond:
// result: (Lsh16x64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end2f5aa78b30ebd2471e8d03a307923b06
}
c := v.Args[1].AuxInt
v.Op = OpLsh16x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto end2f5aa78b30ebd2471e8d03a307923b06
end2f5aa78b30ebd2471e8d03a307923b06:
;
return false
}
func rewriteValuegeneric_OpLsh16x32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh16x32 <t> x (Const32 [c]))
// cond:
// result: (Lsh16x64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto endedeb000c8c97090261a47f08a2ff17e4
}
c := v.Args[1].AuxInt
v.Op = OpLsh16x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto endedeb000c8c97090261a47f08a2ff17e4
endedeb000c8c97090261a47f08a2ff17e4:
;
return false
}
func rewriteValuegeneric_OpLsh16x64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh16x64 (Const16 [c]) (Const64 [d]))
// cond:
// result: (Const16 [int64(int16(c) << uint64(d))])
{
if v.Args[0].Op != OpConst16 {
goto endc9f0d91f3da4bdd46a634a62549810e0
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto endc9f0d91f3da4bdd46a634a62549810e0
}
d := v.Args[1].AuxInt
v.Op = OpConst16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = int64(int16(c) << uint64(d))
return true
}
goto endc9f0d91f3da4bdd46a634a62549810e0
endc9f0d91f3da4bdd46a634a62549810e0:
;
// match: (Lsh16x64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end7ecc343739fab9b50a0bdff6e9d121e6
}
if v.Args[1].AuxInt != 0 {
goto end7ecc343739fab9b50a0bdff6e9d121e6
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end7ecc343739fab9b50a0bdff6e9d121e6
end7ecc343739fab9b50a0bdff6e9d121e6:
;
// match: (Lsh16x64 _ (Const64 [c]))
// cond: uint64(c) >= 16
// result: (Const64 [0])
{
if v.Args[1].Op != OpConst64 {
goto end1d2c74d359df9d89b16c4f658a231dfe
}
c := v.Args[1].AuxInt
if !(uint64(c) >= 16) {
goto end1d2c74d359df9d89b16c4f658a231dfe
}
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end1d2c74d359df9d89b16c4f658a231dfe
end1d2c74d359df9d89b16c4f658a231dfe:
;
// match: (Lsh16x64 <t> (Lsh16x64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Lsh16x64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpLsh16x64 {
goto end26a91e42735a02a30e94a998f54372dd
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto end26a91e42735a02a30e94a998f54372dd
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto end26a91e42735a02a30e94a998f54372dd
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto end26a91e42735a02a30e94a998f54372dd
}
v.Op = OpLsh16x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto end26a91e42735a02a30e94a998f54372dd
end26a91e42735a02a30e94a998f54372dd:
;
return false
}
func rewriteValuegeneric_OpLsh16x8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh16x8 <t> x (Const8 [c]))
// cond:
// result: (Lsh16x64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto endce2401b8a6c6190fe81d77e2d562a10c
}
c := v.Args[1].AuxInt
v.Op = OpLsh16x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto endce2401b8a6c6190fe81d77e2d562a10c
endce2401b8a6c6190fe81d77e2d562a10c:
;
return false
}
func rewriteValuegeneric_OpLsh32x16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh32x16 <t> x (Const16 [c]))
// cond:
// result: (Lsh32x64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end7205eb3e315971143ac5584d07045570
}
c := v.Args[1].AuxInt
v.Op = OpLsh32x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto end7205eb3e315971143ac5584d07045570
end7205eb3e315971143ac5584d07045570:
;
return false
}
func rewriteValuegeneric_OpLsh32x32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh32x32 <t> x (Const32 [c]))
// cond:
// result: (Lsh32x64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto endc1a330b287199c80228e665a53881298
}
c := v.Args[1].AuxInt
v.Op = OpLsh32x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto endc1a330b287199c80228e665a53881298
endc1a330b287199c80228e665a53881298:
;
return false
}
func rewriteValuegeneric_OpLsh32x64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh32x64 (Const32 [c]) (Const64 [d]))
// cond:
// result: (Const32 [int64(int32(c) << uint64(d))])
{
if v.Args[0].Op != OpConst32 {
goto end5896bd9a3fe78f1e1712563642d33254
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end5896bd9a3fe78f1e1712563642d33254
}
d := v.Args[1].AuxInt
v.Op = OpConst32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = int64(int32(c) << uint64(d))
return true
}
goto end5896bd9a3fe78f1e1712563642d33254
end5896bd9a3fe78f1e1712563642d33254:
;
// match: (Lsh32x64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto endd9ce9639a91b11e601823be3d4d6c209
}
if v.Args[1].AuxInt != 0 {
goto endd9ce9639a91b11e601823be3d4d6c209
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto endd9ce9639a91b11e601823be3d4d6c209
endd9ce9639a91b11e601823be3d4d6c209:
;
// match: (Lsh32x64 _ (Const64 [c]))
// cond: uint64(c) >= 32
// result: (Const64 [0])
{
if v.Args[1].Op != OpConst64 {
goto end81247a2423f489be15859d3930738fdf
}
c := v.Args[1].AuxInt
if !(uint64(c) >= 32) {
goto end81247a2423f489be15859d3930738fdf
}
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end81247a2423f489be15859d3930738fdf
end81247a2423f489be15859d3930738fdf:
;
// match: (Lsh32x64 <t> (Lsh32x64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Lsh32x64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpLsh32x64 {
goto endf96a7c9571797fe61a5b63a4923d7e6e
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto endf96a7c9571797fe61a5b63a4923d7e6e
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto endf96a7c9571797fe61a5b63a4923d7e6e
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto endf96a7c9571797fe61a5b63a4923d7e6e
}
v.Op = OpLsh32x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto endf96a7c9571797fe61a5b63a4923d7e6e
endf96a7c9571797fe61a5b63a4923d7e6e:
;
return false
}
func rewriteValuegeneric_OpLsh32x8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh32x8 <t> x (Const8 [c]))
// cond:
// result: (Lsh32x64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end1759d7c25a5bcda288e34d1d197c0b8f
}
c := v.Args[1].AuxInt
v.Op = OpLsh32x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto end1759d7c25a5bcda288e34d1d197c0b8f
end1759d7c25a5bcda288e34d1d197c0b8f:
;
return false
}
func rewriteValuegeneric_OpLsh64x16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh64x16 <t> x (Const16 [c]))
// cond:
// result: (Lsh64x64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto enda649fbb5e14490c9eea9616550a76b5c
}
c := v.Args[1].AuxInt
v.Op = OpLsh64x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto enda649fbb5e14490c9eea9616550a76b5c
enda649fbb5e14490c9eea9616550a76b5c:
;
return false
}
func rewriteValuegeneric_OpLsh64x32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh64x32 <t> x (Const32 [c]))
// cond:
// result: (Lsh64x64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto end40069675cde851a63cce81b1b02751f9
}
c := v.Args[1].AuxInt
v.Op = OpLsh64x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto end40069675cde851a63cce81b1b02751f9
end40069675cde851a63cce81b1b02751f9:
;
return false
}
func rewriteValuegeneric_OpLsh64x64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh64x64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (Const64 [c << uint64(d)])
{
if v.Args[0].Op != OpConst64 {
goto end9c157a23e021f659f1568566435ed57b
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end9c157a23e021f659f1568566435ed57b
}
d := v.Args[1].AuxInt
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c << uint64(d)
return true
}
goto end9c157a23e021f659f1568566435ed57b
end9c157a23e021f659f1568566435ed57b:
;
// match: (Lsh64x64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end9f18ca0556dbb4b50fe888273fab20ca
}
if v.Args[1].AuxInt != 0 {
goto end9f18ca0556dbb4b50fe888273fab20ca
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end9f18ca0556dbb4b50fe888273fab20ca
end9f18ca0556dbb4b50fe888273fab20ca:
;
// match: (Lsh64x64 _ (Const64 [c]))
// cond: uint64(c) >= 64
// result: (Const64 [0])
{
if v.Args[1].Op != OpConst64 {
goto end33da2e0ce5ca3e0554564477ef422402
}
c := v.Args[1].AuxInt
if !(uint64(c) >= 64) {
goto end33da2e0ce5ca3e0554564477ef422402
}
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end33da2e0ce5ca3e0554564477ef422402
end33da2e0ce5ca3e0554564477ef422402:
;
// match: (Lsh64x64 <t> (Lsh64x64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Lsh64x64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpLsh64x64 {
goto end001c62ee580a700ec7b07ccaa3740ac2
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto end001c62ee580a700ec7b07ccaa3740ac2
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto end001c62ee580a700ec7b07ccaa3740ac2
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto end001c62ee580a700ec7b07ccaa3740ac2
}
v.Op = OpLsh64x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto end001c62ee580a700ec7b07ccaa3740ac2
end001c62ee580a700ec7b07ccaa3740ac2:
;
return false
}
func rewriteValuegeneric_OpLsh64x8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh64x8 <t> x (Const8 [c]))
// cond:
// result: (Lsh64x64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end4d9224069abdade8e405df343938d932
}
c := v.Args[1].AuxInt
v.Op = OpLsh64x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto end4d9224069abdade8e405df343938d932
end4d9224069abdade8e405df343938d932:
;
return false
}
func rewriteValuegeneric_OpLsh8x16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh8x16 <t> x (Const16 [c]))
// cond:
// result: (Lsh8x64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end0ad4a82e2eb4c7ca7407d79ec3aa5142
}
c := v.Args[1].AuxInt
v.Op = OpLsh8x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto end0ad4a82e2eb4c7ca7407d79ec3aa5142
end0ad4a82e2eb4c7ca7407d79ec3aa5142:
;
return false
}
func rewriteValuegeneric_OpLsh8x32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh8x32 <t> x (Const32 [c]))
// cond:
// result: (Lsh8x64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto enddaacda113ecc79fe0621fd22ebc548dd
}
c := v.Args[1].AuxInt
v.Op = OpLsh8x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto enddaacda113ecc79fe0621fd22ebc548dd
enddaacda113ecc79fe0621fd22ebc548dd:
;
return false
}
func rewriteValuegeneric_OpLsh8x64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh8x64 (Const8 [c]) (Const64 [d]))
// cond:
// result: (Const8 [int64(int8(c) << uint64(d))])
{
if v.Args[0].Op != OpConst8 {
goto endbc3297ea9642b97eb71f0a9735048d7b
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto endbc3297ea9642b97eb71f0a9735048d7b
}
d := v.Args[1].AuxInt
v.Op = OpConst8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = int64(int8(c) << uint64(d))
return true
}
goto endbc3297ea9642b97eb71f0a9735048d7b
endbc3297ea9642b97eb71f0a9735048d7b:
;
// match: (Lsh8x64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end715f3db41cccf963e25a20c33f618a04
}
if v.Args[1].AuxInt != 0 {
goto end715f3db41cccf963e25a20c33f618a04
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end715f3db41cccf963e25a20c33f618a04
end715f3db41cccf963e25a20c33f618a04:
;
// match: (Lsh8x64 _ (Const64 [c]))
// cond: uint64(c) >= 8
// result: (Const64 [0])
{
if v.Args[1].Op != OpConst64 {
goto endb6749df4d0cdc0cd9acc627187d73488
}
c := v.Args[1].AuxInt
if !(uint64(c) >= 8) {
goto endb6749df4d0cdc0cd9acc627187d73488
}
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto endb6749df4d0cdc0cd9acc627187d73488
endb6749df4d0cdc0cd9acc627187d73488:
;
// match: (Lsh8x64 <t> (Lsh8x64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Lsh8x64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpLsh8x64 {
goto end73a4878b6bbd21c9e22fb99226ef947e
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto end73a4878b6bbd21c9e22fb99226ef947e
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto end73a4878b6bbd21c9e22fb99226ef947e
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto end73a4878b6bbd21c9e22fb99226ef947e
}
v.Op = OpLsh8x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto end73a4878b6bbd21c9e22fb99226ef947e
end73a4878b6bbd21c9e22fb99226ef947e:
;
return false
}
func rewriteValuegeneric_OpLsh8x8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Lsh8x8 <t> x (Const8 [c]))
// cond:
// result: (Lsh8x64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end8b770597435467b0c96014624d522b33
}
c := v.Args[1].AuxInt
v.Op = OpLsh8x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto end8b770597435467b0c96014624d522b33
end8b770597435467b0c96014624d522b33:
;
return false
}
func rewriteValuegeneric_OpMul16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Mul16 (Const16 [c]) (Const16 [d]))
// cond:
// result: (Const16 [c*d])
{
if v.Args[0].Op != OpConst16 {
goto ende8dd468add3015aea24531cf3c89ccb7
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto ende8dd468add3015aea24531cf3c89ccb7
}
d := v.Args[1].AuxInt
v.Op = OpConst16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c * d
return true
}
goto ende8dd468add3015aea24531cf3c89ccb7
ende8dd468add3015aea24531cf3c89ccb7:
;
return false
}
func rewriteValuegeneric_OpMul32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Mul32 (Const32 [c]) (Const32 [d]))
// cond:
// result: (Const32 [c*d])
{
if v.Args[0].Op != OpConst32 {
goto end60b4523099fa7b55e2e872e05bd497a7
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto end60b4523099fa7b55e2e872e05bd497a7
}
d := v.Args[1].AuxInt
v.Op = OpConst32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c * d
return true
}
goto end60b4523099fa7b55e2e872e05bd497a7
end60b4523099fa7b55e2e872e05bd497a7:
;
return false
}
func rewriteValuegeneric_OpMul64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Mul64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (Const64 [c*d])
{
if v.Args[0].Op != OpConst64 {
goto end7aea1048b5d1230974b97f17238380ae
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end7aea1048b5d1230974b97f17238380ae
}
d := v.Args[1].AuxInt
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c * d
return true
}
goto end7aea1048b5d1230974b97f17238380ae
end7aea1048b5d1230974b97f17238380ae:
;
return false
}
func rewriteValuegeneric_OpMul8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Mul8 (Const8 [c]) (Const8 [d]))
// cond:
// result: (Const8 [c*d])
{
if v.Args[0].Op != OpConst8 {
goto end2f1952fd654c4a62ff00511041728809
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto end2f1952fd654c4a62ff00511041728809
}
d := v.Args[1].AuxInt
v.Op = OpConst8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c * d
return true
}
goto end2f1952fd654c4a62ff00511041728809
end2f1952fd654c4a62ff00511041728809:
;
return false
}
func rewriteValuegeneric_OpNeq16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Neq16 x x)
// cond:
// result: (ConstBool [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto ende76a50b524aeb16c7aeccf5f5cc60c06
}
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto ende76a50b524aeb16c7aeccf5f5cc60c06
ende76a50b524aeb16c7aeccf5f5cc60c06:
;
// match: (Neq16 (Const16 <t> [c]) (Add16 (Const16 <t> [d]) x))
// cond:
// result: (Neq16 (Const16 <t> [c-d]) x)
{
if v.Args[0].Op != OpConst16 {
goto end552011bd97e6f92ebc2672aa1843eadd
}
t := v.Args[0].Type
c := v.Args[0].AuxInt
if v.Args[1].Op != OpAdd16 {
goto end552011bd97e6f92ebc2672aa1843eadd
}
if v.Args[1].Args[0].Op != OpConst16 {
goto end552011bd97e6f92ebc2672aa1843eadd
}
if v.Args[1].Args[0].Type != v.Args[0].Type {
goto end552011bd97e6f92ebc2672aa1843eadd
}
d := v.Args[1].Args[0].AuxInt
x := v.Args[1].Args[1]
v.Op = OpNeq16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst16, t)
v0.AuxInt = c - d
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end552011bd97e6f92ebc2672aa1843eadd
end552011bd97e6f92ebc2672aa1843eadd:
;
// match: (Neq16 x (Const16 <t> [c]))
// cond: x.Op != OpConst16
// result: (Neq16 (Const16 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end0e45958f29e87997f632248aa9ee97e0
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst16) {
goto end0e45958f29e87997f632248aa9ee97e0
}
v.Op = OpNeq16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst16, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end0e45958f29e87997f632248aa9ee97e0
end0e45958f29e87997f632248aa9ee97e0:
;
// match: (Neq16 (Const16 [c]) (Const16 [d]))
// cond:
// result: (ConstBool [b2i(int16(c) != int16(d))])
{
if v.Args[0].Op != OpConst16 {
goto end6302c9b645bb191982d28c2f846904d6
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto end6302c9b645bb191982d28c2f846904d6
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int16(c) != int16(d))
return true
}
goto end6302c9b645bb191982d28c2f846904d6
end6302c9b645bb191982d28c2f846904d6:
;
return false
}
func rewriteValuegeneric_OpNeq32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Neq32 x x)
// cond:
// result: (ConstBool [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto end3713a608cffd29b40ff7c3b3f2585cbb
}
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end3713a608cffd29b40ff7c3b3f2585cbb
end3713a608cffd29b40ff7c3b3f2585cbb:
;
// match: (Neq32 (Const32 <t> [c]) (Add32 (Const32 <t> [d]) x))
// cond:
// result: (Neq32 (Const32 <t> [c-d]) x)
{
if v.Args[0].Op != OpConst32 {
goto end93fc3b4a3639b965b414891111b16245
}
t := v.Args[0].Type
c := v.Args[0].AuxInt
if v.Args[1].Op != OpAdd32 {
goto end93fc3b4a3639b965b414891111b16245
}
if v.Args[1].Args[0].Op != OpConst32 {
goto end93fc3b4a3639b965b414891111b16245
}
if v.Args[1].Args[0].Type != v.Args[0].Type {
goto end93fc3b4a3639b965b414891111b16245
}
d := v.Args[1].Args[0].AuxInt
x := v.Args[1].Args[1]
v.Op = OpNeq32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst32, t)
v0.AuxInt = c - d
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end93fc3b4a3639b965b414891111b16245
end93fc3b4a3639b965b414891111b16245:
;
// match: (Neq32 x (Const32 <t> [c]))
// cond: x.Op != OpConst32
// result: (Neq32 (Const32 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto end5376f9ab90e282450f49011d0e0ce236
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst32) {
goto end5376f9ab90e282450f49011d0e0ce236
}
v.Op = OpNeq32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst32, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end5376f9ab90e282450f49011d0e0ce236
end5376f9ab90e282450f49011d0e0ce236:
;
// match: (Neq32 (Const32 [c]) (Const32 [d]))
// cond:
// result: (ConstBool [b2i(int32(c) != int32(d))])
{
if v.Args[0].Op != OpConst32 {
goto endf9f3d0814854d2d0879d331e9bdfcae2
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto endf9f3d0814854d2d0879d331e9bdfcae2
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int32(c) != int32(d))
return true
}
goto endf9f3d0814854d2d0879d331e9bdfcae2
endf9f3d0814854d2d0879d331e9bdfcae2:
;
return false
}
func rewriteValuegeneric_OpNeq64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Neq64 x x)
// cond:
// result: (ConstBool [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto end3601ad382705ea12b79d2008c1e5725c
}
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end3601ad382705ea12b79d2008c1e5725c
end3601ad382705ea12b79d2008c1e5725c:
;
// match: (Neq64 (Const64 <t> [c]) (Add64 (Const64 <t> [d]) x))
// cond:
// result: (Neq64 (Const64 <t> [c-d]) x)
{
if v.Args[0].Op != OpConst64 {
goto enda3d39cad13a557a2aa6d086f43596c1b
}
t := v.Args[0].Type
c := v.Args[0].AuxInt
if v.Args[1].Op != OpAdd64 {
goto enda3d39cad13a557a2aa6d086f43596c1b
}
if v.Args[1].Args[0].Op != OpConst64 {
goto enda3d39cad13a557a2aa6d086f43596c1b
}
if v.Args[1].Args[0].Type != v.Args[0].Type {
goto enda3d39cad13a557a2aa6d086f43596c1b
}
d := v.Args[1].Args[0].AuxInt
x := v.Args[1].Args[1]
v.Op = OpNeq64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c - d
v.AddArg(v0)
v.AddArg(x)
return true
}
goto enda3d39cad13a557a2aa6d086f43596c1b
enda3d39cad13a557a2aa6d086f43596c1b:
;
// match: (Neq64 x (Const64 <t> [c]))
// cond: x.Op != OpConst64
// result: (Neq64 (Const64 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end0936a57de20373ca6cacb9506ddde708
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst64) {
goto end0936a57de20373ca6cacb9506ddde708
}
v.Op = OpNeq64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end0936a57de20373ca6cacb9506ddde708
end0936a57de20373ca6cacb9506ddde708:
;
// match: (Neq64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (ConstBool [b2i(int64(c) != int64(d))])
{
if v.Args[0].Op != OpConst64 {
goto endf07433ecd3c150b1b75e943aa44a7203
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto endf07433ecd3c150b1b75e943aa44a7203
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int64(c) != int64(d))
return true
}
goto endf07433ecd3c150b1b75e943aa44a7203
endf07433ecd3c150b1b75e943aa44a7203:
;
return false
}
func rewriteValuegeneric_OpNeq8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Neq8 x x)
// cond:
// result: (ConstBool [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto end09a0deaf3c42627d0d2d3efa96e30745
}
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end09a0deaf3c42627d0d2d3efa96e30745
end09a0deaf3c42627d0d2d3efa96e30745:
;
// match: (Neq8 (Const8 <t> [c]) (Add8 (Const8 <t> [d]) x))
// cond:
// result: (Neq8 (Const8 <t> [c-d]) x)
{
if v.Args[0].Op != OpConst8 {
goto endc8f853c610c460c887cbfdca958e3691
}
t := v.Args[0].Type
c := v.Args[0].AuxInt
if v.Args[1].Op != OpAdd8 {
goto endc8f853c610c460c887cbfdca958e3691
}
if v.Args[1].Args[0].Op != OpConst8 {
goto endc8f853c610c460c887cbfdca958e3691
}
if v.Args[1].Args[0].Type != v.Args[0].Type {
goto endc8f853c610c460c887cbfdca958e3691
}
d := v.Args[1].Args[0].AuxInt
x := v.Args[1].Args[1]
v.Op = OpNeq8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst8, t)
v0.AuxInt = c - d
v.AddArg(v0)
v.AddArg(x)
return true
}
goto endc8f853c610c460c887cbfdca958e3691
endc8f853c610c460c887cbfdca958e3691:
;
// match: (Neq8 x (Const8 <t> [c]))
// cond: x.Op != OpConst8
// result: (Neq8 (Const8 <t> [c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end04dc0ae2b08cf0447b50e5b8ef469252
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst8) {
goto end04dc0ae2b08cf0447b50e5b8ef469252
}
v.Op = OpNeq8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst8, t)
v0.AuxInt = c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end04dc0ae2b08cf0447b50e5b8ef469252
end04dc0ae2b08cf0447b50e5b8ef469252:
;
// match: (Neq8 (Const8 [c]) (Const8 [d]))
// cond:
// result: (ConstBool [b2i(int8(c) != int8(d))])
{
if v.Args[0].Op != OpConst8 {
goto end72ebdaf2de9b3aa57cf0cb8e068b5f9c
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto end72ebdaf2de9b3aa57cf0cb8e068b5f9c
}
d := v.Args[1].AuxInt
v.Op = OpConstBool
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = b2i(int8(c) != int8(d))
return true
}
goto end72ebdaf2de9b3aa57cf0cb8e068b5f9c
end72ebdaf2de9b3aa57cf0cb8e068b5f9c:
;
return false
}
func rewriteValuegeneric_OpNeqInter(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (NeqInter x y)
// cond:
// result: (NeqPtr (ITab x) (ITab y))
{
x := v.Args[0]
y := v.Args[1]
v.Op = OpNeqPtr
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpITab, config.fe.TypeBytePtr())
v0.AddArg(x)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpITab, config.fe.TypeBytePtr())
v1.AddArg(y)
v.AddArg(v1)
return true
}
goto end17b2333bf57e9fe81a671be02f9c4c14
end17b2333bf57e9fe81a671be02f9c4c14:
;
return false
}
func rewriteValuegeneric_OpNeqPtr(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (NeqPtr p (ConstNil))
// cond:
// result: (IsNonNil p)
{
p := v.Args[0]
if v.Args[1].Op != OpConstNil {
goto endba798520b4d41172b110347158c44791
}
v.Op = OpIsNonNil
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(p)
return true
}
goto endba798520b4d41172b110347158c44791
endba798520b4d41172b110347158c44791:
;
// match: (NeqPtr (ConstNil) p)
// cond:
// result: (IsNonNil p)
{
if v.Args[0].Op != OpConstNil {
goto enddd95e9c3606d9fd48034f1a703561e45
}
p := v.Args[1]
v.Op = OpIsNonNil
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(p)
return true
}
goto enddd95e9c3606d9fd48034f1a703561e45
enddd95e9c3606d9fd48034f1a703561e45:
;
return false
}
func rewriteValuegeneric_OpNeqSlice(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (NeqSlice x y)
// cond:
// result: (NeqPtr (SlicePtr x) (SlicePtr y))
{
x := v.Args[0]
y := v.Args[1]
v.Op = OpNeqPtr
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpSlicePtr, config.fe.TypeBytePtr())
v0.AddArg(x)
v.AddArg(v0)
v1 := b.NewValue0(v.Line, OpSlicePtr, config.fe.TypeBytePtr())
v1.AddArg(y)
v.AddArg(v1)
return true
}
goto endc6bc83c506e491236ca66ea1081231a2
endc6bc83c506e491236ca66ea1081231a2:
;
return false
}
func rewriteValuegeneric_OpOr16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Or16 x x)
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1] != x {
goto end47a2f25fd31a76807aced3e2b126acdc
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end47a2f25fd31a76807aced3e2b126acdc
end47a2f25fd31a76807aced3e2b126acdc:
;
return false
}
func rewriteValuegeneric_OpOr32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Or32 x x)
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1] != x {
goto end231e283e568e90bd9a3e6a4fa328c8a4
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end231e283e568e90bd9a3e6a4fa328c8a4
end231e283e568e90bd9a3e6a4fa328c8a4:
;
return false
}
func rewriteValuegeneric_OpOr64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Or64 x x)
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1] != x {
goto end6b0efc212016dc97d0e3939db04c81d9
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end6b0efc212016dc97d0e3939db04c81d9
end6b0efc212016dc97d0e3939db04c81d9:
;
return false
}
func rewriteValuegeneric_OpOr8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Or8 x x)
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1] != x {
goto end05295dbfafd6869af79b4daee9fda000
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end05295dbfafd6869af79b4daee9fda000
end05295dbfafd6869af79b4daee9fda000:
;
return false
}
func rewriteValuegeneric_OpPtrIndex(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (PtrIndex <t> ptr idx)
// cond: config.PtrSize == 4
// result: (AddPtr ptr (Mul32 <config.fe.TypeInt()> idx (Const32 <config.fe.TypeInt()> [t.Elem().Size()])))
{
t := v.Type
ptr := v.Args[0]
idx := v.Args[1]
if !(config.PtrSize == 4) {
goto endd902622aaa1e7545b5a2a0c08b47d287
}
v.Op = OpAddPtr
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(ptr)
v0 := b.NewValue0(v.Line, OpMul32, config.fe.TypeInt())
v0.AddArg(idx)
v1 := b.NewValue0(v.Line, OpConst32, config.fe.TypeInt())
v1.AuxInt = t.Elem().Size()
v0.AddArg(v1)
v.AddArg(v0)
return true
}
goto endd902622aaa1e7545b5a2a0c08b47d287
endd902622aaa1e7545b5a2a0c08b47d287:
;
// match: (PtrIndex <t> ptr idx)
// cond: config.PtrSize == 8
// result: (AddPtr ptr (Mul64 <config.fe.TypeInt()> idx (Const64 <config.fe.TypeInt()> [t.Elem().Size()])))
{
t := v.Type
ptr := v.Args[0]
idx := v.Args[1]
if !(config.PtrSize == 8) {
goto end47a5f1d1b158914fa383de024bbe3b08
}
v.Op = OpAddPtr
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(ptr)
v0 := b.NewValue0(v.Line, OpMul64, config.fe.TypeInt())
v0.AddArg(idx)
v1 := b.NewValue0(v.Line, OpConst64, config.fe.TypeInt())
v1.AuxInt = t.Elem().Size()
v0.AddArg(v1)
v.AddArg(v0)
return true
}
goto end47a5f1d1b158914fa383de024bbe3b08
end47a5f1d1b158914fa383de024bbe3b08:
;
return false
}
func rewriteValuegeneric_OpRsh16Ux16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh16Ux16 <t> x (Const16 [c]))
// cond:
// result: (Rsh16Ux64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto endd981df40f353104ef828d13ad4ccdf02
}
c := v.Args[1].AuxInt
v.Op = OpRsh16Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto endd981df40f353104ef828d13ad4ccdf02
endd981df40f353104ef828d13ad4ccdf02:
;
return false
}
func rewriteValuegeneric_OpRsh16Ux32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh16Ux32 <t> x (Const32 [c]))
// cond:
// result: (Rsh16Ux64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto ende0be9ee562725206dcf96d3e5750b5ea
}
c := v.Args[1].AuxInt
v.Op = OpRsh16Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto ende0be9ee562725206dcf96d3e5750b5ea
ende0be9ee562725206dcf96d3e5750b5ea:
;
return false
}
func rewriteValuegeneric_OpRsh16Ux64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh16Ux64 (Const16 [c]) (Const64 [d]))
// cond:
// result: (Const16 [int64(uint16(c) >> uint64(d))])
{
if v.Args[0].Op != OpConst16 {
goto ended17f40375fb44bcbaf2d87161c5ed3c
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto ended17f40375fb44bcbaf2d87161c5ed3c
}
d := v.Args[1].AuxInt
v.Op = OpConst16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = int64(uint16(c) >> uint64(d))
return true
}
goto ended17f40375fb44bcbaf2d87161c5ed3c
ended17f40375fb44bcbaf2d87161c5ed3c:
;
// match: (Rsh16Ux64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end752d1b5a60f87afa7e40febbf1bce309
}
if v.Args[1].AuxInt != 0 {
goto end752d1b5a60f87afa7e40febbf1bce309
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end752d1b5a60f87afa7e40febbf1bce309
end752d1b5a60f87afa7e40febbf1bce309:
;
// match: (Rsh16Ux64 _ (Const64 [c]))
// cond: uint64(c) >= 16
// result: (Const64 [0])
{
if v.Args[1].Op != OpConst64 {
goto endca5c7ae2e51f2ae32486c2b1a3033b77
}
c := v.Args[1].AuxInt
if !(uint64(c) >= 16) {
goto endca5c7ae2e51f2ae32486c2b1a3033b77
}
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto endca5c7ae2e51f2ae32486c2b1a3033b77
endca5c7ae2e51f2ae32486c2b1a3033b77:
;
// match: (Rsh16Ux64 <t> (Rsh16Ux64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Rsh16Ux64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpRsh16Ux64 {
goto end56f2c0034c9fbe651abb36fb640af465
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto end56f2c0034c9fbe651abb36fb640af465
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto end56f2c0034c9fbe651abb36fb640af465
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto end56f2c0034c9fbe651abb36fb640af465
}
v.Op = OpRsh16Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto end56f2c0034c9fbe651abb36fb640af465
end56f2c0034c9fbe651abb36fb640af465:
;
return false
}
func rewriteValuegeneric_OpRsh16Ux8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh16Ux8 <t> x (Const8 [c]))
// cond:
// result: (Rsh16Ux64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end20d4667094c32c71bac4e0805dab85c9
}
c := v.Args[1].AuxInt
v.Op = OpRsh16Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto end20d4667094c32c71bac4e0805dab85c9
end20d4667094c32c71bac4e0805dab85c9:
;
return false
}
func rewriteValuegeneric_OpRsh16x16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh16x16 <t> x (Const16 [c]))
// cond:
// result: (Rsh16x64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end1b501c7ae2fe58ad3a88b467f2d95389
}
c := v.Args[1].AuxInt
v.Op = OpRsh16x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto end1b501c7ae2fe58ad3a88b467f2d95389
end1b501c7ae2fe58ad3a88b467f2d95389:
;
return false
}
func rewriteValuegeneric_OpRsh16x32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh16x32 <t> x (Const32 [c]))
// cond:
// result: (Rsh16x64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto end4d3a41113d2d0b09924bf5759ca49cab
}
c := v.Args[1].AuxInt
v.Op = OpRsh16x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto end4d3a41113d2d0b09924bf5759ca49cab
end4d3a41113d2d0b09924bf5759ca49cab:
;
return false
}
func rewriteValuegeneric_OpRsh16x64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh16x64 (Const16 [c]) (Const64 [d]))
// cond:
// result: (Const16 [int64(int16(c) >> uint64(d))])
{
if v.Args[0].Op != OpConst16 {
goto end8f05fede35a3d2f687fcd4a5829a25ad
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end8f05fede35a3d2f687fcd4a5829a25ad
}
d := v.Args[1].AuxInt
v.Op = OpConst16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = int64(int16(c) >> uint64(d))
return true
}
goto end8f05fede35a3d2f687fcd4a5829a25ad
end8f05fede35a3d2f687fcd4a5829a25ad:
;
// match: (Rsh16x64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end750fafe01fcc689d953101d53efc19ab
}
if v.Args[1].AuxInt != 0 {
goto end750fafe01fcc689d953101d53efc19ab
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end750fafe01fcc689d953101d53efc19ab
end750fafe01fcc689d953101d53efc19ab:
;
// match: (Rsh16x64 <t> (Rsh16x64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Rsh16x64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpRsh16x64 {
goto endf425eff9e05aad27194af957e3383c76
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto endf425eff9e05aad27194af957e3383c76
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto endf425eff9e05aad27194af957e3383c76
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto endf425eff9e05aad27194af957e3383c76
}
v.Op = OpRsh16x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto endf425eff9e05aad27194af957e3383c76
endf425eff9e05aad27194af957e3383c76:
;
return false
}
func rewriteValuegeneric_OpRsh16x8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh16x8 <t> x (Const8 [c]))
// cond:
// result: (Rsh16x64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end0b5e274d62a3ae8df9f4089756c6a9d4
}
c := v.Args[1].AuxInt
v.Op = OpRsh16x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto end0b5e274d62a3ae8df9f4089756c6a9d4
end0b5e274d62a3ae8df9f4089756c6a9d4:
;
return false
}
func rewriteValuegeneric_OpRsh32Ux16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh32Ux16 <t> x (Const16 [c]))
// cond:
// result: (Rsh32Ux64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end8d8f9f3e2e1f7a5e9a186fb792fc40a8
}
c := v.Args[1].AuxInt
v.Op = OpRsh32Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto end8d8f9f3e2e1f7a5e9a186fb792fc40a8
end8d8f9f3e2e1f7a5e9a186fb792fc40a8:
;
return false
}
func rewriteValuegeneric_OpRsh32Ux32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh32Ux32 <t> x (Const32 [c]))
// cond:
// result: (Rsh32Ux64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto endd23d060f74e00f34cc967b6fb9a4d320
}
c := v.Args[1].AuxInt
v.Op = OpRsh32Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto endd23d060f74e00f34cc967b6fb9a4d320
endd23d060f74e00f34cc967b6fb9a4d320:
;
return false
}
func rewriteValuegeneric_OpRsh32Ux64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh32Ux64 (Const32 [c]) (Const64 [d]))
// cond:
// result: (Const32 [int64(uint32(c) >> uint64(d))])
{
if v.Args[0].Op != OpConst32 {
goto enda101e6b765d7ecffd9b7410c9dc3be82
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto enda101e6b765d7ecffd9b7410c9dc3be82
}
d := v.Args[1].AuxInt
v.Op = OpConst32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = int64(uint32(c) >> uint64(d))
return true
}
goto enda101e6b765d7ecffd9b7410c9dc3be82
enda101e6b765d7ecffd9b7410c9dc3be82:
;
// match: (Rsh32Ux64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end162e4e182a665d4e6f0d85fe131e7288
}
if v.Args[1].AuxInt != 0 {
goto end162e4e182a665d4e6f0d85fe131e7288
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end162e4e182a665d4e6f0d85fe131e7288
end162e4e182a665d4e6f0d85fe131e7288:
;
// match: (Rsh32Ux64 _ (Const64 [c]))
// cond: uint64(c) >= 32
// result: (Const64 [0])
{
if v.Args[1].Op != OpConst64 {
goto endca322c370839b4264b219ee042a6ab33
}
c := v.Args[1].AuxInt
if !(uint64(c) >= 32) {
goto endca322c370839b4264b219ee042a6ab33
}
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto endca322c370839b4264b219ee042a6ab33
endca322c370839b4264b219ee042a6ab33:
;
// match: (Rsh32Ux64 <t> (Rsh32Ux64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Rsh32Ux64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpRsh32Ux64 {
goto end2e502d68a32663142684194adbe6c297
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto end2e502d68a32663142684194adbe6c297
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto end2e502d68a32663142684194adbe6c297
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto end2e502d68a32663142684194adbe6c297
}
v.Op = OpRsh32Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto end2e502d68a32663142684194adbe6c297
end2e502d68a32663142684194adbe6c297:
;
return false
}
func rewriteValuegeneric_OpRsh32Ux8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh32Ux8 <t> x (Const8 [c]))
// cond:
// result: (Rsh32Ux64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end967cea80158afaffb783f6da7aa898ca
}
c := v.Args[1].AuxInt
v.Op = OpRsh32Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto end967cea80158afaffb783f6da7aa898ca
end967cea80158afaffb783f6da7aa898ca:
;
return false
}
func rewriteValuegeneric_OpRsh32x16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh32x16 <t> x (Const16 [c]))
// cond:
// result: (Rsh32x64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end6a62ebdcc98ea2e3214559214708d26a
}
c := v.Args[1].AuxInt
v.Op = OpRsh32x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto end6a62ebdcc98ea2e3214559214708d26a
end6a62ebdcc98ea2e3214559214708d26a:
;
return false
}
func rewriteValuegeneric_OpRsh32x32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh32x32 <t> x (Const32 [c]))
// cond:
// result: (Rsh32x64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto end6e3b467acdca74f58e9177fb42a1968b
}
c := v.Args[1].AuxInt
v.Op = OpRsh32x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto end6e3b467acdca74f58e9177fb42a1968b
end6e3b467acdca74f58e9177fb42a1968b:
;
return false
}
func rewriteValuegeneric_OpRsh32x64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh32x64 (Const32 [c]) (Const64 [d]))
// cond:
// result: (Const32 [int64(int32(c) >> uint64(d))])
{
if v.Args[0].Op != OpConst32 {
goto end7e4b8c499cffe1fef73a16e6be54d4d2
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end7e4b8c499cffe1fef73a16e6be54d4d2
}
d := v.Args[1].AuxInt
v.Op = OpConst32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = int64(int32(c) >> uint64(d))
return true
}
goto end7e4b8c499cffe1fef73a16e6be54d4d2
end7e4b8c499cffe1fef73a16e6be54d4d2:
;
// match: (Rsh32x64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end72da2611eaaffe407efa1cc45c23ade3
}
if v.Args[1].AuxInt != 0 {
goto end72da2611eaaffe407efa1cc45c23ade3
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end72da2611eaaffe407efa1cc45c23ade3
end72da2611eaaffe407efa1cc45c23ade3:
;
// match: (Rsh32x64 <t> (Rsh32x64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Rsh32x64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpRsh32x64 {
goto endadb415be78ee46a8a4135ec50df772b0
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto endadb415be78ee46a8a4135ec50df772b0
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto endadb415be78ee46a8a4135ec50df772b0
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto endadb415be78ee46a8a4135ec50df772b0
}
v.Op = OpRsh32x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto endadb415be78ee46a8a4135ec50df772b0
endadb415be78ee46a8a4135ec50df772b0:
;
return false
}
func rewriteValuegeneric_OpRsh32x8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh32x8 <t> x (Const8 [c]))
// cond:
// result: (Rsh32x64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end7b59b42c5c68a2d55be469a0c086dd8b
}
c := v.Args[1].AuxInt
v.Op = OpRsh32x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto end7b59b42c5c68a2d55be469a0c086dd8b
end7b59b42c5c68a2d55be469a0c086dd8b:
;
return false
}
func rewriteValuegeneric_OpRsh64Ux16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh64Ux16 <t> x (Const16 [c]))
// cond:
// result: (Rsh64Ux64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end733d85a7b599bcba969ca1cb4bdb9e48
}
c := v.Args[1].AuxInt
v.Op = OpRsh64Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto end733d85a7b599bcba969ca1cb4bdb9e48
end733d85a7b599bcba969ca1cb4bdb9e48:
;
return false
}
func rewriteValuegeneric_OpRsh64Ux32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh64Ux32 <t> x (Const32 [c]))
// cond:
// result: (Rsh64Ux64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto endeac7b34169de1fb0393b833e65b9bb19
}
c := v.Args[1].AuxInt
v.Op = OpRsh64Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto endeac7b34169de1fb0393b833e65b9bb19
endeac7b34169de1fb0393b833e65b9bb19:
;
return false
}
func rewriteValuegeneric_OpRsh64Ux64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh64Ux64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (Const64 [int64(uint64(c) >> uint64(d))])
{
if v.Args[0].Op != OpConst64 {
goto end102f4cfd7979a2aa222d52c34ac6802d
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end102f4cfd7979a2aa222d52c34ac6802d
}
d := v.Args[1].AuxInt
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = int64(uint64(c) >> uint64(d))
return true
}
goto end102f4cfd7979a2aa222d52c34ac6802d
end102f4cfd7979a2aa222d52c34ac6802d:
;
// match: (Rsh64Ux64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end5ad037b910698f2847df90177c23a6ac
}
if v.Args[1].AuxInt != 0 {
goto end5ad037b910698f2847df90177c23a6ac
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end5ad037b910698f2847df90177c23a6ac
end5ad037b910698f2847df90177c23a6ac:
;
// match: (Rsh64Ux64 _ (Const64 [c]))
// cond: uint64(c) >= 64
// result: (Const64 [0])
{
if v.Args[1].Op != OpConst64 {
goto end16ea16aa61862207ea64e514369d608b
}
c := v.Args[1].AuxInt
if !(uint64(c) >= 64) {
goto end16ea16aa61862207ea64e514369d608b
}
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end16ea16aa61862207ea64e514369d608b
end16ea16aa61862207ea64e514369d608b:
;
// match: (Rsh64Ux64 <t> (Rsh64Ux64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Rsh64Ux64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpRsh64Ux64 {
goto end32bfdb1b4ccc23a5cd62fc0348ebd877
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto end32bfdb1b4ccc23a5cd62fc0348ebd877
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto end32bfdb1b4ccc23a5cd62fc0348ebd877
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto end32bfdb1b4ccc23a5cd62fc0348ebd877
}
v.Op = OpRsh64Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto end32bfdb1b4ccc23a5cd62fc0348ebd877
end32bfdb1b4ccc23a5cd62fc0348ebd877:
;
return false
}
func rewriteValuegeneric_OpRsh64Ux8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh64Ux8 <t> x (Const8 [c]))
// cond:
// result: (Rsh64Ux64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto ende3d8090a67a52dbcd24b52ee32c9d7f0
}
c := v.Args[1].AuxInt
v.Op = OpRsh64Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto ende3d8090a67a52dbcd24b52ee32c9d7f0
ende3d8090a67a52dbcd24b52ee32c9d7f0:
;
return false
}
func rewriteValuegeneric_OpRsh64x16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh64x16 <t> x (Const16 [c]))
// cond:
// result: (Rsh64x64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto endd5151d0bfc38c55ae6ae6836014df3bc
}
c := v.Args[1].AuxInt
v.Op = OpRsh64x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto endd5151d0bfc38c55ae6ae6836014df3bc
endd5151d0bfc38c55ae6ae6836014df3bc:
;
return false
}
func rewriteValuegeneric_OpRsh64x32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh64x32 <t> x (Const32 [c]))
// cond:
// result: (Rsh64x64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto end0f2dbca5c7d6b100890c94a97bf0de7c
}
c := v.Args[1].AuxInt
v.Op = OpRsh64x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto end0f2dbca5c7d6b100890c94a97bf0de7c
end0f2dbca5c7d6b100890c94a97bf0de7c:
;
return false
}
func rewriteValuegeneric_OpRsh64x64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh64x64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (Const64 [c >> uint64(d)])
{
if v.Args[0].Op != OpConst64 {
goto endfa4609d6bea8a3e3d3a777b1968c97d9
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto endfa4609d6bea8a3e3d3a777b1968c97d9
}
d := v.Args[1].AuxInt
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c >> uint64(d)
return true
}
goto endfa4609d6bea8a3e3d3a777b1968c97d9
endfa4609d6bea8a3e3d3a777b1968c97d9:
;
// match: (Rsh64x64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto ende62e0c67d3f04eb221646371a2a91d05
}
if v.Args[1].AuxInt != 0 {
goto ende62e0c67d3f04eb221646371a2a91d05
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto ende62e0c67d3f04eb221646371a2a91d05
ende62e0c67d3f04eb221646371a2a91d05:
;
// match: (Rsh64x64 <t> (Rsh64x64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Rsh64x64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpRsh64x64 {
goto endd3e8ea66dc3ad0bc393001d6babb7160
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto endd3e8ea66dc3ad0bc393001d6babb7160
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto endd3e8ea66dc3ad0bc393001d6babb7160
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto endd3e8ea66dc3ad0bc393001d6babb7160
}
v.Op = OpRsh64x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto endd3e8ea66dc3ad0bc393001d6babb7160
endd3e8ea66dc3ad0bc393001d6babb7160:
;
return false
}
func rewriteValuegeneric_OpRsh64x8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh64x8 <t> x (Const8 [c]))
// cond:
// result: (Rsh64x64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end1a9e5a89849344396210da7c7ec810be
}
c := v.Args[1].AuxInt
v.Op = OpRsh64x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto end1a9e5a89849344396210da7c7ec810be
end1a9e5a89849344396210da7c7ec810be:
;
return false
}
func rewriteValuegeneric_OpRsh8Ux16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh8Ux16 <t> x (Const16 [c]))
// cond:
// result: (Rsh8Ux64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end7acc015610273092e9efcce2949ee0f9
}
c := v.Args[1].AuxInt
v.Op = OpRsh8Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto end7acc015610273092e9efcce2949ee0f9
end7acc015610273092e9efcce2949ee0f9:
;
return false
}
func rewriteValuegeneric_OpRsh8Ux32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh8Ux32 <t> x (Const32 [c]))
// cond:
// result: (Rsh8Ux64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto end27e9b4472e085b653a105b1d67554ce8
}
c := v.Args[1].AuxInt
v.Op = OpRsh8Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto end27e9b4472e085b653a105b1d67554ce8
end27e9b4472e085b653a105b1d67554ce8:
;
return false
}
func rewriteValuegeneric_OpRsh8Ux64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh8Ux64 (Const8 [c]) (Const64 [d]))
// cond:
// result: (Const8 [int64(uint8(c) >> uint64(d))])
{
if v.Args[0].Op != OpConst8 {
goto enddd166e450d81ba7b466d61d2fbec178c
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto enddd166e450d81ba7b466d61d2fbec178c
}
d := v.Args[1].AuxInt
v.Op = OpConst8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = int64(uint8(c) >> uint64(d))
return true
}
goto enddd166e450d81ba7b466d61d2fbec178c
enddd166e450d81ba7b466d61d2fbec178c:
;
// match: (Rsh8Ux64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end570cb1d9db3c7bebd85e485eeb2c0969
}
if v.Args[1].AuxInt != 0 {
goto end570cb1d9db3c7bebd85e485eeb2c0969
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end570cb1d9db3c7bebd85e485eeb2c0969
end570cb1d9db3c7bebd85e485eeb2c0969:
;
// match: (Rsh8Ux64 _ (Const64 [c]))
// cond: uint64(c) >= 8
// result: (Const64 [0])
{
if v.Args[1].Op != OpConst64 {
goto endb63e1a7d1d91716ca0d9d74215361323
}
c := v.Args[1].AuxInt
if !(uint64(c) >= 8) {
goto endb63e1a7d1d91716ca0d9d74215361323
}
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto endb63e1a7d1d91716ca0d9d74215361323
endb63e1a7d1d91716ca0d9d74215361323:
;
// match: (Rsh8Ux64 <t> (Rsh8Ux64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Rsh8Ux64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpRsh8Ux64 {
goto endee8824b7071ed1a6dba4fcbaab98229e
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto endee8824b7071ed1a6dba4fcbaab98229e
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto endee8824b7071ed1a6dba4fcbaab98229e
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto endee8824b7071ed1a6dba4fcbaab98229e
}
v.Op = OpRsh8Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto endee8824b7071ed1a6dba4fcbaab98229e
endee8824b7071ed1a6dba4fcbaab98229e:
;
return false
}
func rewriteValuegeneric_OpRsh8Ux8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh8Ux8 <t> x (Const8 [c]))
// cond:
// result: (Rsh8Ux64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto ended7e4f4d9ab89dc26e6649d466577930
}
c := v.Args[1].AuxInt
v.Op = OpRsh8Ux64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto ended7e4f4d9ab89dc26e6649d466577930
ended7e4f4d9ab89dc26e6649d466577930:
;
return false
}
func rewriteValuegeneric_OpRsh8x16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh8x16 <t> x (Const16 [c]))
// cond:
// result: (Rsh8x64 x (Const64 <t> [int64(uint16(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end136bef6f60180bc8b4befbfc370af7ef
}
c := v.Args[1].AuxInt
v.Op = OpRsh8x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint16(c))
v.AddArg(v0)
return true
}
goto end136bef6f60180bc8b4befbfc370af7ef
end136bef6f60180bc8b4befbfc370af7ef:
;
return false
}
func rewriteValuegeneric_OpRsh8x32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh8x32 <t> x (Const32 [c]))
// cond:
// result: (Rsh8x64 x (Const64 <t> [int64(uint32(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto end2ef95c222a7c552fa9cc86e36196644e
}
c := v.Args[1].AuxInt
v.Op = OpRsh8x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint32(c))
v.AddArg(v0)
return true
}
goto end2ef95c222a7c552fa9cc86e36196644e
end2ef95c222a7c552fa9cc86e36196644e:
;
return false
}
func rewriteValuegeneric_OpRsh8x64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh8x64 (Const8 [c]) (Const64 [d]))
// cond:
// result: (Const8 [int64(int8(c) >> uint64(d))])
{
if v.Args[0].Op != OpConst8 {
goto end3b90206d75365466dfd1368e5b69db35
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end3b90206d75365466dfd1368e5b69db35
}
d := v.Args[1].AuxInt
v.Op = OpConst8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = int64(int8(c) >> uint64(d))
return true
}
goto end3b90206d75365466dfd1368e5b69db35
end3b90206d75365466dfd1368e5b69db35:
;
// match: (Rsh8x64 x (Const64 [0]))
// cond:
// result: x
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto end1e664cc720a11d1c769de8081cfa1de4
}
if v.Args[1].AuxInt != 0 {
goto end1e664cc720a11d1c769de8081cfa1de4
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end1e664cc720a11d1c769de8081cfa1de4
end1e664cc720a11d1c769de8081cfa1de4:
;
// match: (Rsh8x64 <t> (Rsh8x64 x (Const64 [c])) (Const64 [d]))
// cond: !uaddOvf(c,d)
// result: (Rsh8x64 x (Const64 <t> [c+d]))
{
t := v.Type
if v.Args[0].Op != OpRsh8x64 {
goto end6408685a7276af7e76ec086f359c942c
}
x := v.Args[0].Args[0]
if v.Args[0].Args[1].Op != OpConst64 {
goto end6408685a7276af7e76ec086f359c942c
}
c := v.Args[0].Args[1].AuxInt
if v.Args[1].Op != OpConst64 {
goto end6408685a7276af7e76ec086f359c942c
}
d := v.Args[1].AuxInt
if !(!uaddOvf(c, d)) {
goto end6408685a7276af7e76ec086f359c942c
}
v.Op = OpRsh8x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = c + d
v.AddArg(v0)
return true
}
goto end6408685a7276af7e76ec086f359c942c
end6408685a7276af7e76ec086f359c942c:
;
return false
}
func rewriteValuegeneric_OpRsh8x8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Rsh8x8 <t> x (Const8 [c]))
// cond:
// result: (Rsh8x64 x (Const64 <t> [int64(uint8(c))]))
{
t := v.Type
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto endae44f60f364cddd8903763dd921a007e
}
c := v.Args[1].AuxInt
v.Op = OpRsh8x64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(x)
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = int64(uint8(c))
v.AddArg(v0)
return true
}
goto endae44f60f364cddd8903763dd921a007e
endae44f60f364cddd8903763dd921a007e:
;
return false
}
func rewriteValuegeneric_OpSliceCap(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (SliceCap (SliceMake _ _ cap))
// cond:
// result: cap
{
if v.Args[0].Op != OpSliceMake {
goto end1bd11616743632b33b410964667fb3c6
}
cap := v.Args[0].Args[2]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = cap.Type
v.AddArg(cap)
return true
}
goto end1bd11616743632b33b410964667fb3c6
end1bd11616743632b33b410964667fb3c6:
;
return false
}
func rewriteValuegeneric_OpSliceLen(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (SliceLen (SliceMake _ len _))
// cond:
// result: len
{
if v.Args[0].Op != OpSliceMake {
goto endebb2090199d13e4c2ae52fb3e778f7fd
}
len := v.Args[0].Args[1]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = len.Type
v.AddArg(len)
return true
}
goto endebb2090199d13e4c2ae52fb3e778f7fd
endebb2090199d13e4c2ae52fb3e778f7fd:
;
return false
}
func rewriteValuegeneric_OpSlicePtr(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (SlicePtr (SliceMake ptr _ _ ))
// cond:
// result: ptr
{
if v.Args[0].Op != OpSliceMake {
goto end526acc0a705137a5d25577499206720b
}
ptr := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = ptr.Type
v.AddArg(ptr)
return true
}
goto end526acc0a705137a5d25577499206720b
end526acc0a705137a5d25577499206720b:
;
return false
}
func rewriteValuegeneric_OpStore(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Store _ (StructMake0) mem)
// cond:
// result: mem
{
if v.Args[1].Op != OpStructMake0 {
goto endd4f364b0adfc229d8c200af183d4c808
}
mem := v.Args[2]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = mem.Type
v.AddArg(mem)
return true
}
goto endd4f364b0adfc229d8c200af183d4c808
endd4f364b0adfc229d8c200af183d4c808:
;
// match: (Store dst (StructMake1 <t> f0) mem)
// cond:
// result: (Store [t.FieldType(0).Size()] dst f0 mem)
{
dst := v.Args[0]
if v.Args[1].Op != OpStructMake1 {
goto end2cff6d06f4440132f48ca374b6b1e9d8
}
t := v.Args[1].Type
f0 := v.Args[1].Args[0]
mem := v.Args[2]
v.Op = OpStore
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = t.FieldType(0).Size()
v.AddArg(dst)
v.AddArg(f0)
v.AddArg(mem)
return true
}
goto end2cff6d06f4440132f48ca374b6b1e9d8
end2cff6d06f4440132f48ca374b6b1e9d8:
;
// match: (Store dst (StructMake2 <t> f0 f1) mem)
// cond:
// result: (Store [t.FieldType(1).Size()] (OffPtr <t.FieldType(1).PtrTo()> [t.FieldOff(1)] dst) f1 (Store [t.FieldType(0).Size()] dst f0 mem))
{
dst := v.Args[0]
if v.Args[1].Op != OpStructMake2 {
goto end4e8ede6cc575a287795971da6b637973
}
t := v.Args[1].Type
f0 := v.Args[1].Args[0]
f1 := v.Args[1].Args[1]
mem := v.Args[2]
v.Op = OpStore
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = t.FieldType(1).Size()
v0 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(1).PtrTo())
v0.AuxInt = t.FieldOff(1)
v0.AddArg(dst)
v.AddArg(v0)
v.AddArg(f1)
v1 := b.NewValue0(v.Line, OpStore, TypeMem)
v1.AuxInt = t.FieldType(0).Size()
v1.AddArg(dst)
v1.AddArg(f0)
v1.AddArg(mem)
v.AddArg(v1)
return true
}
goto end4e8ede6cc575a287795971da6b637973
end4e8ede6cc575a287795971da6b637973:
;
// match: (Store dst (StructMake3 <t> f0 f1 f2) mem)
// cond:
// result: (Store [t.FieldType(2).Size()] (OffPtr <t.FieldType(2).PtrTo()> [t.FieldOff(2)] dst) f2 (Store [t.FieldType(1).Size()] (OffPtr <t.FieldType(1).PtrTo()> [t.FieldOff(1)] dst) f1 (Store [t.FieldType(0).Size()] dst f0 mem)))
{
dst := v.Args[0]
if v.Args[1].Op != OpStructMake3 {
goto end6ad675267724a87c8f852dd1e185e911
}
t := v.Args[1].Type
f0 := v.Args[1].Args[0]
f1 := v.Args[1].Args[1]
f2 := v.Args[1].Args[2]
mem := v.Args[2]
v.Op = OpStore
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = t.FieldType(2).Size()
v0 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(2).PtrTo())
v0.AuxInt = t.FieldOff(2)
v0.AddArg(dst)
v.AddArg(v0)
v.AddArg(f2)
v1 := b.NewValue0(v.Line, OpStore, TypeMem)
v1.AuxInt = t.FieldType(1).Size()
v2 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(1).PtrTo())
v2.AuxInt = t.FieldOff(1)
v2.AddArg(dst)
v1.AddArg(v2)
v1.AddArg(f1)
v3 := b.NewValue0(v.Line, OpStore, TypeMem)
v3.AuxInt = t.FieldType(0).Size()
v3.AddArg(dst)
v3.AddArg(f0)
v3.AddArg(mem)
v1.AddArg(v3)
v.AddArg(v1)
return true
}
goto end6ad675267724a87c8f852dd1e185e911
end6ad675267724a87c8f852dd1e185e911:
;
// match: (Store dst (StructMake4 <t> f0 f1 f2 f3) mem)
// cond:
// result: (Store [t.FieldType(3).Size()] (OffPtr <t.FieldType(3).PtrTo()> [t.FieldOff(3)] dst) f3 (Store [t.FieldType(2).Size()] (OffPtr <t.FieldType(2).PtrTo()> [t.FieldOff(2)] dst) f2 (Store [t.FieldType(1).Size()] (OffPtr <t.FieldType(1).PtrTo()> [t.FieldOff(1)] dst) f1 (Store [t.FieldType(0).Size()] dst f0 mem))))
{
dst := v.Args[0]
if v.Args[1].Op != OpStructMake4 {
goto end7ea91abd44794f7653374502a5a405ea
}
t := v.Args[1].Type
f0 := v.Args[1].Args[0]
f1 := v.Args[1].Args[1]
f2 := v.Args[1].Args[2]
f3 := v.Args[1].Args[3]
mem := v.Args[2]
v.Op = OpStore
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = t.FieldType(3).Size()
v0 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(3).PtrTo())
v0.AuxInt = t.FieldOff(3)
v0.AddArg(dst)
v.AddArg(v0)
v.AddArg(f3)
v1 := b.NewValue0(v.Line, OpStore, TypeMem)
v1.AuxInt = t.FieldType(2).Size()
v2 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(2).PtrTo())
v2.AuxInt = t.FieldOff(2)
v2.AddArg(dst)
v1.AddArg(v2)
v1.AddArg(f2)
v3 := b.NewValue0(v.Line, OpStore, TypeMem)
v3.AuxInt = t.FieldType(1).Size()
v4 := b.NewValue0(v.Line, OpOffPtr, t.FieldType(1).PtrTo())
v4.AuxInt = t.FieldOff(1)
v4.AddArg(dst)
v3.AddArg(v4)
v3.AddArg(f1)
v5 := b.NewValue0(v.Line, OpStore, TypeMem)
v5.AuxInt = t.FieldType(0).Size()
v5.AddArg(dst)
v5.AddArg(f0)
v5.AddArg(mem)
v3.AddArg(v5)
v1.AddArg(v3)
v.AddArg(v1)
return true
}
goto end7ea91abd44794f7653374502a5a405ea
end7ea91abd44794f7653374502a5a405ea:
;
// match: (Store [8] dst (ComplexMake real imag) mem)
// cond:
// result: (Store [4] (OffPtr <config.fe.TypeFloat32().PtrTo()> [4] dst) imag (Store [4] dst real mem))
{
if v.AuxInt != 8 {
goto endced898cb0a165662afe48ea44ad3318a
}
dst := v.Args[0]
if v.Args[1].Op != OpComplexMake {
goto endced898cb0a165662afe48ea44ad3318a
}
real := v.Args[1].Args[0]
imag := v.Args[1].Args[1]
mem := v.Args[2]
v.Op = OpStore
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 4
v0 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeFloat32().PtrTo())
v0.AuxInt = 4
v0.AddArg(dst)
v.AddArg(v0)
v.AddArg(imag)
v1 := b.NewValue0(v.Line, OpStore, TypeMem)
v1.AuxInt = 4
v1.AddArg(dst)
v1.AddArg(real)
v1.AddArg(mem)
v.AddArg(v1)
return true
}
goto endced898cb0a165662afe48ea44ad3318a
endced898cb0a165662afe48ea44ad3318a:
;
// match: (Store [16] dst (ComplexMake real imag) mem)
// cond:
// result: (Store [8] (OffPtr <config.fe.TypeFloat64().PtrTo()> [8] dst) imag (Store [8] dst real mem))
{
if v.AuxInt != 16 {
goto end3851a482d7bd37a93c4d81581e85b3ab
}
dst := v.Args[0]
if v.Args[1].Op != OpComplexMake {
goto end3851a482d7bd37a93c4d81581e85b3ab
}
real := v.Args[1].Args[0]
imag := v.Args[1].Args[1]
mem := v.Args[2]
v.Op = OpStore
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 8
v0 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeFloat64().PtrTo())
v0.AuxInt = 8
v0.AddArg(dst)
v.AddArg(v0)
v.AddArg(imag)
v1 := b.NewValue0(v.Line, OpStore, TypeMem)
v1.AuxInt = 8
v1.AddArg(dst)
v1.AddArg(real)
v1.AddArg(mem)
v.AddArg(v1)
return true
}
goto end3851a482d7bd37a93c4d81581e85b3ab
end3851a482d7bd37a93c4d81581e85b3ab:
;
// match: (Store [2*config.PtrSize] dst (StringMake ptr len) mem)
// cond:
// result: (Store [config.PtrSize] (OffPtr <config.fe.TypeInt().PtrTo()> [config.PtrSize] dst) len (Store [config.PtrSize] dst ptr mem))
{
if v.AuxInt != 2*config.PtrSize {
goto endd3a6ecebdad5899570a79fe5c62f34f1
}
dst := v.Args[0]
if v.Args[1].Op != OpStringMake {
goto endd3a6ecebdad5899570a79fe5c62f34f1
}
ptr := v.Args[1].Args[0]
len := v.Args[1].Args[1]
mem := v.Args[2]
v.Op = OpStore
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = config.PtrSize
v0 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeInt().PtrTo())
v0.AuxInt = config.PtrSize
v0.AddArg(dst)
v.AddArg(v0)
v.AddArg(len)
v1 := b.NewValue0(v.Line, OpStore, TypeMem)
v1.AuxInt = config.PtrSize
v1.AddArg(dst)
v1.AddArg(ptr)
v1.AddArg(mem)
v.AddArg(v1)
return true
}
goto endd3a6ecebdad5899570a79fe5c62f34f1
endd3a6ecebdad5899570a79fe5c62f34f1:
;
// match: (Store [3*config.PtrSize] dst (SliceMake ptr len cap) mem)
// cond:
// result: (Store [config.PtrSize] (OffPtr <config.fe.TypeInt().PtrTo()> [2*config.PtrSize] dst) cap (Store [config.PtrSize] (OffPtr <config.fe.TypeInt().PtrTo()> [config.PtrSize] dst) len (Store [config.PtrSize] dst ptr mem)))
{
if v.AuxInt != 3*config.PtrSize {
goto endd5cc8c3dad7d24c845b0b88fc51487ae
}
dst := v.Args[0]
if v.Args[1].Op != OpSliceMake {
goto endd5cc8c3dad7d24c845b0b88fc51487ae
}
ptr := v.Args[1].Args[0]
len := v.Args[1].Args[1]
cap := v.Args[1].Args[2]
mem := v.Args[2]
v.Op = OpStore
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = config.PtrSize
v0 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeInt().PtrTo())
v0.AuxInt = 2 * config.PtrSize
v0.AddArg(dst)
v.AddArg(v0)
v.AddArg(cap)
v1 := b.NewValue0(v.Line, OpStore, TypeMem)
v1.AuxInt = config.PtrSize
v2 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeInt().PtrTo())
v2.AuxInt = config.PtrSize
v2.AddArg(dst)
v1.AddArg(v2)
v1.AddArg(len)
v3 := b.NewValue0(v.Line, OpStore, TypeMem)
v3.AuxInt = config.PtrSize
v3.AddArg(dst)
v3.AddArg(ptr)
v3.AddArg(mem)
v1.AddArg(v3)
v.AddArg(v1)
return true
}
goto endd5cc8c3dad7d24c845b0b88fc51487ae
endd5cc8c3dad7d24c845b0b88fc51487ae:
;
// match: (Store [2*config.PtrSize] dst (IMake itab data) mem)
// cond:
// result: (Store [config.PtrSize] (OffPtr <config.fe.TypeBytePtr().PtrTo()> [config.PtrSize] dst) data (Store [config.PtrSize] dst itab mem))
{
if v.AuxInt != 2*config.PtrSize {
goto endaa801a871178ae3256b3f6f5d9f13514
}
dst := v.Args[0]
if v.Args[1].Op != OpIMake {
goto endaa801a871178ae3256b3f6f5d9f13514
}
itab := v.Args[1].Args[0]
data := v.Args[1].Args[1]
mem := v.Args[2]
v.Op = OpStore
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = config.PtrSize
v0 := b.NewValue0(v.Line, OpOffPtr, config.fe.TypeBytePtr().PtrTo())
v0.AuxInt = config.PtrSize
v0.AddArg(dst)
v.AddArg(v0)
v.AddArg(data)
v1 := b.NewValue0(v.Line, OpStore, TypeMem)
v1.AuxInt = config.PtrSize
v1.AddArg(dst)
v1.AddArg(itab)
v1.AddArg(mem)
v.AddArg(v1)
return true
}
goto endaa801a871178ae3256b3f6f5d9f13514
endaa801a871178ae3256b3f6f5d9f13514:
;
// match: (Store [size] dst (Load <t> src mem) mem)
// cond: !config.fe.CanSSA(t)
// result: (Move [size] dst src mem)
{
size := v.AuxInt
dst := v.Args[0]
if v.Args[1].Op != OpLoad {
goto end45295326269ba18413dceb7b608a0b9d
}
t := v.Args[1].Type
src := v.Args[1].Args[0]
mem := v.Args[1].Args[1]
if v.Args[2] != mem {
goto end45295326269ba18413dceb7b608a0b9d
}
if !(!config.fe.CanSSA(t)) {
goto end45295326269ba18413dceb7b608a0b9d
}
v.Op = OpMove
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = size
v.AddArg(dst)
v.AddArg(src)
v.AddArg(mem)
return true
}
goto end45295326269ba18413dceb7b608a0b9d
end45295326269ba18413dceb7b608a0b9d:
;
// match: (Store [size] dst (Load <t> src mem) (VarDef {x} mem))
// cond: !config.fe.CanSSA(t)
// result: (Move [size] dst src (VarDef {x} mem))
{
size := v.AuxInt
dst := v.Args[0]
if v.Args[1].Op != OpLoad {
goto end7f3cc0baffb82ba3ee879599b189a512
}
t := v.Args[1].Type
src := v.Args[1].Args[0]
mem := v.Args[1].Args[1]
if v.Args[2].Op != OpVarDef {
goto end7f3cc0baffb82ba3ee879599b189a512
}
x := v.Args[2].Aux
if v.Args[2].Args[0] != mem {
goto end7f3cc0baffb82ba3ee879599b189a512
}
if !(!config.fe.CanSSA(t)) {
goto end7f3cc0baffb82ba3ee879599b189a512
}
v.Op = OpMove
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = size
v.AddArg(dst)
v.AddArg(src)
v0 := b.NewValue0(v.Line, OpVarDef, TypeMem)
v0.Aux = x
v0.AddArg(mem)
v.AddArg(v0)
return true
}
goto end7f3cc0baffb82ba3ee879599b189a512
end7f3cc0baffb82ba3ee879599b189a512:
;
return false
}
func rewriteValuegeneric_OpStringLen(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (StringLen (StringMake _ len))
// cond:
// result: len
{
if v.Args[0].Op != OpStringMake {
goto end0d922460b7e5ca88324034f4bd6c027c
}
len := v.Args[0].Args[1]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = len.Type
v.AddArg(len)
return true
}
goto end0d922460b7e5ca88324034f4bd6c027c
end0d922460b7e5ca88324034f4bd6c027c:
;
return false
}
func rewriteValuegeneric_OpStringPtr(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (StringPtr (StringMake ptr _))
// cond:
// result: ptr
{
if v.Args[0].Op != OpStringMake {
goto end061edc5d85c73ad909089af2556d9380
}
ptr := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = ptr.Type
v.AddArg(ptr)
return true
}
goto end061edc5d85c73ad909089af2556d9380
end061edc5d85c73ad909089af2556d9380:
;
return false
}
func rewriteValuegeneric_OpStructSelect(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (StructSelect (StructMake1 x))
// cond:
// result: x
{
if v.Args[0].Op != OpStructMake1 {
goto end17af582e7eba5216b4a51fe6c9206d3c
}
x := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end17af582e7eba5216b4a51fe6c9206d3c
end17af582e7eba5216b4a51fe6c9206d3c:
;
// match: (StructSelect [0] (StructMake2 x _))
// cond:
// result: x
{
if v.AuxInt != 0 {
goto end355cfff99c8e9af975c3ae450d49b7f9
}
if v.Args[0].Op != OpStructMake2 {
goto end355cfff99c8e9af975c3ae450d49b7f9
}
x := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end355cfff99c8e9af975c3ae450d49b7f9
end355cfff99c8e9af975c3ae450d49b7f9:
;
// match: (StructSelect [1] (StructMake2 _ x))
// cond:
// result: x
{
if v.AuxInt != 1 {
goto end69baa65e494ef9ae154e0943b53734f9
}
if v.Args[0].Op != OpStructMake2 {
goto end69baa65e494ef9ae154e0943b53734f9
}
x := v.Args[0].Args[1]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end69baa65e494ef9ae154e0943b53734f9
end69baa65e494ef9ae154e0943b53734f9:
;
// match: (StructSelect [0] (StructMake3 x _ _))
// cond:
// result: x
{
if v.AuxInt != 0 {
goto endb0d98e2c46bb51c9abd4c3543392e0ec
}
if v.Args[0].Op != OpStructMake3 {
goto endb0d98e2c46bb51c9abd4c3543392e0ec
}
x := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto endb0d98e2c46bb51c9abd4c3543392e0ec
endb0d98e2c46bb51c9abd4c3543392e0ec:
;
// match: (StructSelect [1] (StructMake3 _ x _))
// cond:
// result: x
{
if v.AuxInt != 1 {
goto end2e40457286d26c2f14ad4fd127946773
}
if v.Args[0].Op != OpStructMake3 {
goto end2e40457286d26c2f14ad4fd127946773
}
x := v.Args[0].Args[1]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end2e40457286d26c2f14ad4fd127946773
end2e40457286d26c2f14ad4fd127946773:
;
// match: (StructSelect [2] (StructMake3 _ _ x))
// cond:
// result: x
{
if v.AuxInt != 2 {
goto end3e3b96ad431206175d002ece87aa1409
}
if v.Args[0].Op != OpStructMake3 {
goto end3e3b96ad431206175d002ece87aa1409
}
x := v.Args[0].Args[2]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end3e3b96ad431206175d002ece87aa1409
end3e3b96ad431206175d002ece87aa1409:
;
// match: (StructSelect [0] (StructMake4 x _ _ _))
// cond:
// result: x
{
if v.AuxInt != 0 {
goto end09f8a1ffa3d8c3124bc6d4083b941108
}
if v.Args[0].Op != OpStructMake4 {
goto end09f8a1ffa3d8c3124bc6d4083b941108
}
x := v.Args[0].Args[0]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end09f8a1ffa3d8c3124bc6d4083b941108
end09f8a1ffa3d8c3124bc6d4083b941108:
;
// match: (StructSelect [1] (StructMake4 _ x _ _))
// cond:
// result: x
{
if v.AuxInt != 1 {
goto endd3ef25e605a927e9251be6d9221f4acf
}
if v.Args[0].Op != OpStructMake4 {
goto endd3ef25e605a927e9251be6d9221f4acf
}
x := v.Args[0].Args[1]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto endd3ef25e605a927e9251be6d9221f4acf
endd3ef25e605a927e9251be6d9221f4acf:
;
// match: (StructSelect [2] (StructMake4 _ _ x _))
// cond:
// result: x
{
if v.AuxInt != 2 {
goto end0438e22cc8f41123fa42009a81ee723a
}
if v.Args[0].Op != OpStructMake4 {
goto end0438e22cc8f41123fa42009a81ee723a
}
x := v.Args[0].Args[2]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end0438e22cc8f41123fa42009a81ee723a
end0438e22cc8f41123fa42009a81ee723a:
;
// match: (StructSelect [3] (StructMake4 _ _ _ x))
// cond:
// result: x
{
if v.AuxInt != 3 {
goto end56a7c7781fee35eeff0a3652dc206012
}
if v.Args[0].Op != OpStructMake4 {
goto end56a7c7781fee35eeff0a3652dc206012
}
x := v.Args[0].Args[3]
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end56a7c7781fee35eeff0a3652dc206012
end56a7c7781fee35eeff0a3652dc206012:
;
// match: (StructSelect [i] (Load <t> ptr mem))
// cond: !config.fe.CanSSA(t)
// result: @v.Args[0].Block (Load <v.Type> (OffPtr <v.Type.PtrTo()> [t.FieldOff(i)] ptr) mem)
{
i := v.AuxInt
if v.Args[0].Op != OpLoad {
goto end2afd47b4fcaaab7a73325bd8a75e3e8e
}
t := v.Args[0].Type
ptr := v.Args[0].Args[0]
mem := v.Args[0].Args[1]
if !(!config.fe.CanSSA(t)) {
goto end2afd47b4fcaaab7a73325bd8a75e3e8e
}
v0 := v.Args[0].Block.NewValue0(v.Line, OpLoad, v.Type)
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AddArg(v0)
v1 := v.Args[0].Block.NewValue0(v.Line, OpOffPtr, v.Type.PtrTo())
v1.AuxInt = t.FieldOff(i)
v1.AddArg(ptr)
v0.AddArg(v1)
v0.AddArg(mem)
return true
}
goto end2afd47b4fcaaab7a73325bd8a75e3e8e
end2afd47b4fcaaab7a73325bd8a75e3e8e:
;
return false
}
func rewriteValuegeneric_OpSub16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Sub16 (Const16 [c]) (Const16 [d]))
// cond:
// result: (Const16 [c-d])
{
if v.Args[0].Op != OpConst16 {
goto end5c6fab95c9dbeff5973119096bfd4e78
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst16 {
goto end5c6fab95c9dbeff5973119096bfd4e78
}
d := v.Args[1].AuxInt
v.Op = OpConst16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c - d
return true
}
goto end5c6fab95c9dbeff5973119096bfd4e78
end5c6fab95c9dbeff5973119096bfd4e78:
;
// match: (Sub16 x (Const16 <t> [c]))
// cond: x.Op != OpConst16
// result: (Add16 (Const16 <t> [-c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst16 {
goto end493545258a8e7e79d005b34c712ddd0c
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst16) {
goto end493545258a8e7e79d005b34c712ddd0c
}
v.Op = OpAdd16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst16, t)
v0.AuxInt = -c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end493545258a8e7e79d005b34c712ddd0c
end493545258a8e7e79d005b34c712ddd0c:
;
// match: (Sub16 x x)
// cond:
// result: (Const16 [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto end83da541391be564f2a08464e674a49e7
}
v.Op = OpConst16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end83da541391be564f2a08464e674a49e7
end83da541391be564f2a08464e674a49e7:
;
// match: (Sub16 (Add16 x y) x)
// cond:
// result: y
{
if v.Args[0].Op != OpAdd16 {
goto end0dd8f250c457b9c005ecbed59fc2e758
}
x := v.Args[0].Args[0]
y := v.Args[0].Args[1]
if v.Args[1] != x {
goto end0dd8f250c457b9c005ecbed59fc2e758
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = y.Type
v.AddArg(y)
return true
}
goto end0dd8f250c457b9c005ecbed59fc2e758
end0dd8f250c457b9c005ecbed59fc2e758:
;
// match: (Sub16 (Add16 x y) y)
// cond:
// result: x
{
if v.Args[0].Op != OpAdd16 {
goto end01c8db2e0bce69e048cf79f3bdc82b9b
}
x := v.Args[0].Args[0]
y := v.Args[0].Args[1]
if v.Args[1] != y {
goto end01c8db2e0bce69e048cf79f3bdc82b9b
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end01c8db2e0bce69e048cf79f3bdc82b9b
end01c8db2e0bce69e048cf79f3bdc82b9b:
;
return false
}
func rewriteValuegeneric_OpSub32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Sub32 (Const32 [c]) (Const32 [d]))
// cond:
// result: (Const32 [c-d])
{
if v.Args[0].Op != OpConst32 {
goto end7623799db780e1bcc42c6ea0df9c49d3
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst32 {
goto end7623799db780e1bcc42c6ea0df9c49d3
}
d := v.Args[1].AuxInt
v.Op = OpConst32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c - d
return true
}
goto end7623799db780e1bcc42c6ea0df9c49d3
end7623799db780e1bcc42c6ea0df9c49d3:
;
// match: (Sub32 x (Const32 <t> [c]))
// cond: x.Op != OpConst32
// result: (Add32 (Const32 <t> [-c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst32 {
goto end391e2f2ba8c7502b62c0153ec69c4fbd
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst32) {
goto end391e2f2ba8c7502b62c0153ec69c4fbd
}
v.Op = OpAdd32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst32, t)
v0.AuxInt = -c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end391e2f2ba8c7502b62c0153ec69c4fbd
end391e2f2ba8c7502b62c0153ec69c4fbd:
;
// match: (Sub32 x x)
// cond:
// result: (Const32 [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto enda747581e798f199e07f4ad69747cd069
}
v.Op = OpConst32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto enda747581e798f199e07f4ad69747cd069
enda747581e798f199e07f4ad69747cd069:
;
// match: (Sub32 (Add32 x y) x)
// cond:
// result: y
{
if v.Args[0].Op != OpAdd32 {
goto end70c1e60e58a6c106d060f10cd3f179ea
}
x := v.Args[0].Args[0]
y := v.Args[0].Args[1]
if v.Args[1] != x {
goto end70c1e60e58a6c106d060f10cd3f179ea
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = y.Type
v.AddArg(y)
return true
}
goto end70c1e60e58a6c106d060f10cd3f179ea
end70c1e60e58a6c106d060f10cd3f179ea:
;
// match: (Sub32 (Add32 x y) y)
// cond:
// result: x
{
if v.Args[0].Op != OpAdd32 {
goto end20e42db178ec4f423cc56a991863a4a2
}
x := v.Args[0].Args[0]
y := v.Args[0].Args[1]
if v.Args[1] != y {
goto end20e42db178ec4f423cc56a991863a4a2
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end20e42db178ec4f423cc56a991863a4a2
end20e42db178ec4f423cc56a991863a4a2:
;
return false
}
func rewriteValuegeneric_OpSub64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Sub64 (Const64 [c]) (Const64 [d]))
// cond:
// result: (Const64 [c-d])
{
if v.Args[0].Op != OpConst64 {
goto end5a84a285ff0ff48b8ad3c64b15e3459f
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst64 {
goto end5a84a285ff0ff48b8ad3c64b15e3459f
}
d := v.Args[1].AuxInt
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c - d
return true
}
goto end5a84a285ff0ff48b8ad3c64b15e3459f
end5a84a285ff0ff48b8ad3c64b15e3459f:
;
// match: (Sub64 x (Const64 <t> [c]))
// cond: x.Op != OpConst64
// result: (Add64 (Const64 <t> [-c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst64 {
goto enda80d30f6794bcf02cd4442b238f68333
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst64) {
goto enda80d30f6794bcf02cd4442b238f68333
}
v.Op = OpAdd64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst64, t)
v0.AuxInt = -c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto enda80d30f6794bcf02cd4442b238f68333
enda80d30f6794bcf02cd4442b238f68333:
;
// match: (Sub64 x x)
// cond:
// result: (Const64 [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto end0387dc2b7bbe57d4aa54eab5d959da4b
}
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end0387dc2b7bbe57d4aa54eab5d959da4b
end0387dc2b7bbe57d4aa54eab5d959da4b:
;
// match: (Sub64 (Add64 x y) x)
// cond:
// result: y
{
if v.Args[0].Op != OpAdd64 {
goto end7d177451cf8959cb781f52d5ded46fff
}
x := v.Args[0].Args[0]
y := v.Args[0].Args[1]
if v.Args[1] != x {
goto end7d177451cf8959cb781f52d5ded46fff
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = y.Type
v.AddArg(y)
return true
}
goto end7d177451cf8959cb781f52d5ded46fff
end7d177451cf8959cb781f52d5ded46fff:
;
// match: (Sub64 (Add64 x y) y)
// cond:
// result: x
{
if v.Args[0].Op != OpAdd64 {
goto end6ea8172b21100cfe3dc86b7a850fbe97
}
x := v.Args[0].Args[0]
y := v.Args[0].Args[1]
if v.Args[1] != y {
goto end6ea8172b21100cfe3dc86b7a850fbe97
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto end6ea8172b21100cfe3dc86b7a850fbe97
end6ea8172b21100cfe3dc86b7a850fbe97:
;
return false
}
func rewriteValuegeneric_OpSub8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Sub8 (Const8 [c]) (Const8 [d]))
// cond:
// result: (Const8 [c-d])
{
if v.Args[0].Op != OpConst8 {
goto endc00ea11c7535529e211710574f5cff24
}
c := v.Args[0].AuxInt
if v.Args[1].Op != OpConst8 {
goto endc00ea11c7535529e211710574f5cff24
}
d := v.Args[1].AuxInt
v.Op = OpConst8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = c - d
return true
}
goto endc00ea11c7535529e211710574f5cff24
endc00ea11c7535529e211710574f5cff24:
;
// match: (Sub8 x (Const8 <t> [c]))
// cond: x.Op != OpConst8
// result: (Add8 (Const8 <t> [-c]) x)
{
x := v.Args[0]
if v.Args[1].Op != OpConst8 {
goto end0bfab5b6f1037e55dc049b79e2636678
}
t := v.Args[1].Type
c := v.Args[1].AuxInt
if !(x.Op != OpConst8) {
goto end0bfab5b6f1037e55dc049b79e2636678
}
v.Op = OpAdd8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v0 := b.NewValue0(v.Line, OpConst8, t)
v0.AuxInt = -c
v.AddArg(v0)
v.AddArg(x)
return true
}
goto end0bfab5b6f1037e55dc049b79e2636678
end0bfab5b6f1037e55dc049b79e2636678:
;
// match: (Sub8 x x)
// cond:
// result: (Const8 [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto end4e2ee15ef17611919a1a6b5f80bbfe18
}
v.Op = OpConst8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end4e2ee15ef17611919a1a6b5f80bbfe18
end4e2ee15ef17611919a1a6b5f80bbfe18:
;
// match: (Sub8 (Add8 x y) x)
// cond:
// result: y
{
if v.Args[0].Op != OpAdd8 {
goto endd79d561e14dc3d11da4c3bb20270b541
}
x := v.Args[0].Args[0]
y := v.Args[0].Args[1]
if v.Args[1] != x {
goto endd79d561e14dc3d11da4c3bb20270b541
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = y.Type
v.AddArg(y)
return true
}
goto endd79d561e14dc3d11da4c3bb20270b541
endd79d561e14dc3d11da4c3bb20270b541:
;
// match: (Sub8 (Add8 x y) y)
// cond:
// result: x
{
if v.Args[0].Op != OpAdd8 {
goto endcb7111b11d6d068c97026a97ecff8248
}
x := v.Args[0].Args[0]
y := v.Args[0].Args[1]
if v.Args[1] != y {
goto endcb7111b11d6d068c97026a97ecff8248
}
v.Op = OpCopy
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.Type = x.Type
v.AddArg(x)
return true
}
goto endcb7111b11d6d068c97026a97ecff8248
endcb7111b11d6d068c97026a97ecff8248:
;
return false
}
func rewriteValuegeneric_OpXor16(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Xor16 x x)
// cond:
// result: (Const16 [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto end5733ceb1903b8140248d8e2cac02fefe
}
v.Op = OpConst16
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end5733ceb1903b8140248d8e2cac02fefe
end5733ceb1903b8140248d8e2cac02fefe:
;
return false
}
func rewriteValuegeneric_OpXor32(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Xor32 x x)
// cond:
// result: (Const32 [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto end268ca02df6515d648e0bfb4e90981d25
}
v.Op = OpConst32
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end268ca02df6515d648e0bfb4e90981d25
end268ca02df6515d648e0bfb4e90981d25:
;
return false
}
func rewriteValuegeneric_OpXor64(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Xor64 x x)
// cond:
// result: (Const64 [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto endaf44e7f9fc58af30df69070953fb45ce
}
v.Op = OpConst64
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto endaf44e7f9fc58af30df69070953fb45ce
endaf44e7f9fc58af30df69070953fb45ce:
;
return false
}
func rewriteValuegeneric_OpXor8(v *Value, config *Config) bool {
b := v.Block
_ = b
// match: (Xor8 x x)
// cond:
// result: (Const8 [0])
{
x := v.Args[0]
if v.Args[1] != x {
goto end949b3a60b7d181688e6f79f93c782fc8
}
v.Op = OpConst8
v.AuxInt = 0
v.Aux = nil
v.resetArgs()
v.AuxInt = 0
return true
}
goto end949b3a60b7d181688e6f79f93c782fc8
end949b3a60b7d181688e6f79f93c782fc8:
;
return false
}
func rewriteBlockgeneric(b *Block) bool {
switch b.Kind {
case BlockCheck:
// match: (Check (NilCheck (GetG _) _) next)
// cond:
// result: (Plain nil next)
{
v := b.Control
if v.Op != OpNilCheck {
goto end6e20d932d6961903b0dcf16eac513826
}
if v.Args[0].Op != OpGetG {
goto end6e20d932d6961903b0dcf16eac513826
}
next := b.Succs[0]
b.Kind = BlockPlain
b.Control = nil
b.Succs[0] = next
b.Likely = BranchUnknown
return true
}
goto end6e20d932d6961903b0dcf16eac513826
end6e20d932d6961903b0dcf16eac513826:
;
case BlockIf:
// match: (If (Not cond) yes no)
// cond:
// result: (If cond no yes)
{
v := b.Control
if v.Op != OpNot {
goto endebe19c1c3c3bec068cdb2dd29ef57f96
}
cond := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockIf
b.Control = cond
b.Succs[0] = no
b.Succs[1] = yes
b.Likely *= -1
return true
}
goto endebe19c1c3c3bec068cdb2dd29ef57f96
endebe19c1c3c3bec068cdb2dd29ef57f96:
;
// match: (If (ConstBool [c]) yes no)
// cond: c == 1
// result: (First nil yes no)
{
v := b.Control
if v.Op != OpConstBool {
goto endc58ecbb85af78c0d58bb232ca86b67a4
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c == 1) {
goto endc58ecbb85af78c0d58bb232ca86b67a4
}
b.Kind = BlockFirst
b.Control = nil
b.Succs[0] = yes
b.Succs[1] = no
return true
}
goto endc58ecbb85af78c0d58bb232ca86b67a4
endc58ecbb85af78c0d58bb232ca86b67a4:
;
// match: (If (ConstBool [c]) yes no)
// cond: c == 0
// result: (First nil no yes)
{
v := b.Control
if v.Op != OpConstBool {
goto end4c3e297e275dd7e2e67f8ccd348c4bb5
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c == 0) {
goto end4c3e297e275dd7e2e67f8ccd348c4bb5
}
b.Kind = BlockFirst
b.Control = nil
b.Succs[0] = no
b.Succs[1] = yes
b.Likely *= -1
return true
}
goto end4c3e297e275dd7e2e67f8ccd348c4bb5
end4c3e297e275dd7e2e67f8ccd348c4bb5:
}
return false
}