Source file src/cmd/compile/internal/ssarewrite/rewritedec64/rewritedec64.go

     1  // Code generated from _gen/dec64.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package rewritedec64
     4  
     5  import "cmd/compile/internal/types"
     6  import "cmd/compile/internal/ssa/ssaop"
     7  import "cmd/compile/internal/ssa"
     8  
     9  func RewriteValue(v *ssa.Value) bool {
    10  	switch v.Op {
    11  	case ssaop.OpAdd64:
    12  		return rewriteValue_OpAdd64(v)
    13  	case ssaop.OpAnd64:
    14  		return rewriteValue_OpAnd64(v)
    15  	case ssaop.OpArg:
    16  		return rewriteValue_OpArg(v)
    17  	case ssaop.OpAvg64u:
    18  		return rewriteValue_OpAvg64u(v)
    19  	case ssaop.OpBitLen64:
    20  		return rewriteValue_OpBitLen64(v)
    21  	case ssaop.OpBswap64:
    22  		return rewriteValue_OpBswap64(v)
    23  	case ssaop.OpCom64:
    24  		return rewriteValue_OpCom64(v)
    25  	case ssaop.OpConst64:
    26  		return rewriteValue_OpConst64(v)
    27  	case ssaop.OpCtz64:
    28  		return rewriteValue_OpCtz64(v)
    29  	case ssaop.OpCtz64NonZero:
    30  		v.Op = ssaop.OpCtz64
    31  		return true
    32  	case ssaop.OpEq64:
    33  		return rewriteValue_OpEq64(v)
    34  	case ssaop.OpHmul64:
    35  		return rewriteValue_OpHmul64(v)
    36  	case ssaop.OpHmul64u:
    37  		return rewriteValue_OpHmul64u(v)
    38  	case ssaop.OpInt64Hi:
    39  		return rewriteValue_OpInt64Hi(v)
    40  	case ssaop.OpInt64Lo:
    41  		return rewriteValue_OpInt64Lo(v)
    42  	case ssaop.OpLast:
    43  		return rewriteValue_OpLast(v)
    44  	case ssaop.OpLeq64:
    45  		return rewriteValue_OpLeq64(v)
    46  	case ssaop.OpLeq64U:
    47  		return rewriteValue_OpLeq64U(v)
    48  	case ssaop.OpLess64:
    49  		return rewriteValue_OpLess64(v)
    50  	case ssaop.OpLess64U:
    51  		return rewriteValue_OpLess64U(v)
    52  	case ssaop.OpLoad:
    53  		return rewriteValue_OpLoad(v)
    54  	case ssaop.OpLsh16x64:
    55  		return rewriteValue_OpLsh16x64(v)
    56  	case ssaop.OpLsh32x64:
    57  		return rewriteValue_OpLsh32x64(v)
    58  	case ssaop.OpLsh64x16:
    59  		return rewriteValue_OpLsh64x16(v)
    60  	case ssaop.OpLsh64x32:
    61  		return rewriteValue_OpLsh64x32(v)
    62  	case ssaop.OpLsh64x64:
    63  		return rewriteValue_OpLsh64x64(v)
    64  	case ssaop.OpLsh64x8:
    65  		return rewriteValue_OpLsh64x8(v)
    66  	case ssaop.OpLsh8x64:
    67  		return rewriteValue_OpLsh8x64(v)
    68  	case ssaop.OpMul64:
    69  		return rewriteValue_OpMul64(v)
    70  	case ssaop.OpMul64uhilo:
    71  		return rewriteValue_OpMul64uhilo(v)
    72  	case ssaop.OpNeg64:
    73  		return rewriteValue_OpNeg64(v)
    74  	case ssaop.OpNeq64:
    75  		return rewriteValue_OpNeq64(v)
    76  	case ssaop.OpOr32:
    77  		return rewriteValue_OpOr32(v)
    78  	case ssaop.OpOr64:
    79  		return rewriteValue_OpOr64(v)
    80  	case ssaop.OpRotateLeft16:
    81  		return rewriteValue_OpRotateLeft16(v)
    82  	case ssaop.OpRotateLeft32:
    83  		return rewriteValue_OpRotateLeft32(v)
    84  	case ssaop.OpRotateLeft64:
    85  		return rewriteValue_OpRotateLeft64(v)
    86  	case ssaop.OpRotateLeft8:
    87  		return rewriteValue_OpRotateLeft8(v)
    88  	case ssaop.OpRsh16Ux64:
    89  		return rewriteValue_OpRsh16Ux64(v)
    90  	case ssaop.OpRsh16x64:
    91  		return rewriteValue_OpRsh16x64(v)
    92  	case ssaop.OpRsh32Ux64:
    93  		return rewriteValue_OpRsh32Ux64(v)
    94  	case ssaop.OpRsh32x64:
    95  		return rewriteValue_OpRsh32x64(v)
    96  	case ssaop.OpRsh64Ux16:
    97  		return rewriteValue_OpRsh64Ux16(v)
    98  	case ssaop.OpRsh64Ux32:
    99  		return rewriteValue_OpRsh64Ux32(v)
   100  	case ssaop.OpRsh64Ux64:
   101  		return rewriteValue_OpRsh64Ux64(v)
   102  	case ssaop.OpRsh64Ux8:
   103  		return rewriteValue_OpRsh64Ux8(v)
   104  	case ssaop.OpRsh64x16:
   105  		return rewriteValue_OpRsh64x16(v)
   106  	case ssaop.OpRsh64x32:
   107  		return rewriteValue_OpRsh64x32(v)
   108  	case ssaop.OpRsh64x64:
   109  		return rewriteValue_OpRsh64x64(v)
   110  	case ssaop.OpRsh64x8:
   111  		return rewriteValue_OpRsh64x8(v)
   112  	case ssaop.OpRsh8Ux64:
   113  		return rewriteValue_OpRsh8Ux64(v)
   114  	case ssaop.OpRsh8x64:
   115  		return rewriteValue_OpRsh8x64(v)
   116  	case ssaop.OpSelect0:
   117  		return rewriteValue_OpSelect0(v)
   118  	case ssaop.OpSelect1:
   119  		return rewriteValue_OpSelect1(v)
   120  	case ssaop.OpSignExt16to64:
   121  		return rewriteValue_OpSignExt16to64(v)
   122  	case ssaop.OpSignExt32to64:
   123  		return rewriteValue_OpSignExt32to64(v)
   124  	case ssaop.OpSignExt8to64:
   125  		return rewriteValue_OpSignExt8to64(v)
   126  	case ssaop.OpStore:
   127  		return rewriteValue_OpStore(v)
   128  	case ssaop.OpSub64:
   129  		return rewriteValue_OpSub64(v)
   130  	case ssaop.OpTrunc64to16:
   131  		return rewriteValue_OpTrunc64to16(v)
   132  	case ssaop.OpTrunc64to32:
   133  		return rewriteValue_OpTrunc64to32(v)
   134  	case ssaop.OpTrunc64to8:
   135  		return rewriteValue_OpTrunc64to8(v)
   136  	case ssaop.OpXor64:
   137  		return rewriteValue_OpXor64(v)
   138  	case ssaop.OpZeroExt16to64:
   139  		return rewriteValue_OpZeroExt16to64(v)
   140  	case ssaop.OpZeroExt32to64:
   141  		return rewriteValue_OpZeroExt32to64(v)
   142  	case ssaop.OpZeroExt8to64:
   143  		return rewriteValue_OpZeroExt8to64(v)
   144  	}
   145  	return false
   146  }
   147  func rewriteValue_OpAdd64(v *ssa.Value) bool {
   148  	v_1 := v.Args[1]
   149  	v_0 := v.Args[0]
   150  	b := v.Block
   151  	typ := &b.Func.Config.Types
   152  	// match: (Add64 <t> x y)
   153  	// result: (Last <t> x0: (Int64Lo x) x1: (Int64Hi x) y0: (Int64Lo y) y1: (Int64Hi y) add: (Add32carry x0 y0) (Int64Make (Add32withcarry <typ.UInt32> x1 y1 (Select1 <types.TypeFlags> add)) (Select0 <typ.UInt32> add)))
   154  	for {
   155  		t := v.Type
   156  		x := v_0
   157  		y := v_1
   158  		v.Reset(ssaop.OpLast)
   159  		v.Type = t
   160  		x0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   161  		x0.AddArg(x)
   162  		x1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   163  		x1.AddArg(x)
   164  		y0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   165  		y0.AddArg(y)
   166  		y1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   167  		y1.AddArg(y)
   168  		add := b.NewValue0(v.Pos, ssaop.OpAdd32carry, types.NewTuple(typ.UInt32, types.TypeFlags))
   169  		add.AddArg2(x0, y0)
   170  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Make, typ.UInt64)
   171  		v6 := b.NewValue0(v.Pos, ssaop.OpAdd32withcarry, typ.UInt32)
   172  		v7 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
   173  		v7.AddArg(add)
   174  		v6.AddArg3(x1, y1, v7)
   175  		v8 := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt32)
   176  		v8.AddArg(add)
   177  		v5.AddArg2(v6, v8)
   178  		v.AddArg6(x0, x1, y0, y1, add, v5)
   179  		return true
   180  	}
   181  }
   182  func rewriteValue_OpAnd64(v *ssa.Value) bool {
   183  	v_1 := v.Args[1]
   184  	v_0 := v.Args[0]
   185  	b := v.Block
   186  	typ := &b.Func.Config.Types
   187  	// match: (And64 x y)
   188  	// result: (Int64Make (And32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (And32 <typ.UInt32> (Int64Lo x) (Int64Lo y)))
   189  	for {
   190  		x := v_0
   191  		y := v_1
   192  		v.Reset(ssaop.OpInt64Make)
   193  		v0 := b.NewValue0(v.Pos, ssaop.OpAnd32, typ.UInt32)
   194  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   195  		v1.AddArg(x)
   196  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   197  		v2.AddArg(y)
   198  		v0.AddArg2(v1, v2)
   199  		v3 := b.NewValue0(v.Pos, ssaop.OpAnd32, typ.UInt32)
   200  		v4 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   201  		v4.AddArg(x)
   202  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   203  		v5.AddArg(y)
   204  		v3.AddArg2(v4, v5)
   205  		v.AddArg2(v0, v3)
   206  		return true
   207  	}
   208  }
   209  func rewriteValue_OpArg(v *ssa.Value) bool {
   210  	b := v.Block
   211  	config := b.Func.Config
   212  	typ := &b.Func.Config.Types
   213  	// match: (Arg {n} [off])
   214  	// cond: ssa.Is64BitInt(v.Type) && !config.BigEndian && v.Type.IsSigned() && !(b.Func.Pass.Name == "decompose builtin")
   215  	// result: (Int64Make (Arg <typ.Int32> {n} [off+4]) (Arg <typ.UInt32> {n} [off]))
   216  	for {
   217  		off := ssa.AuxIntToInt32(v.AuxInt)
   218  		n := ssa.AuxToSym(v.Aux)
   219  		if !(ssa.Is64BitInt(v.Type) && !config.BigEndian && v.Type.IsSigned() && !(b.Func.Pass.Name == "decompose builtin")) {
   220  			break
   221  		}
   222  		v.Reset(ssaop.OpInt64Make)
   223  		v0 := b.NewValue0(v.Pos, ssaop.OpArg, typ.Int32)
   224  		v0.AuxInt = ssa.Int32ToAuxInt(off + 4)
   225  		v0.Aux = ssa.SymToAux(n)
   226  		v1 := b.NewValue0(v.Pos, ssaop.OpArg, typ.UInt32)
   227  		v1.AuxInt = ssa.Int32ToAuxInt(off)
   228  		v1.Aux = ssa.SymToAux(n)
   229  		v.AddArg2(v0, v1)
   230  		return true
   231  	}
   232  	// match: (Arg {n} [off])
   233  	// cond: ssa.Is64BitInt(v.Type) && !config.BigEndian && !v.Type.IsSigned() && !(b.Func.Pass.Name == "decompose builtin")
   234  	// result: (Int64Make (Arg <typ.UInt32> {n} [off+4]) (Arg <typ.UInt32> {n} [off]))
   235  	for {
   236  		off := ssa.AuxIntToInt32(v.AuxInt)
   237  		n := ssa.AuxToSym(v.Aux)
   238  		if !(ssa.Is64BitInt(v.Type) && !config.BigEndian && !v.Type.IsSigned() && !(b.Func.Pass.Name == "decompose builtin")) {
   239  			break
   240  		}
   241  		v.Reset(ssaop.OpInt64Make)
   242  		v0 := b.NewValue0(v.Pos, ssaop.OpArg, typ.UInt32)
   243  		v0.AuxInt = ssa.Int32ToAuxInt(off + 4)
   244  		v0.Aux = ssa.SymToAux(n)
   245  		v1 := b.NewValue0(v.Pos, ssaop.OpArg, typ.UInt32)
   246  		v1.AuxInt = ssa.Int32ToAuxInt(off)
   247  		v1.Aux = ssa.SymToAux(n)
   248  		v.AddArg2(v0, v1)
   249  		return true
   250  	}
   251  	// match: (Arg {n} [off])
   252  	// cond: ssa.Is64BitInt(v.Type) && config.BigEndian && v.Type.IsSigned() && !(b.Func.Pass.Name == "decompose builtin")
   253  	// result: (Int64Make (Arg <typ.Int32> {n} [off]) (Arg <typ.UInt32> {n} [off+4]))
   254  	for {
   255  		off := ssa.AuxIntToInt32(v.AuxInt)
   256  		n := ssa.AuxToSym(v.Aux)
   257  		if !(ssa.Is64BitInt(v.Type) && config.BigEndian && v.Type.IsSigned() && !(b.Func.Pass.Name == "decompose builtin")) {
   258  			break
   259  		}
   260  		v.Reset(ssaop.OpInt64Make)
   261  		v0 := b.NewValue0(v.Pos, ssaop.OpArg, typ.Int32)
   262  		v0.AuxInt = ssa.Int32ToAuxInt(off)
   263  		v0.Aux = ssa.SymToAux(n)
   264  		v1 := b.NewValue0(v.Pos, ssaop.OpArg, typ.UInt32)
   265  		v1.AuxInt = ssa.Int32ToAuxInt(off + 4)
   266  		v1.Aux = ssa.SymToAux(n)
   267  		v.AddArg2(v0, v1)
   268  		return true
   269  	}
   270  	// match: (Arg {n} [off])
   271  	// cond: ssa.Is64BitInt(v.Type) && config.BigEndian && !v.Type.IsSigned() && !(b.Func.Pass.Name == "decompose builtin")
   272  	// result: (Int64Make (Arg <typ.UInt32> {n} [off]) (Arg <typ.UInt32> {n} [off+4]))
   273  	for {
   274  		off := ssa.AuxIntToInt32(v.AuxInt)
   275  		n := ssa.AuxToSym(v.Aux)
   276  		if !(ssa.Is64BitInt(v.Type) && config.BigEndian && !v.Type.IsSigned() && !(b.Func.Pass.Name == "decompose builtin")) {
   277  			break
   278  		}
   279  		v.Reset(ssaop.OpInt64Make)
   280  		v0 := b.NewValue0(v.Pos, ssaop.OpArg, typ.UInt32)
   281  		v0.AuxInt = ssa.Int32ToAuxInt(off)
   282  		v0.Aux = ssa.SymToAux(n)
   283  		v1 := b.NewValue0(v.Pos, ssaop.OpArg, typ.UInt32)
   284  		v1.AuxInt = ssa.Int32ToAuxInt(off + 4)
   285  		v1.Aux = ssa.SymToAux(n)
   286  		v.AddArg2(v0, v1)
   287  		return true
   288  	}
   289  	return false
   290  }
   291  func rewriteValue_OpAvg64u(v *ssa.Value) bool {
   292  	v_1 := v.Args[1]
   293  	v_0 := v.Args[0]
   294  	b := v.Block
   295  	typ := &b.Func.Config.Types
   296  	// match: (Avg64u <t> x y)
   297  	// result: (Add64 (Rsh64Ux32 <t> (Sub64 <t> x y) (Const32 <typ.UInt32> [1])) y)
   298  	for {
   299  		t := v.Type
   300  		x := v_0
   301  		y := v_1
   302  		v.Reset(ssaop.OpAdd64)
   303  		v0 := b.NewValue0(v.Pos, ssaop.OpRsh64Ux32, t)
   304  		v1 := b.NewValue0(v.Pos, ssaop.OpSub64, t)
   305  		v1.AddArg2(x, y)
   306  		v2 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
   307  		v2.AuxInt = ssa.Int32ToAuxInt(1)
   308  		v0.AddArg2(v1, v2)
   309  		v.AddArg2(v0, y)
   310  		return true
   311  	}
   312  }
   313  func rewriteValue_OpBitLen64(v *ssa.Value) bool {
   314  	v_0 := v.Args[0]
   315  	b := v.Block
   316  	typ := &b.Func.Config.Types
   317  	// match: (BitLen64 x)
   318  	// result: (Add32 <typ.Int> (BitLen32 <typ.Int> (Int64Hi x)) (BitLen32 <typ.Int> (Or32 <typ.UInt32> (Int64Lo x) (Zeromask (Int64Hi x)))))
   319  	for {
   320  		x := v_0
   321  		v.Reset(ssaop.OpAdd32)
   322  		v.Type = typ.Int
   323  		v0 := b.NewValue0(v.Pos, ssaop.OpBitLen32, typ.Int)
   324  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   325  		v1.AddArg(x)
   326  		v0.AddArg(v1)
   327  		v2 := b.NewValue0(v.Pos, ssaop.OpBitLen32, typ.Int)
   328  		v3 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
   329  		v4 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   330  		v4.AddArg(x)
   331  		v5 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
   332  		v5.AddArg(v1)
   333  		v3.AddArg2(v4, v5)
   334  		v2.AddArg(v3)
   335  		v.AddArg2(v0, v2)
   336  		return true
   337  	}
   338  }
   339  func rewriteValue_OpBswap64(v *ssa.Value) bool {
   340  	v_0 := v.Args[0]
   341  	b := v.Block
   342  	typ := &b.Func.Config.Types
   343  	// match: (Bswap64 x)
   344  	// result: (Int64Make (Bswap32 <typ.UInt32> (Int64Lo x)) (Bswap32 <typ.UInt32> (Int64Hi x)))
   345  	for {
   346  		x := v_0
   347  		v.Reset(ssaop.OpInt64Make)
   348  		v0 := b.NewValue0(v.Pos, ssaop.OpBswap32, typ.UInt32)
   349  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   350  		v1.AddArg(x)
   351  		v0.AddArg(v1)
   352  		v2 := b.NewValue0(v.Pos, ssaop.OpBswap32, typ.UInt32)
   353  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   354  		v3.AddArg(x)
   355  		v2.AddArg(v3)
   356  		v.AddArg2(v0, v2)
   357  		return true
   358  	}
   359  }
   360  func rewriteValue_OpCom64(v *ssa.Value) bool {
   361  	v_0 := v.Args[0]
   362  	b := v.Block
   363  	typ := &b.Func.Config.Types
   364  	// match: (Com64 x)
   365  	// result: (Int64Make (Com32 <typ.UInt32> (Int64Hi x)) (Com32 <typ.UInt32> (Int64Lo x)))
   366  	for {
   367  		x := v_0
   368  		v.Reset(ssaop.OpInt64Make)
   369  		v0 := b.NewValue0(v.Pos, ssaop.OpCom32, typ.UInt32)
   370  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   371  		v1.AddArg(x)
   372  		v0.AddArg(v1)
   373  		v2 := b.NewValue0(v.Pos, ssaop.OpCom32, typ.UInt32)
   374  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   375  		v3.AddArg(x)
   376  		v2.AddArg(v3)
   377  		v.AddArg2(v0, v2)
   378  		return true
   379  	}
   380  }
   381  func rewriteValue_OpConst64(v *ssa.Value) bool {
   382  	b := v.Block
   383  	typ := &b.Func.Config.Types
   384  	// match: (Const64 <t> [c])
   385  	// cond: t.IsSigned()
   386  	// result: (Int64Make (Const32 <typ.Int32> [int32(c>>32)]) (Const32 <typ.UInt32> [int32(c)]))
   387  	for {
   388  		t := v.Type
   389  		c := ssa.AuxIntToInt64(v.AuxInt)
   390  		if !(t.IsSigned()) {
   391  			break
   392  		}
   393  		v.Reset(ssaop.OpInt64Make)
   394  		v0 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.Int32)
   395  		v0.AuxInt = ssa.Int32ToAuxInt(int32(c >> 32))
   396  		v1 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
   397  		v1.AuxInt = ssa.Int32ToAuxInt(int32(c))
   398  		v.AddArg2(v0, v1)
   399  		return true
   400  	}
   401  	// match: (Const64 <t> [c])
   402  	// cond: !t.IsSigned()
   403  	// result: (Int64Make (Const32 <typ.UInt32> [int32(c>>32)]) (Const32 <typ.UInt32> [int32(c)]))
   404  	for {
   405  		t := v.Type
   406  		c := ssa.AuxIntToInt64(v.AuxInt)
   407  		if !(!t.IsSigned()) {
   408  			break
   409  		}
   410  		v.Reset(ssaop.OpInt64Make)
   411  		v0 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
   412  		v0.AuxInt = ssa.Int32ToAuxInt(int32(c >> 32))
   413  		v1 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
   414  		v1.AuxInt = ssa.Int32ToAuxInt(int32(c))
   415  		v.AddArg2(v0, v1)
   416  		return true
   417  	}
   418  	return false
   419  }
   420  func rewriteValue_OpCtz64(v *ssa.Value) bool {
   421  	v_0 := v.Args[0]
   422  	b := v.Block
   423  	typ := &b.Func.Config.Types
   424  	// match: (Ctz64 x)
   425  	// result: (Add32 <typ.UInt32> (Ctz32 <typ.UInt32> (Int64Lo x)) (And32 <typ.UInt32> (Com32 <typ.UInt32> (Zeromask (Int64Lo x))) (Ctz32 <typ.UInt32> (Int64Hi x))))
   426  	for {
   427  		x := v_0
   428  		v.Reset(ssaop.OpAdd32)
   429  		v.Type = typ.UInt32
   430  		v0 := b.NewValue0(v.Pos, ssaop.OpCtz32, typ.UInt32)
   431  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   432  		v1.AddArg(x)
   433  		v0.AddArg(v1)
   434  		v2 := b.NewValue0(v.Pos, ssaop.OpAnd32, typ.UInt32)
   435  		v3 := b.NewValue0(v.Pos, ssaop.OpCom32, typ.UInt32)
   436  		v4 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
   437  		v4.AddArg(v1)
   438  		v3.AddArg(v4)
   439  		v5 := b.NewValue0(v.Pos, ssaop.OpCtz32, typ.UInt32)
   440  		v6 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   441  		v6.AddArg(x)
   442  		v5.AddArg(v6)
   443  		v2.AddArg2(v3, v5)
   444  		v.AddArg2(v0, v2)
   445  		return true
   446  	}
   447  }
   448  func rewriteValue_OpEq64(v *ssa.Value) bool {
   449  	v_1 := v.Args[1]
   450  	v_0 := v.Args[0]
   451  	b := v.Block
   452  	typ := &b.Func.Config.Types
   453  	// match: (Eq64 x y)
   454  	// result: (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Eq32 (Int64Lo x) (Int64Lo y)))
   455  	for {
   456  		x := v_0
   457  		y := v_1
   458  		v.Reset(ssaop.OpAndB)
   459  		v0 := b.NewValue0(v.Pos, ssaop.OpEq32, typ.Bool)
   460  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   461  		v1.AddArg(x)
   462  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   463  		v2.AddArg(y)
   464  		v0.AddArg2(v1, v2)
   465  		v3 := b.NewValue0(v.Pos, ssaop.OpEq32, typ.Bool)
   466  		v4 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   467  		v4.AddArg(x)
   468  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   469  		v5.AddArg(y)
   470  		v3.AddArg2(v4, v5)
   471  		v.AddArg2(v0, v3)
   472  		return true
   473  	}
   474  }
   475  func rewriteValue_OpHmul64(v *ssa.Value) bool {
   476  	v_1 := v.Args[1]
   477  	v_0 := v.Args[0]
   478  	b := v.Block
   479  	typ := &b.Func.Config.Types
   480  	// match: (Hmul64 x y)
   481  	// result: (Last p: (Hmul64u <typ.UInt64> x y) xSign: (Int64Make xs:(Rsh32x32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [31])) xs) ySign: (Int64Make ys:(Rsh32x32 <typ.UInt32> (Int64Hi y) (Const32 <typ.UInt32> [31])) ys) (Sub64 <typ.Int64> (Sub64 <typ.Int64> p (And64 <typ.Int64> xSign y)) (And64 <typ.Int64> ySign x)))
   482  	for {
   483  		x := v_0
   484  		y := v_1
   485  		v.Reset(ssaop.OpLast)
   486  		p := b.NewValue0(v.Pos, ssaop.OpHmul64u, typ.UInt64)
   487  		p.AddArg2(x, y)
   488  		xSign := b.NewValue0(v.Pos, ssaop.OpInt64Make, typ.UInt64)
   489  		xs := b.NewValue0(v.Pos, ssaop.OpRsh32x32, typ.UInt32)
   490  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   491  		v3.AddArg(x)
   492  		v4 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
   493  		v4.AuxInt = ssa.Int32ToAuxInt(31)
   494  		xs.AddArg2(v3, v4)
   495  		xSign.AddArg2(xs, xs)
   496  		ySign := b.NewValue0(v.Pos, ssaop.OpInt64Make, typ.UInt64)
   497  		ys := b.NewValue0(v.Pos, ssaop.OpRsh32x32, typ.UInt32)
   498  		v7 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   499  		v7.AddArg(y)
   500  		ys.AddArg2(v7, v4)
   501  		ySign.AddArg2(ys, ys)
   502  		v8 := b.NewValue0(v.Pos, ssaop.OpSub64, typ.Int64)
   503  		v9 := b.NewValue0(v.Pos, ssaop.OpSub64, typ.Int64)
   504  		v10 := b.NewValue0(v.Pos, ssaop.OpAnd64, typ.Int64)
   505  		v10.AddArg2(xSign, y)
   506  		v9.AddArg2(p, v10)
   507  		v11 := b.NewValue0(v.Pos, ssaop.OpAnd64, typ.Int64)
   508  		v11.AddArg2(ySign, x)
   509  		v8.AddArg2(v9, v11)
   510  		v.AddArg4(p, xSign, ySign, v8)
   511  		return true
   512  	}
   513  }
   514  func rewriteValue_OpHmul64u(v *ssa.Value) bool {
   515  	v_1 := v.Args[1]
   516  	v_0 := v.Args[0]
   517  	b := v.Block
   518  	typ := &b.Func.Config.Types
   519  	// match: (Hmul64u x y)
   520  	// result: (Select0 (Mul64uhilo x y))
   521  	for {
   522  		x := v_0
   523  		y := v_1
   524  		v.Reset(ssaop.OpSelect0)
   525  		v0 := b.NewValue0(v.Pos, ssaop.OpMul64uhilo, types.NewTuple(typ.UInt64, typ.UInt64))
   526  		v0.AddArg2(x, y)
   527  		v.AddArg(v0)
   528  		return true
   529  	}
   530  }
   531  func rewriteValue_OpInt64Hi(v *ssa.Value) bool {
   532  	v_0 := v.Args[0]
   533  	// match: (Int64Hi (Int64Make hi _))
   534  	// result: hi
   535  	for {
   536  		if v_0.Op != ssaop.OpInt64Make {
   537  			break
   538  		}
   539  		hi := v_0.Args[0]
   540  		v.CopyOf(hi)
   541  		return true
   542  	}
   543  	return false
   544  }
   545  func rewriteValue_OpInt64Lo(v *ssa.Value) bool {
   546  	v_0 := v.Args[0]
   547  	// match: (Int64Lo (Int64Make _ lo))
   548  	// result: lo
   549  	for {
   550  		if v_0.Op != ssaop.OpInt64Make {
   551  			break
   552  		}
   553  		lo := v_0.Args[1]
   554  		v.CopyOf(lo)
   555  		return true
   556  	}
   557  	return false
   558  }
   559  func rewriteValue_OpLast(v *ssa.Value) bool {
   560  	// match: (Last ___)
   561  	// result: v.Args[len(v.Args)-1]
   562  	for {
   563  		v.CopyOf(v.Args[len(v.Args)-1])
   564  		return true
   565  	}
   566  }
   567  func rewriteValue_OpLeq64(v *ssa.Value) bool {
   568  	v_1 := v.Args[1]
   569  	v_0 := v.Args[0]
   570  	b := v.Block
   571  	typ := &b.Func.Config.Types
   572  	// match: (Leq64 x y)
   573  	// result: (OrB (Less32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Leq32U (Int64Lo x) (Int64Lo y))))
   574  	for {
   575  		x := v_0
   576  		y := v_1
   577  		v.Reset(ssaop.OpOrB)
   578  		v0 := b.NewValue0(v.Pos, ssaop.OpLess32, typ.Bool)
   579  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   580  		v1.AddArg(x)
   581  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   582  		v2.AddArg(y)
   583  		v0.AddArg2(v1, v2)
   584  		v3 := b.NewValue0(v.Pos, ssaop.OpAndB, typ.Bool)
   585  		v4 := b.NewValue0(v.Pos, ssaop.OpEq32, typ.Bool)
   586  		v4.AddArg2(v1, v2)
   587  		v5 := b.NewValue0(v.Pos, ssaop.OpLeq32U, typ.Bool)
   588  		v6 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   589  		v6.AddArg(x)
   590  		v7 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   591  		v7.AddArg(y)
   592  		v5.AddArg2(v6, v7)
   593  		v3.AddArg2(v4, v5)
   594  		v.AddArg2(v0, v3)
   595  		return true
   596  	}
   597  }
   598  func rewriteValue_OpLeq64U(v *ssa.Value) bool {
   599  	v_1 := v.Args[1]
   600  	v_0 := v.Args[0]
   601  	b := v.Block
   602  	typ := &b.Func.Config.Types
   603  	// match: (Leq64U x y)
   604  	// result: (OrB (Less32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Leq32U (Int64Lo x) (Int64Lo y))))
   605  	for {
   606  		x := v_0
   607  		y := v_1
   608  		v.Reset(ssaop.OpOrB)
   609  		v0 := b.NewValue0(v.Pos, ssaop.OpLess32U, typ.Bool)
   610  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   611  		v1.AddArg(x)
   612  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   613  		v2.AddArg(y)
   614  		v0.AddArg2(v1, v2)
   615  		v3 := b.NewValue0(v.Pos, ssaop.OpAndB, typ.Bool)
   616  		v4 := b.NewValue0(v.Pos, ssaop.OpEq32, typ.Bool)
   617  		v4.AddArg2(v1, v2)
   618  		v5 := b.NewValue0(v.Pos, ssaop.OpLeq32U, typ.Bool)
   619  		v6 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   620  		v6.AddArg(x)
   621  		v7 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   622  		v7.AddArg(y)
   623  		v5.AddArg2(v6, v7)
   624  		v3.AddArg2(v4, v5)
   625  		v.AddArg2(v0, v3)
   626  		return true
   627  	}
   628  }
   629  func rewriteValue_OpLess64(v *ssa.Value) bool {
   630  	v_1 := v.Args[1]
   631  	v_0 := v.Args[0]
   632  	b := v.Block
   633  	typ := &b.Func.Config.Types
   634  	// match: (Less64 x y)
   635  	// result: (OrB (Less32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Less32U (Int64Lo x) (Int64Lo y))))
   636  	for {
   637  		x := v_0
   638  		y := v_1
   639  		v.Reset(ssaop.OpOrB)
   640  		v0 := b.NewValue0(v.Pos, ssaop.OpLess32, typ.Bool)
   641  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   642  		v1.AddArg(x)
   643  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   644  		v2.AddArg(y)
   645  		v0.AddArg2(v1, v2)
   646  		v3 := b.NewValue0(v.Pos, ssaop.OpAndB, typ.Bool)
   647  		v4 := b.NewValue0(v.Pos, ssaop.OpEq32, typ.Bool)
   648  		v4.AddArg2(v1, v2)
   649  		v5 := b.NewValue0(v.Pos, ssaop.OpLess32U, typ.Bool)
   650  		v6 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   651  		v6.AddArg(x)
   652  		v7 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   653  		v7.AddArg(y)
   654  		v5.AddArg2(v6, v7)
   655  		v3.AddArg2(v4, v5)
   656  		v.AddArg2(v0, v3)
   657  		return true
   658  	}
   659  }
   660  func rewriteValue_OpLess64U(v *ssa.Value) bool {
   661  	v_1 := v.Args[1]
   662  	v_0 := v.Args[0]
   663  	b := v.Block
   664  	typ := &b.Func.Config.Types
   665  	// match: (Less64U x y)
   666  	// result: (OrB (Less32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Less32U (Int64Lo x) (Int64Lo y))))
   667  	for {
   668  		x := v_0
   669  		y := v_1
   670  		v.Reset(ssaop.OpOrB)
   671  		v0 := b.NewValue0(v.Pos, ssaop.OpLess32U, typ.Bool)
   672  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   673  		v1.AddArg(x)
   674  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   675  		v2.AddArg(y)
   676  		v0.AddArg2(v1, v2)
   677  		v3 := b.NewValue0(v.Pos, ssaop.OpAndB, typ.Bool)
   678  		v4 := b.NewValue0(v.Pos, ssaop.OpEq32, typ.Bool)
   679  		v4.AddArg2(v1, v2)
   680  		v5 := b.NewValue0(v.Pos, ssaop.OpLess32U, typ.Bool)
   681  		v6 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   682  		v6.AddArg(x)
   683  		v7 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   684  		v7.AddArg(y)
   685  		v5.AddArg2(v6, v7)
   686  		v3.AddArg2(v4, v5)
   687  		v.AddArg2(v0, v3)
   688  		return true
   689  	}
   690  }
   691  func rewriteValue_OpLoad(v *ssa.Value) bool {
   692  	v_1 := v.Args[1]
   693  	v_0 := v.Args[0]
   694  	b := v.Block
   695  	config := b.Func.Config
   696  	typ := &b.Func.Config.Types
   697  	// match: (Load <t> ptr mem)
   698  	// cond: ssa.Is64BitInt(t) && !config.BigEndian && t.IsSigned()
   699  	// result: (Int64Make (Load <typ.Int32> (OffPtr <typ.Int32Ptr> [4] ptr) mem) (Load <typ.UInt32> ptr mem))
   700  	for {
   701  		t := v.Type
   702  		ptr := v_0
   703  		mem := v_1
   704  		if !(ssa.Is64BitInt(t) && !config.BigEndian && t.IsSigned()) {
   705  			break
   706  		}
   707  		v.Reset(ssaop.OpInt64Make)
   708  		v0 := b.NewValue0(v.Pos, ssaop.OpLoad, typ.Int32)
   709  		v1 := b.NewValue0(v.Pos, ssaop.OpOffPtr, typ.Int32Ptr)
   710  		v1.AuxInt = ssa.Int64ToAuxInt(4)
   711  		v1.AddArg(ptr)
   712  		v0.AddArg2(v1, mem)
   713  		v2 := b.NewValue0(v.Pos, ssaop.OpLoad, typ.UInt32)
   714  		v2.AddArg2(ptr, mem)
   715  		v.AddArg2(v0, v2)
   716  		return true
   717  	}
   718  	// match: (Load <t> ptr mem)
   719  	// cond: ssa.Is64BitInt(t) && !config.BigEndian && !t.IsSigned()
   720  	// result: (Int64Make (Load <typ.UInt32> (OffPtr <typ.UInt32Ptr> [4] ptr) mem) (Load <typ.UInt32> ptr mem))
   721  	for {
   722  		t := v.Type
   723  		ptr := v_0
   724  		mem := v_1
   725  		if !(ssa.Is64BitInt(t) && !config.BigEndian && !t.IsSigned()) {
   726  			break
   727  		}
   728  		v.Reset(ssaop.OpInt64Make)
   729  		v0 := b.NewValue0(v.Pos, ssaop.OpLoad, typ.UInt32)
   730  		v1 := b.NewValue0(v.Pos, ssaop.OpOffPtr, typ.UInt32Ptr)
   731  		v1.AuxInt = ssa.Int64ToAuxInt(4)
   732  		v1.AddArg(ptr)
   733  		v0.AddArg2(v1, mem)
   734  		v2 := b.NewValue0(v.Pos, ssaop.OpLoad, typ.UInt32)
   735  		v2.AddArg2(ptr, mem)
   736  		v.AddArg2(v0, v2)
   737  		return true
   738  	}
   739  	// match: (Load <t> ptr mem)
   740  	// cond: ssa.Is64BitInt(t) && config.BigEndian && t.IsSigned()
   741  	// result: (Int64Make (Load <typ.Int32> ptr mem) (Load <typ.UInt32> (OffPtr <typ.UInt32Ptr> [4] ptr) mem))
   742  	for {
   743  		t := v.Type
   744  		ptr := v_0
   745  		mem := v_1
   746  		if !(ssa.Is64BitInt(t) && config.BigEndian && t.IsSigned()) {
   747  			break
   748  		}
   749  		v.Reset(ssaop.OpInt64Make)
   750  		v0 := b.NewValue0(v.Pos, ssaop.OpLoad, typ.Int32)
   751  		v0.AddArg2(ptr, mem)
   752  		v1 := b.NewValue0(v.Pos, ssaop.OpLoad, typ.UInt32)
   753  		v2 := b.NewValue0(v.Pos, ssaop.OpOffPtr, typ.UInt32Ptr)
   754  		v2.AuxInt = ssa.Int64ToAuxInt(4)
   755  		v2.AddArg(ptr)
   756  		v1.AddArg2(v2, mem)
   757  		v.AddArg2(v0, v1)
   758  		return true
   759  	}
   760  	// match: (Load <t> ptr mem)
   761  	// cond: ssa.Is64BitInt(t) && config.BigEndian && !t.IsSigned()
   762  	// result: (Int64Make (Load <typ.UInt32> ptr mem) (Load <typ.UInt32> (OffPtr <typ.UInt32Ptr> [4] ptr) mem))
   763  	for {
   764  		t := v.Type
   765  		ptr := v_0
   766  		mem := v_1
   767  		if !(ssa.Is64BitInt(t) && config.BigEndian && !t.IsSigned()) {
   768  			break
   769  		}
   770  		v.Reset(ssaop.OpInt64Make)
   771  		v0 := b.NewValue0(v.Pos, ssaop.OpLoad, typ.UInt32)
   772  		v0.AddArg2(ptr, mem)
   773  		v1 := b.NewValue0(v.Pos, ssaop.OpLoad, typ.UInt32)
   774  		v2 := b.NewValue0(v.Pos, ssaop.OpOffPtr, typ.UInt32Ptr)
   775  		v2.AuxInt = ssa.Int64ToAuxInt(4)
   776  		v2.AddArg(ptr)
   777  		v1.AddArg2(v2, mem)
   778  		v.AddArg2(v0, v1)
   779  		return true
   780  	}
   781  	return false
   782  }
   783  func rewriteValue_OpLsh16x64(v *ssa.Value) bool {
   784  	v_1 := v.Args[1]
   785  	v_0 := v.Args[0]
   786  	b := v.Block
   787  	typ := &b.Func.Config.Types
   788  	// match: (Lsh16x64 _ (Int64Make (Const32 [c]) _))
   789  	// cond: c != 0
   790  	// result: (Const32 [0])
   791  	for {
   792  		if v_1.Op != ssaop.OpInt64Make {
   793  			break
   794  		}
   795  		v_1_0 := v_1.Args[0]
   796  		if v_1_0.Op != ssaop.OpConst32 {
   797  			break
   798  		}
   799  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
   800  		if !(c != 0) {
   801  			break
   802  		}
   803  		v.Reset(ssaop.OpConst32)
   804  		v.AuxInt = ssa.Int32ToAuxInt(0)
   805  		return true
   806  	}
   807  	// match: (Lsh16x64 [c] x (Int64Make (Const32 [0]) lo))
   808  	// result: (Lsh16x32 [c] x lo)
   809  	for {
   810  		c := ssa.AuxIntToBool(v.AuxInt)
   811  		x := v_0
   812  		if v_1.Op != ssaop.OpInt64Make {
   813  			break
   814  		}
   815  		lo := v_1.Args[1]
   816  		v_1_0 := v_1.Args[0]
   817  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
   818  			break
   819  		}
   820  		v.Reset(ssaop.OpLsh16x32)
   821  		v.AuxInt = ssa.BoolToAuxInt(c)
   822  		v.AddArg2(x, lo)
   823  		return true
   824  	}
   825  	// match: (Lsh16x64 x (Int64Make hi lo))
   826  	// cond: hi.Op != ssaop.OpConst32
   827  	// result: (Lsh16x32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
   828  	for {
   829  		x := v_0
   830  		if v_1.Op != ssaop.OpInt64Make {
   831  			break
   832  		}
   833  		lo := v_1.Args[1]
   834  		hi := v_1.Args[0]
   835  		if !(hi.Op != ssaop.OpConst32) {
   836  			break
   837  		}
   838  		v.Reset(ssaop.OpLsh16x32)
   839  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
   840  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
   841  		v1.AddArg(hi)
   842  		v0.AddArg2(v1, lo)
   843  		v.AddArg2(x, v0)
   844  		return true
   845  	}
   846  	// match: (Lsh16x64 x y)
   847  	// result: (Lsh16x32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
   848  	for {
   849  		x := v_0
   850  		y := v_1
   851  		v.Reset(ssaop.OpLsh16x32)
   852  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
   853  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
   854  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   855  		v2.AddArg(y)
   856  		v1.AddArg(v2)
   857  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   858  		v3.AddArg(y)
   859  		v0.AddArg2(v1, v3)
   860  		v.AddArg2(x, v0)
   861  		return true
   862  	}
   863  }
   864  func rewriteValue_OpLsh32x64(v *ssa.Value) bool {
   865  	v_1 := v.Args[1]
   866  	v_0 := v.Args[0]
   867  	b := v.Block
   868  	typ := &b.Func.Config.Types
   869  	// match: (Lsh32x64 _ (Int64Make (Const32 [c]) _))
   870  	// cond: c != 0
   871  	// result: (Const32 [0])
   872  	for {
   873  		if v_1.Op != ssaop.OpInt64Make {
   874  			break
   875  		}
   876  		v_1_0 := v_1.Args[0]
   877  		if v_1_0.Op != ssaop.OpConst32 {
   878  			break
   879  		}
   880  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
   881  		if !(c != 0) {
   882  			break
   883  		}
   884  		v.Reset(ssaop.OpConst32)
   885  		v.AuxInt = ssa.Int32ToAuxInt(0)
   886  		return true
   887  	}
   888  	// match: (Lsh32x64 [c] x (Int64Make (Const32 [0]) lo))
   889  	// result: (Lsh32x32 [c] x lo)
   890  	for {
   891  		c := ssa.AuxIntToBool(v.AuxInt)
   892  		x := v_0
   893  		if v_1.Op != ssaop.OpInt64Make {
   894  			break
   895  		}
   896  		lo := v_1.Args[1]
   897  		v_1_0 := v_1.Args[0]
   898  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
   899  			break
   900  		}
   901  		v.Reset(ssaop.OpLsh32x32)
   902  		v.AuxInt = ssa.BoolToAuxInt(c)
   903  		v.AddArg2(x, lo)
   904  		return true
   905  	}
   906  	// match: (Lsh32x64 x (Int64Make hi lo))
   907  	// cond: hi.Op != ssaop.OpConst32
   908  	// result: (Lsh32x32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
   909  	for {
   910  		x := v_0
   911  		if v_1.Op != ssaop.OpInt64Make {
   912  			break
   913  		}
   914  		lo := v_1.Args[1]
   915  		hi := v_1.Args[0]
   916  		if !(hi.Op != ssaop.OpConst32) {
   917  			break
   918  		}
   919  		v.Reset(ssaop.OpLsh32x32)
   920  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
   921  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
   922  		v1.AddArg(hi)
   923  		v0.AddArg2(v1, lo)
   924  		v.AddArg2(x, v0)
   925  		return true
   926  	}
   927  	// match: (Lsh32x64 x y)
   928  	// result: (Lsh32x32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
   929  	for {
   930  		x := v_0
   931  		y := v_1
   932  		v.Reset(ssaop.OpLsh32x32)
   933  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
   934  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
   935  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   936  		v2.AddArg(y)
   937  		v1.AddArg(v2)
   938  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   939  		v3.AddArg(y)
   940  		v0.AddArg2(v1, v3)
   941  		v.AddArg2(x, v0)
   942  		return true
   943  	}
   944  }
   945  func rewriteValue_OpLsh64x16(v *ssa.Value) bool {
   946  	v_1 := v.Args[1]
   947  	v_0 := v.Args[0]
   948  	b := v.Block
   949  	typ := &b.Func.Config.Types
   950  	// match: (Lsh64x16 x s)
   951  	// result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x16 <typ.UInt32> (Int64Hi x) s) (Rsh32Ux16 <typ.UInt32> (Int64Lo x) (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (Lsh32x16 <typ.UInt32> (Int64Lo x) (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32])))) (Lsh32x16 <typ.UInt32> (Int64Lo x) s))
   952  	for {
   953  		x := v_0
   954  		s := v_1
   955  		v.Reset(ssaop.OpInt64Make)
   956  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
   957  		v1 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
   958  		v2 := b.NewValue0(v.Pos, ssaop.OpLsh32x16, typ.UInt32)
   959  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   960  		v3.AddArg(x)
   961  		v2.AddArg2(v3, s)
   962  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux16, typ.UInt32)
   963  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
   964  		v5.AddArg(x)
   965  		v6 := b.NewValue0(v.Pos, ssaop.OpSub16, typ.UInt16)
   966  		v7 := b.NewValue0(v.Pos, ssaop.OpConst16, typ.UInt16)
   967  		v7.AuxInt = ssa.Int16ToAuxInt(32)
   968  		v6.AddArg2(v7, s)
   969  		v4.AddArg2(v5, v6)
   970  		v1.AddArg2(v2, v4)
   971  		v8 := b.NewValue0(v.Pos, ssaop.OpLsh32x16, typ.UInt32)
   972  		v9 := b.NewValue0(v.Pos, ssaop.OpSub16, typ.UInt16)
   973  		v9.AddArg2(s, v7)
   974  		v8.AddArg2(v5, v9)
   975  		v0.AddArg2(v1, v8)
   976  		v10 := b.NewValue0(v.Pos, ssaop.OpLsh32x16, typ.UInt32)
   977  		v10.AddArg2(v5, s)
   978  		v.AddArg2(v0, v10)
   979  		return true
   980  	}
   981  }
   982  func rewriteValue_OpLsh64x32(v *ssa.Value) bool {
   983  	v_1 := v.Args[1]
   984  	v_0 := v.Args[0]
   985  	b := v.Block
   986  	typ := &b.Func.Config.Types
   987  	// match: (Lsh64x32 x s)
   988  	// result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Hi x) s) (Rsh32Ux32 <typ.UInt32> (Int64Lo x) (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (Lsh32x32 <typ.UInt32> (Int64Lo x) (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32])))) (Lsh32x32 <typ.UInt32> (Int64Lo x) s))
   989  	for {
   990  		x := v_0
   991  		s := v_1
   992  		v.Reset(ssaop.OpInt64Make)
   993  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
   994  		v1 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
   995  		v2 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
   996  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
   997  		v3.AddArg(x)
   998  		v2.AddArg2(v3, s)
   999  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1000  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1001  		v5.AddArg(x)
  1002  		v6 := b.NewValue0(v.Pos, ssaop.OpSub32, typ.UInt32)
  1003  		v7 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1004  		v7.AuxInt = ssa.Int32ToAuxInt(32)
  1005  		v6.AddArg2(v7, s)
  1006  		v4.AddArg2(v5, v6)
  1007  		v1.AddArg2(v2, v4)
  1008  		v8 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1009  		v9 := b.NewValue0(v.Pos, ssaop.OpSub32, typ.UInt32)
  1010  		v9.AddArg2(s, v7)
  1011  		v8.AddArg2(v5, v9)
  1012  		v0.AddArg2(v1, v8)
  1013  		v10 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1014  		v10.AddArg2(v5, s)
  1015  		v.AddArg2(v0, v10)
  1016  		return true
  1017  	}
  1018  }
  1019  func rewriteValue_OpLsh64x64(v *ssa.Value) bool {
  1020  	v_1 := v.Args[1]
  1021  	v_0 := v.Args[0]
  1022  	b := v.Block
  1023  	typ := &b.Func.Config.Types
  1024  	// match: (Lsh64x64 _ (Int64Make (Const32 [c]) _))
  1025  	// cond: c != 0
  1026  	// result: (Const64 [0])
  1027  	for {
  1028  		if v_1.Op != ssaop.OpInt64Make {
  1029  			break
  1030  		}
  1031  		v_1_0 := v_1.Args[0]
  1032  		if v_1_0.Op != ssaop.OpConst32 {
  1033  			break
  1034  		}
  1035  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
  1036  		if !(c != 0) {
  1037  			break
  1038  		}
  1039  		v.Reset(ssaop.OpConst64)
  1040  		v.AuxInt = ssa.Int64ToAuxInt(0)
  1041  		return true
  1042  	}
  1043  	// match: (Lsh64x64 [c] x (Int64Make (Const32 [0]) lo))
  1044  	// result: (Lsh64x32 [c] x lo)
  1045  	for {
  1046  		c := ssa.AuxIntToBool(v.AuxInt)
  1047  		x := v_0
  1048  		if v_1.Op != ssaop.OpInt64Make {
  1049  			break
  1050  		}
  1051  		lo := v_1.Args[1]
  1052  		v_1_0 := v_1.Args[0]
  1053  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
  1054  			break
  1055  		}
  1056  		v.Reset(ssaop.OpLsh64x32)
  1057  		v.AuxInt = ssa.BoolToAuxInt(c)
  1058  		v.AddArg2(x, lo)
  1059  		return true
  1060  	}
  1061  	// match: (Lsh64x64 x (Int64Make hi lo))
  1062  	// cond: hi.Op != ssaop.OpConst32
  1063  	// result: (Lsh64x32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
  1064  	for {
  1065  		x := v_0
  1066  		if v_1.Op != ssaop.OpInt64Make {
  1067  			break
  1068  		}
  1069  		lo := v_1.Args[1]
  1070  		hi := v_1.Args[0]
  1071  		if !(hi.Op != ssaop.OpConst32) {
  1072  			break
  1073  		}
  1074  		v.Reset(ssaop.OpLsh64x32)
  1075  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1076  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  1077  		v1.AddArg(hi)
  1078  		v0.AddArg2(v1, lo)
  1079  		v.AddArg2(x, v0)
  1080  		return true
  1081  	}
  1082  	// match: (Lsh64x64 x y)
  1083  	// result: (Lsh64x32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
  1084  	for {
  1085  		x := v_0
  1086  		y := v_1
  1087  		v.Reset(ssaop.OpLsh64x32)
  1088  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1089  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  1090  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1091  		v2.AddArg(y)
  1092  		v1.AddArg(v2)
  1093  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1094  		v3.AddArg(y)
  1095  		v0.AddArg2(v1, v3)
  1096  		v.AddArg2(x, v0)
  1097  		return true
  1098  	}
  1099  }
  1100  func rewriteValue_OpLsh64x8(v *ssa.Value) bool {
  1101  	v_1 := v.Args[1]
  1102  	v_0 := v.Args[0]
  1103  	b := v.Block
  1104  	typ := &b.Func.Config.Types
  1105  	// match: (Lsh64x8 x s)
  1106  	// result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x8 <typ.UInt32> (Int64Hi x) s) (Rsh32Ux8 <typ.UInt32> (Int64Lo x) (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (Lsh32x8 <typ.UInt32> (Int64Lo x) (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32])))) (Lsh32x8 <typ.UInt32> (Int64Lo x) s))
  1107  	for {
  1108  		x := v_0
  1109  		s := v_1
  1110  		v.Reset(ssaop.OpInt64Make)
  1111  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1112  		v1 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1113  		v2 := b.NewValue0(v.Pos, ssaop.OpLsh32x8, typ.UInt32)
  1114  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1115  		v3.AddArg(x)
  1116  		v2.AddArg2(v3, s)
  1117  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux8, typ.UInt32)
  1118  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1119  		v5.AddArg(x)
  1120  		v6 := b.NewValue0(v.Pos, ssaop.OpSub8, typ.UInt8)
  1121  		v7 := b.NewValue0(v.Pos, ssaop.OpConst8, typ.UInt8)
  1122  		v7.AuxInt = ssa.Int8ToAuxInt(32)
  1123  		v6.AddArg2(v7, s)
  1124  		v4.AddArg2(v5, v6)
  1125  		v1.AddArg2(v2, v4)
  1126  		v8 := b.NewValue0(v.Pos, ssaop.OpLsh32x8, typ.UInt32)
  1127  		v9 := b.NewValue0(v.Pos, ssaop.OpSub8, typ.UInt8)
  1128  		v9.AddArg2(s, v7)
  1129  		v8.AddArg2(v5, v9)
  1130  		v0.AddArg2(v1, v8)
  1131  		v10 := b.NewValue0(v.Pos, ssaop.OpLsh32x8, typ.UInt32)
  1132  		v10.AddArg2(v5, s)
  1133  		v.AddArg2(v0, v10)
  1134  		return true
  1135  	}
  1136  }
  1137  func rewriteValue_OpLsh8x64(v *ssa.Value) bool {
  1138  	v_1 := v.Args[1]
  1139  	v_0 := v.Args[0]
  1140  	b := v.Block
  1141  	typ := &b.Func.Config.Types
  1142  	// match: (Lsh8x64 _ (Int64Make (Const32 [c]) _))
  1143  	// cond: c != 0
  1144  	// result: (Const32 [0])
  1145  	for {
  1146  		if v_1.Op != ssaop.OpInt64Make {
  1147  			break
  1148  		}
  1149  		v_1_0 := v_1.Args[0]
  1150  		if v_1_0.Op != ssaop.OpConst32 {
  1151  			break
  1152  		}
  1153  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
  1154  		if !(c != 0) {
  1155  			break
  1156  		}
  1157  		v.Reset(ssaop.OpConst32)
  1158  		v.AuxInt = ssa.Int32ToAuxInt(0)
  1159  		return true
  1160  	}
  1161  	// match: (Lsh8x64 [c] x (Int64Make (Const32 [0]) lo))
  1162  	// result: (Lsh8x32 [c] x lo)
  1163  	for {
  1164  		c := ssa.AuxIntToBool(v.AuxInt)
  1165  		x := v_0
  1166  		if v_1.Op != ssaop.OpInt64Make {
  1167  			break
  1168  		}
  1169  		lo := v_1.Args[1]
  1170  		v_1_0 := v_1.Args[0]
  1171  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
  1172  			break
  1173  		}
  1174  		v.Reset(ssaop.OpLsh8x32)
  1175  		v.AuxInt = ssa.BoolToAuxInt(c)
  1176  		v.AddArg2(x, lo)
  1177  		return true
  1178  	}
  1179  	// match: (Lsh8x64 x (Int64Make hi lo))
  1180  	// cond: hi.Op != ssaop.OpConst32
  1181  	// result: (Lsh8x32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
  1182  	for {
  1183  		x := v_0
  1184  		if v_1.Op != ssaop.OpInt64Make {
  1185  			break
  1186  		}
  1187  		lo := v_1.Args[1]
  1188  		hi := v_1.Args[0]
  1189  		if !(hi.Op != ssaop.OpConst32) {
  1190  			break
  1191  		}
  1192  		v.Reset(ssaop.OpLsh8x32)
  1193  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1194  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  1195  		v1.AddArg(hi)
  1196  		v0.AddArg2(v1, lo)
  1197  		v.AddArg2(x, v0)
  1198  		return true
  1199  	}
  1200  	// match: (Lsh8x64 x y)
  1201  	// result: (Lsh8x32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
  1202  	for {
  1203  		x := v_0
  1204  		y := v_1
  1205  		v.Reset(ssaop.OpLsh8x32)
  1206  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1207  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  1208  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1209  		v2.AddArg(y)
  1210  		v1.AddArg(v2)
  1211  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1212  		v3.AddArg(y)
  1213  		v0.AddArg2(v1, v3)
  1214  		v.AddArg2(x, v0)
  1215  		return true
  1216  	}
  1217  }
  1218  func rewriteValue_OpMul64(v *ssa.Value) bool {
  1219  	v_1 := v.Args[1]
  1220  	v_0 := v.Args[0]
  1221  	b := v.Block
  1222  	typ := &b.Func.Config.Types
  1223  	// match: (Mul64 <t> x y)
  1224  	// result: (Last <t> x0: (Int64Lo x) x1: (Int64Hi x) y0: (Int64Lo y) y1: (Int64Hi y) x0y0: (Mul32uhilo x0 y0) x0y0Hi: (Select0 <typ.UInt32> x0y0) x0y0Lo: (Select1 <typ.UInt32> x0y0) (Int64Make (Add32 <typ.UInt32> x0y0Hi (Add32 <typ.UInt32> (Mul32 <typ.UInt32> x0 y1) (Mul32 <typ.UInt32> x1 y0))) x0y0Lo))
  1225  	for {
  1226  		t := v.Type
  1227  		x := v_0
  1228  		y := v_1
  1229  		v.Reset(ssaop.OpLast)
  1230  		v.Type = t
  1231  		x0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1232  		x0.AddArg(x)
  1233  		x1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1234  		x1.AddArg(x)
  1235  		y0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1236  		y0.AddArg(y)
  1237  		y1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1238  		y1.AddArg(y)
  1239  		x0y0 := b.NewValue0(v.Pos, ssaop.OpMul32uhilo, types.NewTuple(typ.UInt32, typ.UInt32))
  1240  		x0y0.AddArg2(x0, y0)
  1241  		x0y0Hi := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt32)
  1242  		x0y0Hi.AddArg(x0y0)
  1243  		x0y0Lo := b.NewValue0(v.Pos, ssaop.OpSelect1, typ.UInt32)
  1244  		x0y0Lo.AddArg(x0y0)
  1245  		v7 := b.NewValue0(v.Pos, ssaop.OpInt64Make, typ.UInt64)
  1246  		v8 := b.NewValue0(v.Pos, ssaop.OpAdd32, typ.UInt32)
  1247  		v9 := b.NewValue0(v.Pos, ssaop.OpAdd32, typ.UInt32)
  1248  		v10 := b.NewValue0(v.Pos, ssaop.OpMul32, typ.UInt32)
  1249  		v10.AddArg2(x0, y1)
  1250  		v11 := b.NewValue0(v.Pos, ssaop.OpMul32, typ.UInt32)
  1251  		v11.AddArg2(x1, y0)
  1252  		v9.AddArg2(v10, v11)
  1253  		v8.AddArg2(x0y0Hi, v9)
  1254  		v7.AddArg2(v8, x0y0Lo)
  1255  		v.AddArgs(x0, x1, y0, y1, x0y0, x0y0Hi, x0y0Lo, v7)
  1256  		return true
  1257  	}
  1258  }
  1259  func rewriteValue_OpMul64uhilo(v *ssa.Value) bool {
  1260  	v_1 := v.Args[1]
  1261  	v_0 := v.Args[0]
  1262  	b := v.Block
  1263  	typ := &b.Func.Config.Types
  1264  	// match: (Mul64uhilo <t> x y)
  1265  	// result: (Last <t> x0: (Int64Lo x) x1: (Int64Hi x) y0: (Int64Lo y) y1: (Int64Hi y) x0y0: (Mul32uhilo x0 y0) x0y1: (Mul32uhilo x0 y1) x1y0: (Mul32uhilo x1 y0) x1y1: (Mul32uhilo x1 y1) x0y0Hi: (Select0 <typ.UInt32> x0y0) x0y0Lo: (Select1 <typ.UInt32> x0y0) x0y1Hi: (Select0 <typ.UInt32> x0y1) x0y1Lo: (Select1 <typ.UInt32> x0y1) x1y0Hi: (Select0 <typ.UInt32> x1y0) x1y0Lo: (Select1 <typ.UInt32> x1y0) x1y1Hi: (Select0 <typ.UInt32> x1y1) x1y1Lo: (Select1 <typ.UInt32> x1y1) w1a: (Add32carry x0y0Hi x0y1Lo) w2a: (Add32carrywithcarry x0y1Hi x1y0Hi (Select1 <types.TypeFlags> w1a)) w3a: (Add32withcarry <typ.UInt32> x1y1Hi (Const32 <typ.UInt32> [0]) (Select1 <types.TypeFlags> w2a)) w1b: (Add32carry x1y0Lo (Select0 <typ.UInt32> w1a)) w2b: (Add32carrywithcarry x1y1Lo (Select0 <typ.UInt32> w2a) (Select1 <types.TypeFlags> w1b)) w3b: (Add32withcarry <typ.UInt32> w3a (Const32 <typ.UInt32> [0]) (Select1 <types.TypeFlags> w2b)) (MakeTuple <types.NewTuple(typ.UInt64,typ.UInt64)> (Int64Make w3b (Select0 <typ.UInt32> w2b)) (Int64Make (Select0 <typ.UInt32> w1b) x0y0Lo)))
  1266  	for {
  1267  		t := v.Type
  1268  		x := v_0
  1269  		y := v_1
  1270  		v.Reset(ssaop.OpLast)
  1271  		v.Type = t
  1272  		x0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1273  		x0.AddArg(x)
  1274  		x1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1275  		x1.AddArg(x)
  1276  		y0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1277  		y0.AddArg(y)
  1278  		y1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1279  		y1.AddArg(y)
  1280  		x0y0 := b.NewValue0(v.Pos, ssaop.OpMul32uhilo, types.NewTuple(typ.UInt32, typ.UInt32))
  1281  		x0y0.AddArg2(x0, y0)
  1282  		x0y1 := b.NewValue0(v.Pos, ssaop.OpMul32uhilo, types.NewTuple(typ.UInt32, typ.UInt32))
  1283  		x0y1.AddArg2(x0, y1)
  1284  		x1y0 := b.NewValue0(v.Pos, ssaop.OpMul32uhilo, types.NewTuple(typ.UInt32, typ.UInt32))
  1285  		x1y0.AddArg2(x1, y0)
  1286  		x1y1 := b.NewValue0(v.Pos, ssaop.OpMul32uhilo, types.NewTuple(typ.UInt32, typ.UInt32))
  1287  		x1y1.AddArg2(x1, y1)
  1288  		x0y0Hi := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt32)
  1289  		x0y0Hi.AddArg(x0y0)
  1290  		x0y0Lo := b.NewValue0(v.Pos, ssaop.OpSelect1, typ.UInt32)
  1291  		x0y0Lo.AddArg(x0y0)
  1292  		x0y1Hi := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt32)
  1293  		x0y1Hi.AddArg(x0y1)
  1294  		x0y1Lo := b.NewValue0(v.Pos, ssaop.OpSelect1, typ.UInt32)
  1295  		x0y1Lo.AddArg(x0y1)
  1296  		x1y0Hi := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt32)
  1297  		x1y0Hi.AddArg(x1y0)
  1298  		x1y0Lo := b.NewValue0(v.Pos, ssaop.OpSelect1, typ.UInt32)
  1299  		x1y0Lo.AddArg(x1y0)
  1300  		x1y1Hi := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt32)
  1301  		x1y1Hi.AddArg(x1y1)
  1302  		x1y1Lo := b.NewValue0(v.Pos, ssaop.OpSelect1, typ.UInt32)
  1303  		x1y1Lo.AddArg(x1y1)
  1304  		w1a := b.NewValue0(v.Pos, ssaop.OpAdd32carry, types.NewTuple(typ.UInt32, types.TypeFlags))
  1305  		w1a.AddArg2(x0y0Hi, x0y1Lo)
  1306  		w2a := b.NewValue0(v.Pos, ssaop.OpAdd32carrywithcarry, types.NewTuple(typ.UInt32, types.TypeFlags))
  1307  		v18 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
  1308  		v18.AddArg(w1a)
  1309  		w2a.AddArg3(x0y1Hi, x1y0Hi, v18)
  1310  		w3a := b.NewValue0(v.Pos, ssaop.OpAdd32withcarry, typ.UInt32)
  1311  		v20 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1312  		v20.AuxInt = ssa.Int32ToAuxInt(0)
  1313  		v21 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
  1314  		v21.AddArg(w2a)
  1315  		w3a.AddArg3(x1y1Hi, v20, v21)
  1316  		w1b := b.NewValue0(v.Pos, ssaop.OpAdd32carry, types.NewTuple(typ.UInt32, types.TypeFlags))
  1317  		v23 := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt32)
  1318  		v23.AddArg(w1a)
  1319  		w1b.AddArg2(x1y0Lo, v23)
  1320  		w2b := b.NewValue0(v.Pos, ssaop.OpAdd32carrywithcarry, types.NewTuple(typ.UInt32, types.TypeFlags))
  1321  		v25 := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt32)
  1322  		v25.AddArg(w2a)
  1323  		v26 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
  1324  		v26.AddArg(w1b)
  1325  		w2b.AddArg3(x1y1Lo, v25, v26)
  1326  		w3b := b.NewValue0(v.Pos, ssaop.OpAdd32withcarry, typ.UInt32)
  1327  		v28 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
  1328  		v28.AddArg(w2b)
  1329  		w3b.AddArg3(w3a, v20, v28)
  1330  		v29 := b.NewValue0(v.Pos, ssaop.OpMakeTuple, types.NewTuple(typ.UInt64, typ.UInt64))
  1331  		v30 := b.NewValue0(v.Pos, ssaop.OpInt64Make, typ.UInt64)
  1332  		v31 := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt32)
  1333  		v31.AddArg(w2b)
  1334  		v30.AddArg2(w3b, v31)
  1335  		v32 := b.NewValue0(v.Pos, ssaop.OpInt64Make, typ.UInt64)
  1336  		v33 := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt32)
  1337  		v33.AddArg(w1b)
  1338  		v32.AddArg2(v33, x0y0Lo)
  1339  		v29.AddArg2(v30, v32)
  1340  		v.AddArgs(x0, x1, y0, y1, x0y0, x0y1, x1y0, x1y1, x0y0Hi, x0y0Lo, x0y1Hi, x0y1Lo, x1y0Hi, x1y0Lo, x1y1Hi, x1y1Lo, w1a, w2a, w3a, w1b, w2b, w3b, v29)
  1341  		return true
  1342  	}
  1343  }
  1344  func rewriteValue_OpNeg64(v *ssa.Value) bool {
  1345  	v_0 := v.Args[0]
  1346  	b := v.Block
  1347  	// match: (Neg64 <t> x)
  1348  	// result: (Sub64 (Const64 <t> [0]) x)
  1349  	for {
  1350  		t := v.Type
  1351  		x := v_0
  1352  		v.Reset(ssaop.OpSub64)
  1353  		v0 := b.NewValue0(v.Pos, ssaop.OpConst64, t)
  1354  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1355  		v.AddArg2(v0, x)
  1356  		return true
  1357  	}
  1358  }
  1359  func rewriteValue_OpNeq64(v *ssa.Value) bool {
  1360  	v_1 := v.Args[1]
  1361  	v_0 := v.Args[0]
  1362  	b := v.Block
  1363  	typ := &b.Func.Config.Types
  1364  	// match: (Neq64 x y)
  1365  	// result: (OrB (Neq32 (Int64Hi x) (Int64Hi y)) (Neq32 (Int64Lo x) (Int64Lo y)))
  1366  	for {
  1367  		x := v_0
  1368  		y := v_1
  1369  		v.Reset(ssaop.OpOrB)
  1370  		v0 := b.NewValue0(v.Pos, ssaop.OpNeq32, typ.Bool)
  1371  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1372  		v1.AddArg(x)
  1373  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1374  		v2.AddArg(y)
  1375  		v0.AddArg2(v1, v2)
  1376  		v3 := b.NewValue0(v.Pos, ssaop.OpNeq32, typ.Bool)
  1377  		v4 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1378  		v4.AddArg(x)
  1379  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1380  		v5.AddArg(y)
  1381  		v3.AddArg2(v4, v5)
  1382  		v.AddArg2(v0, v3)
  1383  		return true
  1384  	}
  1385  }
  1386  func rewriteValue_OpOr32(v *ssa.Value) bool {
  1387  	v_1 := v.Args[1]
  1388  	v_0 := v.Args[0]
  1389  	b := v.Block
  1390  	typ := &b.Func.Config.Types
  1391  	// match: (Or32 <typ.UInt32> (Zeromask (Const32 [c])) y)
  1392  	// cond: c == 0
  1393  	// result: y
  1394  	for {
  1395  		if v.Type != typ.UInt32 {
  1396  			break
  1397  		}
  1398  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1399  			if v_0.Op != ssaop.OpZeromask {
  1400  				continue
  1401  			}
  1402  			v_0_0 := v_0.Args[0]
  1403  			if v_0_0.Op != ssaop.OpConst32 {
  1404  				continue
  1405  			}
  1406  			c := ssa.AuxIntToInt32(v_0_0.AuxInt)
  1407  			y := v_1
  1408  			if !(c == 0) {
  1409  				continue
  1410  			}
  1411  			v.CopyOf(y)
  1412  			return true
  1413  		}
  1414  		break
  1415  	}
  1416  	// match: (Or32 <typ.UInt32> (Zeromask (Const32 [c])) y)
  1417  	// cond: c != 0
  1418  	// result: (Const32 <typ.UInt32> [-1])
  1419  	for {
  1420  		if v.Type != typ.UInt32 {
  1421  			break
  1422  		}
  1423  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1424  			if v_0.Op != ssaop.OpZeromask {
  1425  				continue
  1426  			}
  1427  			v_0_0 := v_0.Args[0]
  1428  			if v_0_0.Op != ssaop.OpConst32 {
  1429  				continue
  1430  			}
  1431  			c := ssa.AuxIntToInt32(v_0_0.AuxInt)
  1432  			if !(c != 0) {
  1433  				continue
  1434  			}
  1435  			v.Reset(ssaop.OpConst32)
  1436  			v.Type = typ.UInt32
  1437  			v.AuxInt = ssa.Int32ToAuxInt(-1)
  1438  			return true
  1439  		}
  1440  		break
  1441  	}
  1442  	return false
  1443  }
  1444  func rewriteValue_OpOr64(v *ssa.Value) bool {
  1445  	v_1 := v.Args[1]
  1446  	v_0 := v.Args[0]
  1447  	b := v.Block
  1448  	typ := &b.Func.Config.Types
  1449  	// match: (Or64 x y)
  1450  	// result: (Int64Make (Or32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (Or32 <typ.UInt32> (Int64Lo x) (Int64Lo y)))
  1451  	for {
  1452  		x := v_0
  1453  		y := v_1
  1454  		v.Reset(ssaop.OpInt64Make)
  1455  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1456  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1457  		v1.AddArg(x)
  1458  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1459  		v2.AddArg(y)
  1460  		v0.AddArg2(v1, v2)
  1461  		v3 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1462  		v4 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1463  		v4.AddArg(x)
  1464  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1465  		v5.AddArg(y)
  1466  		v3.AddArg2(v4, v5)
  1467  		v.AddArg2(v0, v3)
  1468  		return true
  1469  	}
  1470  }
  1471  func rewriteValue_OpRotateLeft16(v *ssa.Value) bool {
  1472  	v_1 := v.Args[1]
  1473  	v_0 := v.Args[0]
  1474  	// match: (RotateLeft16 x (Int64Make hi lo))
  1475  	// result: (RotateLeft16 x lo)
  1476  	for {
  1477  		x := v_0
  1478  		if v_1.Op != ssaop.OpInt64Make {
  1479  			break
  1480  		}
  1481  		lo := v_1.Args[1]
  1482  		v.Reset(ssaop.OpRotateLeft16)
  1483  		v.AddArg2(x, lo)
  1484  		return true
  1485  	}
  1486  	return false
  1487  }
  1488  func rewriteValue_OpRotateLeft32(v *ssa.Value) bool {
  1489  	v_1 := v.Args[1]
  1490  	v_0 := v.Args[0]
  1491  	// match: (RotateLeft32 x (Int64Make hi lo))
  1492  	// result: (RotateLeft32 x lo)
  1493  	for {
  1494  		x := v_0
  1495  		if v_1.Op != ssaop.OpInt64Make {
  1496  			break
  1497  		}
  1498  		lo := v_1.Args[1]
  1499  		v.Reset(ssaop.OpRotateLeft32)
  1500  		v.AddArg2(x, lo)
  1501  		return true
  1502  	}
  1503  	return false
  1504  }
  1505  func rewriteValue_OpRotateLeft64(v *ssa.Value) bool {
  1506  	v_1 := v.Args[1]
  1507  	v_0 := v.Args[0]
  1508  	b := v.Block
  1509  	typ := &b.Func.Config.Types
  1510  	// match: (RotateLeft64 x (Int64Make hi lo))
  1511  	// result: (RotateLeft64 x lo)
  1512  	for {
  1513  		x := v_0
  1514  		if v_1.Op != ssaop.OpInt64Make {
  1515  			break
  1516  		}
  1517  		lo := v_1.Args[1]
  1518  		v.Reset(ssaop.OpRotateLeft64)
  1519  		v.AddArg2(x, lo)
  1520  		return true
  1521  	}
  1522  	// match: (RotateLeft64 <t> x (Const64 [c]))
  1523  	// cond: c&63 == 0
  1524  	// result: x
  1525  	for {
  1526  		x := v_0
  1527  		if v_1.Op != ssaop.OpConst64 {
  1528  			break
  1529  		}
  1530  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  1531  		if !(c&63 == 0) {
  1532  			break
  1533  		}
  1534  		v.CopyOf(x)
  1535  		return true
  1536  	}
  1537  	// match: (RotateLeft64 <t> x (Const32 [c]))
  1538  	// cond: c&63 == 0
  1539  	// result: x
  1540  	for {
  1541  		x := v_0
  1542  		if v_1.Op != ssaop.OpConst32 {
  1543  			break
  1544  		}
  1545  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  1546  		if !(c&63 == 0) {
  1547  			break
  1548  		}
  1549  		v.CopyOf(x)
  1550  		return true
  1551  	}
  1552  	// match: (RotateLeft64 <t> x (Const16 [c]))
  1553  	// cond: c&63 == 0
  1554  	// result: x
  1555  	for {
  1556  		x := v_0
  1557  		if v_1.Op != ssaop.OpConst16 {
  1558  			break
  1559  		}
  1560  		c := ssa.AuxIntToInt16(v_1.AuxInt)
  1561  		if !(c&63 == 0) {
  1562  			break
  1563  		}
  1564  		v.CopyOf(x)
  1565  		return true
  1566  	}
  1567  	// match: (RotateLeft64 <t> x (Const8 [c]))
  1568  	// cond: c&63 == 0
  1569  	// result: x
  1570  	for {
  1571  		x := v_0
  1572  		if v_1.Op != ssaop.OpConst8 {
  1573  			break
  1574  		}
  1575  		c := ssa.AuxIntToInt8(v_1.AuxInt)
  1576  		if !(c&63 == 0) {
  1577  			break
  1578  		}
  1579  		v.CopyOf(x)
  1580  		return true
  1581  	}
  1582  	// match: (RotateLeft64 <t> x (Const64 [c]))
  1583  	// cond: c&63 == 32
  1584  	// result: (Int64Make <t> (Int64Lo x) (Int64Hi x))
  1585  	for {
  1586  		t := v.Type
  1587  		x := v_0
  1588  		if v_1.Op != ssaop.OpConst64 {
  1589  			break
  1590  		}
  1591  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  1592  		if !(c&63 == 32) {
  1593  			break
  1594  		}
  1595  		v.Reset(ssaop.OpInt64Make)
  1596  		v.Type = t
  1597  		v0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1598  		v0.AddArg(x)
  1599  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1600  		v1.AddArg(x)
  1601  		v.AddArg2(v0, v1)
  1602  		return true
  1603  	}
  1604  	// match: (RotateLeft64 <t> x (Const32 [c]))
  1605  	// cond: c&63 == 32
  1606  	// result: (Int64Make <t> (Int64Lo x) (Int64Hi x))
  1607  	for {
  1608  		t := v.Type
  1609  		x := v_0
  1610  		if v_1.Op != ssaop.OpConst32 {
  1611  			break
  1612  		}
  1613  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  1614  		if !(c&63 == 32) {
  1615  			break
  1616  		}
  1617  		v.Reset(ssaop.OpInt64Make)
  1618  		v.Type = t
  1619  		v0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1620  		v0.AddArg(x)
  1621  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1622  		v1.AddArg(x)
  1623  		v.AddArg2(v0, v1)
  1624  		return true
  1625  	}
  1626  	// match: (RotateLeft64 <t> x (Const16 [c]))
  1627  	// cond: c&63 == 32
  1628  	// result: (Int64Make <t> (Int64Lo x) (Int64Hi x))
  1629  	for {
  1630  		t := v.Type
  1631  		x := v_0
  1632  		if v_1.Op != ssaop.OpConst16 {
  1633  			break
  1634  		}
  1635  		c := ssa.AuxIntToInt16(v_1.AuxInt)
  1636  		if !(c&63 == 32) {
  1637  			break
  1638  		}
  1639  		v.Reset(ssaop.OpInt64Make)
  1640  		v.Type = t
  1641  		v0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1642  		v0.AddArg(x)
  1643  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1644  		v1.AddArg(x)
  1645  		v.AddArg2(v0, v1)
  1646  		return true
  1647  	}
  1648  	// match: (RotateLeft64 <t> x (Const8 [c]))
  1649  	// cond: c&63 == 32
  1650  	// result: (Int64Make <t> (Int64Lo x) (Int64Hi x))
  1651  	for {
  1652  		t := v.Type
  1653  		x := v_0
  1654  		if v_1.Op != ssaop.OpConst8 {
  1655  			break
  1656  		}
  1657  		c := ssa.AuxIntToInt8(v_1.AuxInt)
  1658  		if !(c&63 == 32) {
  1659  			break
  1660  		}
  1661  		v.Reset(ssaop.OpInt64Make)
  1662  		v.Type = t
  1663  		v0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1664  		v0.AddArg(x)
  1665  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1666  		v1.AddArg(x)
  1667  		v.AddArg2(v0, v1)
  1668  		return true
  1669  	}
  1670  	// match: (RotateLeft64 <t> x (Const64 [c]))
  1671  	// cond: 0 < c&63 && c&63 < 32
  1672  	// result: (Int64Make <t> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(32-c&31)]))) (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(32-c&31)]))))
  1673  	for {
  1674  		t := v.Type
  1675  		x := v_0
  1676  		if v_1.Op != ssaop.OpConst64 {
  1677  			break
  1678  		}
  1679  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  1680  		if !(0 < c&63 && c&63 < 32) {
  1681  			break
  1682  		}
  1683  		v.Reset(ssaop.OpInt64Make)
  1684  		v.Type = t
  1685  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1686  		v1 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1687  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1688  		v2.AddArg(x)
  1689  		v3 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1690  		v3.AuxInt = ssa.Int32ToAuxInt(int32(c & 31))
  1691  		v1.AddArg2(v2, v3)
  1692  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1693  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1694  		v5.AddArg(x)
  1695  		v6 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1696  		v6.AuxInt = ssa.Int32ToAuxInt(int32(32 - c&31))
  1697  		v4.AddArg2(v5, v6)
  1698  		v0.AddArg2(v1, v4)
  1699  		v7 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1700  		v8 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1701  		v8.AddArg2(v5, v3)
  1702  		v9 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1703  		v9.AddArg2(v2, v6)
  1704  		v7.AddArg2(v8, v9)
  1705  		v.AddArg2(v0, v7)
  1706  		return true
  1707  	}
  1708  	// match: (RotateLeft64 <t> x (Const32 [c]))
  1709  	// cond: 0 < c&63 && c&63 < 32
  1710  	// result: (Int64Make <t> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(32-c&31)]))) (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(32-c&31)]))))
  1711  	for {
  1712  		t := v.Type
  1713  		x := v_0
  1714  		if v_1.Op != ssaop.OpConst32 {
  1715  			break
  1716  		}
  1717  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  1718  		if !(0 < c&63 && c&63 < 32) {
  1719  			break
  1720  		}
  1721  		v.Reset(ssaop.OpInt64Make)
  1722  		v.Type = t
  1723  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1724  		v1 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1725  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1726  		v2.AddArg(x)
  1727  		v3 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1728  		v3.AuxInt = ssa.Int32ToAuxInt(int32(c & 31))
  1729  		v1.AddArg2(v2, v3)
  1730  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1731  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1732  		v5.AddArg(x)
  1733  		v6 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1734  		v6.AuxInt = ssa.Int32ToAuxInt(int32(32 - c&31))
  1735  		v4.AddArg2(v5, v6)
  1736  		v0.AddArg2(v1, v4)
  1737  		v7 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1738  		v8 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1739  		v8.AddArg2(v5, v3)
  1740  		v9 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1741  		v9.AddArg2(v2, v6)
  1742  		v7.AddArg2(v8, v9)
  1743  		v.AddArg2(v0, v7)
  1744  		return true
  1745  	}
  1746  	// match: (RotateLeft64 <t> x (Const16 [c]))
  1747  	// cond: 0 < c&63 && c&63 < 32
  1748  	// result: (Int64Make <t> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(32-c&31)]))) (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(32-c&31)]))))
  1749  	for {
  1750  		t := v.Type
  1751  		x := v_0
  1752  		if v_1.Op != ssaop.OpConst16 {
  1753  			break
  1754  		}
  1755  		c := ssa.AuxIntToInt16(v_1.AuxInt)
  1756  		if !(0 < c&63 && c&63 < 32) {
  1757  			break
  1758  		}
  1759  		v.Reset(ssaop.OpInt64Make)
  1760  		v.Type = t
  1761  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1762  		v1 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1763  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1764  		v2.AddArg(x)
  1765  		v3 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1766  		v3.AuxInt = ssa.Int32ToAuxInt(int32(c & 31))
  1767  		v1.AddArg2(v2, v3)
  1768  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1769  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1770  		v5.AddArg(x)
  1771  		v6 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1772  		v6.AuxInt = ssa.Int32ToAuxInt(int32(32 - c&31))
  1773  		v4.AddArg2(v5, v6)
  1774  		v0.AddArg2(v1, v4)
  1775  		v7 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1776  		v8 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1777  		v8.AddArg2(v5, v3)
  1778  		v9 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1779  		v9.AddArg2(v2, v6)
  1780  		v7.AddArg2(v8, v9)
  1781  		v.AddArg2(v0, v7)
  1782  		return true
  1783  	}
  1784  	// match: (RotateLeft64 <t> x (Const8 [c]))
  1785  	// cond: 0 < c&63 && c&63 < 32
  1786  	// result: (Int64Make <t> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(32-c&31)]))) (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(32-c&31)]))))
  1787  	for {
  1788  		t := v.Type
  1789  		x := v_0
  1790  		if v_1.Op != ssaop.OpConst8 {
  1791  			break
  1792  		}
  1793  		c := ssa.AuxIntToInt8(v_1.AuxInt)
  1794  		if !(0 < c&63 && c&63 < 32) {
  1795  			break
  1796  		}
  1797  		v.Reset(ssaop.OpInt64Make)
  1798  		v.Type = t
  1799  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1800  		v1 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1801  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1802  		v2.AddArg(x)
  1803  		v3 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1804  		v3.AuxInt = ssa.Int32ToAuxInt(int32(c & 31))
  1805  		v1.AddArg2(v2, v3)
  1806  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1807  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1808  		v5.AddArg(x)
  1809  		v6 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1810  		v6.AuxInt = ssa.Int32ToAuxInt(int32(32 - c&31))
  1811  		v4.AddArg2(v5, v6)
  1812  		v0.AddArg2(v1, v4)
  1813  		v7 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1814  		v8 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1815  		v8.AddArg2(v5, v3)
  1816  		v9 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1817  		v9.AddArg2(v2, v6)
  1818  		v7.AddArg2(v8, v9)
  1819  		v.AddArg2(v0, v7)
  1820  		return true
  1821  	}
  1822  	// match: (RotateLeft64 <t> x (Const64 [c]))
  1823  	// cond: 32 < c&63 && c&63 < 64
  1824  	// result: (Int64Make <t> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(32-c&31)]))) (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(32-c&31)]))))
  1825  	for {
  1826  		t := v.Type
  1827  		x := v_0
  1828  		if v_1.Op != ssaop.OpConst64 {
  1829  			break
  1830  		}
  1831  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  1832  		if !(32 < c&63 && c&63 < 64) {
  1833  			break
  1834  		}
  1835  		v.Reset(ssaop.OpInt64Make)
  1836  		v.Type = t
  1837  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1838  		v1 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1839  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1840  		v2.AddArg(x)
  1841  		v3 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1842  		v3.AuxInt = ssa.Int32ToAuxInt(int32(c & 31))
  1843  		v1.AddArg2(v2, v3)
  1844  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1845  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1846  		v5.AddArg(x)
  1847  		v6 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1848  		v6.AuxInt = ssa.Int32ToAuxInt(int32(32 - c&31))
  1849  		v4.AddArg2(v5, v6)
  1850  		v0.AddArg2(v1, v4)
  1851  		v7 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1852  		v8 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1853  		v8.AddArg2(v5, v3)
  1854  		v9 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1855  		v9.AddArg2(v2, v6)
  1856  		v7.AddArg2(v8, v9)
  1857  		v.AddArg2(v0, v7)
  1858  		return true
  1859  	}
  1860  	// match: (RotateLeft64 <t> x (Const32 [c]))
  1861  	// cond: 32 < c&63 && c&63 < 64
  1862  	// result: (Int64Make <t> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(32-c&31)]))) (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(32-c&31)]))))
  1863  	for {
  1864  		t := v.Type
  1865  		x := v_0
  1866  		if v_1.Op != ssaop.OpConst32 {
  1867  			break
  1868  		}
  1869  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  1870  		if !(32 < c&63 && c&63 < 64) {
  1871  			break
  1872  		}
  1873  		v.Reset(ssaop.OpInt64Make)
  1874  		v.Type = t
  1875  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1876  		v1 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1877  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1878  		v2.AddArg(x)
  1879  		v3 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1880  		v3.AuxInt = ssa.Int32ToAuxInt(int32(c & 31))
  1881  		v1.AddArg2(v2, v3)
  1882  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1883  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1884  		v5.AddArg(x)
  1885  		v6 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1886  		v6.AuxInt = ssa.Int32ToAuxInt(int32(32 - c&31))
  1887  		v4.AddArg2(v5, v6)
  1888  		v0.AddArg2(v1, v4)
  1889  		v7 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1890  		v8 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1891  		v8.AddArg2(v5, v3)
  1892  		v9 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1893  		v9.AddArg2(v2, v6)
  1894  		v7.AddArg2(v8, v9)
  1895  		v.AddArg2(v0, v7)
  1896  		return true
  1897  	}
  1898  	// match: (RotateLeft64 <t> x (Const16 [c]))
  1899  	// cond: 32 < c&63 && c&63 < 64
  1900  	// result: (Int64Make <t> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(32-c&31)]))) (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(32-c&31)]))))
  1901  	for {
  1902  		t := v.Type
  1903  		x := v_0
  1904  		if v_1.Op != ssaop.OpConst16 {
  1905  			break
  1906  		}
  1907  		c := ssa.AuxIntToInt16(v_1.AuxInt)
  1908  		if !(32 < c&63 && c&63 < 64) {
  1909  			break
  1910  		}
  1911  		v.Reset(ssaop.OpInt64Make)
  1912  		v.Type = t
  1913  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1914  		v1 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1915  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1916  		v2.AddArg(x)
  1917  		v3 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1918  		v3.AuxInt = ssa.Int32ToAuxInt(int32(c & 31))
  1919  		v1.AddArg2(v2, v3)
  1920  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1921  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1922  		v5.AddArg(x)
  1923  		v6 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1924  		v6.AuxInt = ssa.Int32ToAuxInt(int32(32 - c&31))
  1925  		v4.AddArg2(v5, v6)
  1926  		v0.AddArg2(v1, v4)
  1927  		v7 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1928  		v8 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1929  		v8.AddArg2(v5, v3)
  1930  		v9 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1931  		v9.AddArg2(v2, v6)
  1932  		v7.AddArg2(v8, v9)
  1933  		v.AddArg2(v0, v7)
  1934  		return true
  1935  	}
  1936  	// match: (RotateLeft64 <t> x (Const8 [c]))
  1937  	// cond: 32 < c&63 && c&63 < 64
  1938  	// result: (Int64Make <t> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(32-c&31)]))) (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> (Int64Hi x) (Const32 <typ.UInt32> [int32(c&31)])) (Rsh32Ux32 <typ.UInt32> (Int64Lo x) (Const32 <typ.UInt32> [int32(32-c&31)]))))
  1939  	for {
  1940  		t := v.Type
  1941  		x := v_0
  1942  		if v_1.Op != ssaop.OpConst8 {
  1943  			break
  1944  		}
  1945  		c := ssa.AuxIntToInt8(v_1.AuxInt)
  1946  		if !(32 < c&63 && c&63 < 64) {
  1947  			break
  1948  		}
  1949  		v.Reset(ssaop.OpInt64Make)
  1950  		v.Type = t
  1951  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1952  		v1 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1953  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  1954  		v2.AddArg(x)
  1955  		v3 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1956  		v3.AuxInt = ssa.Int32ToAuxInt(int32(c & 31))
  1957  		v1.AddArg2(v2, v3)
  1958  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1959  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  1960  		v5.AddArg(x)
  1961  		v6 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  1962  		v6.AuxInt = ssa.Int32ToAuxInt(int32(32 - c&31))
  1963  		v4.AddArg2(v5, v6)
  1964  		v0.AddArg2(v1, v4)
  1965  		v7 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  1966  		v8 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  1967  		v8.AddArg2(v5, v3)
  1968  		v9 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  1969  		v9.AddArg2(v2, v6)
  1970  		v7.AddArg2(v8, v9)
  1971  		v.AddArg2(v0, v7)
  1972  		return true
  1973  	}
  1974  	return false
  1975  }
  1976  func rewriteValue_OpRotateLeft8(v *ssa.Value) bool {
  1977  	v_1 := v.Args[1]
  1978  	v_0 := v.Args[0]
  1979  	// match: (RotateLeft8 x (Int64Make hi lo))
  1980  	// result: (RotateLeft8 x lo)
  1981  	for {
  1982  		x := v_0
  1983  		if v_1.Op != ssaop.OpInt64Make {
  1984  			break
  1985  		}
  1986  		lo := v_1.Args[1]
  1987  		v.Reset(ssaop.OpRotateLeft8)
  1988  		v.AddArg2(x, lo)
  1989  		return true
  1990  	}
  1991  	return false
  1992  }
  1993  func rewriteValue_OpRsh16Ux64(v *ssa.Value) bool {
  1994  	v_1 := v.Args[1]
  1995  	v_0 := v.Args[0]
  1996  	b := v.Block
  1997  	typ := &b.Func.Config.Types
  1998  	// match: (Rsh16Ux64 _ (Int64Make (Const32 [c]) _))
  1999  	// cond: c != 0
  2000  	// result: (Const32 [0])
  2001  	for {
  2002  		if v_1.Op != ssaop.OpInt64Make {
  2003  			break
  2004  		}
  2005  		v_1_0 := v_1.Args[0]
  2006  		if v_1_0.Op != ssaop.OpConst32 {
  2007  			break
  2008  		}
  2009  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
  2010  		if !(c != 0) {
  2011  			break
  2012  		}
  2013  		v.Reset(ssaop.OpConst32)
  2014  		v.AuxInt = ssa.Int32ToAuxInt(0)
  2015  		return true
  2016  	}
  2017  	// match: (Rsh16Ux64 [c] x (Int64Make (Const32 [0]) lo))
  2018  	// result: (Rsh16Ux32 [c] x lo)
  2019  	for {
  2020  		c := ssa.AuxIntToBool(v.AuxInt)
  2021  		x := v_0
  2022  		if v_1.Op != ssaop.OpInt64Make {
  2023  			break
  2024  		}
  2025  		lo := v_1.Args[1]
  2026  		v_1_0 := v_1.Args[0]
  2027  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
  2028  			break
  2029  		}
  2030  		v.Reset(ssaop.OpRsh16Ux32)
  2031  		v.AuxInt = ssa.BoolToAuxInt(c)
  2032  		v.AddArg2(x, lo)
  2033  		return true
  2034  	}
  2035  	// match: (Rsh16Ux64 x (Int64Make hi lo))
  2036  	// cond: hi.Op != ssaop.OpConst32
  2037  	// result: (Rsh16Ux32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
  2038  	for {
  2039  		x := v_0
  2040  		if v_1.Op != ssaop.OpInt64Make {
  2041  			break
  2042  		}
  2043  		lo := v_1.Args[1]
  2044  		hi := v_1.Args[0]
  2045  		if !(hi.Op != ssaop.OpConst32) {
  2046  			break
  2047  		}
  2048  		v.Reset(ssaop.OpRsh16Ux32)
  2049  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2050  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2051  		v1.AddArg(hi)
  2052  		v0.AddArg2(v1, lo)
  2053  		v.AddArg2(x, v0)
  2054  		return true
  2055  	}
  2056  	// match: (Rsh16Ux64 x y)
  2057  	// result: (Rsh16Ux32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
  2058  	for {
  2059  		x := v_0
  2060  		y := v_1
  2061  		v.Reset(ssaop.OpRsh16Ux32)
  2062  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2063  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2064  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2065  		v2.AddArg(y)
  2066  		v1.AddArg(v2)
  2067  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2068  		v3.AddArg(y)
  2069  		v0.AddArg2(v1, v3)
  2070  		v.AddArg2(x, v0)
  2071  		return true
  2072  	}
  2073  }
  2074  func rewriteValue_OpRsh16x64(v *ssa.Value) bool {
  2075  	v_1 := v.Args[1]
  2076  	v_0 := v.Args[0]
  2077  	b := v.Block
  2078  	typ := &b.Func.Config.Types
  2079  	// match: (Rsh16x64 x (Int64Make (Const32 [c]) _))
  2080  	// cond: c != 0
  2081  	// result: (Signmask (SignExt16to32 x))
  2082  	for {
  2083  		x := v_0
  2084  		if v_1.Op != ssaop.OpInt64Make {
  2085  			break
  2086  		}
  2087  		v_1_0 := v_1.Args[0]
  2088  		if v_1_0.Op != ssaop.OpConst32 {
  2089  			break
  2090  		}
  2091  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
  2092  		if !(c != 0) {
  2093  			break
  2094  		}
  2095  		v.Reset(ssaop.OpSignmask)
  2096  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  2097  		v0.AddArg(x)
  2098  		v.AddArg(v0)
  2099  		return true
  2100  	}
  2101  	// match: (Rsh16x64 [c] x (Int64Make (Const32 [0]) lo))
  2102  	// result: (Rsh16x32 [c] x lo)
  2103  	for {
  2104  		c := ssa.AuxIntToBool(v.AuxInt)
  2105  		x := v_0
  2106  		if v_1.Op != ssaop.OpInt64Make {
  2107  			break
  2108  		}
  2109  		lo := v_1.Args[1]
  2110  		v_1_0 := v_1.Args[0]
  2111  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
  2112  			break
  2113  		}
  2114  		v.Reset(ssaop.OpRsh16x32)
  2115  		v.AuxInt = ssa.BoolToAuxInt(c)
  2116  		v.AddArg2(x, lo)
  2117  		return true
  2118  	}
  2119  	// match: (Rsh16x64 x (Int64Make hi lo))
  2120  	// cond: hi.Op != ssaop.OpConst32
  2121  	// result: (Rsh16x32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
  2122  	for {
  2123  		x := v_0
  2124  		if v_1.Op != ssaop.OpInt64Make {
  2125  			break
  2126  		}
  2127  		lo := v_1.Args[1]
  2128  		hi := v_1.Args[0]
  2129  		if !(hi.Op != ssaop.OpConst32) {
  2130  			break
  2131  		}
  2132  		v.Reset(ssaop.OpRsh16x32)
  2133  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2134  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2135  		v1.AddArg(hi)
  2136  		v0.AddArg2(v1, lo)
  2137  		v.AddArg2(x, v0)
  2138  		return true
  2139  	}
  2140  	// match: (Rsh16x64 x y)
  2141  	// result: (Rsh16x32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
  2142  	for {
  2143  		x := v_0
  2144  		y := v_1
  2145  		v.Reset(ssaop.OpRsh16x32)
  2146  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2147  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2148  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2149  		v2.AddArg(y)
  2150  		v1.AddArg(v2)
  2151  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2152  		v3.AddArg(y)
  2153  		v0.AddArg2(v1, v3)
  2154  		v.AddArg2(x, v0)
  2155  		return true
  2156  	}
  2157  }
  2158  func rewriteValue_OpRsh32Ux64(v *ssa.Value) bool {
  2159  	v_1 := v.Args[1]
  2160  	v_0 := v.Args[0]
  2161  	b := v.Block
  2162  	typ := &b.Func.Config.Types
  2163  	// match: (Rsh32Ux64 _ (Int64Make (Const32 [c]) _))
  2164  	// cond: c != 0
  2165  	// result: (Const32 [0])
  2166  	for {
  2167  		if v_1.Op != ssaop.OpInt64Make {
  2168  			break
  2169  		}
  2170  		v_1_0 := v_1.Args[0]
  2171  		if v_1_0.Op != ssaop.OpConst32 {
  2172  			break
  2173  		}
  2174  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
  2175  		if !(c != 0) {
  2176  			break
  2177  		}
  2178  		v.Reset(ssaop.OpConst32)
  2179  		v.AuxInt = ssa.Int32ToAuxInt(0)
  2180  		return true
  2181  	}
  2182  	// match: (Rsh32Ux64 [c] x (Int64Make (Const32 [0]) lo))
  2183  	// result: (Rsh32Ux32 [c] x lo)
  2184  	for {
  2185  		c := ssa.AuxIntToBool(v.AuxInt)
  2186  		x := v_0
  2187  		if v_1.Op != ssaop.OpInt64Make {
  2188  			break
  2189  		}
  2190  		lo := v_1.Args[1]
  2191  		v_1_0 := v_1.Args[0]
  2192  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
  2193  			break
  2194  		}
  2195  		v.Reset(ssaop.OpRsh32Ux32)
  2196  		v.AuxInt = ssa.BoolToAuxInt(c)
  2197  		v.AddArg2(x, lo)
  2198  		return true
  2199  	}
  2200  	// match: (Rsh32Ux64 x (Int64Make hi lo))
  2201  	// cond: hi.Op != ssaop.OpConst32
  2202  	// result: (Rsh32Ux32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
  2203  	for {
  2204  		x := v_0
  2205  		if v_1.Op != ssaop.OpInt64Make {
  2206  			break
  2207  		}
  2208  		lo := v_1.Args[1]
  2209  		hi := v_1.Args[0]
  2210  		if !(hi.Op != ssaop.OpConst32) {
  2211  			break
  2212  		}
  2213  		v.Reset(ssaop.OpRsh32Ux32)
  2214  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2215  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2216  		v1.AddArg(hi)
  2217  		v0.AddArg2(v1, lo)
  2218  		v.AddArg2(x, v0)
  2219  		return true
  2220  	}
  2221  	// match: (Rsh32Ux64 x y)
  2222  	// result: (Rsh32Ux32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
  2223  	for {
  2224  		x := v_0
  2225  		y := v_1
  2226  		v.Reset(ssaop.OpRsh32Ux32)
  2227  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2228  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2229  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2230  		v2.AddArg(y)
  2231  		v1.AddArg(v2)
  2232  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2233  		v3.AddArg(y)
  2234  		v0.AddArg2(v1, v3)
  2235  		v.AddArg2(x, v0)
  2236  		return true
  2237  	}
  2238  }
  2239  func rewriteValue_OpRsh32x64(v *ssa.Value) bool {
  2240  	v_1 := v.Args[1]
  2241  	v_0 := v.Args[0]
  2242  	b := v.Block
  2243  	typ := &b.Func.Config.Types
  2244  	// match: (Rsh32x64 x (Int64Make (Const32 [c]) _))
  2245  	// cond: c != 0
  2246  	// result: (Signmask x)
  2247  	for {
  2248  		x := v_0
  2249  		if v_1.Op != ssaop.OpInt64Make {
  2250  			break
  2251  		}
  2252  		v_1_0 := v_1.Args[0]
  2253  		if v_1_0.Op != ssaop.OpConst32 {
  2254  			break
  2255  		}
  2256  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
  2257  		if !(c != 0) {
  2258  			break
  2259  		}
  2260  		v.Reset(ssaop.OpSignmask)
  2261  		v.AddArg(x)
  2262  		return true
  2263  	}
  2264  	// match: (Rsh32x64 [c] x (Int64Make (Const32 [0]) lo))
  2265  	// result: (Rsh32x32 [c] x lo)
  2266  	for {
  2267  		c := ssa.AuxIntToBool(v.AuxInt)
  2268  		x := v_0
  2269  		if v_1.Op != ssaop.OpInt64Make {
  2270  			break
  2271  		}
  2272  		lo := v_1.Args[1]
  2273  		v_1_0 := v_1.Args[0]
  2274  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
  2275  			break
  2276  		}
  2277  		v.Reset(ssaop.OpRsh32x32)
  2278  		v.AuxInt = ssa.BoolToAuxInt(c)
  2279  		v.AddArg2(x, lo)
  2280  		return true
  2281  	}
  2282  	// match: (Rsh32x64 x (Int64Make hi lo))
  2283  	// cond: hi.Op != ssaop.OpConst32
  2284  	// result: (Rsh32x32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
  2285  	for {
  2286  		x := v_0
  2287  		if v_1.Op != ssaop.OpInt64Make {
  2288  			break
  2289  		}
  2290  		lo := v_1.Args[1]
  2291  		hi := v_1.Args[0]
  2292  		if !(hi.Op != ssaop.OpConst32) {
  2293  			break
  2294  		}
  2295  		v.Reset(ssaop.OpRsh32x32)
  2296  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2297  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2298  		v1.AddArg(hi)
  2299  		v0.AddArg2(v1, lo)
  2300  		v.AddArg2(x, v0)
  2301  		return true
  2302  	}
  2303  	// match: (Rsh32x64 x y)
  2304  	// result: (Rsh32x32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
  2305  	for {
  2306  		x := v_0
  2307  		y := v_1
  2308  		v.Reset(ssaop.OpRsh32x32)
  2309  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2310  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2311  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2312  		v2.AddArg(y)
  2313  		v1.AddArg(v2)
  2314  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2315  		v3.AddArg(y)
  2316  		v0.AddArg2(v1, v3)
  2317  		v.AddArg2(x, v0)
  2318  		return true
  2319  	}
  2320  }
  2321  func rewriteValue_OpRsh64Ux16(v *ssa.Value) bool {
  2322  	v_1 := v.Args[1]
  2323  	v_0 := v.Args[0]
  2324  	b := v.Block
  2325  	typ := &b.Func.Config.Types
  2326  	// match: (Rsh64Ux16 x s)
  2327  	// result: (Int64Make (Rsh32Ux16 <typ.UInt32> (Int64Hi x) s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux16 <typ.UInt32> (Int64Lo x) s) (Lsh32x16 <typ.UInt32> (Int64Hi x) (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (Rsh32Ux16 <typ.UInt32> (Int64Hi x) (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32])))))
  2328  	for {
  2329  		x := v_0
  2330  		s := v_1
  2331  		v.Reset(ssaop.OpInt64Make)
  2332  		v0 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux16, typ.UInt32)
  2333  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2334  		v1.AddArg(x)
  2335  		v0.AddArg2(v1, s)
  2336  		v2 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2337  		v3 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2338  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux16, typ.UInt32)
  2339  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2340  		v5.AddArg(x)
  2341  		v4.AddArg2(v5, s)
  2342  		v6 := b.NewValue0(v.Pos, ssaop.OpLsh32x16, typ.UInt32)
  2343  		v7 := b.NewValue0(v.Pos, ssaop.OpSub16, typ.UInt16)
  2344  		v8 := b.NewValue0(v.Pos, ssaop.OpConst16, typ.UInt16)
  2345  		v8.AuxInt = ssa.Int16ToAuxInt(32)
  2346  		v7.AddArg2(v8, s)
  2347  		v6.AddArg2(v1, v7)
  2348  		v3.AddArg2(v4, v6)
  2349  		v9 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux16, typ.UInt32)
  2350  		v10 := b.NewValue0(v.Pos, ssaop.OpSub16, typ.UInt16)
  2351  		v10.AddArg2(s, v8)
  2352  		v9.AddArg2(v1, v10)
  2353  		v2.AddArg2(v3, v9)
  2354  		v.AddArg2(v0, v2)
  2355  		return true
  2356  	}
  2357  }
  2358  func rewriteValue_OpRsh64Ux32(v *ssa.Value) bool {
  2359  	v_1 := v.Args[1]
  2360  	v_0 := v.Args[0]
  2361  	b := v.Block
  2362  	typ := &b.Func.Config.Types
  2363  	// match: (Rsh64Ux32 x s)
  2364  	// result: (Int64Make (Rsh32Ux32 <typ.UInt32> (Int64Hi x) s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux32 <typ.UInt32> (Int64Lo x) s) (Lsh32x32 <typ.UInt32> (Int64Hi x) (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (Rsh32Ux32 <typ.UInt32> (Int64Hi x) (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32])))))
  2365  	for {
  2366  		x := v_0
  2367  		s := v_1
  2368  		v.Reset(ssaop.OpInt64Make)
  2369  		v0 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  2370  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2371  		v1.AddArg(x)
  2372  		v0.AddArg2(v1, s)
  2373  		v2 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2374  		v3 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2375  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  2376  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2377  		v5.AddArg(x)
  2378  		v4.AddArg2(v5, s)
  2379  		v6 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  2380  		v7 := b.NewValue0(v.Pos, ssaop.OpSub32, typ.UInt32)
  2381  		v8 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  2382  		v8.AuxInt = ssa.Int32ToAuxInt(32)
  2383  		v7.AddArg2(v8, s)
  2384  		v6.AddArg2(v1, v7)
  2385  		v3.AddArg2(v4, v6)
  2386  		v9 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  2387  		v10 := b.NewValue0(v.Pos, ssaop.OpSub32, typ.UInt32)
  2388  		v10.AddArg2(s, v8)
  2389  		v9.AddArg2(v1, v10)
  2390  		v2.AddArg2(v3, v9)
  2391  		v.AddArg2(v0, v2)
  2392  		return true
  2393  	}
  2394  }
  2395  func rewriteValue_OpRsh64Ux64(v *ssa.Value) bool {
  2396  	v_1 := v.Args[1]
  2397  	v_0 := v.Args[0]
  2398  	b := v.Block
  2399  	typ := &b.Func.Config.Types
  2400  	// match: (Rsh64Ux64 _ (Int64Make (Const32 [c]) _))
  2401  	// cond: c != 0
  2402  	// result: (Const64 [0])
  2403  	for {
  2404  		if v_1.Op != ssaop.OpInt64Make {
  2405  			break
  2406  		}
  2407  		v_1_0 := v_1.Args[0]
  2408  		if v_1_0.Op != ssaop.OpConst32 {
  2409  			break
  2410  		}
  2411  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
  2412  		if !(c != 0) {
  2413  			break
  2414  		}
  2415  		v.Reset(ssaop.OpConst64)
  2416  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2417  		return true
  2418  	}
  2419  	// match: (Rsh64Ux64 [c] x (Int64Make (Const32 [0]) lo))
  2420  	// result: (Rsh64Ux32 [c] x lo)
  2421  	for {
  2422  		c := ssa.AuxIntToBool(v.AuxInt)
  2423  		x := v_0
  2424  		if v_1.Op != ssaop.OpInt64Make {
  2425  			break
  2426  		}
  2427  		lo := v_1.Args[1]
  2428  		v_1_0 := v_1.Args[0]
  2429  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
  2430  			break
  2431  		}
  2432  		v.Reset(ssaop.OpRsh64Ux32)
  2433  		v.AuxInt = ssa.BoolToAuxInt(c)
  2434  		v.AddArg2(x, lo)
  2435  		return true
  2436  	}
  2437  	// match: (Rsh64Ux64 x (Int64Make hi lo))
  2438  	// cond: hi.Op != ssaop.OpConst32
  2439  	// result: (Rsh64Ux32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
  2440  	for {
  2441  		x := v_0
  2442  		if v_1.Op != ssaop.OpInt64Make {
  2443  			break
  2444  		}
  2445  		lo := v_1.Args[1]
  2446  		hi := v_1.Args[0]
  2447  		if !(hi.Op != ssaop.OpConst32) {
  2448  			break
  2449  		}
  2450  		v.Reset(ssaop.OpRsh64Ux32)
  2451  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2452  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2453  		v1.AddArg(hi)
  2454  		v0.AddArg2(v1, lo)
  2455  		v.AddArg2(x, v0)
  2456  		return true
  2457  	}
  2458  	// match: (Rsh64Ux64 x y)
  2459  	// result: (Rsh64Ux32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
  2460  	for {
  2461  		x := v_0
  2462  		y := v_1
  2463  		v.Reset(ssaop.OpRsh64Ux32)
  2464  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2465  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2466  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2467  		v2.AddArg(y)
  2468  		v1.AddArg(v2)
  2469  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2470  		v3.AddArg(y)
  2471  		v0.AddArg2(v1, v3)
  2472  		v.AddArg2(x, v0)
  2473  		return true
  2474  	}
  2475  }
  2476  func rewriteValue_OpRsh64Ux8(v *ssa.Value) bool {
  2477  	v_1 := v.Args[1]
  2478  	v_0 := v.Args[0]
  2479  	b := v.Block
  2480  	typ := &b.Func.Config.Types
  2481  	// match: (Rsh64Ux8 x s)
  2482  	// result: (Int64Make (Rsh32Ux8 <typ.UInt32> (Int64Hi x) s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux8 <typ.UInt32> (Int64Lo x) s) (Lsh32x8 <typ.UInt32> (Int64Hi x) (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (Rsh32Ux8 <typ.UInt32> (Int64Hi x) (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32])))))
  2483  	for {
  2484  		x := v_0
  2485  		s := v_1
  2486  		v.Reset(ssaop.OpInt64Make)
  2487  		v0 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux8, typ.UInt32)
  2488  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2489  		v1.AddArg(x)
  2490  		v0.AddArg2(v1, s)
  2491  		v2 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2492  		v3 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2493  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux8, typ.UInt32)
  2494  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2495  		v5.AddArg(x)
  2496  		v4.AddArg2(v5, s)
  2497  		v6 := b.NewValue0(v.Pos, ssaop.OpLsh32x8, typ.UInt32)
  2498  		v7 := b.NewValue0(v.Pos, ssaop.OpSub8, typ.UInt8)
  2499  		v8 := b.NewValue0(v.Pos, ssaop.OpConst8, typ.UInt8)
  2500  		v8.AuxInt = ssa.Int8ToAuxInt(32)
  2501  		v7.AddArg2(v8, s)
  2502  		v6.AddArg2(v1, v7)
  2503  		v3.AddArg2(v4, v6)
  2504  		v9 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux8, typ.UInt32)
  2505  		v10 := b.NewValue0(v.Pos, ssaop.OpSub8, typ.UInt8)
  2506  		v10.AddArg2(s, v8)
  2507  		v9.AddArg2(v1, v10)
  2508  		v2.AddArg2(v3, v9)
  2509  		v.AddArg2(v0, v2)
  2510  		return true
  2511  	}
  2512  }
  2513  func rewriteValue_OpRsh64x16(v *ssa.Value) bool {
  2514  	v_1 := v.Args[1]
  2515  	v_0 := v.Args[0]
  2516  	b := v.Block
  2517  	typ := &b.Func.Config.Types
  2518  	// match: (Rsh64x16 x s)
  2519  	// result: (Int64Make (Rsh32x16 <typ.UInt32> (Int64Hi x) s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux16 <typ.UInt32> (Int64Lo x) s) (Lsh32x16 <typ.UInt32> (Int64Hi x) (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (And32 <typ.UInt32> (Rsh32x16 <typ.UInt32> (Int64Hi x) (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32]))) (Zeromask (ZeroExt16to32 (Rsh16Ux32 <typ.UInt16> s (Const32 <typ.UInt32> [5])))))))
  2520  	for {
  2521  		x := v_0
  2522  		s := v_1
  2523  		v.Reset(ssaop.OpInt64Make)
  2524  		v0 := b.NewValue0(v.Pos, ssaop.OpRsh32x16, typ.UInt32)
  2525  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2526  		v1.AddArg(x)
  2527  		v0.AddArg2(v1, s)
  2528  		v2 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2529  		v3 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2530  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux16, typ.UInt32)
  2531  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2532  		v5.AddArg(x)
  2533  		v4.AddArg2(v5, s)
  2534  		v6 := b.NewValue0(v.Pos, ssaop.OpLsh32x16, typ.UInt32)
  2535  		v7 := b.NewValue0(v.Pos, ssaop.OpSub16, typ.UInt16)
  2536  		v8 := b.NewValue0(v.Pos, ssaop.OpConst16, typ.UInt16)
  2537  		v8.AuxInt = ssa.Int16ToAuxInt(32)
  2538  		v7.AddArg2(v8, s)
  2539  		v6.AddArg2(v1, v7)
  2540  		v3.AddArg2(v4, v6)
  2541  		v9 := b.NewValue0(v.Pos, ssaop.OpAnd32, typ.UInt32)
  2542  		v10 := b.NewValue0(v.Pos, ssaop.OpRsh32x16, typ.UInt32)
  2543  		v11 := b.NewValue0(v.Pos, ssaop.OpSub16, typ.UInt16)
  2544  		v11.AddArg2(s, v8)
  2545  		v10.AddArg2(v1, v11)
  2546  		v12 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2547  		v13 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  2548  		v14 := b.NewValue0(v.Pos, ssaop.OpRsh16Ux32, typ.UInt16)
  2549  		v15 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  2550  		v15.AuxInt = ssa.Int32ToAuxInt(5)
  2551  		v14.AddArg2(s, v15)
  2552  		v13.AddArg(v14)
  2553  		v12.AddArg(v13)
  2554  		v9.AddArg2(v10, v12)
  2555  		v2.AddArg2(v3, v9)
  2556  		v.AddArg2(v0, v2)
  2557  		return true
  2558  	}
  2559  }
  2560  func rewriteValue_OpRsh64x32(v *ssa.Value) bool {
  2561  	v_1 := v.Args[1]
  2562  	v_0 := v.Args[0]
  2563  	b := v.Block
  2564  	typ := &b.Func.Config.Types
  2565  	// match: (Rsh64x32 x s)
  2566  	// result: (Int64Make (Rsh32x32 <typ.UInt32> (Int64Hi x) s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux32 <typ.UInt32> (Int64Lo x) s) (Lsh32x32 <typ.UInt32> (Int64Hi x) (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (And32 <typ.UInt32> (Rsh32x32 <typ.UInt32> (Int64Hi x) (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32]))) (Zeromask (Rsh32Ux32 <typ.UInt32> s (Const32 <typ.UInt32> [5]))))))
  2567  	for {
  2568  		x := v_0
  2569  		s := v_1
  2570  		v.Reset(ssaop.OpInt64Make)
  2571  		v0 := b.NewValue0(v.Pos, ssaop.OpRsh32x32, typ.UInt32)
  2572  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2573  		v1.AddArg(x)
  2574  		v0.AddArg2(v1, s)
  2575  		v2 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2576  		v3 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2577  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  2578  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2579  		v5.AddArg(x)
  2580  		v4.AddArg2(v5, s)
  2581  		v6 := b.NewValue0(v.Pos, ssaop.OpLsh32x32, typ.UInt32)
  2582  		v7 := b.NewValue0(v.Pos, ssaop.OpSub32, typ.UInt32)
  2583  		v8 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  2584  		v8.AuxInt = ssa.Int32ToAuxInt(32)
  2585  		v7.AddArg2(v8, s)
  2586  		v6.AddArg2(v1, v7)
  2587  		v3.AddArg2(v4, v6)
  2588  		v9 := b.NewValue0(v.Pos, ssaop.OpAnd32, typ.UInt32)
  2589  		v10 := b.NewValue0(v.Pos, ssaop.OpRsh32x32, typ.UInt32)
  2590  		v11 := b.NewValue0(v.Pos, ssaop.OpSub32, typ.UInt32)
  2591  		v11.AddArg2(s, v8)
  2592  		v10.AddArg2(v1, v11)
  2593  		v12 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2594  		v13 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux32, typ.UInt32)
  2595  		v14 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  2596  		v14.AuxInt = ssa.Int32ToAuxInt(5)
  2597  		v13.AddArg2(s, v14)
  2598  		v12.AddArg(v13)
  2599  		v9.AddArg2(v10, v12)
  2600  		v2.AddArg2(v3, v9)
  2601  		v.AddArg2(v0, v2)
  2602  		return true
  2603  	}
  2604  }
  2605  func rewriteValue_OpRsh64x64(v *ssa.Value) bool {
  2606  	v_1 := v.Args[1]
  2607  	v_0 := v.Args[0]
  2608  	b := v.Block
  2609  	typ := &b.Func.Config.Types
  2610  	// match: (Rsh64x64 x (Int64Make (Const32 [c]) _))
  2611  	// cond: c != 0
  2612  	// result: (Int64Make (Signmask (Int64Hi x)) (Signmask (Int64Hi x)))
  2613  	for {
  2614  		x := v_0
  2615  		if v_1.Op != ssaop.OpInt64Make {
  2616  			break
  2617  		}
  2618  		v_1_0 := v_1.Args[0]
  2619  		if v_1_0.Op != ssaop.OpConst32 {
  2620  			break
  2621  		}
  2622  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
  2623  		if !(c != 0) {
  2624  			break
  2625  		}
  2626  		v.Reset(ssaop.OpInt64Make)
  2627  		v0 := b.NewValue0(v.Pos, ssaop.OpSignmask, typ.Int32)
  2628  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2629  		v1.AddArg(x)
  2630  		v0.AddArg(v1)
  2631  		v.AddArg2(v0, v0)
  2632  		return true
  2633  	}
  2634  	// match: (Rsh64x64 [c] x (Int64Make (Const32 [0]) lo))
  2635  	// result: (Rsh64x32 [c] x lo)
  2636  	for {
  2637  		c := ssa.AuxIntToBool(v.AuxInt)
  2638  		x := v_0
  2639  		if v_1.Op != ssaop.OpInt64Make {
  2640  			break
  2641  		}
  2642  		lo := v_1.Args[1]
  2643  		v_1_0 := v_1.Args[0]
  2644  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
  2645  			break
  2646  		}
  2647  		v.Reset(ssaop.OpRsh64x32)
  2648  		v.AuxInt = ssa.BoolToAuxInt(c)
  2649  		v.AddArg2(x, lo)
  2650  		return true
  2651  	}
  2652  	// match: (Rsh64x64 x (Int64Make hi lo))
  2653  	// cond: hi.Op != ssaop.OpConst32
  2654  	// result: (Rsh64x32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
  2655  	for {
  2656  		x := v_0
  2657  		if v_1.Op != ssaop.OpInt64Make {
  2658  			break
  2659  		}
  2660  		lo := v_1.Args[1]
  2661  		hi := v_1.Args[0]
  2662  		if !(hi.Op != ssaop.OpConst32) {
  2663  			break
  2664  		}
  2665  		v.Reset(ssaop.OpRsh64x32)
  2666  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2667  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2668  		v1.AddArg(hi)
  2669  		v0.AddArg2(v1, lo)
  2670  		v.AddArg2(x, v0)
  2671  		return true
  2672  	}
  2673  	// match: (Rsh64x64 x y)
  2674  	// result: (Rsh64x32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
  2675  	for {
  2676  		x := v_0
  2677  		y := v_1
  2678  		v.Reset(ssaop.OpRsh64x32)
  2679  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2680  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2681  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2682  		v2.AddArg(y)
  2683  		v1.AddArg(v2)
  2684  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2685  		v3.AddArg(y)
  2686  		v0.AddArg2(v1, v3)
  2687  		v.AddArg2(x, v0)
  2688  		return true
  2689  	}
  2690  }
  2691  func rewriteValue_OpRsh64x8(v *ssa.Value) bool {
  2692  	v_1 := v.Args[1]
  2693  	v_0 := v.Args[0]
  2694  	b := v.Block
  2695  	typ := &b.Func.Config.Types
  2696  	// match: (Rsh64x8 x s)
  2697  	// result: (Int64Make (Rsh32x8 <typ.UInt32> (Int64Hi x) s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux8 <typ.UInt32> (Int64Lo x) s) (Lsh32x8 <typ.UInt32> (Int64Hi x) (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (And32 <typ.UInt32> (Rsh32x8 <typ.UInt32> (Int64Hi x) (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32]))) (Zeromask (ZeroExt8to32 (Rsh8Ux32 <typ.UInt8> s (Const32 <typ.UInt32> [5])))))))
  2698  	for {
  2699  		x := v_0
  2700  		s := v_1
  2701  		v.Reset(ssaop.OpInt64Make)
  2702  		v0 := b.NewValue0(v.Pos, ssaop.OpRsh32x8, typ.UInt32)
  2703  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2704  		v1.AddArg(x)
  2705  		v0.AddArg2(v1, s)
  2706  		v2 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2707  		v3 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2708  		v4 := b.NewValue0(v.Pos, ssaop.OpRsh32Ux8, typ.UInt32)
  2709  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2710  		v5.AddArg(x)
  2711  		v4.AddArg2(v5, s)
  2712  		v6 := b.NewValue0(v.Pos, ssaop.OpLsh32x8, typ.UInt32)
  2713  		v7 := b.NewValue0(v.Pos, ssaop.OpSub8, typ.UInt8)
  2714  		v8 := b.NewValue0(v.Pos, ssaop.OpConst8, typ.UInt8)
  2715  		v8.AuxInt = ssa.Int8ToAuxInt(32)
  2716  		v7.AddArg2(v8, s)
  2717  		v6.AddArg2(v1, v7)
  2718  		v3.AddArg2(v4, v6)
  2719  		v9 := b.NewValue0(v.Pos, ssaop.OpAnd32, typ.UInt32)
  2720  		v10 := b.NewValue0(v.Pos, ssaop.OpRsh32x8, typ.UInt32)
  2721  		v11 := b.NewValue0(v.Pos, ssaop.OpSub8, typ.UInt8)
  2722  		v11.AddArg2(s, v8)
  2723  		v10.AddArg2(v1, v11)
  2724  		v12 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2725  		v13 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  2726  		v14 := b.NewValue0(v.Pos, ssaop.OpRsh8Ux32, typ.UInt8)
  2727  		v15 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  2728  		v15.AuxInt = ssa.Int32ToAuxInt(5)
  2729  		v14.AddArg2(s, v15)
  2730  		v13.AddArg(v14)
  2731  		v12.AddArg(v13)
  2732  		v9.AddArg2(v10, v12)
  2733  		v2.AddArg2(v3, v9)
  2734  		v.AddArg2(v0, v2)
  2735  		return true
  2736  	}
  2737  }
  2738  func rewriteValue_OpRsh8Ux64(v *ssa.Value) bool {
  2739  	v_1 := v.Args[1]
  2740  	v_0 := v.Args[0]
  2741  	b := v.Block
  2742  	typ := &b.Func.Config.Types
  2743  	// match: (Rsh8Ux64 _ (Int64Make (Const32 [c]) _))
  2744  	// cond: c != 0
  2745  	// result: (Const32 [0])
  2746  	for {
  2747  		if v_1.Op != ssaop.OpInt64Make {
  2748  			break
  2749  		}
  2750  		v_1_0 := v_1.Args[0]
  2751  		if v_1_0.Op != ssaop.OpConst32 {
  2752  			break
  2753  		}
  2754  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
  2755  		if !(c != 0) {
  2756  			break
  2757  		}
  2758  		v.Reset(ssaop.OpConst32)
  2759  		v.AuxInt = ssa.Int32ToAuxInt(0)
  2760  		return true
  2761  	}
  2762  	// match: (Rsh8Ux64 [c] x (Int64Make (Const32 [0]) lo))
  2763  	// result: (Rsh8Ux32 [c] x lo)
  2764  	for {
  2765  		c := ssa.AuxIntToBool(v.AuxInt)
  2766  		x := v_0
  2767  		if v_1.Op != ssaop.OpInt64Make {
  2768  			break
  2769  		}
  2770  		lo := v_1.Args[1]
  2771  		v_1_0 := v_1.Args[0]
  2772  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
  2773  			break
  2774  		}
  2775  		v.Reset(ssaop.OpRsh8Ux32)
  2776  		v.AuxInt = ssa.BoolToAuxInt(c)
  2777  		v.AddArg2(x, lo)
  2778  		return true
  2779  	}
  2780  	// match: (Rsh8Ux64 x (Int64Make hi lo))
  2781  	// cond: hi.Op != ssaop.OpConst32
  2782  	// result: (Rsh8Ux32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
  2783  	for {
  2784  		x := v_0
  2785  		if v_1.Op != ssaop.OpInt64Make {
  2786  			break
  2787  		}
  2788  		lo := v_1.Args[1]
  2789  		hi := v_1.Args[0]
  2790  		if !(hi.Op != ssaop.OpConst32) {
  2791  			break
  2792  		}
  2793  		v.Reset(ssaop.OpRsh8Ux32)
  2794  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2795  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2796  		v1.AddArg(hi)
  2797  		v0.AddArg2(v1, lo)
  2798  		v.AddArg2(x, v0)
  2799  		return true
  2800  	}
  2801  	// match: (Rsh8Ux64 x y)
  2802  	// result: (Rsh8Ux32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
  2803  	for {
  2804  		x := v_0
  2805  		y := v_1
  2806  		v.Reset(ssaop.OpRsh8Ux32)
  2807  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2808  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2809  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2810  		v2.AddArg(y)
  2811  		v1.AddArg(v2)
  2812  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2813  		v3.AddArg(y)
  2814  		v0.AddArg2(v1, v3)
  2815  		v.AddArg2(x, v0)
  2816  		return true
  2817  	}
  2818  }
  2819  func rewriteValue_OpRsh8x64(v *ssa.Value) bool {
  2820  	v_1 := v.Args[1]
  2821  	v_0 := v.Args[0]
  2822  	b := v.Block
  2823  	typ := &b.Func.Config.Types
  2824  	// match: (Rsh8x64 x (Int64Make (Const32 [c]) _))
  2825  	// cond: c != 0
  2826  	// result: (Signmask (SignExt8to32 x))
  2827  	for {
  2828  		x := v_0
  2829  		if v_1.Op != ssaop.OpInt64Make {
  2830  			break
  2831  		}
  2832  		v_1_0 := v_1.Args[0]
  2833  		if v_1_0.Op != ssaop.OpConst32 {
  2834  			break
  2835  		}
  2836  		c := ssa.AuxIntToInt32(v_1_0.AuxInt)
  2837  		if !(c != 0) {
  2838  			break
  2839  		}
  2840  		v.Reset(ssaop.OpSignmask)
  2841  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  2842  		v0.AddArg(x)
  2843  		v.AddArg(v0)
  2844  		return true
  2845  	}
  2846  	// match: (Rsh8x64 [c] x (Int64Make (Const32 [0]) lo))
  2847  	// result: (Rsh8x32 [c] x lo)
  2848  	for {
  2849  		c := ssa.AuxIntToBool(v.AuxInt)
  2850  		x := v_0
  2851  		if v_1.Op != ssaop.OpInt64Make {
  2852  			break
  2853  		}
  2854  		lo := v_1.Args[1]
  2855  		v_1_0 := v_1.Args[0]
  2856  		if v_1_0.Op != ssaop.OpConst32 || ssa.AuxIntToInt32(v_1_0.AuxInt) != 0 {
  2857  			break
  2858  		}
  2859  		v.Reset(ssaop.OpRsh8x32)
  2860  		v.AuxInt = ssa.BoolToAuxInt(c)
  2861  		v.AddArg2(x, lo)
  2862  		return true
  2863  	}
  2864  	// match: (Rsh8x64 x (Int64Make hi lo))
  2865  	// cond: hi.Op != ssaop.OpConst32
  2866  	// result: (Rsh8x32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
  2867  	for {
  2868  		x := v_0
  2869  		if v_1.Op != ssaop.OpInt64Make {
  2870  			break
  2871  		}
  2872  		lo := v_1.Args[1]
  2873  		hi := v_1.Args[0]
  2874  		if !(hi.Op != ssaop.OpConst32) {
  2875  			break
  2876  		}
  2877  		v.Reset(ssaop.OpRsh8x32)
  2878  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2879  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2880  		v1.AddArg(hi)
  2881  		v0.AddArg2(v1, lo)
  2882  		v.AddArg2(x, v0)
  2883  		return true
  2884  	}
  2885  	// match: (Rsh8x64 x y)
  2886  	// result: (Rsh8x32 x (Or32 <typ.UInt32> (Zeromask (Int64Hi y)) (Int64Lo y)))
  2887  	for {
  2888  		x := v_0
  2889  		y := v_1
  2890  		v.Reset(ssaop.OpRsh8x32)
  2891  		v0 := b.NewValue0(v.Pos, ssaop.OpOr32, typ.UInt32)
  2892  		v1 := b.NewValue0(v.Pos, ssaop.OpZeromask, typ.UInt32)
  2893  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  2894  		v2.AddArg(y)
  2895  		v1.AddArg(v2)
  2896  		v3 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  2897  		v3.AddArg(y)
  2898  		v0.AddArg2(v1, v3)
  2899  		v.AddArg2(x, v0)
  2900  		return true
  2901  	}
  2902  }
  2903  func rewriteValue_OpSelect0(v *ssa.Value) bool {
  2904  	v_0 := v.Args[0]
  2905  	// match: (Select0 (MakeTuple x y))
  2906  	// result: x
  2907  	for {
  2908  		if v_0.Op != ssaop.OpMakeTuple {
  2909  			break
  2910  		}
  2911  		x := v_0.Args[0]
  2912  		v.CopyOf(x)
  2913  		return true
  2914  	}
  2915  	return false
  2916  }
  2917  func rewriteValue_OpSelect1(v *ssa.Value) bool {
  2918  	v_0 := v.Args[0]
  2919  	// match: (Select1 (MakeTuple x y))
  2920  	// result: y
  2921  	for {
  2922  		if v_0.Op != ssaop.OpMakeTuple {
  2923  			break
  2924  		}
  2925  		y := v_0.Args[1]
  2926  		v.CopyOf(y)
  2927  		return true
  2928  	}
  2929  	return false
  2930  }
  2931  func rewriteValue_OpSignExt16to64(v *ssa.Value) bool {
  2932  	v_0 := v.Args[0]
  2933  	b := v.Block
  2934  	typ := &b.Func.Config.Types
  2935  	// match: (SignExt16to64 x)
  2936  	// result: (SignExt32to64 (SignExt16to32 x))
  2937  	for {
  2938  		x := v_0
  2939  		v.Reset(ssaop.OpSignExt32to64)
  2940  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  2941  		v0.AddArg(x)
  2942  		v.AddArg(v0)
  2943  		return true
  2944  	}
  2945  }
  2946  func rewriteValue_OpSignExt32to64(v *ssa.Value) bool {
  2947  	v_0 := v.Args[0]
  2948  	b := v.Block
  2949  	typ := &b.Func.Config.Types
  2950  	// match: (SignExt32to64 x)
  2951  	// result: (Int64Make (Signmask x) x)
  2952  	for {
  2953  		x := v_0
  2954  		v.Reset(ssaop.OpInt64Make)
  2955  		v0 := b.NewValue0(v.Pos, ssaop.OpSignmask, typ.Int32)
  2956  		v0.AddArg(x)
  2957  		v.AddArg2(v0, x)
  2958  		return true
  2959  	}
  2960  }
  2961  func rewriteValue_OpSignExt8to64(v *ssa.Value) bool {
  2962  	v_0 := v.Args[0]
  2963  	b := v.Block
  2964  	typ := &b.Func.Config.Types
  2965  	// match: (SignExt8to64 x)
  2966  	// result: (SignExt32to64 (SignExt8to32 x))
  2967  	for {
  2968  		x := v_0
  2969  		v.Reset(ssaop.OpSignExt32to64)
  2970  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  2971  		v0.AddArg(x)
  2972  		v.AddArg(v0)
  2973  		return true
  2974  	}
  2975  }
  2976  func rewriteValue_OpStore(v *ssa.Value) bool {
  2977  	v_2 := v.Args[2]
  2978  	v_1 := v.Args[1]
  2979  	v_0 := v.Args[0]
  2980  	b := v.Block
  2981  	config := b.Func.Config
  2982  	// match: (Store {t} dst (Int64Make hi lo) mem)
  2983  	// cond: t.Size() == 8 && !config.BigEndian
  2984  	// result: (Store {hi.Type} (OffPtr <hi.Type.PtrTo()> [4] dst) hi (Store {lo.Type} dst lo mem))
  2985  	for {
  2986  		t := ssa.AuxToType(v.Aux)
  2987  		dst := v_0
  2988  		if v_1.Op != ssaop.OpInt64Make {
  2989  			break
  2990  		}
  2991  		lo := v_1.Args[1]
  2992  		hi := v_1.Args[0]
  2993  		mem := v_2
  2994  		if !(t.Size() == 8 && !config.BigEndian) {
  2995  			break
  2996  		}
  2997  		v.Reset(ssaop.OpStore)
  2998  		v.Aux = ssa.TypeToAux(hi.Type)
  2999  		v0 := b.NewValue0(v.Pos, ssaop.OpOffPtr, hi.Type.PtrTo())
  3000  		v0.AuxInt = ssa.Int64ToAuxInt(4)
  3001  		v0.AddArg(dst)
  3002  		v1 := b.NewValue0(v.Pos, ssaop.OpStore, types.TypeMem)
  3003  		v1.Aux = ssa.TypeToAux(lo.Type)
  3004  		v1.AddArg3(dst, lo, mem)
  3005  		v.AddArg3(v0, hi, v1)
  3006  		return true
  3007  	}
  3008  	// match: (Store {t} dst (Int64Make hi lo) mem)
  3009  	// cond: t.Size() == 8 && config.BigEndian
  3010  	// result: (Store {lo.Type} (OffPtr <lo.Type.PtrTo()> [4] dst) lo (Store {hi.Type} dst hi mem))
  3011  	for {
  3012  		t := ssa.AuxToType(v.Aux)
  3013  		dst := v_0
  3014  		if v_1.Op != ssaop.OpInt64Make {
  3015  			break
  3016  		}
  3017  		lo := v_1.Args[1]
  3018  		hi := v_1.Args[0]
  3019  		mem := v_2
  3020  		if !(t.Size() == 8 && config.BigEndian) {
  3021  			break
  3022  		}
  3023  		v.Reset(ssaop.OpStore)
  3024  		v.Aux = ssa.TypeToAux(lo.Type)
  3025  		v0 := b.NewValue0(v.Pos, ssaop.OpOffPtr, lo.Type.PtrTo())
  3026  		v0.AuxInt = ssa.Int64ToAuxInt(4)
  3027  		v0.AddArg(dst)
  3028  		v1 := b.NewValue0(v.Pos, ssaop.OpStore, types.TypeMem)
  3029  		v1.Aux = ssa.TypeToAux(hi.Type)
  3030  		v1.AddArg3(dst, hi, mem)
  3031  		v.AddArg3(v0, lo, v1)
  3032  		return true
  3033  	}
  3034  	return false
  3035  }
  3036  func rewriteValue_OpSub64(v *ssa.Value) bool {
  3037  	v_1 := v.Args[1]
  3038  	v_0 := v.Args[0]
  3039  	b := v.Block
  3040  	typ := &b.Func.Config.Types
  3041  	// match: (Sub64 <t> x y)
  3042  	// result: (Last <t> x0: (Int64Lo x) x1: (Int64Hi x) y0: (Int64Lo y) y1: (Int64Hi y) sub: (Sub32carry x0 y0) (Int64Make (Sub32withcarry <typ.UInt32> x1 y1 (Select1 <types.TypeFlags> sub)) (Select0 <typ.UInt32> sub)))
  3043  	for {
  3044  		t := v.Type
  3045  		x := v_0
  3046  		y := v_1
  3047  		v.Reset(ssaop.OpLast)
  3048  		v.Type = t
  3049  		x0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  3050  		x0.AddArg(x)
  3051  		x1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  3052  		x1.AddArg(x)
  3053  		y0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  3054  		y0.AddArg(y)
  3055  		y1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  3056  		y1.AddArg(y)
  3057  		sub := b.NewValue0(v.Pos, ssaop.OpSub32carry, types.NewTuple(typ.UInt32, types.TypeFlags))
  3058  		sub.AddArg2(x0, y0)
  3059  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Make, typ.UInt64)
  3060  		v6 := b.NewValue0(v.Pos, ssaop.OpSub32withcarry, typ.UInt32)
  3061  		v7 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
  3062  		v7.AddArg(sub)
  3063  		v6.AddArg3(x1, y1, v7)
  3064  		v8 := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt32)
  3065  		v8.AddArg(sub)
  3066  		v5.AddArg2(v6, v8)
  3067  		v.AddArg6(x0, x1, y0, y1, sub, v5)
  3068  		return true
  3069  	}
  3070  }
  3071  func rewriteValue_OpTrunc64to16(v *ssa.Value) bool {
  3072  	v_0 := v.Args[0]
  3073  	b := v.Block
  3074  	typ := &b.Func.Config.Types
  3075  	// match: (Trunc64to16 (Int64Make _ lo))
  3076  	// result: (Trunc32to16 lo)
  3077  	for {
  3078  		if v_0.Op != ssaop.OpInt64Make {
  3079  			break
  3080  		}
  3081  		lo := v_0.Args[1]
  3082  		v.Reset(ssaop.OpTrunc32to16)
  3083  		v.AddArg(lo)
  3084  		return true
  3085  	}
  3086  	// match: (Trunc64to16 x)
  3087  	// result: (Trunc32to16 (Int64Lo x))
  3088  	for {
  3089  		x := v_0
  3090  		v.Reset(ssaop.OpTrunc32to16)
  3091  		v0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  3092  		v0.AddArg(x)
  3093  		v.AddArg(v0)
  3094  		return true
  3095  	}
  3096  }
  3097  func rewriteValue_OpTrunc64to32(v *ssa.Value) bool {
  3098  	v_0 := v.Args[0]
  3099  	// match: (Trunc64to32 (Int64Make _ lo))
  3100  	// result: lo
  3101  	for {
  3102  		if v_0.Op != ssaop.OpInt64Make {
  3103  			break
  3104  		}
  3105  		lo := v_0.Args[1]
  3106  		v.CopyOf(lo)
  3107  		return true
  3108  	}
  3109  	// match: (Trunc64to32 x)
  3110  	// result: (Int64Lo x)
  3111  	for {
  3112  		x := v_0
  3113  		v.Reset(ssaop.OpInt64Lo)
  3114  		v.AddArg(x)
  3115  		return true
  3116  	}
  3117  }
  3118  func rewriteValue_OpTrunc64to8(v *ssa.Value) bool {
  3119  	v_0 := v.Args[0]
  3120  	b := v.Block
  3121  	typ := &b.Func.Config.Types
  3122  	// match: (Trunc64to8 (Int64Make _ lo))
  3123  	// result: (Trunc32to8 lo)
  3124  	for {
  3125  		if v_0.Op != ssaop.OpInt64Make {
  3126  			break
  3127  		}
  3128  		lo := v_0.Args[1]
  3129  		v.Reset(ssaop.OpTrunc32to8)
  3130  		v.AddArg(lo)
  3131  		return true
  3132  	}
  3133  	// match: (Trunc64to8 x)
  3134  	// result: (Trunc32to8 (Int64Lo x))
  3135  	for {
  3136  		x := v_0
  3137  		v.Reset(ssaop.OpTrunc32to8)
  3138  		v0 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  3139  		v0.AddArg(x)
  3140  		v.AddArg(v0)
  3141  		return true
  3142  	}
  3143  }
  3144  func rewriteValue_OpXor64(v *ssa.Value) bool {
  3145  	v_1 := v.Args[1]
  3146  	v_0 := v.Args[0]
  3147  	b := v.Block
  3148  	typ := &b.Func.Config.Types
  3149  	// match: (Xor64 x y)
  3150  	// result: (Int64Make (Xor32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (Xor32 <typ.UInt32> (Int64Lo x) (Int64Lo y)))
  3151  	for {
  3152  		x := v_0
  3153  		y := v_1
  3154  		v.Reset(ssaop.OpInt64Make)
  3155  		v0 := b.NewValue0(v.Pos, ssaop.OpXor32, typ.UInt32)
  3156  		v1 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  3157  		v1.AddArg(x)
  3158  		v2 := b.NewValue0(v.Pos, ssaop.OpInt64Hi, typ.UInt32)
  3159  		v2.AddArg(y)
  3160  		v0.AddArg2(v1, v2)
  3161  		v3 := b.NewValue0(v.Pos, ssaop.OpXor32, typ.UInt32)
  3162  		v4 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  3163  		v4.AddArg(x)
  3164  		v5 := b.NewValue0(v.Pos, ssaop.OpInt64Lo, typ.UInt32)
  3165  		v5.AddArg(y)
  3166  		v3.AddArg2(v4, v5)
  3167  		v.AddArg2(v0, v3)
  3168  		return true
  3169  	}
  3170  }
  3171  func rewriteValue_OpZeroExt16to64(v *ssa.Value) bool {
  3172  	v_0 := v.Args[0]
  3173  	b := v.Block
  3174  	typ := &b.Func.Config.Types
  3175  	// match: (ZeroExt16to64 x)
  3176  	// result: (ZeroExt32to64 (ZeroExt16to32 x))
  3177  	for {
  3178  		x := v_0
  3179  		v.Reset(ssaop.OpZeroExt32to64)
  3180  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  3181  		v0.AddArg(x)
  3182  		v.AddArg(v0)
  3183  		return true
  3184  	}
  3185  }
  3186  func rewriteValue_OpZeroExt32to64(v *ssa.Value) bool {
  3187  	v_0 := v.Args[0]
  3188  	b := v.Block
  3189  	typ := &b.Func.Config.Types
  3190  	// match: (ZeroExt32to64 x)
  3191  	// result: (Int64Make (Const32 <typ.UInt32> [0]) x)
  3192  	for {
  3193  		x := v_0
  3194  		v.Reset(ssaop.OpInt64Make)
  3195  		v0 := b.NewValue0(v.Pos, ssaop.OpConst32, typ.UInt32)
  3196  		v0.AuxInt = ssa.Int32ToAuxInt(0)
  3197  		v.AddArg2(v0, x)
  3198  		return true
  3199  	}
  3200  }
  3201  func rewriteValue_OpZeroExt8to64(v *ssa.Value) bool {
  3202  	v_0 := v.Args[0]
  3203  	b := v.Block
  3204  	typ := &b.Func.Config.Types
  3205  	// match: (ZeroExt8to64 x)
  3206  	// result: (ZeroExt32to64 (ZeroExt8to32 x))
  3207  	for {
  3208  		x := v_0
  3209  		v.Reset(ssaop.OpZeroExt32to64)
  3210  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  3211  		v0.AddArg(x)
  3212  		v.AddArg(v0)
  3213  		return true
  3214  	}
  3215  }
  3216  func RewriteBlock(b *ssa.Block) bool {
  3217  	return false
  3218  }
  3219  

View as plain text