Source file src/cmd/compile/internal/ssarewrite/rewriteloong64/rewriteLOONG64.go

     1  // Code generated from _gen/LOONG64.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package rewriteloong64
     4  
     5  import "cmd/compile/internal/types"
     6  import "cmd/compile/internal/ssa/block"
     7  import "cmd/compile/internal/ssa/ssaop"
     8  import "cmd/compile/internal/ssa"
     9  
    10  func RewriteValue(v *ssa.Value) bool {
    11  	switch v.Op {
    12  	case ssaop.OpAbs:
    13  		v.Op = ssaop.OpLOONG64ABSD
    14  		return true
    15  	case ssaop.OpAdd16:
    16  		v.Op = ssaop.OpLOONG64ADDV
    17  		return true
    18  	case ssaop.OpAdd32:
    19  		v.Op = ssaop.OpLOONG64ADDV
    20  		return true
    21  	case ssaop.OpAdd32F:
    22  		v.Op = ssaop.OpLOONG64ADDF
    23  		return true
    24  	case ssaop.OpAdd64:
    25  		v.Op = ssaop.OpLOONG64ADDV
    26  		return true
    27  	case ssaop.OpAdd64F:
    28  		v.Op = ssaop.OpLOONG64ADDD
    29  		return true
    30  	case ssaop.OpAdd8:
    31  		v.Op = ssaop.OpLOONG64ADDV
    32  		return true
    33  	case ssaop.OpAddPtr:
    34  		v.Op = ssaop.OpLOONG64ADDV
    35  		return true
    36  	case ssaop.OpAddr:
    37  		return rewriteValue_OpAddr(v)
    38  	case ssaop.OpAnd16:
    39  		v.Op = ssaop.OpLOONG64AND
    40  		return true
    41  	case ssaop.OpAnd32:
    42  		v.Op = ssaop.OpLOONG64AND
    43  		return true
    44  	case ssaop.OpAnd64:
    45  		v.Op = ssaop.OpLOONG64AND
    46  		return true
    47  	case ssaop.OpAnd8:
    48  		v.Op = ssaop.OpLOONG64AND
    49  		return true
    50  	case ssaop.OpAndB:
    51  		v.Op = ssaop.OpLOONG64AND
    52  		return true
    53  	case ssaop.OpAtomicAdd32:
    54  		v.Op = ssaop.OpLOONG64LoweredAtomicAdd32
    55  		return true
    56  	case ssaop.OpAtomicAdd64:
    57  		v.Op = ssaop.OpLOONG64LoweredAtomicAdd64
    58  		return true
    59  	case ssaop.OpAtomicAnd32:
    60  		v.Op = ssaop.OpLOONG64LoweredAtomicAnd32
    61  		return true
    62  	case ssaop.OpAtomicAnd32value:
    63  		v.Op = ssaop.OpLOONG64LoweredAtomicAnd32value
    64  		return true
    65  	case ssaop.OpAtomicAnd64value:
    66  		v.Op = ssaop.OpLOONG64LoweredAtomicAnd64value
    67  		return true
    68  	case ssaop.OpAtomicAnd8:
    69  		return rewriteValue_OpAtomicAnd8(v)
    70  	case ssaop.OpAtomicCompareAndSwap32:
    71  		return rewriteValue_OpAtomicCompareAndSwap32(v)
    72  	case ssaop.OpAtomicCompareAndSwap32Variant:
    73  		return rewriteValue_OpAtomicCompareAndSwap32Variant(v)
    74  	case ssaop.OpAtomicCompareAndSwap64:
    75  		v.Op = ssaop.OpLOONG64LoweredAtomicCas64
    76  		return true
    77  	case ssaop.OpAtomicCompareAndSwap64Variant:
    78  		v.Op = ssaop.OpLOONG64LoweredAtomicCas64Variant
    79  		return true
    80  	case ssaop.OpAtomicExchange32:
    81  		v.Op = ssaop.OpLOONG64LoweredAtomicExchange32
    82  		return true
    83  	case ssaop.OpAtomicExchange64:
    84  		v.Op = ssaop.OpLOONG64LoweredAtomicExchange64
    85  		return true
    86  	case ssaop.OpAtomicExchange8Variant:
    87  		v.Op = ssaop.OpLOONG64LoweredAtomicExchange8Variant
    88  		return true
    89  	case ssaop.OpAtomicLoad32:
    90  		v.Op = ssaop.OpLOONG64LoweredAtomicLoad32
    91  		return true
    92  	case ssaop.OpAtomicLoad64:
    93  		v.Op = ssaop.OpLOONG64LoweredAtomicLoad64
    94  		return true
    95  	case ssaop.OpAtomicLoad8:
    96  		v.Op = ssaop.OpLOONG64LoweredAtomicLoad8
    97  		return true
    98  	case ssaop.OpAtomicLoadPtr:
    99  		v.Op = ssaop.OpLOONG64LoweredAtomicLoad64
   100  		return true
   101  	case ssaop.OpAtomicOr32:
   102  		v.Op = ssaop.OpLOONG64LoweredAtomicOr32
   103  		return true
   104  	case ssaop.OpAtomicOr32value:
   105  		v.Op = ssaop.OpLOONG64LoweredAtomicOr32value
   106  		return true
   107  	case ssaop.OpAtomicOr64value:
   108  		v.Op = ssaop.OpLOONG64LoweredAtomicOr64value
   109  		return true
   110  	case ssaop.OpAtomicOr8:
   111  		return rewriteValue_OpAtomicOr8(v)
   112  	case ssaop.OpAtomicStore32:
   113  		v.Op = ssaop.OpLOONG64LoweredAtomicStore32
   114  		return true
   115  	case ssaop.OpAtomicStore32Variant:
   116  		v.Op = ssaop.OpLOONG64LoweredAtomicStore32Variant
   117  		return true
   118  	case ssaop.OpAtomicStore64:
   119  		v.Op = ssaop.OpLOONG64LoweredAtomicStore64
   120  		return true
   121  	case ssaop.OpAtomicStore64Variant:
   122  		v.Op = ssaop.OpLOONG64LoweredAtomicStore64Variant
   123  		return true
   124  	case ssaop.OpAtomicStore8:
   125  		v.Op = ssaop.OpLOONG64LoweredAtomicStore8
   126  		return true
   127  	case ssaop.OpAtomicStore8Variant:
   128  		v.Op = ssaop.OpLOONG64LoweredAtomicStore8Variant
   129  		return true
   130  	case ssaop.OpAtomicStorePtrNoWB:
   131  		v.Op = ssaop.OpLOONG64LoweredAtomicStore64
   132  		return true
   133  	case ssaop.OpAvg64u:
   134  		return rewriteValue_OpAvg64u(v)
   135  	case ssaop.OpBitLen16:
   136  		return rewriteValue_OpBitLen16(v)
   137  	case ssaop.OpBitLen32:
   138  		return rewriteValue_OpBitLen32(v)
   139  	case ssaop.OpBitLen64:
   140  		return rewriteValue_OpBitLen64(v)
   141  	case ssaop.OpBitLen8:
   142  		return rewriteValue_OpBitLen8(v)
   143  	case ssaop.OpBitRev16:
   144  		return rewriteValue_OpBitRev16(v)
   145  	case ssaop.OpBitRev32:
   146  		v.Op = ssaop.OpLOONG64BITREVW
   147  		return true
   148  	case ssaop.OpBitRev64:
   149  		v.Op = ssaop.OpLOONG64BITREVV
   150  		return true
   151  	case ssaop.OpBitRev8:
   152  		v.Op = ssaop.OpLOONG64BITREV4B
   153  		return true
   154  	case ssaop.OpBswap16:
   155  		v.Op = ssaop.OpLOONG64REVB2H
   156  		return true
   157  	case ssaop.OpBswap32:
   158  		v.Op = ssaop.OpLOONG64REVB2W
   159  		return true
   160  	case ssaop.OpBswap64:
   161  		v.Op = ssaop.OpLOONG64REVBV
   162  		return true
   163  	case ssaop.OpCeil:
   164  		v.Op = ssaop.OpLOONG64FRINTPD
   165  		return true
   166  	case ssaop.OpClosureCall:
   167  		v.Op = ssaop.OpLOONG64CALLclosure
   168  		return true
   169  	case ssaop.OpCom16:
   170  		return rewriteValue_OpCom16(v)
   171  	case ssaop.OpCom32:
   172  		return rewriteValue_OpCom32(v)
   173  	case ssaop.OpCom64:
   174  		return rewriteValue_OpCom64(v)
   175  	case ssaop.OpCom8:
   176  		return rewriteValue_OpCom8(v)
   177  	case ssaop.OpCondSelect:
   178  		return rewriteValue_OpCondSelect(v)
   179  	case ssaop.OpConst16:
   180  		return rewriteValue_OpConst16(v)
   181  	case ssaop.OpConst32:
   182  		return rewriteValue_OpConst32(v)
   183  	case ssaop.OpConst32F:
   184  		return rewriteValue_OpConst32F(v)
   185  	case ssaop.OpConst64:
   186  		return rewriteValue_OpConst64(v)
   187  	case ssaop.OpConst64F:
   188  		return rewriteValue_OpConst64F(v)
   189  	case ssaop.OpConst8:
   190  		return rewriteValue_OpConst8(v)
   191  	case ssaop.OpConstBool:
   192  		return rewriteValue_OpConstBool(v)
   193  	case ssaop.OpConstNil:
   194  		return rewriteValue_OpConstNil(v)
   195  	case ssaop.OpCopysign:
   196  		v.Op = ssaop.OpLOONG64FCOPYSGD
   197  		return true
   198  	case ssaop.OpCtz16:
   199  		return rewriteValue_OpCtz16(v)
   200  	case ssaop.OpCtz16NonZero:
   201  		v.Op = ssaop.OpCtz64
   202  		return true
   203  	case ssaop.OpCtz32:
   204  		v.Op = ssaop.OpLOONG64CTZW
   205  		return true
   206  	case ssaop.OpCtz32NonZero:
   207  		v.Op = ssaop.OpCtz64
   208  		return true
   209  	case ssaop.OpCtz64:
   210  		v.Op = ssaop.OpLOONG64CTZV
   211  		return true
   212  	case ssaop.OpCtz64NonZero:
   213  		v.Op = ssaop.OpCtz64
   214  		return true
   215  	case ssaop.OpCtz8:
   216  		return rewriteValue_OpCtz8(v)
   217  	case ssaop.OpCtz8NonZero:
   218  		v.Op = ssaop.OpCtz64
   219  		return true
   220  	case ssaop.OpCvt32Fto32:
   221  		v.Op = ssaop.OpLOONG64TRUNCFW
   222  		return true
   223  	case ssaop.OpCvt32Fto64:
   224  		v.Op = ssaop.OpLOONG64TRUNCFV
   225  		return true
   226  	case ssaop.OpCvt32Fto64F:
   227  		v.Op = ssaop.OpLOONG64MOVFD
   228  		return true
   229  	case ssaop.OpCvt32to32F:
   230  		v.Op = ssaop.OpLOONG64MOVWF
   231  		return true
   232  	case ssaop.OpCvt32to64F:
   233  		v.Op = ssaop.OpLOONG64MOVWD
   234  		return true
   235  	case ssaop.OpCvt64Fto32:
   236  		v.Op = ssaop.OpLOONG64TRUNCDW
   237  		return true
   238  	case ssaop.OpCvt64Fto32F:
   239  		v.Op = ssaop.OpLOONG64MOVDF
   240  		return true
   241  	case ssaop.OpCvt64Fto64:
   242  		v.Op = ssaop.OpLOONG64TRUNCDV
   243  		return true
   244  	case ssaop.OpCvt64to32F:
   245  		v.Op = ssaop.OpLOONG64MOVVF
   246  		return true
   247  	case ssaop.OpCvt64to64F:
   248  		v.Op = ssaop.OpLOONG64MOVVD
   249  		return true
   250  	case ssaop.OpCvtBoolToUint8:
   251  		v.Op = ssaop.OpCopy
   252  		return true
   253  	case ssaop.OpDiv16:
   254  		return rewriteValue_OpDiv16(v)
   255  	case ssaop.OpDiv16u:
   256  		return rewriteValue_OpDiv16u(v)
   257  	case ssaop.OpDiv32:
   258  		return rewriteValue_OpDiv32(v)
   259  	case ssaop.OpDiv32F:
   260  		v.Op = ssaop.OpLOONG64DIVF
   261  		return true
   262  	case ssaop.OpDiv32u:
   263  		return rewriteValue_OpDiv32u(v)
   264  	case ssaop.OpDiv64:
   265  		return rewriteValue_OpDiv64(v)
   266  	case ssaop.OpDiv64F:
   267  		v.Op = ssaop.OpLOONG64DIVD
   268  		return true
   269  	case ssaop.OpDiv64u:
   270  		v.Op = ssaop.OpLOONG64DIVVU
   271  		return true
   272  	case ssaop.OpDiv8:
   273  		return rewriteValue_OpDiv8(v)
   274  	case ssaop.OpDiv8u:
   275  		return rewriteValue_OpDiv8u(v)
   276  	case ssaop.OpEq16:
   277  		return rewriteValue_OpEq16(v)
   278  	case ssaop.OpEq32:
   279  		return rewriteValue_OpEq32(v)
   280  	case ssaop.OpEq32F:
   281  		return rewriteValue_OpEq32F(v)
   282  	case ssaop.OpEq64:
   283  		return rewriteValue_OpEq64(v)
   284  	case ssaop.OpEq64F:
   285  		return rewriteValue_OpEq64F(v)
   286  	case ssaop.OpEq8:
   287  		return rewriteValue_OpEq8(v)
   288  	case ssaop.OpEqB:
   289  		return rewriteValue_OpEqB(v)
   290  	case ssaop.OpEqPtr:
   291  		return rewriteValue_OpEqPtr(v)
   292  	case ssaop.OpFMA:
   293  		v.Op = ssaop.OpLOONG64FMADDD
   294  		return true
   295  	case ssaop.OpFloor:
   296  		v.Op = ssaop.OpLOONG64FRINTMD
   297  		return true
   298  	case ssaop.OpGetCallerPC:
   299  		v.Op = ssaop.OpLOONG64LoweredGetCallerPC
   300  		return true
   301  	case ssaop.OpGetCallerSP:
   302  		v.Op = ssaop.OpLOONG64LoweredGetCallerSP
   303  		return true
   304  	case ssaop.OpGetClosurePtr:
   305  		v.Op = ssaop.OpLOONG64LoweredGetClosurePtr
   306  		return true
   307  	case ssaop.OpHmul32:
   308  		v.Op = ssaop.OpLOONG64MULH
   309  		return true
   310  	case ssaop.OpHmul32u:
   311  		v.Op = ssaop.OpLOONG64MULHU
   312  		return true
   313  	case ssaop.OpHmul64:
   314  		v.Op = ssaop.OpLOONG64MULHV
   315  		return true
   316  	case ssaop.OpHmul64u:
   317  		v.Op = ssaop.OpLOONG64MULHVU
   318  		return true
   319  	case ssaop.OpInterCall:
   320  		v.Op = ssaop.OpLOONG64CALLinter
   321  		return true
   322  	case ssaop.OpIsInBounds:
   323  		return rewriteValue_OpIsInBounds(v)
   324  	case ssaop.OpIsNonNil:
   325  		return rewriteValue_OpIsNonNil(v)
   326  	case ssaop.OpIsSliceInBounds:
   327  		return rewriteValue_OpIsSliceInBounds(v)
   328  	case ssaop.OpLOONG64ADDD:
   329  		return rewriteValue_OpLOONG64ADDD(v)
   330  	case ssaop.OpLOONG64ADDF:
   331  		return rewriteValue_OpLOONG64ADDF(v)
   332  	case ssaop.OpLOONG64ADDV:
   333  		return rewriteValue_OpLOONG64ADDV(v)
   334  	case ssaop.OpLOONG64ADDVconst:
   335  		return rewriteValue_OpLOONG64ADDVconst(v)
   336  	case ssaop.OpLOONG64ADDshiftLLV:
   337  		return rewriteValue_OpLOONG64ADDshiftLLV(v)
   338  	case ssaop.OpLOONG64AND:
   339  		return rewriteValue_OpLOONG64AND(v)
   340  	case ssaop.OpLOONG64ANDconst:
   341  		return rewriteValue_OpLOONG64ANDconst(v)
   342  	case ssaop.OpLOONG64DIVV:
   343  		return rewriteValue_OpLOONG64DIVV(v)
   344  	case ssaop.OpLOONG64DIVVU:
   345  		return rewriteValue_OpLOONG64DIVVU(v)
   346  	case ssaop.OpLOONG64LoweredPanicBoundsCR:
   347  		return rewriteValue_OpLOONG64LoweredPanicBoundsCR(v)
   348  	case ssaop.OpLOONG64LoweredPanicBoundsRC:
   349  		return rewriteValue_OpLOONG64LoweredPanicBoundsRC(v)
   350  	case ssaop.OpLOONG64LoweredPanicBoundsRR:
   351  		return rewriteValue_OpLOONG64LoweredPanicBoundsRR(v)
   352  	case ssaop.OpLOONG64MASKEQZ:
   353  		return rewriteValue_OpLOONG64MASKEQZ(v)
   354  	case ssaop.OpLOONG64MASKNEZ:
   355  		return rewriteValue_OpLOONG64MASKNEZ(v)
   356  	case ssaop.OpLOONG64MOVBUload:
   357  		return rewriteValue_OpLOONG64MOVBUload(v)
   358  	case ssaop.OpLOONG64MOVBUloadidx:
   359  		return rewriteValue_OpLOONG64MOVBUloadidx(v)
   360  	case ssaop.OpLOONG64MOVBUreg:
   361  		return rewriteValue_OpLOONG64MOVBUreg(v)
   362  	case ssaop.OpLOONG64MOVBload:
   363  		return rewriteValue_OpLOONG64MOVBload(v)
   364  	case ssaop.OpLOONG64MOVBloadidx:
   365  		return rewriteValue_OpLOONG64MOVBloadidx(v)
   366  	case ssaop.OpLOONG64MOVBreg:
   367  		return rewriteValue_OpLOONG64MOVBreg(v)
   368  	case ssaop.OpLOONG64MOVBstore:
   369  		return rewriteValue_OpLOONG64MOVBstore(v)
   370  	case ssaop.OpLOONG64MOVBstoreidx:
   371  		return rewriteValue_OpLOONG64MOVBstoreidx(v)
   372  	case ssaop.OpLOONG64MOVDF:
   373  		return rewriteValue_OpLOONG64MOVDF(v)
   374  	case ssaop.OpLOONG64MOVDload:
   375  		return rewriteValue_OpLOONG64MOVDload(v)
   376  	case ssaop.OpLOONG64MOVDloadidx:
   377  		return rewriteValue_OpLOONG64MOVDloadidx(v)
   378  	case ssaop.OpLOONG64MOVDstore:
   379  		return rewriteValue_OpLOONG64MOVDstore(v)
   380  	case ssaop.OpLOONG64MOVDstoreidx:
   381  		return rewriteValue_OpLOONG64MOVDstoreidx(v)
   382  	case ssaop.OpLOONG64MOVFload:
   383  		return rewriteValue_OpLOONG64MOVFload(v)
   384  	case ssaop.OpLOONG64MOVFloadidx:
   385  		return rewriteValue_OpLOONG64MOVFloadidx(v)
   386  	case ssaop.OpLOONG64MOVFstore:
   387  		return rewriteValue_OpLOONG64MOVFstore(v)
   388  	case ssaop.OpLOONG64MOVFstoreidx:
   389  		return rewriteValue_OpLOONG64MOVFstoreidx(v)
   390  	case ssaop.OpLOONG64MOVHUload:
   391  		return rewriteValue_OpLOONG64MOVHUload(v)
   392  	case ssaop.OpLOONG64MOVHUloadidx:
   393  		return rewriteValue_OpLOONG64MOVHUloadidx(v)
   394  	case ssaop.OpLOONG64MOVHUreg:
   395  		return rewriteValue_OpLOONG64MOVHUreg(v)
   396  	case ssaop.OpLOONG64MOVHload:
   397  		return rewriteValue_OpLOONG64MOVHload(v)
   398  	case ssaop.OpLOONG64MOVHloadidx:
   399  		return rewriteValue_OpLOONG64MOVHloadidx(v)
   400  	case ssaop.OpLOONG64MOVHreg:
   401  		return rewriteValue_OpLOONG64MOVHreg(v)
   402  	case ssaop.OpLOONG64MOVHstore:
   403  		return rewriteValue_OpLOONG64MOVHstore(v)
   404  	case ssaop.OpLOONG64MOVHstoreidx:
   405  		return rewriteValue_OpLOONG64MOVHstoreidx(v)
   406  	case ssaop.OpLOONG64MOVVload:
   407  		return rewriteValue_OpLOONG64MOVVload(v)
   408  	case ssaop.OpLOONG64MOVVloadidx:
   409  		return rewriteValue_OpLOONG64MOVVloadidx(v)
   410  	case ssaop.OpLOONG64MOVVnop:
   411  		return rewriteValue_OpLOONG64MOVVnop(v)
   412  	case ssaop.OpLOONG64MOVVreg:
   413  		return rewriteValue_OpLOONG64MOVVreg(v)
   414  	case ssaop.OpLOONG64MOVVstore:
   415  		return rewriteValue_OpLOONG64MOVVstore(v)
   416  	case ssaop.OpLOONG64MOVVstoreidx:
   417  		return rewriteValue_OpLOONG64MOVVstoreidx(v)
   418  	case ssaop.OpLOONG64MOVWUload:
   419  		return rewriteValue_OpLOONG64MOVWUload(v)
   420  	case ssaop.OpLOONG64MOVWUloadidx:
   421  		return rewriteValue_OpLOONG64MOVWUloadidx(v)
   422  	case ssaop.OpLOONG64MOVWUreg:
   423  		return rewriteValue_OpLOONG64MOVWUreg(v)
   424  	case ssaop.OpLOONG64MOVWload:
   425  		return rewriteValue_OpLOONG64MOVWload(v)
   426  	case ssaop.OpLOONG64MOVWloadidx:
   427  		return rewriteValue_OpLOONG64MOVWloadidx(v)
   428  	case ssaop.OpLOONG64MOVWreg:
   429  		return rewriteValue_OpLOONG64MOVWreg(v)
   430  	case ssaop.OpLOONG64MOVWstore:
   431  		return rewriteValue_OpLOONG64MOVWstore(v)
   432  	case ssaop.OpLOONG64MOVWstoreidx:
   433  		return rewriteValue_OpLOONG64MOVWstoreidx(v)
   434  	case ssaop.OpLOONG64MULV:
   435  		return rewriteValue_OpLOONG64MULV(v)
   436  	case ssaop.OpLOONG64NEGV:
   437  		return rewriteValue_OpLOONG64NEGV(v)
   438  	case ssaop.OpLOONG64NOR:
   439  		return rewriteValue_OpLOONG64NOR(v)
   440  	case ssaop.OpLOONG64NORconst:
   441  		return rewriteValue_OpLOONG64NORconst(v)
   442  	case ssaop.OpLOONG64OR:
   443  		return rewriteValue_OpLOONG64OR(v)
   444  	case ssaop.OpLOONG64ORN:
   445  		return rewriteValue_OpLOONG64ORN(v)
   446  	case ssaop.OpLOONG64ORconst:
   447  		return rewriteValue_OpLOONG64ORconst(v)
   448  	case ssaop.OpLOONG64REMV:
   449  		return rewriteValue_OpLOONG64REMV(v)
   450  	case ssaop.OpLOONG64REMVU:
   451  		return rewriteValue_OpLOONG64REMVU(v)
   452  	case ssaop.OpLOONG64ROTR:
   453  		return rewriteValue_OpLOONG64ROTR(v)
   454  	case ssaop.OpLOONG64ROTRV:
   455  		return rewriteValue_OpLOONG64ROTRV(v)
   456  	case ssaop.OpLOONG64SGT:
   457  		return rewriteValue_OpLOONG64SGT(v)
   458  	case ssaop.OpLOONG64SGTU:
   459  		return rewriteValue_OpLOONG64SGTU(v)
   460  	case ssaop.OpLOONG64SGTUconst:
   461  		return rewriteValue_OpLOONG64SGTUconst(v)
   462  	case ssaop.OpLOONG64SGTconst:
   463  		return rewriteValue_OpLOONG64SGTconst(v)
   464  	case ssaop.OpLOONG64SLL:
   465  		return rewriteValue_OpLOONG64SLL(v)
   466  	case ssaop.OpLOONG64SLLV:
   467  		return rewriteValue_OpLOONG64SLLV(v)
   468  	case ssaop.OpLOONG64SLLVconst:
   469  		return rewriteValue_OpLOONG64SLLVconst(v)
   470  	case ssaop.OpLOONG64SLLconst:
   471  		return rewriteValue_OpLOONG64SLLconst(v)
   472  	case ssaop.OpLOONG64SRA:
   473  		return rewriteValue_OpLOONG64SRA(v)
   474  	case ssaop.OpLOONG64SRAV:
   475  		return rewriteValue_OpLOONG64SRAV(v)
   476  	case ssaop.OpLOONG64SRAVconst:
   477  		return rewriteValue_OpLOONG64SRAVconst(v)
   478  	case ssaop.OpLOONG64SRL:
   479  		return rewriteValue_OpLOONG64SRL(v)
   480  	case ssaop.OpLOONG64SRLV:
   481  		return rewriteValue_OpLOONG64SRLV(v)
   482  	case ssaop.OpLOONG64SRLVconst:
   483  		return rewriteValue_OpLOONG64SRLVconst(v)
   484  	case ssaop.OpLOONG64SUBD:
   485  		return rewriteValue_OpLOONG64SUBD(v)
   486  	case ssaop.OpLOONG64SUBF:
   487  		return rewriteValue_OpLOONG64SUBF(v)
   488  	case ssaop.OpLOONG64SUBV:
   489  		return rewriteValue_OpLOONG64SUBV(v)
   490  	case ssaop.OpLOONG64SUBVconst:
   491  		return rewriteValue_OpLOONG64SUBVconst(v)
   492  	case ssaop.OpLOONG64XOR:
   493  		return rewriteValue_OpLOONG64XOR(v)
   494  	case ssaop.OpLOONG64XORconst:
   495  		return rewriteValue_OpLOONG64XORconst(v)
   496  	case ssaop.OpLeq16:
   497  		return rewriteValue_OpLeq16(v)
   498  	case ssaop.OpLeq16U:
   499  		return rewriteValue_OpLeq16U(v)
   500  	case ssaop.OpLeq32:
   501  		return rewriteValue_OpLeq32(v)
   502  	case ssaop.OpLeq32F:
   503  		return rewriteValue_OpLeq32F(v)
   504  	case ssaop.OpLeq32U:
   505  		return rewriteValue_OpLeq32U(v)
   506  	case ssaop.OpLeq64:
   507  		return rewriteValue_OpLeq64(v)
   508  	case ssaop.OpLeq64F:
   509  		return rewriteValue_OpLeq64F(v)
   510  	case ssaop.OpLeq64U:
   511  		return rewriteValue_OpLeq64U(v)
   512  	case ssaop.OpLeq8:
   513  		return rewriteValue_OpLeq8(v)
   514  	case ssaop.OpLeq8U:
   515  		return rewriteValue_OpLeq8U(v)
   516  	case ssaop.OpLess16:
   517  		return rewriteValue_OpLess16(v)
   518  	case ssaop.OpLess16U:
   519  		return rewriteValue_OpLess16U(v)
   520  	case ssaop.OpLess32:
   521  		return rewriteValue_OpLess32(v)
   522  	case ssaop.OpLess32F:
   523  		return rewriteValue_OpLess32F(v)
   524  	case ssaop.OpLess32U:
   525  		return rewriteValue_OpLess32U(v)
   526  	case ssaop.OpLess64:
   527  		return rewriteValue_OpLess64(v)
   528  	case ssaop.OpLess64F:
   529  		return rewriteValue_OpLess64F(v)
   530  	case ssaop.OpLess64U:
   531  		return rewriteValue_OpLess64U(v)
   532  	case ssaop.OpLess8:
   533  		return rewriteValue_OpLess8(v)
   534  	case ssaop.OpLess8U:
   535  		return rewriteValue_OpLess8U(v)
   536  	case ssaop.OpLoad:
   537  		return rewriteValue_OpLoad(v)
   538  	case ssaop.OpLocalAddr:
   539  		return rewriteValue_OpLocalAddr(v)
   540  	case ssaop.OpLsh16x16:
   541  		return rewriteValue_OpLsh16x16(v)
   542  	case ssaop.OpLsh16x32:
   543  		return rewriteValue_OpLsh16x32(v)
   544  	case ssaop.OpLsh16x64:
   545  		return rewriteValue_OpLsh16x64(v)
   546  	case ssaop.OpLsh16x8:
   547  		return rewriteValue_OpLsh16x8(v)
   548  	case ssaop.OpLsh32x16:
   549  		return rewriteValue_OpLsh32x16(v)
   550  	case ssaop.OpLsh32x32:
   551  		return rewriteValue_OpLsh32x32(v)
   552  	case ssaop.OpLsh32x64:
   553  		return rewriteValue_OpLsh32x64(v)
   554  	case ssaop.OpLsh32x8:
   555  		return rewriteValue_OpLsh32x8(v)
   556  	case ssaop.OpLsh64x16:
   557  		return rewriteValue_OpLsh64x16(v)
   558  	case ssaop.OpLsh64x32:
   559  		return rewriteValue_OpLsh64x32(v)
   560  	case ssaop.OpLsh64x64:
   561  		return rewriteValue_OpLsh64x64(v)
   562  	case ssaop.OpLsh64x8:
   563  		return rewriteValue_OpLsh64x8(v)
   564  	case ssaop.OpLsh8x16:
   565  		return rewriteValue_OpLsh8x16(v)
   566  	case ssaop.OpLsh8x32:
   567  		return rewriteValue_OpLsh8x32(v)
   568  	case ssaop.OpLsh8x64:
   569  		return rewriteValue_OpLsh8x64(v)
   570  	case ssaop.OpLsh8x8:
   571  		return rewriteValue_OpLsh8x8(v)
   572  	case ssaop.OpMax32F:
   573  		v.Op = ssaop.OpLOONG64FMAXF
   574  		return true
   575  	case ssaop.OpMax64F:
   576  		v.Op = ssaop.OpLOONG64FMAXD
   577  		return true
   578  	case ssaop.OpMin32F:
   579  		v.Op = ssaop.OpLOONG64FMINF
   580  		return true
   581  	case ssaop.OpMin64F:
   582  		v.Op = ssaop.OpLOONG64FMIND
   583  		return true
   584  	case ssaop.OpMod16:
   585  		return rewriteValue_OpMod16(v)
   586  	case ssaop.OpMod16u:
   587  		return rewriteValue_OpMod16u(v)
   588  	case ssaop.OpMod32:
   589  		return rewriteValue_OpMod32(v)
   590  	case ssaop.OpMod32u:
   591  		return rewriteValue_OpMod32u(v)
   592  	case ssaop.OpMod64:
   593  		return rewriteValue_OpMod64(v)
   594  	case ssaop.OpMod64u:
   595  		v.Op = ssaop.OpLOONG64REMVU
   596  		return true
   597  	case ssaop.OpMod8:
   598  		return rewriteValue_OpMod8(v)
   599  	case ssaop.OpMod8u:
   600  		return rewriteValue_OpMod8u(v)
   601  	case ssaop.OpMove:
   602  		return rewriteValue_OpMove(v)
   603  	case ssaop.OpMul16:
   604  		v.Op = ssaop.OpLOONG64MULV
   605  		return true
   606  	case ssaop.OpMul32:
   607  		v.Op = ssaop.OpLOONG64MULV
   608  		return true
   609  	case ssaop.OpMul32F:
   610  		v.Op = ssaop.OpLOONG64MULF
   611  		return true
   612  	case ssaop.OpMul64:
   613  		v.Op = ssaop.OpLOONG64MULV
   614  		return true
   615  	case ssaop.OpMul64F:
   616  		v.Op = ssaop.OpLOONG64MULD
   617  		return true
   618  	case ssaop.OpMul8:
   619  		v.Op = ssaop.OpLOONG64MULV
   620  		return true
   621  	case ssaop.OpNeg16:
   622  		v.Op = ssaop.OpLOONG64NEGV
   623  		return true
   624  	case ssaop.OpNeg32:
   625  		v.Op = ssaop.OpLOONG64NEGV
   626  		return true
   627  	case ssaop.OpNeg32F:
   628  		v.Op = ssaop.OpLOONG64NEGF
   629  		return true
   630  	case ssaop.OpNeg64:
   631  		v.Op = ssaop.OpLOONG64NEGV
   632  		return true
   633  	case ssaop.OpNeg64F:
   634  		v.Op = ssaop.OpLOONG64NEGD
   635  		return true
   636  	case ssaop.OpNeg8:
   637  		v.Op = ssaop.OpLOONG64NEGV
   638  		return true
   639  	case ssaop.OpNeq16:
   640  		return rewriteValue_OpNeq16(v)
   641  	case ssaop.OpNeq32:
   642  		return rewriteValue_OpNeq32(v)
   643  	case ssaop.OpNeq32F:
   644  		return rewriteValue_OpNeq32F(v)
   645  	case ssaop.OpNeq64:
   646  		return rewriteValue_OpNeq64(v)
   647  	case ssaop.OpNeq64F:
   648  		return rewriteValue_OpNeq64F(v)
   649  	case ssaop.OpNeq8:
   650  		return rewriteValue_OpNeq8(v)
   651  	case ssaop.OpNeqB:
   652  		v.Op = ssaop.OpLOONG64XOR
   653  		return true
   654  	case ssaop.OpNeqPtr:
   655  		return rewriteValue_OpNeqPtr(v)
   656  	case ssaop.OpNilCheck:
   657  		v.Op = ssaop.OpLOONG64LoweredNilCheck
   658  		return true
   659  	case ssaop.OpNot:
   660  		return rewriteValue_OpNot(v)
   661  	case ssaop.OpOffPtr:
   662  		return rewriteValue_OpOffPtr(v)
   663  	case ssaop.OpOr16:
   664  		v.Op = ssaop.OpLOONG64OR
   665  		return true
   666  	case ssaop.OpOr32:
   667  		v.Op = ssaop.OpLOONG64OR
   668  		return true
   669  	case ssaop.OpOr64:
   670  		v.Op = ssaop.OpLOONG64OR
   671  		return true
   672  	case ssaop.OpOr8:
   673  		v.Op = ssaop.OpLOONG64OR
   674  		return true
   675  	case ssaop.OpOrB:
   676  		v.Op = ssaop.OpLOONG64OR
   677  		return true
   678  	case ssaop.OpPanicBounds:
   679  		v.Op = ssaop.OpLOONG64LoweredPanicBoundsRR
   680  		return true
   681  	case ssaop.OpPopCount16:
   682  		return rewriteValue_OpPopCount16(v)
   683  	case ssaop.OpPopCount32:
   684  		return rewriteValue_OpPopCount32(v)
   685  	case ssaop.OpPopCount64:
   686  		return rewriteValue_OpPopCount64(v)
   687  	case ssaop.OpPrefetchCache:
   688  		return rewriteValue_OpPrefetchCache(v)
   689  	case ssaop.OpPrefetchCacheStreamed:
   690  		return rewriteValue_OpPrefetchCacheStreamed(v)
   691  	case ssaop.OpPubBarrier:
   692  		v.Op = ssaop.OpLOONG64LoweredPubBarrier
   693  		return true
   694  	case ssaop.OpRotateLeft16:
   695  		return rewriteValue_OpRotateLeft16(v)
   696  	case ssaop.OpRotateLeft32:
   697  		return rewriteValue_OpRotateLeft32(v)
   698  	case ssaop.OpRotateLeft64:
   699  		return rewriteValue_OpRotateLeft64(v)
   700  	case ssaop.OpRotateLeft8:
   701  		return rewriteValue_OpRotateLeft8(v)
   702  	case ssaop.OpRound32F:
   703  		v.Op = ssaop.OpLOONG64LoweredRound32F
   704  		return true
   705  	case ssaop.OpRound64F:
   706  		v.Op = ssaop.OpLOONG64LoweredRound64F
   707  		return true
   708  	case ssaop.OpRoundToEven:
   709  		v.Op = ssaop.OpLOONG64FRINTND
   710  		return true
   711  	case ssaop.OpRsh16Ux16:
   712  		return rewriteValue_OpRsh16Ux16(v)
   713  	case ssaop.OpRsh16Ux32:
   714  		return rewriteValue_OpRsh16Ux32(v)
   715  	case ssaop.OpRsh16Ux64:
   716  		return rewriteValue_OpRsh16Ux64(v)
   717  	case ssaop.OpRsh16Ux8:
   718  		return rewriteValue_OpRsh16Ux8(v)
   719  	case ssaop.OpRsh16x16:
   720  		return rewriteValue_OpRsh16x16(v)
   721  	case ssaop.OpRsh16x32:
   722  		return rewriteValue_OpRsh16x32(v)
   723  	case ssaop.OpRsh16x64:
   724  		return rewriteValue_OpRsh16x64(v)
   725  	case ssaop.OpRsh16x8:
   726  		return rewriteValue_OpRsh16x8(v)
   727  	case ssaop.OpRsh32Ux16:
   728  		return rewriteValue_OpRsh32Ux16(v)
   729  	case ssaop.OpRsh32Ux32:
   730  		return rewriteValue_OpRsh32Ux32(v)
   731  	case ssaop.OpRsh32Ux64:
   732  		return rewriteValue_OpRsh32Ux64(v)
   733  	case ssaop.OpRsh32Ux8:
   734  		return rewriteValue_OpRsh32Ux8(v)
   735  	case ssaop.OpRsh32x16:
   736  		return rewriteValue_OpRsh32x16(v)
   737  	case ssaop.OpRsh32x32:
   738  		return rewriteValue_OpRsh32x32(v)
   739  	case ssaop.OpRsh32x64:
   740  		return rewriteValue_OpRsh32x64(v)
   741  	case ssaop.OpRsh32x8:
   742  		return rewriteValue_OpRsh32x8(v)
   743  	case ssaop.OpRsh64Ux16:
   744  		return rewriteValue_OpRsh64Ux16(v)
   745  	case ssaop.OpRsh64Ux32:
   746  		return rewriteValue_OpRsh64Ux32(v)
   747  	case ssaop.OpRsh64Ux64:
   748  		return rewriteValue_OpRsh64Ux64(v)
   749  	case ssaop.OpRsh64Ux8:
   750  		return rewriteValue_OpRsh64Ux8(v)
   751  	case ssaop.OpRsh64x16:
   752  		return rewriteValue_OpRsh64x16(v)
   753  	case ssaop.OpRsh64x32:
   754  		return rewriteValue_OpRsh64x32(v)
   755  	case ssaop.OpRsh64x64:
   756  		return rewriteValue_OpRsh64x64(v)
   757  	case ssaop.OpRsh64x8:
   758  		return rewriteValue_OpRsh64x8(v)
   759  	case ssaop.OpRsh8Ux16:
   760  		return rewriteValue_OpRsh8Ux16(v)
   761  	case ssaop.OpRsh8Ux32:
   762  		return rewriteValue_OpRsh8Ux32(v)
   763  	case ssaop.OpRsh8Ux64:
   764  		return rewriteValue_OpRsh8Ux64(v)
   765  	case ssaop.OpRsh8Ux8:
   766  		return rewriteValue_OpRsh8Ux8(v)
   767  	case ssaop.OpRsh8x16:
   768  		return rewriteValue_OpRsh8x16(v)
   769  	case ssaop.OpRsh8x32:
   770  		return rewriteValue_OpRsh8x32(v)
   771  	case ssaop.OpRsh8x64:
   772  		return rewriteValue_OpRsh8x64(v)
   773  	case ssaop.OpRsh8x8:
   774  		return rewriteValue_OpRsh8x8(v)
   775  	case ssaop.OpSelect0:
   776  		return rewriteValue_OpSelect0(v)
   777  	case ssaop.OpSelect1:
   778  		return rewriteValue_OpSelect1(v)
   779  	case ssaop.OpSelectN:
   780  		return rewriteValue_OpSelectN(v)
   781  	case ssaop.OpSignExt16to32:
   782  		v.Op = ssaop.OpLOONG64MOVHreg
   783  		return true
   784  	case ssaop.OpSignExt16to64:
   785  		v.Op = ssaop.OpLOONG64MOVHreg
   786  		return true
   787  	case ssaop.OpSignExt32to64:
   788  		v.Op = ssaop.OpLOONG64MOVWreg
   789  		return true
   790  	case ssaop.OpSignExt8to16:
   791  		v.Op = ssaop.OpLOONG64MOVBreg
   792  		return true
   793  	case ssaop.OpSignExt8to32:
   794  		v.Op = ssaop.OpLOONG64MOVBreg
   795  		return true
   796  	case ssaop.OpSignExt8to64:
   797  		v.Op = ssaop.OpLOONG64MOVBreg
   798  		return true
   799  	case ssaop.OpSlicemask:
   800  		return rewriteValue_OpSlicemask(v)
   801  	case ssaop.OpSqrt:
   802  		v.Op = ssaop.OpLOONG64SQRTD
   803  		return true
   804  	case ssaop.OpSqrt32:
   805  		v.Op = ssaop.OpLOONG64SQRTF
   806  		return true
   807  	case ssaop.OpStaticCall:
   808  		v.Op = ssaop.OpLOONG64CALLstatic
   809  		return true
   810  	case ssaop.OpStore:
   811  		return rewriteValue_OpStore(v)
   812  	case ssaop.OpSub16:
   813  		v.Op = ssaop.OpLOONG64SUBV
   814  		return true
   815  	case ssaop.OpSub32:
   816  		v.Op = ssaop.OpLOONG64SUBV
   817  		return true
   818  	case ssaop.OpSub32F:
   819  		v.Op = ssaop.OpLOONG64SUBF
   820  		return true
   821  	case ssaop.OpSub64:
   822  		v.Op = ssaop.OpLOONG64SUBV
   823  		return true
   824  	case ssaop.OpSub64F:
   825  		v.Op = ssaop.OpLOONG64SUBD
   826  		return true
   827  	case ssaop.OpSub8:
   828  		v.Op = ssaop.OpLOONG64SUBV
   829  		return true
   830  	case ssaop.OpSubPtr:
   831  		v.Op = ssaop.OpLOONG64SUBV
   832  		return true
   833  	case ssaop.OpTailCall:
   834  		v.Op = ssaop.OpLOONG64CALLtail
   835  		return true
   836  	case ssaop.OpTailCallInter:
   837  		v.Op = ssaop.OpLOONG64CALLtailinter
   838  		return true
   839  	case ssaop.OpTrunc:
   840  		v.Op = ssaop.OpLOONG64FRINTZD
   841  		return true
   842  	case ssaop.OpTrunc16to8:
   843  		v.Op = ssaop.OpCopy
   844  		return true
   845  	case ssaop.OpTrunc32to16:
   846  		v.Op = ssaop.OpCopy
   847  		return true
   848  	case ssaop.OpTrunc32to8:
   849  		v.Op = ssaop.OpCopy
   850  		return true
   851  	case ssaop.OpTrunc64to16:
   852  		v.Op = ssaop.OpCopy
   853  		return true
   854  	case ssaop.OpTrunc64to32:
   855  		v.Op = ssaop.OpCopy
   856  		return true
   857  	case ssaop.OpTrunc64to8:
   858  		v.Op = ssaop.OpCopy
   859  		return true
   860  	case ssaop.OpWB:
   861  		v.Op = ssaop.OpLOONG64LoweredWB
   862  		return true
   863  	case ssaop.OpXor16:
   864  		v.Op = ssaop.OpLOONG64XOR
   865  		return true
   866  	case ssaop.OpXor32:
   867  		v.Op = ssaop.OpLOONG64XOR
   868  		return true
   869  	case ssaop.OpXor64:
   870  		v.Op = ssaop.OpLOONG64XOR
   871  		return true
   872  	case ssaop.OpXor8:
   873  		v.Op = ssaop.OpLOONG64XOR
   874  		return true
   875  	case ssaop.OpZero:
   876  		return rewriteValue_OpZero(v)
   877  	case ssaop.OpZeroExt16to32:
   878  		v.Op = ssaop.OpLOONG64MOVHUreg
   879  		return true
   880  	case ssaop.OpZeroExt16to64:
   881  		v.Op = ssaop.OpLOONG64MOVHUreg
   882  		return true
   883  	case ssaop.OpZeroExt32to64:
   884  		v.Op = ssaop.OpLOONG64MOVWUreg
   885  		return true
   886  	case ssaop.OpZeroExt8to16:
   887  		v.Op = ssaop.OpLOONG64MOVBUreg
   888  		return true
   889  	case ssaop.OpZeroExt8to32:
   890  		v.Op = ssaop.OpLOONG64MOVBUreg
   891  		return true
   892  	case ssaop.OpZeroExt8to64:
   893  		v.Op = ssaop.OpLOONG64MOVBUreg
   894  		return true
   895  	}
   896  	return false
   897  }
   898  func rewriteValue_OpAddr(v *ssa.Value) bool {
   899  	v_0 := v.Args[0]
   900  	// match: (Addr {sym} base)
   901  	// result: (MOVVaddr {sym} base)
   902  	for {
   903  		sym := ssa.AuxToSym(v.Aux)
   904  		base := v_0
   905  		v.Reset(ssaop.OpLOONG64MOVVaddr)
   906  		v.Aux = ssa.SymToAux(sym)
   907  		v.AddArg(base)
   908  		return true
   909  	}
   910  }
   911  func rewriteValue_OpAtomicAnd8(v *ssa.Value) bool {
   912  	v_2 := v.Args[2]
   913  	v_1 := v.Args[1]
   914  	v_0 := v.Args[0]
   915  	b := v.Block
   916  	typ := &b.Func.Config.Types
   917  	// match: (AtomicAnd8 ptr val mem)
   918  	// result: (LoweredAtomicAnd32 (AND <typ.Uintptr> (MOVVconst [^3]) ptr) (NORconst [0] <typ.UInt32> (SLLV <typ.UInt32> (XORconst <typ.UInt32> [0xff] (ZeroExt8to32 val)) (SLLVconst <typ.UInt64> [3] (ANDconst <typ.UInt64> [3] ptr)))) mem)
   919  	for {
   920  		ptr := v_0
   921  		val := v_1
   922  		mem := v_2
   923  		v.Reset(ssaop.OpLOONG64LoweredAtomicAnd32)
   924  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64AND, typ.Uintptr)
   925  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
   926  		v1.AuxInt = ssa.Int64ToAuxInt(^3)
   927  		v0.AddArg2(v1, ptr)
   928  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NORconst, typ.UInt32)
   929  		v2.AuxInt = ssa.Int64ToAuxInt(0)
   930  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, typ.UInt32)
   931  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64XORconst, typ.UInt32)
   932  		v4.AuxInt = ssa.Int64ToAuxInt(0xff)
   933  		v5 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
   934  		v5.AddArg(val)
   935  		v4.AddArg(v5)
   936  		v6 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.UInt64)
   937  		v6.AuxInt = ssa.Int64ToAuxInt(3)
   938  		v7 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.UInt64)
   939  		v7.AuxInt = ssa.Int64ToAuxInt(3)
   940  		v7.AddArg(ptr)
   941  		v6.AddArg(v7)
   942  		v3.AddArg2(v4, v6)
   943  		v2.AddArg(v3)
   944  		v.AddArg3(v0, v2, mem)
   945  		return true
   946  	}
   947  }
   948  func rewriteValue_OpAtomicCompareAndSwap32(v *ssa.Value) bool {
   949  	v_3 := v.Args[3]
   950  	v_2 := v.Args[2]
   951  	v_1 := v.Args[1]
   952  	v_0 := v.Args[0]
   953  	b := v.Block
   954  	typ := &b.Func.Config.Types
   955  	// match: (AtomicCompareAndSwap32 ptr old new mem)
   956  	// result: (LoweredAtomicCas32 ptr (SignExt32to64 old) new mem)
   957  	for {
   958  		ptr := v_0
   959  		old := v_1
   960  		new := v_2
   961  		mem := v_3
   962  		v.Reset(ssaop.OpLOONG64LoweredAtomicCas32)
   963  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
   964  		v0.AddArg(old)
   965  		v.AddArg4(ptr, v0, new, mem)
   966  		return true
   967  	}
   968  }
   969  func rewriteValue_OpAtomicCompareAndSwap32Variant(v *ssa.Value) bool {
   970  	v_3 := v.Args[3]
   971  	v_2 := v.Args[2]
   972  	v_1 := v.Args[1]
   973  	v_0 := v.Args[0]
   974  	b := v.Block
   975  	typ := &b.Func.Config.Types
   976  	// match: (AtomicCompareAndSwap32Variant ptr old new mem)
   977  	// result: (LoweredAtomicCas32Variant ptr (SignExt32to64 old) new mem)
   978  	for {
   979  		ptr := v_0
   980  		old := v_1
   981  		new := v_2
   982  		mem := v_3
   983  		v.Reset(ssaop.OpLOONG64LoweredAtomicCas32Variant)
   984  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
   985  		v0.AddArg(old)
   986  		v.AddArg4(ptr, v0, new, mem)
   987  		return true
   988  	}
   989  }
   990  func rewriteValue_OpAtomicOr8(v *ssa.Value) bool {
   991  	v_2 := v.Args[2]
   992  	v_1 := v.Args[1]
   993  	v_0 := v.Args[0]
   994  	b := v.Block
   995  	typ := &b.Func.Config.Types
   996  	// match: (AtomicOr8 ptr val mem)
   997  	// result: (LoweredAtomicOr32 (AND <typ.Uintptr> (MOVVconst [^3]) ptr) (SLLV <typ.UInt32> (ZeroExt8to32 val) (SLLVconst <typ.UInt64> [3] (ANDconst <typ.UInt64> [3] ptr))) mem)
   998  	for {
   999  		ptr := v_0
  1000  		val := v_1
  1001  		mem := v_2
  1002  		v.Reset(ssaop.OpLOONG64LoweredAtomicOr32)
  1003  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64AND, typ.Uintptr)
  1004  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1005  		v1.AuxInt = ssa.Int64ToAuxInt(^3)
  1006  		v0.AddArg2(v1, ptr)
  1007  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, typ.UInt32)
  1008  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  1009  		v3.AddArg(val)
  1010  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.UInt64)
  1011  		v4.AuxInt = ssa.Int64ToAuxInt(3)
  1012  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.UInt64)
  1013  		v5.AuxInt = ssa.Int64ToAuxInt(3)
  1014  		v5.AddArg(ptr)
  1015  		v4.AddArg(v5)
  1016  		v2.AddArg2(v3, v4)
  1017  		v.AddArg3(v0, v2, mem)
  1018  		return true
  1019  	}
  1020  }
  1021  func rewriteValue_OpAvg64u(v *ssa.Value) bool {
  1022  	v_1 := v.Args[1]
  1023  	v_0 := v.Args[0]
  1024  	b := v.Block
  1025  	// match: (Avg64u <t> x y)
  1026  	// result: (ADDV (SRLVconst <t> (SUBV <t> x y) [1]) y)
  1027  	for {
  1028  		t := v.Type
  1029  		x := v_0
  1030  		y := v_1
  1031  		v.Reset(ssaop.OpLOONG64ADDV)
  1032  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLVconst, t)
  1033  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1034  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
  1035  		v1.AddArg2(x, y)
  1036  		v0.AddArg(v1)
  1037  		v.AddArg2(v0, y)
  1038  		return true
  1039  	}
  1040  }
  1041  func rewriteValue_OpBitLen16(v *ssa.Value) bool {
  1042  	v_0 := v.Args[0]
  1043  	b := v.Block
  1044  	typ := &b.Func.Config.Types
  1045  	// match: (BitLen16 x)
  1046  	// result: (BitLen64 (ZeroExt16to64 x))
  1047  	for {
  1048  		x := v_0
  1049  		v.Reset(ssaop.OpBitLen64)
  1050  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1051  		v0.AddArg(x)
  1052  		v.AddArg(v0)
  1053  		return true
  1054  	}
  1055  }
  1056  func rewriteValue_OpBitLen32(v *ssa.Value) bool {
  1057  	v_0 := v.Args[0]
  1058  	b := v.Block
  1059  	// match: (BitLen32 <t> x)
  1060  	// result: (NEGV <t> (SUBVconst <t> [32] (CLZW <t> x)))
  1061  	for {
  1062  		t := v.Type
  1063  		x := v_0
  1064  		v.Reset(ssaop.OpLOONG64NEGV)
  1065  		v.Type = t
  1066  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBVconst, t)
  1067  		v0.AuxInt = ssa.Int64ToAuxInt(32)
  1068  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64CLZW, t)
  1069  		v1.AddArg(x)
  1070  		v0.AddArg(v1)
  1071  		v.AddArg(v0)
  1072  		return true
  1073  	}
  1074  }
  1075  func rewriteValue_OpBitLen64(v *ssa.Value) bool {
  1076  	v_0 := v.Args[0]
  1077  	b := v.Block
  1078  	// match: (BitLen64 <t> x)
  1079  	// result: (NEGV <t> (SUBVconst <t> [64] (CLZV <t> x)))
  1080  	for {
  1081  		t := v.Type
  1082  		x := v_0
  1083  		v.Reset(ssaop.OpLOONG64NEGV)
  1084  		v.Type = t
  1085  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBVconst, t)
  1086  		v0.AuxInt = ssa.Int64ToAuxInt(64)
  1087  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64CLZV, t)
  1088  		v1.AddArg(x)
  1089  		v0.AddArg(v1)
  1090  		v.AddArg(v0)
  1091  		return true
  1092  	}
  1093  }
  1094  func rewriteValue_OpBitLen8(v *ssa.Value) bool {
  1095  	v_0 := v.Args[0]
  1096  	b := v.Block
  1097  	typ := &b.Func.Config.Types
  1098  	// match: (BitLen8 x)
  1099  	// result: (BitLen64 (ZeroExt8to64 x))
  1100  	for {
  1101  		x := v_0
  1102  		v.Reset(ssaop.OpBitLen64)
  1103  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1104  		v0.AddArg(x)
  1105  		v.AddArg(v0)
  1106  		return true
  1107  	}
  1108  }
  1109  func rewriteValue_OpBitRev16(v *ssa.Value) bool {
  1110  	v_0 := v.Args[0]
  1111  	b := v.Block
  1112  	// match: (BitRev16 <t> x)
  1113  	// result: (REVB2H (BITREV4B <t> x))
  1114  	for {
  1115  		t := v.Type
  1116  		x := v_0
  1117  		v.Reset(ssaop.OpLOONG64REVB2H)
  1118  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64BITREV4B, t)
  1119  		v0.AddArg(x)
  1120  		v.AddArg(v0)
  1121  		return true
  1122  	}
  1123  }
  1124  func rewriteValue_OpCom16(v *ssa.Value) bool {
  1125  	v_0 := v.Args[0]
  1126  	b := v.Block
  1127  	typ := &b.Func.Config.Types
  1128  	// match: (Com16 x)
  1129  	// result: (NOR (MOVVconst [0]) x)
  1130  	for {
  1131  		x := v_0
  1132  		v.Reset(ssaop.OpLOONG64NOR)
  1133  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1134  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1135  		v.AddArg2(v0, x)
  1136  		return true
  1137  	}
  1138  }
  1139  func rewriteValue_OpCom32(v *ssa.Value) bool {
  1140  	v_0 := v.Args[0]
  1141  	b := v.Block
  1142  	typ := &b.Func.Config.Types
  1143  	// match: (Com32 x)
  1144  	// result: (NOR (MOVVconst [0]) x)
  1145  	for {
  1146  		x := v_0
  1147  		v.Reset(ssaop.OpLOONG64NOR)
  1148  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1149  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1150  		v.AddArg2(v0, x)
  1151  		return true
  1152  	}
  1153  }
  1154  func rewriteValue_OpCom64(v *ssa.Value) bool {
  1155  	v_0 := v.Args[0]
  1156  	b := v.Block
  1157  	typ := &b.Func.Config.Types
  1158  	// match: (Com64 x)
  1159  	// result: (NOR (MOVVconst [0]) x)
  1160  	for {
  1161  		x := v_0
  1162  		v.Reset(ssaop.OpLOONG64NOR)
  1163  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1164  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1165  		v.AddArg2(v0, x)
  1166  		return true
  1167  	}
  1168  }
  1169  func rewriteValue_OpCom8(v *ssa.Value) bool {
  1170  	v_0 := v.Args[0]
  1171  	b := v.Block
  1172  	typ := &b.Func.Config.Types
  1173  	// match: (Com8 x)
  1174  	// result: (NOR (MOVVconst [0]) x)
  1175  	for {
  1176  		x := v_0
  1177  		v.Reset(ssaop.OpLOONG64NOR)
  1178  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1179  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1180  		v.AddArg2(v0, x)
  1181  		return true
  1182  	}
  1183  }
  1184  func rewriteValue_OpCondSelect(v *ssa.Value) bool {
  1185  	v_2 := v.Args[2]
  1186  	v_1 := v.Args[1]
  1187  	v_0 := v.Args[0]
  1188  	b := v.Block
  1189  	// match: (CondSelect <t> x y cond)
  1190  	// result: (OR (MASKEQZ <t> x cond) (MASKNEZ <t> y cond))
  1191  	for {
  1192  		t := v.Type
  1193  		x := v_0
  1194  		y := v_1
  1195  		cond := v_2
  1196  		v.Reset(ssaop.OpLOONG64OR)
  1197  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MASKEQZ, t)
  1198  		v0.AddArg2(x, cond)
  1199  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MASKNEZ, t)
  1200  		v1.AddArg2(y, cond)
  1201  		v.AddArg2(v0, v1)
  1202  		return true
  1203  	}
  1204  }
  1205  func rewriteValue_OpConst16(v *ssa.Value) bool {
  1206  	// match: (Const16 [val])
  1207  	// result: (MOVVconst [int64(val)])
  1208  	for {
  1209  		val := ssa.AuxIntToInt16(v.AuxInt)
  1210  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1211  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1212  		return true
  1213  	}
  1214  }
  1215  func rewriteValue_OpConst32(v *ssa.Value) bool {
  1216  	// match: (Const32 [val])
  1217  	// result: (MOVVconst [int64(val)])
  1218  	for {
  1219  		val := ssa.AuxIntToInt32(v.AuxInt)
  1220  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1221  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1222  		return true
  1223  	}
  1224  }
  1225  func rewriteValue_OpConst32F(v *ssa.Value) bool {
  1226  	// match: (Const32F [val])
  1227  	// result: (MOVFconst [float64(val)])
  1228  	for {
  1229  		val := ssa.AuxIntToFloat32(v.AuxInt)
  1230  		v.Reset(ssaop.OpLOONG64MOVFconst)
  1231  		v.AuxInt = ssa.Float64ToAuxInt(float64(val))
  1232  		return true
  1233  	}
  1234  }
  1235  func rewriteValue_OpConst64(v *ssa.Value) bool {
  1236  	// match: (Const64 [val])
  1237  	// result: (MOVVconst [int64(val)])
  1238  	for {
  1239  		val := ssa.AuxIntToInt64(v.AuxInt)
  1240  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1241  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1242  		return true
  1243  	}
  1244  }
  1245  func rewriteValue_OpConst64F(v *ssa.Value) bool {
  1246  	// match: (Const64F [val])
  1247  	// result: (MOVDconst [float64(val)])
  1248  	for {
  1249  		val := ssa.AuxIntToFloat64(v.AuxInt)
  1250  		v.Reset(ssaop.OpLOONG64MOVDconst)
  1251  		v.AuxInt = ssa.Float64ToAuxInt(float64(val))
  1252  		return true
  1253  	}
  1254  }
  1255  func rewriteValue_OpConst8(v *ssa.Value) bool {
  1256  	// match: (Const8 [val])
  1257  	// result: (MOVVconst [int64(val)])
  1258  	for {
  1259  		val := ssa.AuxIntToInt8(v.AuxInt)
  1260  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1261  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1262  		return true
  1263  	}
  1264  }
  1265  func rewriteValue_OpConstBool(v *ssa.Value) bool {
  1266  	// match: (ConstBool [t])
  1267  	// result: (MOVVconst [int64(ssa.B2i(t))])
  1268  	for {
  1269  		t := ssa.AuxIntToBool(v.AuxInt)
  1270  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1271  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.B2i(t)))
  1272  		return true
  1273  	}
  1274  }
  1275  func rewriteValue_OpConstNil(v *ssa.Value) bool {
  1276  	// match: (ConstNil)
  1277  	// result: (MOVVconst [0])
  1278  	for {
  1279  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1280  		v.AuxInt = ssa.Int64ToAuxInt(0)
  1281  		return true
  1282  	}
  1283  }
  1284  func rewriteValue_OpCtz16(v *ssa.Value) bool {
  1285  	v_0 := v.Args[0]
  1286  	b := v.Block
  1287  	typ := &b.Func.Config.Types
  1288  	// match: (Ctz16 x)
  1289  	// result: (CTZV (OR <typ.UInt64> x (MOVVconst [1<<16])))
  1290  	for {
  1291  		x := v_0
  1292  		v.Reset(ssaop.OpLOONG64CTZV)
  1293  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, typ.UInt64)
  1294  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1295  		v1.AuxInt = ssa.Int64ToAuxInt(1 << 16)
  1296  		v0.AddArg2(x, v1)
  1297  		v.AddArg(v0)
  1298  		return true
  1299  	}
  1300  }
  1301  func rewriteValue_OpCtz8(v *ssa.Value) bool {
  1302  	v_0 := v.Args[0]
  1303  	b := v.Block
  1304  	typ := &b.Func.Config.Types
  1305  	// match: (Ctz8 x)
  1306  	// result: (CTZV (OR <typ.UInt64> x (MOVVconst [1<<8])))
  1307  	for {
  1308  		x := v_0
  1309  		v.Reset(ssaop.OpLOONG64CTZV)
  1310  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, typ.UInt64)
  1311  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1312  		v1.AuxInt = ssa.Int64ToAuxInt(1 << 8)
  1313  		v0.AddArg2(x, v1)
  1314  		v.AddArg(v0)
  1315  		return true
  1316  	}
  1317  }
  1318  func rewriteValue_OpDiv16(v *ssa.Value) bool {
  1319  	v_1 := v.Args[1]
  1320  	v_0 := v.Args[0]
  1321  	b := v.Block
  1322  	typ := &b.Func.Config.Types
  1323  	// match: (Div16 x y)
  1324  	// result: (DIVV (SignExt16to64 x) (SignExt16to64 y))
  1325  	for {
  1326  		x := v_0
  1327  		y := v_1
  1328  		v.Reset(ssaop.OpLOONG64DIVV)
  1329  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  1330  		v0.AddArg(x)
  1331  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  1332  		v1.AddArg(y)
  1333  		v.AddArg2(v0, v1)
  1334  		return true
  1335  	}
  1336  }
  1337  func rewriteValue_OpDiv16u(v *ssa.Value) bool {
  1338  	v_1 := v.Args[1]
  1339  	v_0 := v.Args[0]
  1340  	b := v.Block
  1341  	typ := &b.Func.Config.Types
  1342  	// match: (Div16u x y)
  1343  	// result: (DIVVU (ZeroExt16to64 x) (ZeroExt16to64 y))
  1344  	for {
  1345  		x := v_0
  1346  		y := v_1
  1347  		v.Reset(ssaop.OpLOONG64DIVVU)
  1348  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1349  		v0.AddArg(x)
  1350  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1351  		v1.AddArg(y)
  1352  		v.AddArg2(v0, v1)
  1353  		return true
  1354  	}
  1355  }
  1356  func rewriteValue_OpDiv32(v *ssa.Value) bool {
  1357  	v_1 := v.Args[1]
  1358  	v_0 := v.Args[0]
  1359  	b := v.Block
  1360  	typ := &b.Func.Config.Types
  1361  	// match: (Div32 x y)
  1362  	// result: (DIVV (SignExt32to64 x) (SignExt32to64 y))
  1363  	for {
  1364  		x := v_0
  1365  		y := v_1
  1366  		v.Reset(ssaop.OpLOONG64DIVV)
  1367  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1368  		v0.AddArg(x)
  1369  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1370  		v1.AddArg(y)
  1371  		v.AddArg2(v0, v1)
  1372  		return true
  1373  	}
  1374  }
  1375  func rewriteValue_OpDiv32u(v *ssa.Value) bool {
  1376  	v_1 := v.Args[1]
  1377  	v_0 := v.Args[0]
  1378  	b := v.Block
  1379  	typ := &b.Func.Config.Types
  1380  	// match: (Div32u x y)
  1381  	// result: (DIVVU (ZeroExt32to64 x) (ZeroExt32to64 y))
  1382  	for {
  1383  		x := v_0
  1384  		y := v_1
  1385  		v.Reset(ssaop.OpLOONG64DIVVU)
  1386  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1387  		v0.AddArg(x)
  1388  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1389  		v1.AddArg(y)
  1390  		v.AddArg2(v0, v1)
  1391  		return true
  1392  	}
  1393  }
  1394  func rewriteValue_OpDiv64(v *ssa.Value) bool {
  1395  	v_1 := v.Args[1]
  1396  	v_0 := v.Args[0]
  1397  	// match: (Div64 x y)
  1398  	// result: (DIVV x y)
  1399  	for {
  1400  		x := v_0
  1401  		y := v_1
  1402  		v.Reset(ssaop.OpLOONG64DIVV)
  1403  		v.AddArg2(x, y)
  1404  		return true
  1405  	}
  1406  }
  1407  func rewriteValue_OpDiv8(v *ssa.Value) bool {
  1408  	v_1 := v.Args[1]
  1409  	v_0 := v.Args[0]
  1410  	b := v.Block
  1411  	typ := &b.Func.Config.Types
  1412  	// match: (Div8 x y)
  1413  	// result: (DIVV (SignExt8to64 x) (SignExt8to64 y))
  1414  	for {
  1415  		x := v_0
  1416  		y := v_1
  1417  		v.Reset(ssaop.OpLOONG64DIVV)
  1418  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  1419  		v0.AddArg(x)
  1420  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  1421  		v1.AddArg(y)
  1422  		v.AddArg2(v0, v1)
  1423  		return true
  1424  	}
  1425  }
  1426  func rewriteValue_OpDiv8u(v *ssa.Value) bool {
  1427  	v_1 := v.Args[1]
  1428  	v_0 := v.Args[0]
  1429  	b := v.Block
  1430  	typ := &b.Func.Config.Types
  1431  	// match: (Div8u x y)
  1432  	// result: (DIVVU (ZeroExt8to64 x) (ZeroExt8to64 y))
  1433  	for {
  1434  		x := v_0
  1435  		y := v_1
  1436  		v.Reset(ssaop.OpLOONG64DIVVU)
  1437  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1438  		v0.AddArg(x)
  1439  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1440  		v1.AddArg(y)
  1441  		v.AddArg2(v0, v1)
  1442  		return true
  1443  	}
  1444  }
  1445  func rewriteValue_OpEq16(v *ssa.Value) bool {
  1446  	v_1 := v.Args[1]
  1447  	v_0 := v.Args[0]
  1448  	b := v.Block
  1449  	typ := &b.Func.Config.Types
  1450  	// match: (Eq16 x y)
  1451  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt16to64 x) (ZeroExt16to64 y)))
  1452  	for {
  1453  		x := v_0
  1454  		y := v_1
  1455  		v.Reset(ssaop.OpLOONG64SGTU)
  1456  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1457  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1458  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1459  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1460  		v2.AddArg(x)
  1461  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1462  		v3.AddArg(y)
  1463  		v1.AddArg2(v2, v3)
  1464  		v.AddArg2(v0, v1)
  1465  		return true
  1466  	}
  1467  }
  1468  func rewriteValue_OpEq32(v *ssa.Value) bool {
  1469  	v_1 := v.Args[1]
  1470  	v_0 := v.Args[0]
  1471  	b := v.Block
  1472  	typ := &b.Func.Config.Types
  1473  	// match: (Eq32 x y)
  1474  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt32to64 x) (ZeroExt32to64 y)))
  1475  	for {
  1476  		x := v_0
  1477  		y := v_1
  1478  		v.Reset(ssaop.OpLOONG64SGTU)
  1479  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1480  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1481  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1482  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1483  		v2.AddArg(x)
  1484  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1485  		v3.AddArg(y)
  1486  		v1.AddArg2(v2, v3)
  1487  		v.AddArg2(v0, v1)
  1488  		return true
  1489  	}
  1490  }
  1491  func rewriteValue_OpEq32F(v *ssa.Value) bool {
  1492  	v_1 := v.Args[1]
  1493  	v_0 := v.Args[0]
  1494  	b := v.Block
  1495  	// match: (Eq32F x y)
  1496  	// result: (FPFlagTrue (CMPEQF x y))
  1497  	for {
  1498  		x := v_0
  1499  		y := v_1
  1500  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  1501  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQF, types.TypeFlags)
  1502  		v0.AddArg2(x, y)
  1503  		v.AddArg(v0)
  1504  		return true
  1505  	}
  1506  }
  1507  func rewriteValue_OpEq64(v *ssa.Value) bool {
  1508  	v_1 := v.Args[1]
  1509  	v_0 := v.Args[0]
  1510  	b := v.Block
  1511  	typ := &b.Func.Config.Types
  1512  	// match: (Eq64 x y)
  1513  	// result: (SGTU (MOVVconst [1]) (XOR x y))
  1514  	for {
  1515  		x := v_0
  1516  		y := v_1
  1517  		v.Reset(ssaop.OpLOONG64SGTU)
  1518  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1519  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1520  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1521  		v1.AddArg2(x, y)
  1522  		v.AddArg2(v0, v1)
  1523  		return true
  1524  	}
  1525  }
  1526  func rewriteValue_OpEq64F(v *ssa.Value) bool {
  1527  	v_1 := v.Args[1]
  1528  	v_0 := v.Args[0]
  1529  	b := v.Block
  1530  	// match: (Eq64F x y)
  1531  	// result: (FPFlagTrue (CMPEQD x y))
  1532  	for {
  1533  		x := v_0
  1534  		y := v_1
  1535  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  1536  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQD, types.TypeFlags)
  1537  		v0.AddArg2(x, y)
  1538  		v.AddArg(v0)
  1539  		return true
  1540  	}
  1541  }
  1542  func rewriteValue_OpEq8(v *ssa.Value) bool {
  1543  	v_1 := v.Args[1]
  1544  	v_0 := v.Args[0]
  1545  	b := v.Block
  1546  	typ := &b.Func.Config.Types
  1547  	// match: (Eq8 x y)
  1548  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt8to64 x) (ZeroExt8to64 y)))
  1549  	for {
  1550  		x := v_0
  1551  		y := v_1
  1552  		v.Reset(ssaop.OpLOONG64SGTU)
  1553  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1554  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1555  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1556  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1557  		v2.AddArg(x)
  1558  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1559  		v3.AddArg(y)
  1560  		v1.AddArg2(v2, v3)
  1561  		v.AddArg2(v0, v1)
  1562  		return true
  1563  	}
  1564  }
  1565  func rewriteValue_OpEqB(v *ssa.Value) bool {
  1566  	v_1 := v.Args[1]
  1567  	v_0 := v.Args[0]
  1568  	b := v.Block
  1569  	typ := &b.Func.Config.Types
  1570  	// match: (EqB x y)
  1571  	// result: (XOR (MOVVconst [1]) (XOR <typ.Bool> x y))
  1572  	for {
  1573  		x := v_0
  1574  		y := v_1
  1575  		v.Reset(ssaop.OpLOONG64XOR)
  1576  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1577  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1578  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.Bool)
  1579  		v1.AddArg2(x, y)
  1580  		v.AddArg2(v0, v1)
  1581  		return true
  1582  	}
  1583  }
  1584  func rewriteValue_OpEqPtr(v *ssa.Value) bool {
  1585  	v_1 := v.Args[1]
  1586  	v_0 := v.Args[0]
  1587  	b := v.Block
  1588  	typ := &b.Func.Config.Types
  1589  	// match: (EqPtr x y)
  1590  	// result: (SGTU (MOVVconst [1]) (XOR x y))
  1591  	for {
  1592  		x := v_0
  1593  		y := v_1
  1594  		v.Reset(ssaop.OpLOONG64SGTU)
  1595  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1596  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1597  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1598  		v1.AddArg2(x, y)
  1599  		v.AddArg2(v0, v1)
  1600  		return true
  1601  	}
  1602  }
  1603  func rewriteValue_OpIsInBounds(v *ssa.Value) bool {
  1604  	v_1 := v.Args[1]
  1605  	v_0 := v.Args[0]
  1606  	// match: (IsInBounds idx len)
  1607  	// result: (SGTU len idx)
  1608  	for {
  1609  		idx := v_0
  1610  		len := v_1
  1611  		v.Reset(ssaop.OpLOONG64SGTU)
  1612  		v.AddArg2(len, idx)
  1613  		return true
  1614  	}
  1615  }
  1616  func rewriteValue_OpIsNonNil(v *ssa.Value) bool {
  1617  	v_0 := v.Args[0]
  1618  	b := v.Block
  1619  	typ := &b.Func.Config.Types
  1620  	// match: (IsNonNil ptr)
  1621  	// result: (SGTU ptr (MOVVconst [0]))
  1622  	for {
  1623  		ptr := v_0
  1624  		v.Reset(ssaop.OpLOONG64SGTU)
  1625  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1626  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1627  		v.AddArg2(ptr, v0)
  1628  		return true
  1629  	}
  1630  }
  1631  func rewriteValue_OpIsSliceInBounds(v *ssa.Value) bool {
  1632  	v_1 := v.Args[1]
  1633  	v_0 := v.Args[0]
  1634  	b := v.Block
  1635  	typ := &b.Func.Config.Types
  1636  	// match: (IsSliceInBounds idx len)
  1637  	// result: (XOR (MOVVconst [1]) (SGTU idx len))
  1638  	for {
  1639  		idx := v_0
  1640  		len := v_1
  1641  		v.Reset(ssaop.OpLOONG64XOR)
  1642  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1643  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1644  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  1645  		v1.AddArg2(idx, len)
  1646  		v.AddArg2(v0, v1)
  1647  		return true
  1648  	}
  1649  }
  1650  func rewriteValue_OpLOONG64ADDD(v *ssa.Value) bool {
  1651  	v_1 := v.Args[1]
  1652  	v_0 := v.Args[0]
  1653  	// match: (ADDD (MULD x y) z)
  1654  	// cond: z.Block.Func.UseFMA(v)
  1655  	// result: (FMADDD x y z)
  1656  	for {
  1657  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1658  			if v_0.Op != ssaop.OpLOONG64MULD {
  1659  				continue
  1660  			}
  1661  			y := v_0.Args[1]
  1662  			x := v_0.Args[0]
  1663  			z := v_1
  1664  			if !(z.Block.Func.UseFMA(v)) {
  1665  				continue
  1666  			}
  1667  			v.Reset(ssaop.OpLOONG64FMADDD)
  1668  			v.AddArg3(x, y, z)
  1669  			return true
  1670  		}
  1671  		break
  1672  	}
  1673  	// match: (ADDD z (NEGD (MULD x y)))
  1674  	// cond: z.Block.Func.UseFMA(v)
  1675  	// result: (FNMSUBD x y z)
  1676  	for {
  1677  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1678  			z := v_0
  1679  			if v_1.Op != ssaop.OpLOONG64NEGD {
  1680  				continue
  1681  			}
  1682  			v_1_0 := v_1.Args[0]
  1683  			if v_1_0.Op != ssaop.OpLOONG64MULD {
  1684  				continue
  1685  			}
  1686  			y := v_1_0.Args[1]
  1687  			x := v_1_0.Args[0]
  1688  			if !(z.Block.Func.UseFMA(v)) {
  1689  				continue
  1690  			}
  1691  			v.Reset(ssaop.OpLOONG64FNMSUBD)
  1692  			v.AddArg3(x, y, z)
  1693  			return true
  1694  		}
  1695  		break
  1696  	}
  1697  	return false
  1698  }
  1699  func rewriteValue_OpLOONG64ADDF(v *ssa.Value) bool {
  1700  	v_1 := v.Args[1]
  1701  	v_0 := v.Args[0]
  1702  	// match: (ADDF (MULF x y) z)
  1703  	// cond: z.Block.Func.UseFMA(v)
  1704  	// result: (FMADDF x y z)
  1705  	for {
  1706  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1707  			if v_0.Op != ssaop.OpLOONG64MULF {
  1708  				continue
  1709  			}
  1710  			y := v_0.Args[1]
  1711  			x := v_0.Args[0]
  1712  			z := v_1
  1713  			if !(z.Block.Func.UseFMA(v)) {
  1714  				continue
  1715  			}
  1716  			v.Reset(ssaop.OpLOONG64FMADDF)
  1717  			v.AddArg3(x, y, z)
  1718  			return true
  1719  		}
  1720  		break
  1721  	}
  1722  	// match: (ADDF z (NEGF (MULF x y)))
  1723  	// cond: z.Block.Func.UseFMA(v)
  1724  	// result: (FNMSUBF x y z)
  1725  	for {
  1726  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1727  			z := v_0
  1728  			if v_1.Op != ssaop.OpLOONG64NEGF {
  1729  				continue
  1730  			}
  1731  			v_1_0 := v_1.Args[0]
  1732  			if v_1_0.Op != ssaop.OpLOONG64MULF {
  1733  				continue
  1734  			}
  1735  			y := v_1_0.Args[1]
  1736  			x := v_1_0.Args[0]
  1737  			if !(z.Block.Func.UseFMA(v)) {
  1738  				continue
  1739  			}
  1740  			v.Reset(ssaop.OpLOONG64FNMSUBF)
  1741  			v.AddArg3(x, y, z)
  1742  			return true
  1743  		}
  1744  		break
  1745  	}
  1746  	return false
  1747  }
  1748  func rewriteValue_OpLOONG64ADDV(v *ssa.Value) bool {
  1749  	v_1 := v.Args[1]
  1750  	v_0 := v.Args[0]
  1751  	b := v.Block
  1752  	typ := &b.Func.Config.Types
  1753  	// match: (ADDV <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  1754  	// result: (REVB2H x)
  1755  	for {
  1756  		if v.Type != typ.UInt16 {
  1757  			break
  1758  		}
  1759  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1760  			if v_0.Op != ssaop.OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1761  				continue
  1762  			}
  1763  			x := v_0.Args[0]
  1764  			if v_1.Op != ssaop.OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || ssa.AuxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  1765  				continue
  1766  			}
  1767  			v.Reset(ssaop.OpLOONG64REVB2H)
  1768  			v.AddArg(x)
  1769  			return true
  1770  		}
  1771  		break
  1772  	}
  1773  	// match: (ADDV (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  1774  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  1775  	// result: (REVB2H x)
  1776  	for {
  1777  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1778  			if v_0.Op != ssaop.OpLOONG64SRLconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1779  				continue
  1780  			}
  1781  			v_0_0 := v_0.Args[0]
  1782  			if v_0_0.Op != ssaop.OpLOONG64ANDconst {
  1783  				continue
  1784  			}
  1785  			c1 := ssa.AuxIntToInt64(v_0_0.AuxInt)
  1786  			x := v_0_0.Args[0]
  1787  			if v_1.Op != ssaop.OpLOONG64SLLconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  1788  				continue
  1789  			}
  1790  			v_1_0 := v_1.Args[0]
  1791  			if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  1792  				continue
  1793  			}
  1794  			c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  1795  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  1796  				continue
  1797  			}
  1798  			v.Reset(ssaop.OpLOONG64REVB2H)
  1799  			v.AddArg(x)
  1800  			return true
  1801  		}
  1802  		break
  1803  	}
  1804  	// match: (ADDV (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  1805  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  1806  	// result: (REVB4H x)
  1807  	for {
  1808  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1809  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1810  				continue
  1811  			}
  1812  			v_0_0 := v_0.Args[0]
  1813  			if v_0_0.Op != ssaop.OpLOONG64AND {
  1814  				continue
  1815  			}
  1816  			_ = v_0_0.Args[1]
  1817  			v_0_0_0 := v_0_0.Args[0]
  1818  			v_0_0_1 := v_0_0.Args[1]
  1819  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  1820  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  1821  					continue
  1822  				}
  1823  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  1824  				x := v_0_0_1
  1825  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  1826  					continue
  1827  				}
  1828  				v_1_0 := v_1.Args[0]
  1829  				if v_1_0.Op != ssaop.OpLOONG64AND {
  1830  					continue
  1831  				}
  1832  				_ = v_1_0.Args[1]
  1833  				v_1_0_0 := v_1_0.Args[0]
  1834  				v_1_0_1 := v_1_0.Args[1]
  1835  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  1836  					if v_1_0_0.Op != ssaop.OpLOONG64MOVVconst {
  1837  						continue
  1838  					}
  1839  					c2 := ssa.AuxIntToInt64(v_1_0_0.AuxInt)
  1840  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  1841  						continue
  1842  					}
  1843  					v.Reset(ssaop.OpLOONG64REVB4H)
  1844  					v.AddArg(x)
  1845  					return true
  1846  				}
  1847  			}
  1848  		}
  1849  		break
  1850  	}
  1851  	// match: (ADDV (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  1852  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  1853  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  1854  	for {
  1855  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1856  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1857  				continue
  1858  			}
  1859  			v_0_0 := v_0.Args[0]
  1860  			if v_0_0.Op != ssaop.OpLOONG64AND {
  1861  				continue
  1862  			}
  1863  			_ = v_0_0.Args[1]
  1864  			v_0_0_0 := v_0_0.Args[0]
  1865  			v_0_0_1 := v_0_0.Args[1]
  1866  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  1867  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  1868  					continue
  1869  				}
  1870  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  1871  				x := v_0_0_1
  1872  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  1873  					continue
  1874  				}
  1875  				v_1_0 := v_1.Args[0]
  1876  				if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  1877  					continue
  1878  				}
  1879  				c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  1880  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  1881  					continue
  1882  				}
  1883  				v.Reset(ssaop.OpLOONG64REVB4H)
  1884  				v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, x.Type)
  1885  				v0.AuxInt = ssa.Int64ToAuxInt(0xffffffff)
  1886  				v0.AddArg(x)
  1887  				v.AddArg(v0)
  1888  				return true
  1889  			}
  1890  		}
  1891  		break
  1892  	}
  1893  	// match: (ADDV x (MOVVconst <t> [c]))
  1894  	// cond: ssa.Is32Bit(c) && !t.IsPtr()
  1895  	// result: (ADDVconst [c] x)
  1896  	for {
  1897  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1898  			x := v_0
  1899  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  1900  				continue
  1901  			}
  1902  			t := v_1.Type
  1903  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  1904  			if !(ssa.Is32Bit(c) && !t.IsPtr()) {
  1905  				continue
  1906  			}
  1907  			v.Reset(ssaop.OpLOONG64ADDVconst)
  1908  			v.AuxInt = ssa.Int64ToAuxInt(c)
  1909  			v.AddArg(x)
  1910  			return true
  1911  		}
  1912  		break
  1913  	}
  1914  	// match: (ADDV x0 x1:(SLLVconst [c] y))
  1915  	// cond: x1.Uses == 1 && c > 0 && c <= 4
  1916  	// result: (ADDshiftLLV x0 y [c])
  1917  	for {
  1918  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1919  			x0 := v_0
  1920  			x1 := v_1
  1921  			if x1.Op != ssaop.OpLOONG64SLLVconst {
  1922  				continue
  1923  			}
  1924  			c := ssa.AuxIntToInt64(x1.AuxInt)
  1925  			y := x1.Args[0]
  1926  			if !(x1.Uses == 1 && c > 0 && c <= 4) {
  1927  				continue
  1928  			}
  1929  			v.Reset(ssaop.OpLOONG64ADDshiftLLV)
  1930  			v.AuxInt = ssa.Int64ToAuxInt(c)
  1931  			v.AddArg2(x0, y)
  1932  			return true
  1933  		}
  1934  		break
  1935  	}
  1936  	// match: (ADDV x (NEGV y))
  1937  	// result: (SUBV x y)
  1938  	for {
  1939  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1940  			x := v_0
  1941  			if v_1.Op != ssaop.OpLOONG64NEGV {
  1942  				continue
  1943  			}
  1944  			y := v_1.Args[0]
  1945  			v.Reset(ssaop.OpLOONG64SUBV)
  1946  			v.AddArg2(x, y)
  1947  			return true
  1948  		}
  1949  		break
  1950  	}
  1951  	return false
  1952  }
  1953  func rewriteValue_OpLOONG64ADDVconst(v *ssa.Value) bool {
  1954  	v_0 := v.Args[0]
  1955  	// match: (ADDVconst [off1] (MOVVaddr [off2] {sym} ptr))
  1956  	// cond: ssa.Is32Bit(off1+int64(off2))
  1957  	// result: (MOVVaddr [int32(off1)+int32(off2)] {sym} ptr)
  1958  	for {
  1959  		off1 := ssa.AuxIntToInt64(v.AuxInt)
  1960  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  1961  			break
  1962  		}
  1963  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  1964  		sym := ssa.AuxToSym(v_0.Aux)
  1965  		ptr := v_0.Args[0]
  1966  		if !(ssa.Is32Bit(off1 + int64(off2))) {
  1967  			break
  1968  		}
  1969  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  1970  		v.AuxInt = ssa.Int32ToAuxInt(int32(off1) + int32(off2))
  1971  		v.Aux = ssa.SymToAux(sym)
  1972  		v.AddArg(ptr)
  1973  		return true
  1974  	}
  1975  	// match: (ADDVconst [0] x)
  1976  	// result: x
  1977  	for {
  1978  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  1979  			break
  1980  		}
  1981  		x := v_0
  1982  		v.CopyOf(x)
  1983  		return true
  1984  	}
  1985  	// match: (ADDVconst [c] (MOVVconst [d]))
  1986  	// result: (MOVVconst [c+d])
  1987  	for {
  1988  		c := ssa.AuxIntToInt64(v.AuxInt)
  1989  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  1990  			break
  1991  		}
  1992  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  1993  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1994  		v.AuxInt = ssa.Int64ToAuxInt(c + d)
  1995  		return true
  1996  	}
  1997  	// match: (ADDVconst [c] (ADDVconst [d] x))
  1998  	// cond: ssa.Is32Bit(c+d)
  1999  	// result: (ADDVconst [c+d] x)
  2000  	for {
  2001  		c := ssa.AuxIntToInt64(v.AuxInt)
  2002  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  2003  			break
  2004  		}
  2005  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2006  		x := v_0.Args[0]
  2007  		if !(ssa.Is32Bit(c + d)) {
  2008  			break
  2009  		}
  2010  		v.Reset(ssaop.OpLOONG64ADDVconst)
  2011  		v.AuxInt = ssa.Int64ToAuxInt(c + d)
  2012  		v.AddArg(x)
  2013  		return true
  2014  	}
  2015  	// match: (ADDVconst [c] (SUBVconst [d] x))
  2016  	// cond: ssa.Is32Bit(c-d)
  2017  	// result: (ADDVconst [c-d] x)
  2018  	for {
  2019  		c := ssa.AuxIntToInt64(v.AuxInt)
  2020  		if v_0.Op != ssaop.OpLOONG64SUBVconst {
  2021  			break
  2022  		}
  2023  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2024  		x := v_0.Args[0]
  2025  		if !(ssa.Is32Bit(c - d)) {
  2026  			break
  2027  		}
  2028  		v.Reset(ssaop.OpLOONG64ADDVconst)
  2029  		v.AuxInt = ssa.Int64ToAuxInt(c - d)
  2030  		v.AddArg(x)
  2031  		return true
  2032  	}
  2033  	// match: (ADDVconst [c] x)
  2034  	// cond: ssa.Is32Bit(c) && c&0xffff == 0 && c != 0
  2035  	// result: (ADDV16const [c] x)
  2036  	for {
  2037  		c := ssa.AuxIntToInt64(v.AuxInt)
  2038  		x := v_0
  2039  		if !(ssa.Is32Bit(c) && c&0xffff == 0 && c != 0) {
  2040  			break
  2041  		}
  2042  		v.Reset(ssaop.OpLOONG64ADDV16const)
  2043  		v.AuxInt = ssa.Int64ToAuxInt(c)
  2044  		v.AddArg(x)
  2045  		return true
  2046  	}
  2047  	return false
  2048  }
  2049  func rewriteValue_OpLOONG64ADDshiftLLV(v *ssa.Value) bool {
  2050  	v_1 := v.Args[1]
  2051  	v_0 := v.Args[0]
  2052  	// match: (ADDshiftLLV x (MOVVconst [c]) [d])
  2053  	// cond: ssa.Is12Bit(c<<d)
  2054  	// result: (ADDVconst x [c<<d])
  2055  	for {
  2056  		d := ssa.AuxIntToInt64(v.AuxInt)
  2057  		x := v_0
  2058  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2059  			break
  2060  		}
  2061  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2062  		if !(ssa.Is12Bit(c << d)) {
  2063  			break
  2064  		}
  2065  		v.Reset(ssaop.OpLOONG64ADDVconst)
  2066  		v.AuxInt = ssa.Int64ToAuxInt(c << d)
  2067  		v.AddArg(x)
  2068  		return true
  2069  	}
  2070  	return false
  2071  }
  2072  func rewriteValue_OpLOONG64AND(v *ssa.Value) bool {
  2073  	v_1 := v.Args[1]
  2074  	v_0 := v.Args[0]
  2075  	// match: (AND x (MOVVconst [c]))
  2076  	// cond: ssa.Is32Bit(c)
  2077  	// result: (ANDconst [c] x)
  2078  	for {
  2079  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2080  			x := v_0
  2081  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2082  				continue
  2083  			}
  2084  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  2085  			if !(ssa.Is32Bit(c)) {
  2086  				continue
  2087  			}
  2088  			v.Reset(ssaop.OpLOONG64ANDconst)
  2089  			v.AuxInt = ssa.Int64ToAuxInt(c)
  2090  			v.AddArg(x)
  2091  			return true
  2092  		}
  2093  		break
  2094  	}
  2095  	// match: (AND x x)
  2096  	// result: x
  2097  	for {
  2098  		x := v_0
  2099  		if x != v_1 {
  2100  			break
  2101  		}
  2102  		v.CopyOf(x)
  2103  		return true
  2104  	}
  2105  	// match: (AND x (NORconst [0] y))
  2106  	// result: (ANDN x y)
  2107  	for {
  2108  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2109  			x := v_0
  2110  			if v_1.Op != ssaop.OpLOONG64NORconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  2111  				continue
  2112  			}
  2113  			y := v_1.Args[0]
  2114  			v.Reset(ssaop.OpLOONG64ANDN)
  2115  			v.AddArg2(x, y)
  2116  			return true
  2117  		}
  2118  		break
  2119  	}
  2120  	return false
  2121  }
  2122  func rewriteValue_OpLOONG64ANDconst(v *ssa.Value) bool {
  2123  	v_0 := v.Args[0]
  2124  	// match: (ANDconst [0] _)
  2125  	// result: (MOVVconst [0])
  2126  	for {
  2127  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  2128  			break
  2129  		}
  2130  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2131  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2132  		return true
  2133  	}
  2134  	// match: (ANDconst [-1] x)
  2135  	// result: x
  2136  	for {
  2137  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
  2138  			break
  2139  		}
  2140  		x := v_0
  2141  		v.CopyOf(x)
  2142  		return true
  2143  	}
  2144  	// match: (ANDconst [c] (MOVVconst [d]))
  2145  	// result: (MOVVconst [c&d])
  2146  	for {
  2147  		c := ssa.AuxIntToInt64(v.AuxInt)
  2148  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2149  			break
  2150  		}
  2151  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2152  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2153  		v.AuxInt = ssa.Int64ToAuxInt(c & d)
  2154  		return true
  2155  	}
  2156  	// match: (ANDconst [c] (ANDconst [d] x))
  2157  	// result: (ANDconst [c&d] x)
  2158  	for {
  2159  		c := ssa.AuxIntToInt64(v.AuxInt)
  2160  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  2161  			break
  2162  		}
  2163  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2164  		x := v_0.Args[0]
  2165  		v.Reset(ssaop.OpLOONG64ANDconst)
  2166  		v.AuxInt = ssa.Int64ToAuxInt(c & d)
  2167  		v.AddArg(x)
  2168  		return true
  2169  	}
  2170  	return false
  2171  }
  2172  func rewriteValue_OpLOONG64DIVV(v *ssa.Value) bool {
  2173  	v_1 := v.Args[1]
  2174  	v_0 := v.Args[0]
  2175  	// match: (DIVV (MOVVconst [c]) (MOVVconst [d]))
  2176  	// cond: d != 0
  2177  	// result: (MOVVconst [c/d])
  2178  	for {
  2179  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2180  			break
  2181  		}
  2182  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2183  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2184  			break
  2185  		}
  2186  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  2187  		if !(d != 0) {
  2188  			break
  2189  		}
  2190  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2191  		v.AuxInt = ssa.Int64ToAuxInt(c / d)
  2192  		return true
  2193  	}
  2194  	return false
  2195  }
  2196  func rewriteValue_OpLOONG64DIVVU(v *ssa.Value) bool {
  2197  	v_1 := v.Args[1]
  2198  	v_0 := v.Args[0]
  2199  	// match: (DIVVU x (MOVVconst [1]))
  2200  	// result: x
  2201  	for {
  2202  		x := v_0
  2203  		if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 1 {
  2204  			break
  2205  		}
  2206  		v.CopyOf(x)
  2207  		return true
  2208  	}
  2209  	// match: (DIVVU x (MOVVconst [c]))
  2210  	// cond: ssa.IsPowerOfTwo(c)
  2211  	// result: (SRLVconst [ssa.Log64(c)] x)
  2212  	for {
  2213  		x := v_0
  2214  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2215  			break
  2216  		}
  2217  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2218  		if !(ssa.IsPowerOfTwo(c)) {
  2219  			break
  2220  		}
  2221  		v.Reset(ssaop.OpLOONG64SRLVconst)
  2222  		v.AuxInt = ssa.Int64ToAuxInt(ssa.Log64(c))
  2223  		v.AddArg(x)
  2224  		return true
  2225  	}
  2226  	// match: (DIVVU (MOVVconst [c]) (MOVVconst [d]))
  2227  	// cond: d != 0
  2228  	// result: (MOVVconst [int64(uint64(c)/uint64(d))])
  2229  	for {
  2230  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2231  			break
  2232  		}
  2233  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2234  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2235  			break
  2236  		}
  2237  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  2238  		if !(d != 0) {
  2239  			break
  2240  		}
  2241  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2242  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint64(c) / uint64(d)))
  2243  		return true
  2244  	}
  2245  	return false
  2246  }
  2247  func rewriteValue_OpLOONG64LoweredPanicBoundsCR(v *ssa.Value) bool {
  2248  	v_1 := v.Args[1]
  2249  	v_0 := v.Args[0]
  2250  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVVconst [c]) mem)
  2251  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  2252  	for {
  2253  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2254  		p := ssa.AuxToPanicBoundsC(v.Aux)
  2255  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2256  			break
  2257  		}
  2258  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2259  		mem := v_1
  2260  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsCC)
  2261  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2262  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: p.C, Cy: c})
  2263  		v.AddArg(mem)
  2264  		return true
  2265  	}
  2266  	return false
  2267  }
  2268  func rewriteValue_OpLOONG64LoweredPanicBoundsRC(v *ssa.Value) bool {
  2269  	v_1 := v.Args[1]
  2270  	v_0 := v.Args[0]
  2271  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVVconst [c]) mem)
  2272  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  2273  	for {
  2274  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2275  		p := ssa.AuxToPanicBoundsC(v.Aux)
  2276  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2277  			break
  2278  		}
  2279  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2280  		mem := v_1
  2281  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsCC)
  2282  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2283  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: c, Cy: p.C})
  2284  		v.AddArg(mem)
  2285  		return true
  2286  	}
  2287  	return false
  2288  }
  2289  func rewriteValue_OpLOONG64LoweredPanicBoundsRR(v *ssa.Value) bool {
  2290  	v_2 := v.Args[2]
  2291  	v_1 := v.Args[1]
  2292  	v_0 := v.Args[0]
  2293  	// match: (LoweredPanicBoundsRR [kind] x (MOVVconst [c]) mem)
  2294  	// result: (LoweredPanicBoundsRC [kind] x {ssa.PanicBoundsC{C:c}} mem)
  2295  	for {
  2296  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2297  		x := v_0
  2298  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2299  			break
  2300  		}
  2301  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2302  		mem := v_2
  2303  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsRC)
  2304  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2305  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: c})
  2306  		v.AddArg2(x, mem)
  2307  		return true
  2308  	}
  2309  	// match: (LoweredPanicBoundsRR [kind] (MOVVconst [c]) y mem)
  2310  	// result: (LoweredPanicBoundsCR [kind] {ssa.PanicBoundsC{C:c}} y mem)
  2311  	for {
  2312  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2313  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2314  			break
  2315  		}
  2316  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2317  		y := v_1
  2318  		mem := v_2
  2319  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsCR)
  2320  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2321  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: c})
  2322  		v.AddArg2(y, mem)
  2323  		return true
  2324  	}
  2325  	return false
  2326  }
  2327  func rewriteValue_OpLOONG64MASKEQZ(v *ssa.Value) bool {
  2328  	v_1 := v.Args[1]
  2329  	v_0 := v.Args[0]
  2330  	// match: (MASKEQZ (MOVVconst [0]) cond)
  2331  	// result: (MOVVconst [0])
  2332  	for {
  2333  		if v_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
  2334  			break
  2335  		}
  2336  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2337  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2338  		return true
  2339  	}
  2340  	// match: (MASKEQZ x (MOVVconst [c]))
  2341  	// cond: c == 0
  2342  	// result: (MOVVconst [0])
  2343  	for {
  2344  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2345  			break
  2346  		}
  2347  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2348  		if !(c == 0) {
  2349  			break
  2350  		}
  2351  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2352  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2353  		return true
  2354  	}
  2355  	// match: (MASKEQZ x (MOVVconst [c]))
  2356  	// cond: c != 0
  2357  	// result: x
  2358  	for {
  2359  		x := v_0
  2360  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2361  			break
  2362  		}
  2363  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2364  		if !(c != 0) {
  2365  			break
  2366  		}
  2367  		v.CopyOf(x)
  2368  		return true
  2369  	}
  2370  	return false
  2371  }
  2372  func rewriteValue_OpLOONG64MASKNEZ(v *ssa.Value) bool {
  2373  	v_0 := v.Args[0]
  2374  	// match: (MASKNEZ (MOVVconst [0]) cond)
  2375  	// result: (MOVVconst [0])
  2376  	for {
  2377  		if v_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
  2378  			break
  2379  		}
  2380  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2381  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2382  		return true
  2383  	}
  2384  	return false
  2385  }
  2386  func rewriteValue_OpLOONG64MOVBUload(v *ssa.Value) bool {
  2387  	v_1 := v.Args[1]
  2388  	v_0 := v.Args[0]
  2389  	b := v.Block
  2390  	config := b.Func.Config
  2391  	typ := &b.Func.Config.Types
  2392  	// match: (MOVBUload [off] {sym} ptr (MOVBstore [off] {sym} ptr x _))
  2393  	// result: (MOVBUreg x)
  2394  	for {
  2395  		off := ssa.AuxIntToInt32(v.AuxInt)
  2396  		sym := ssa.AuxToSym(v.Aux)
  2397  		ptr := v_0
  2398  		if v_1.Op != ssaop.OpLOONG64MOVBstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  2399  			break
  2400  		}
  2401  		x := v_1.Args[1]
  2402  		if ptr != v_1.Args[0] {
  2403  			break
  2404  		}
  2405  		v.Reset(ssaop.OpLOONG64MOVBUreg)
  2406  		v.AddArg(x)
  2407  		return true
  2408  	}
  2409  	// match: (MOVBUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  2410  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2411  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
  2412  	for {
  2413  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2414  		sym := ssa.AuxToSym(v.Aux)
  2415  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  2416  			break
  2417  		}
  2418  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  2419  		ptr := v_0.Args[0]
  2420  		mem := v_1
  2421  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2422  			break
  2423  		}
  2424  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2425  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2426  		v.Aux = ssa.SymToAux(sym)
  2427  		v.AddArg2(ptr, mem)
  2428  		return true
  2429  	}
  2430  	// match: (MOVBUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  2431  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2432  	// result: (MOVBUload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  2433  	for {
  2434  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2435  		sym1 := ssa.AuxToSym(v.Aux)
  2436  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  2437  			break
  2438  		}
  2439  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2440  		sym2 := ssa.AuxToSym(v_0.Aux)
  2441  		ptr := v_0.Args[0]
  2442  		mem := v_1
  2443  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2444  			break
  2445  		}
  2446  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2447  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2448  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2449  		v.AddArg2(ptr, mem)
  2450  		return true
  2451  	}
  2452  	// match: (MOVBUload [off] {sym} (ADDV ptr idx) mem)
  2453  	// cond: off == 0 && sym == nil
  2454  	// result: (MOVBUloadidx ptr idx mem)
  2455  	for {
  2456  		off := ssa.AuxIntToInt32(v.AuxInt)
  2457  		sym := ssa.AuxToSym(v.Aux)
  2458  		if v_0.Op != ssaop.OpLOONG64ADDV {
  2459  			break
  2460  		}
  2461  		idx := v_0.Args[1]
  2462  		ptr := v_0.Args[0]
  2463  		mem := v_1
  2464  		if !(off == 0 && sym == nil) {
  2465  			break
  2466  		}
  2467  		v.Reset(ssaop.OpLOONG64MOVBUloadidx)
  2468  		v.AddArg3(ptr, idx, mem)
  2469  		return true
  2470  	}
  2471  	// match: (MOVBUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  2472  	// cond: off == 0 && sym == nil
  2473  	// result: (MOVBUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  2474  	for {
  2475  		off := ssa.AuxIntToInt32(v.AuxInt)
  2476  		sym := ssa.AuxToSym(v.Aux)
  2477  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  2478  			break
  2479  		}
  2480  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  2481  		idx := v_0.Args[1]
  2482  		ptr := v_0.Args[0]
  2483  		mem := v_1
  2484  		if !(off == 0 && sym == nil) {
  2485  			break
  2486  		}
  2487  		v.Reset(ssaop.OpLOONG64MOVBUloadidx)
  2488  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  2489  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  2490  		v0.AddArg(idx)
  2491  		v.AddArg3(ptr, v0, mem)
  2492  		return true
  2493  	}
  2494  	// match: (MOVBUload [off] {sym} (SB) _)
  2495  	// cond: ssa.SymIsRO(sym)
  2496  	// result: (MOVVconst [int64(ssa.Read8(sym, int64(off)))])
  2497  	for {
  2498  		off := ssa.AuxIntToInt32(v.AuxInt)
  2499  		sym := ssa.AuxToSym(v.Aux)
  2500  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  2501  			break
  2502  		}
  2503  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2504  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read8(sym, int64(off))))
  2505  		return true
  2506  	}
  2507  	return false
  2508  }
  2509  func rewriteValue_OpLOONG64MOVBUloadidx(v *ssa.Value) bool {
  2510  	v_2 := v.Args[2]
  2511  	v_1 := v.Args[1]
  2512  	v_0 := v.Args[0]
  2513  	// match: (MOVBUloadidx ptr (MOVVconst [c]) mem)
  2514  	// cond: ssa.Is32Bit(c)
  2515  	// result: (MOVBUload [int32(c)] ptr mem)
  2516  	for {
  2517  		ptr := v_0
  2518  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2519  			break
  2520  		}
  2521  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2522  		mem := v_2
  2523  		if !(ssa.Is32Bit(c)) {
  2524  			break
  2525  		}
  2526  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2527  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  2528  		v.AddArg2(ptr, mem)
  2529  		return true
  2530  	}
  2531  	// match: (MOVBUloadidx (MOVVconst [c]) ptr mem)
  2532  	// cond: ssa.Is32Bit(c)
  2533  	// result: (MOVBUload [int32(c)] ptr mem)
  2534  	for {
  2535  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2536  			break
  2537  		}
  2538  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2539  		ptr := v_1
  2540  		mem := v_2
  2541  		if !(ssa.Is32Bit(c)) {
  2542  			break
  2543  		}
  2544  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2545  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  2546  		v.AddArg2(ptr, mem)
  2547  		return true
  2548  	}
  2549  	return false
  2550  }
  2551  func rewriteValue_OpLOONG64MOVBUreg(v *ssa.Value) bool {
  2552  	v_0 := v.Args[0]
  2553  	// match: (MOVBUreg (SRLVconst [rc] x))
  2554  	// cond: rc < 8
  2555  	// result: (BSTRPICKV [rc + (7+rc)<<6] x)
  2556  	for {
  2557  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  2558  			break
  2559  		}
  2560  		rc := ssa.AuxIntToInt64(v_0.AuxInt)
  2561  		x := v_0.Args[0]
  2562  		if !(rc < 8) {
  2563  			break
  2564  		}
  2565  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  2566  		v.AuxInt = ssa.Int64ToAuxInt(rc + (7+rc)<<6)
  2567  		v.AddArg(x)
  2568  		return true
  2569  	}
  2570  	// match: (MOVBUreg x:(SGT _ _))
  2571  	// result: x
  2572  	for {
  2573  		x := v_0
  2574  		if x.Op != ssaop.OpLOONG64SGT {
  2575  			break
  2576  		}
  2577  		v.CopyOf(x)
  2578  		return true
  2579  	}
  2580  	// match: (MOVBUreg x:(SGTU _ _))
  2581  	// result: x
  2582  	for {
  2583  		x := v_0
  2584  		if x.Op != ssaop.OpLOONG64SGTU {
  2585  			break
  2586  		}
  2587  		v.CopyOf(x)
  2588  		return true
  2589  	}
  2590  	// match: (MOVBUreg x:(XOR (MOVVconst [1]) (SGT _ _)))
  2591  	// result: x
  2592  	for {
  2593  		x := v_0
  2594  		if x.Op != ssaop.OpLOONG64XOR {
  2595  			break
  2596  		}
  2597  		_ = x.Args[1]
  2598  		x_0 := x.Args[0]
  2599  		x_1 := x.Args[1]
  2600  		for _i0 := 0; _i0 <= 1; _i0, x_0, x_1 = _i0+1, x_1, x_0 {
  2601  			if x_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(x_0.AuxInt) != 1 || x_1.Op != ssaop.OpLOONG64SGT {
  2602  				continue
  2603  			}
  2604  			v.CopyOf(x)
  2605  			return true
  2606  		}
  2607  		break
  2608  	}
  2609  	// match: (MOVBUreg x:(XOR (MOVVconst [1]) (SGTU _ _)))
  2610  	// result: x
  2611  	for {
  2612  		x := v_0
  2613  		if x.Op != ssaop.OpLOONG64XOR {
  2614  			break
  2615  		}
  2616  		_ = x.Args[1]
  2617  		x_0 := x.Args[0]
  2618  		x_1 := x.Args[1]
  2619  		for _i0 := 0; _i0 <= 1; _i0, x_0, x_1 = _i0+1, x_1, x_0 {
  2620  			if x_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(x_0.AuxInt) != 1 || x_1.Op != ssaop.OpLOONG64SGTU {
  2621  				continue
  2622  			}
  2623  			v.CopyOf(x)
  2624  			return true
  2625  		}
  2626  		break
  2627  	}
  2628  	// match: (MOVBUreg x:(MOVBUload _ _))
  2629  	// result: (MOVVreg x)
  2630  	for {
  2631  		x := v_0
  2632  		if x.Op != ssaop.OpLOONG64MOVBUload {
  2633  			break
  2634  		}
  2635  		v.Reset(ssaop.OpLOONG64MOVVreg)
  2636  		v.AddArg(x)
  2637  		return true
  2638  	}
  2639  	// match: (MOVBUreg x:(MOVBUloadidx _ _ _))
  2640  	// result: (MOVVreg x)
  2641  	for {
  2642  		x := v_0
  2643  		if x.Op != ssaop.OpLOONG64MOVBUloadidx {
  2644  			break
  2645  		}
  2646  		v.Reset(ssaop.OpLOONG64MOVVreg)
  2647  		v.AddArg(x)
  2648  		return true
  2649  	}
  2650  	// match: (MOVBUreg x:(MOVBUreg _))
  2651  	// result: (MOVVreg x)
  2652  	for {
  2653  		x := v_0
  2654  		if x.Op != ssaop.OpLOONG64MOVBUreg {
  2655  			break
  2656  		}
  2657  		v.Reset(ssaop.OpLOONG64MOVVreg)
  2658  		v.AddArg(x)
  2659  		return true
  2660  	}
  2661  	// match: (MOVBUreg (SLLVconst [lc] x))
  2662  	// cond: lc >= 8
  2663  	// result: (MOVVconst [0])
  2664  	for {
  2665  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  2666  			break
  2667  		}
  2668  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  2669  		if !(lc >= 8) {
  2670  			break
  2671  		}
  2672  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2673  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2674  		return true
  2675  	}
  2676  	// match: (MOVBUreg (MOVVconst [c]))
  2677  	// result: (MOVVconst [int64(uint8(c))])
  2678  	for {
  2679  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2680  			break
  2681  		}
  2682  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2683  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2684  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint8(c)))
  2685  		return true
  2686  	}
  2687  	// match: (MOVBUreg (ANDconst [c] x))
  2688  	// result: (ANDconst [c&0xff] x)
  2689  	for {
  2690  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  2691  			break
  2692  		}
  2693  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2694  		x := v_0.Args[0]
  2695  		v.Reset(ssaop.OpLOONG64ANDconst)
  2696  		v.AuxInt = ssa.Int64ToAuxInt(c & 0xff)
  2697  		v.AddArg(x)
  2698  		return true
  2699  	}
  2700  	// match: (MOVBUreg x:(SRLconst [c] y))
  2701  	// cond: c >= 24
  2702  	// result: x
  2703  	for {
  2704  		x := v_0
  2705  		if x.Op != ssaop.OpLOONG64SRLconst {
  2706  			break
  2707  		}
  2708  		c := ssa.AuxIntToInt64(x.AuxInt)
  2709  		if !(c >= 24) {
  2710  			break
  2711  		}
  2712  		v.CopyOf(x)
  2713  		return true
  2714  	}
  2715  	// match: (MOVBUreg x:(ANDconst [c] y))
  2716  	// cond: c >= 0 && int64(uint8(c)) == c
  2717  	// result: x
  2718  	for {
  2719  		x := v_0
  2720  		if x.Op != ssaop.OpLOONG64ANDconst {
  2721  			break
  2722  		}
  2723  		c := ssa.AuxIntToInt64(x.AuxInt)
  2724  		if !(c >= 0 && int64(uint8(c)) == c) {
  2725  			break
  2726  		}
  2727  		v.CopyOf(x)
  2728  		return true
  2729  	}
  2730  	return false
  2731  }
  2732  func rewriteValue_OpLOONG64MOVBload(v *ssa.Value) bool {
  2733  	v_1 := v.Args[1]
  2734  	v_0 := v.Args[0]
  2735  	b := v.Block
  2736  	config := b.Func.Config
  2737  	typ := &b.Func.Config.Types
  2738  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off] {sym} ptr x _))
  2739  	// result: (MOVBreg x)
  2740  	for {
  2741  		off := ssa.AuxIntToInt32(v.AuxInt)
  2742  		sym := ssa.AuxToSym(v.Aux)
  2743  		ptr := v_0
  2744  		if v_1.Op != ssaop.OpLOONG64MOVBstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  2745  			break
  2746  		}
  2747  		x := v_1.Args[1]
  2748  		if ptr != v_1.Args[0] {
  2749  			break
  2750  		}
  2751  		v.Reset(ssaop.OpLOONG64MOVBreg)
  2752  		v.AddArg(x)
  2753  		return true
  2754  	}
  2755  	// match: (MOVBload [off1] {sym} (ADDVconst [off2] ptr) mem)
  2756  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2757  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
  2758  	for {
  2759  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2760  		sym := ssa.AuxToSym(v.Aux)
  2761  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  2762  			break
  2763  		}
  2764  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  2765  		ptr := v_0.Args[0]
  2766  		mem := v_1
  2767  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2768  			break
  2769  		}
  2770  		v.Reset(ssaop.OpLOONG64MOVBload)
  2771  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2772  		v.Aux = ssa.SymToAux(sym)
  2773  		v.AddArg2(ptr, mem)
  2774  		return true
  2775  	}
  2776  	// match: (MOVBload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  2777  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2778  	// result: (MOVBload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  2779  	for {
  2780  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2781  		sym1 := ssa.AuxToSym(v.Aux)
  2782  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  2783  			break
  2784  		}
  2785  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2786  		sym2 := ssa.AuxToSym(v_0.Aux)
  2787  		ptr := v_0.Args[0]
  2788  		mem := v_1
  2789  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2790  			break
  2791  		}
  2792  		v.Reset(ssaop.OpLOONG64MOVBload)
  2793  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2794  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2795  		v.AddArg2(ptr, mem)
  2796  		return true
  2797  	}
  2798  	// match: (MOVBload [off] {sym} (ADDV ptr idx) mem)
  2799  	// cond: off == 0 && sym == nil
  2800  	// result: (MOVBloadidx ptr idx mem)
  2801  	for {
  2802  		off := ssa.AuxIntToInt32(v.AuxInt)
  2803  		sym := ssa.AuxToSym(v.Aux)
  2804  		if v_0.Op != ssaop.OpLOONG64ADDV {
  2805  			break
  2806  		}
  2807  		idx := v_0.Args[1]
  2808  		ptr := v_0.Args[0]
  2809  		mem := v_1
  2810  		if !(off == 0 && sym == nil) {
  2811  			break
  2812  		}
  2813  		v.Reset(ssaop.OpLOONG64MOVBloadidx)
  2814  		v.AddArg3(ptr, idx, mem)
  2815  		return true
  2816  	}
  2817  	// match: (MOVBload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  2818  	// cond: off == 0 && sym == nil
  2819  	// result: (MOVBloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  2820  	for {
  2821  		off := ssa.AuxIntToInt32(v.AuxInt)
  2822  		sym := ssa.AuxToSym(v.Aux)
  2823  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  2824  			break
  2825  		}
  2826  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  2827  		idx := v_0.Args[1]
  2828  		ptr := v_0.Args[0]
  2829  		mem := v_1
  2830  		if !(off == 0 && sym == nil) {
  2831  			break
  2832  		}
  2833  		v.Reset(ssaop.OpLOONG64MOVBloadidx)
  2834  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  2835  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  2836  		v0.AddArg(idx)
  2837  		v.AddArg3(ptr, v0, mem)
  2838  		return true
  2839  	}
  2840  	// match: (MOVBload [off] {sym} (SB) _)
  2841  	// cond: ssa.SymIsRO(sym)
  2842  	// result: (MOVVconst [int64(int8(ssa.Read8(sym, int64(off))))])
  2843  	for {
  2844  		off := ssa.AuxIntToInt32(v.AuxInt)
  2845  		sym := ssa.AuxToSym(v.Aux)
  2846  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  2847  			break
  2848  		}
  2849  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2850  		v.AuxInt = ssa.Int64ToAuxInt(int64(int8(ssa.Read8(sym, int64(off)))))
  2851  		return true
  2852  	}
  2853  	return false
  2854  }
  2855  func rewriteValue_OpLOONG64MOVBloadidx(v *ssa.Value) bool {
  2856  	v_2 := v.Args[2]
  2857  	v_1 := v.Args[1]
  2858  	v_0 := v.Args[0]
  2859  	// match: (MOVBloadidx ptr (MOVVconst [c]) mem)
  2860  	// cond: ssa.Is32Bit(c)
  2861  	// result: (MOVBload [int32(c)] ptr mem)
  2862  	for {
  2863  		ptr := v_0
  2864  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2865  			break
  2866  		}
  2867  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2868  		mem := v_2
  2869  		if !(ssa.Is32Bit(c)) {
  2870  			break
  2871  		}
  2872  		v.Reset(ssaop.OpLOONG64MOVBload)
  2873  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  2874  		v.AddArg2(ptr, mem)
  2875  		return true
  2876  	}
  2877  	// match: (MOVBloadidx (MOVVconst [c]) ptr mem)
  2878  	// cond: ssa.Is32Bit(c)
  2879  	// result: (MOVBload [int32(c)] ptr mem)
  2880  	for {
  2881  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2882  			break
  2883  		}
  2884  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2885  		ptr := v_1
  2886  		mem := v_2
  2887  		if !(ssa.Is32Bit(c)) {
  2888  			break
  2889  		}
  2890  		v.Reset(ssaop.OpLOONG64MOVBload)
  2891  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  2892  		v.AddArg2(ptr, mem)
  2893  		return true
  2894  	}
  2895  	return false
  2896  }
  2897  func rewriteValue_OpLOONG64MOVBreg(v *ssa.Value) bool {
  2898  	v_0 := v.Args[0]
  2899  	// match: (MOVBreg x:(MOVBload _ _))
  2900  	// result: (MOVVreg x)
  2901  	for {
  2902  		x := v_0
  2903  		if x.Op != ssaop.OpLOONG64MOVBload {
  2904  			break
  2905  		}
  2906  		v.Reset(ssaop.OpLOONG64MOVVreg)
  2907  		v.AddArg(x)
  2908  		return true
  2909  	}
  2910  	// match: (MOVBreg x:(MOVBloadidx _ _ _))
  2911  	// result: (MOVVreg x)
  2912  	for {
  2913  		x := v_0
  2914  		if x.Op != ssaop.OpLOONG64MOVBloadidx {
  2915  			break
  2916  		}
  2917  		v.Reset(ssaop.OpLOONG64MOVVreg)
  2918  		v.AddArg(x)
  2919  		return true
  2920  	}
  2921  	// match: (MOVBreg x:(MOVBreg _))
  2922  	// result: (MOVVreg x)
  2923  	for {
  2924  		x := v_0
  2925  		if x.Op != ssaop.OpLOONG64MOVBreg {
  2926  			break
  2927  		}
  2928  		v.Reset(ssaop.OpLOONG64MOVVreg)
  2929  		v.AddArg(x)
  2930  		return true
  2931  	}
  2932  	// match: (MOVBreg (MOVVconst [c]))
  2933  	// result: (MOVVconst [int64(int8(c))])
  2934  	for {
  2935  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2936  			break
  2937  		}
  2938  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2939  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2940  		v.AuxInt = ssa.Int64ToAuxInt(int64(int8(c)))
  2941  		return true
  2942  	}
  2943  	// match: (MOVBreg x:(ANDconst [c] y))
  2944  	// cond: c >= 0 && int64(int8(c)) == c
  2945  	// result: x
  2946  	for {
  2947  		x := v_0
  2948  		if x.Op != ssaop.OpLOONG64ANDconst {
  2949  			break
  2950  		}
  2951  		c := ssa.AuxIntToInt64(x.AuxInt)
  2952  		if !(c >= 0 && int64(int8(c)) == c) {
  2953  			break
  2954  		}
  2955  		v.CopyOf(x)
  2956  		return true
  2957  	}
  2958  	return false
  2959  }
  2960  func rewriteValue_OpLOONG64MOVBstore(v *ssa.Value) bool {
  2961  	v_2 := v.Args[2]
  2962  	v_1 := v.Args[1]
  2963  	v_0 := v.Args[0]
  2964  	b := v.Block
  2965  	config := b.Func.Config
  2966  	typ := &b.Func.Config.Types
  2967  	// match: (MOVBstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  2968  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2969  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
  2970  	for {
  2971  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2972  		sym := ssa.AuxToSym(v.Aux)
  2973  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  2974  			break
  2975  		}
  2976  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  2977  		ptr := v_0.Args[0]
  2978  		val := v_1
  2979  		mem := v_2
  2980  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2981  			break
  2982  		}
  2983  		v.Reset(ssaop.OpLOONG64MOVBstore)
  2984  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2985  		v.Aux = ssa.SymToAux(sym)
  2986  		v.AddArg3(ptr, val, mem)
  2987  		return true
  2988  	}
  2989  	// match: (MOVBstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  2990  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2991  	// result: (MOVBstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  2992  	for {
  2993  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2994  		sym1 := ssa.AuxToSym(v.Aux)
  2995  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  2996  			break
  2997  		}
  2998  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2999  		sym2 := ssa.AuxToSym(v_0.Aux)
  3000  		ptr := v_0.Args[0]
  3001  		val := v_1
  3002  		mem := v_2
  3003  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3004  			break
  3005  		}
  3006  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3007  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3008  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3009  		v.AddArg3(ptr, val, mem)
  3010  		return true
  3011  	}
  3012  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  3013  	// result: (MOVBstore [off] {sym} ptr x mem)
  3014  	for {
  3015  		off := ssa.AuxIntToInt32(v.AuxInt)
  3016  		sym := ssa.AuxToSym(v.Aux)
  3017  		ptr := v_0
  3018  		if v_1.Op != ssaop.OpLOONG64MOVBreg {
  3019  			break
  3020  		}
  3021  		x := v_1.Args[0]
  3022  		mem := v_2
  3023  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3024  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3025  		v.Aux = ssa.SymToAux(sym)
  3026  		v.AddArg3(ptr, x, mem)
  3027  		return true
  3028  	}
  3029  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  3030  	// result: (MOVBstore [off] {sym} ptr x mem)
  3031  	for {
  3032  		off := ssa.AuxIntToInt32(v.AuxInt)
  3033  		sym := ssa.AuxToSym(v.Aux)
  3034  		ptr := v_0
  3035  		if v_1.Op != ssaop.OpLOONG64MOVBUreg {
  3036  			break
  3037  		}
  3038  		x := v_1.Args[0]
  3039  		mem := v_2
  3040  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3041  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3042  		v.Aux = ssa.SymToAux(sym)
  3043  		v.AddArg3(ptr, x, mem)
  3044  		return true
  3045  	}
  3046  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  3047  	// result: (MOVBstore [off] {sym} ptr x mem)
  3048  	for {
  3049  		off := ssa.AuxIntToInt32(v.AuxInt)
  3050  		sym := ssa.AuxToSym(v.Aux)
  3051  		ptr := v_0
  3052  		if v_1.Op != ssaop.OpLOONG64MOVHreg {
  3053  			break
  3054  		}
  3055  		x := v_1.Args[0]
  3056  		mem := v_2
  3057  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3058  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3059  		v.Aux = ssa.SymToAux(sym)
  3060  		v.AddArg3(ptr, x, mem)
  3061  		return true
  3062  	}
  3063  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  3064  	// result: (MOVBstore [off] {sym} ptr x mem)
  3065  	for {
  3066  		off := ssa.AuxIntToInt32(v.AuxInt)
  3067  		sym := ssa.AuxToSym(v.Aux)
  3068  		ptr := v_0
  3069  		if v_1.Op != ssaop.OpLOONG64MOVHUreg {
  3070  			break
  3071  		}
  3072  		x := v_1.Args[0]
  3073  		mem := v_2
  3074  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3075  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3076  		v.Aux = ssa.SymToAux(sym)
  3077  		v.AddArg3(ptr, x, mem)
  3078  		return true
  3079  	}
  3080  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  3081  	// result: (MOVBstore [off] {sym} ptr x mem)
  3082  	for {
  3083  		off := ssa.AuxIntToInt32(v.AuxInt)
  3084  		sym := ssa.AuxToSym(v.Aux)
  3085  		ptr := v_0
  3086  		if v_1.Op != ssaop.OpLOONG64MOVWreg {
  3087  			break
  3088  		}
  3089  		x := v_1.Args[0]
  3090  		mem := v_2
  3091  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3092  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3093  		v.Aux = ssa.SymToAux(sym)
  3094  		v.AddArg3(ptr, x, mem)
  3095  		return true
  3096  	}
  3097  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
  3098  	// result: (MOVBstore [off] {sym} ptr x mem)
  3099  	for {
  3100  		off := ssa.AuxIntToInt32(v.AuxInt)
  3101  		sym := ssa.AuxToSym(v.Aux)
  3102  		ptr := v_0
  3103  		if v_1.Op != ssaop.OpLOONG64MOVWUreg {
  3104  			break
  3105  		}
  3106  		x := v_1.Args[0]
  3107  		mem := v_2
  3108  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3109  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3110  		v.Aux = ssa.SymToAux(sym)
  3111  		v.AddArg3(ptr, x, mem)
  3112  		return true
  3113  	}
  3114  	// match: (MOVBstore [off] {sym} (ADDV ptr idx) val mem)
  3115  	// cond: off == 0 && sym == nil
  3116  	// result: (MOVBstoreidx ptr idx val mem)
  3117  	for {
  3118  		off := ssa.AuxIntToInt32(v.AuxInt)
  3119  		sym := ssa.AuxToSym(v.Aux)
  3120  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3121  			break
  3122  		}
  3123  		idx := v_0.Args[1]
  3124  		ptr := v_0.Args[0]
  3125  		val := v_1
  3126  		mem := v_2
  3127  		if !(off == 0 && sym == nil) {
  3128  			break
  3129  		}
  3130  		v.Reset(ssaop.OpLOONG64MOVBstoreidx)
  3131  		v.AddArg4(ptr, idx, val, mem)
  3132  		return true
  3133  	}
  3134  	// match: (MOVBstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3135  	// cond: off == 0 && sym == nil
  3136  	// result: (MOVBstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3137  	for {
  3138  		off := ssa.AuxIntToInt32(v.AuxInt)
  3139  		sym := ssa.AuxToSym(v.Aux)
  3140  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3141  			break
  3142  		}
  3143  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3144  		idx := v_0.Args[1]
  3145  		ptr := v_0.Args[0]
  3146  		val := v_1
  3147  		mem := v_2
  3148  		if !(off == 0 && sym == nil) {
  3149  			break
  3150  		}
  3151  		v.Reset(ssaop.OpLOONG64MOVBstoreidx)
  3152  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3153  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3154  		v0.AddArg(idx)
  3155  		v.AddArg4(ptr, v0, val, mem)
  3156  		return true
  3157  	}
  3158  	return false
  3159  }
  3160  func rewriteValue_OpLOONG64MOVBstoreidx(v *ssa.Value) bool {
  3161  	v_3 := v.Args[3]
  3162  	v_2 := v.Args[2]
  3163  	v_1 := v.Args[1]
  3164  	v_0 := v.Args[0]
  3165  	// match: (MOVBstoreidx ptr (MOVVconst [c]) val mem)
  3166  	// cond: ssa.Is32Bit(c)
  3167  	// result: (MOVBstore [int32(c)] ptr val mem)
  3168  	for {
  3169  		ptr := v_0
  3170  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3171  			break
  3172  		}
  3173  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3174  		val := v_2
  3175  		mem := v_3
  3176  		if !(ssa.Is32Bit(c)) {
  3177  			break
  3178  		}
  3179  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3180  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3181  		v.AddArg3(ptr, val, mem)
  3182  		return true
  3183  	}
  3184  	// match: (MOVBstoreidx (MOVVconst [c]) idx val mem)
  3185  	// cond: ssa.Is32Bit(c)
  3186  	// result: (MOVBstore [int32(c)] idx val mem)
  3187  	for {
  3188  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3189  			break
  3190  		}
  3191  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3192  		idx := v_1
  3193  		val := v_2
  3194  		mem := v_3
  3195  		if !(ssa.Is32Bit(c)) {
  3196  			break
  3197  		}
  3198  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3199  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3200  		v.AddArg3(idx, val, mem)
  3201  		return true
  3202  	}
  3203  	return false
  3204  }
  3205  func rewriteValue_OpLOONG64MOVDF(v *ssa.Value) bool {
  3206  	v_0 := v.Args[0]
  3207  	// match: (MOVDF (ABSD (MOVFD x)))
  3208  	// result: (ABSF x)
  3209  	for {
  3210  		if v_0.Op != ssaop.OpLOONG64ABSD {
  3211  			break
  3212  		}
  3213  		v_0_0 := v_0.Args[0]
  3214  		if v_0_0.Op != ssaop.OpLOONG64MOVFD {
  3215  			break
  3216  		}
  3217  		x := v_0_0.Args[0]
  3218  		v.Reset(ssaop.OpLOONG64ABSF)
  3219  		v.AddArg(x)
  3220  		return true
  3221  	}
  3222  	// match: (MOVDF (SQRTD (MOVFD x)))
  3223  	// result: (SQRTF x)
  3224  	for {
  3225  		if v_0.Op != ssaop.OpLOONG64SQRTD {
  3226  			break
  3227  		}
  3228  		v_0_0 := v_0.Args[0]
  3229  		if v_0_0.Op != ssaop.OpLOONG64MOVFD {
  3230  			break
  3231  		}
  3232  		x := v_0_0.Args[0]
  3233  		v.Reset(ssaop.OpLOONG64SQRTF)
  3234  		v.AddArg(x)
  3235  		return true
  3236  	}
  3237  	return false
  3238  }
  3239  func rewriteValue_OpLOONG64MOVDload(v *ssa.Value) bool {
  3240  	v_1 := v.Args[1]
  3241  	v_0 := v.Args[0]
  3242  	b := v.Block
  3243  	config := b.Func.Config
  3244  	typ := &b.Func.Config.Types
  3245  	// match: (MOVDload [off] {sym} ptr (MOVVstore [off] {sym} ptr val _))
  3246  	// result: (MOVVgpfp val)
  3247  	for {
  3248  		off := ssa.AuxIntToInt32(v.AuxInt)
  3249  		sym := ssa.AuxToSym(v.Aux)
  3250  		ptr := v_0
  3251  		if v_1.Op != ssaop.OpLOONG64MOVVstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  3252  			break
  3253  		}
  3254  		val := v_1.Args[1]
  3255  		if ptr != v_1.Args[0] {
  3256  			break
  3257  		}
  3258  		v.Reset(ssaop.OpLOONG64MOVVgpfp)
  3259  		v.AddArg(val)
  3260  		return true
  3261  	}
  3262  	// match: (MOVDload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3263  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3264  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
  3265  	for {
  3266  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3267  		sym := ssa.AuxToSym(v.Aux)
  3268  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3269  			break
  3270  		}
  3271  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3272  		ptr := v_0.Args[0]
  3273  		mem := v_1
  3274  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3275  			break
  3276  		}
  3277  		v.Reset(ssaop.OpLOONG64MOVDload)
  3278  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3279  		v.Aux = ssa.SymToAux(sym)
  3280  		v.AddArg2(ptr, mem)
  3281  		return true
  3282  	}
  3283  	// match: (MOVDload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3284  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3285  	// result: (MOVDload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  3286  	for {
  3287  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3288  		sym1 := ssa.AuxToSym(v.Aux)
  3289  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3290  			break
  3291  		}
  3292  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3293  		sym2 := ssa.AuxToSym(v_0.Aux)
  3294  		ptr := v_0.Args[0]
  3295  		mem := v_1
  3296  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3297  			break
  3298  		}
  3299  		v.Reset(ssaop.OpLOONG64MOVDload)
  3300  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3301  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3302  		v.AddArg2(ptr, mem)
  3303  		return true
  3304  	}
  3305  	// match: (MOVDload [off] {sym} (ADDV ptr idx) mem)
  3306  	// cond: off == 0 && sym == nil
  3307  	// result: (MOVDloadidx ptr idx mem)
  3308  	for {
  3309  		off := ssa.AuxIntToInt32(v.AuxInt)
  3310  		sym := ssa.AuxToSym(v.Aux)
  3311  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3312  			break
  3313  		}
  3314  		idx := v_0.Args[1]
  3315  		ptr := v_0.Args[0]
  3316  		mem := v_1
  3317  		if !(off == 0 && sym == nil) {
  3318  			break
  3319  		}
  3320  		v.Reset(ssaop.OpLOONG64MOVDloadidx)
  3321  		v.AddArg3(ptr, idx, mem)
  3322  		return true
  3323  	}
  3324  	// match: (MOVDload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3325  	// cond: off == 0 && sym == nil
  3326  	// result: (MOVDloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3327  	for {
  3328  		off := ssa.AuxIntToInt32(v.AuxInt)
  3329  		sym := ssa.AuxToSym(v.Aux)
  3330  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3331  			break
  3332  		}
  3333  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3334  		idx := v_0.Args[1]
  3335  		ptr := v_0.Args[0]
  3336  		mem := v_1
  3337  		if !(off == 0 && sym == nil) {
  3338  			break
  3339  		}
  3340  		v.Reset(ssaop.OpLOONG64MOVDloadidx)
  3341  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3342  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3343  		v0.AddArg(idx)
  3344  		v.AddArg3(ptr, v0, mem)
  3345  		return true
  3346  	}
  3347  	return false
  3348  }
  3349  func rewriteValue_OpLOONG64MOVDloadidx(v *ssa.Value) bool {
  3350  	v_2 := v.Args[2]
  3351  	v_1 := v.Args[1]
  3352  	v_0 := v.Args[0]
  3353  	// match: (MOVDloadidx ptr (MOVVconst [c]) mem)
  3354  	// cond: ssa.Is32Bit(c)
  3355  	// result: (MOVDload [int32(c)] ptr mem)
  3356  	for {
  3357  		ptr := v_0
  3358  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3359  			break
  3360  		}
  3361  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3362  		mem := v_2
  3363  		if !(ssa.Is32Bit(c)) {
  3364  			break
  3365  		}
  3366  		v.Reset(ssaop.OpLOONG64MOVDload)
  3367  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3368  		v.AddArg2(ptr, mem)
  3369  		return true
  3370  	}
  3371  	// match: (MOVDloadidx (MOVVconst [c]) ptr mem)
  3372  	// cond: ssa.Is32Bit(c)
  3373  	// result: (MOVDload [int32(c)] ptr mem)
  3374  	for {
  3375  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3376  			break
  3377  		}
  3378  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3379  		ptr := v_1
  3380  		mem := v_2
  3381  		if !(ssa.Is32Bit(c)) {
  3382  			break
  3383  		}
  3384  		v.Reset(ssaop.OpLOONG64MOVDload)
  3385  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3386  		v.AddArg2(ptr, mem)
  3387  		return true
  3388  	}
  3389  	return false
  3390  }
  3391  func rewriteValue_OpLOONG64MOVDstore(v *ssa.Value) bool {
  3392  	v_2 := v.Args[2]
  3393  	v_1 := v.Args[1]
  3394  	v_0 := v.Args[0]
  3395  	b := v.Block
  3396  	config := b.Func.Config
  3397  	typ := &b.Func.Config.Types
  3398  	// match: (MOVDstore [off] {sym} ptr (MOVVgpfp val) mem)
  3399  	// result: (MOVVstore [off] {sym} ptr val mem)
  3400  	for {
  3401  		off := ssa.AuxIntToInt32(v.AuxInt)
  3402  		sym := ssa.AuxToSym(v.Aux)
  3403  		ptr := v_0
  3404  		if v_1.Op != ssaop.OpLOONG64MOVVgpfp {
  3405  			break
  3406  		}
  3407  		val := v_1.Args[0]
  3408  		mem := v_2
  3409  		v.Reset(ssaop.OpLOONG64MOVVstore)
  3410  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3411  		v.Aux = ssa.SymToAux(sym)
  3412  		v.AddArg3(ptr, val, mem)
  3413  		return true
  3414  	}
  3415  	// match: (MOVDstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  3416  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3417  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
  3418  	for {
  3419  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3420  		sym := ssa.AuxToSym(v.Aux)
  3421  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3422  			break
  3423  		}
  3424  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3425  		ptr := v_0.Args[0]
  3426  		val := v_1
  3427  		mem := v_2
  3428  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3429  			break
  3430  		}
  3431  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3432  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3433  		v.Aux = ssa.SymToAux(sym)
  3434  		v.AddArg3(ptr, val, mem)
  3435  		return true
  3436  	}
  3437  	// match: (MOVDstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  3438  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3439  	// result: (MOVDstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  3440  	for {
  3441  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3442  		sym1 := ssa.AuxToSym(v.Aux)
  3443  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3444  			break
  3445  		}
  3446  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3447  		sym2 := ssa.AuxToSym(v_0.Aux)
  3448  		ptr := v_0.Args[0]
  3449  		val := v_1
  3450  		mem := v_2
  3451  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3452  			break
  3453  		}
  3454  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3455  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3456  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3457  		v.AddArg3(ptr, val, mem)
  3458  		return true
  3459  	}
  3460  	// match: (MOVDstore [off] {sym} (ADDV ptr idx) val mem)
  3461  	// cond: off == 0 && sym == nil
  3462  	// result: (MOVDstoreidx ptr idx val mem)
  3463  	for {
  3464  		off := ssa.AuxIntToInt32(v.AuxInt)
  3465  		sym := ssa.AuxToSym(v.Aux)
  3466  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3467  			break
  3468  		}
  3469  		idx := v_0.Args[1]
  3470  		ptr := v_0.Args[0]
  3471  		val := v_1
  3472  		mem := v_2
  3473  		if !(off == 0 && sym == nil) {
  3474  			break
  3475  		}
  3476  		v.Reset(ssaop.OpLOONG64MOVDstoreidx)
  3477  		v.AddArg4(ptr, idx, val, mem)
  3478  		return true
  3479  	}
  3480  	// match: (MOVDstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3481  	// cond: off == 0 && sym == nil
  3482  	// result: (MOVDstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3483  	for {
  3484  		off := ssa.AuxIntToInt32(v.AuxInt)
  3485  		sym := ssa.AuxToSym(v.Aux)
  3486  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3487  			break
  3488  		}
  3489  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3490  		idx := v_0.Args[1]
  3491  		ptr := v_0.Args[0]
  3492  		val := v_1
  3493  		mem := v_2
  3494  		if !(off == 0 && sym == nil) {
  3495  			break
  3496  		}
  3497  		v.Reset(ssaop.OpLOONG64MOVDstoreidx)
  3498  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3499  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3500  		v0.AddArg(idx)
  3501  		v.AddArg4(ptr, v0, val, mem)
  3502  		return true
  3503  	}
  3504  	return false
  3505  }
  3506  func rewriteValue_OpLOONG64MOVDstoreidx(v *ssa.Value) bool {
  3507  	v_3 := v.Args[3]
  3508  	v_2 := v.Args[2]
  3509  	v_1 := v.Args[1]
  3510  	v_0 := v.Args[0]
  3511  	// match: (MOVDstoreidx ptr (MOVVconst [c]) val mem)
  3512  	// cond: ssa.Is32Bit(c)
  3513  	// result: (MOVDstore [int32(c)] ptr val mem)
  3514  	for {
  3515  		ptr := v_0
  3516  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3517  			break
  3518  		}
  3519  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3520  		val := v_2
  3521  		mem := v_3
  3522  		if !(ssa.Is32Bit(c)) {
  3523  			break
  3524  		}
  3525  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3526  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3527  		v.AddArg3(ptr, val, mem)
  3528  		return true
  3529  	}
  3530  	// match: (MOVDstoreidx (MOVVconst [c]) idx val mem)
  3531  	// cond: ssa.Is32Bit(c)
  3532  	// result: (MOVDstore [int32(c)] idx val mem)
  3533  	for {
  3534  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3535  			break
  3536  		}
  3537  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3538  		idx := v_1
  3539  		val := v_2
  3540  		mem := v_3
  3541  		if !(ssa.Is32Bit(c)) {
  3542  			break
  3543  		}
  3544  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3545  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3546  		v.AddArg3(idx, val, mem)
  3547  		return true
  3548  	}
  3549  	return false
  3550  }
  3551  func rewriteValue_OpLOONG64MOVFload(v *ssa.Value) bool {
  3552  	v_1 := v.Args[1]
  3553  	v_0 := v.Args[0]
  3554  	b := v.Block
  3555  	config := b.Func.Config
  3556  	typ := &b.Func.Config.Types
  3557  	// match: (MOVFload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  3558  	// result: (MOVWgpfp val)
  3559  	for {
  3560  		off := ssa.AuxIntToInt32(v.AuxInt)
  3561  		sym := ssa.AuxToSym(v.Aux)
  3562  		ptr := v_0
  3563  		if v_1.Op != ssaop.OpLOONG64MOVWstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  3564  			break
  3565  		}
  3566  		val := v_1.Args[1]
  3567  		if ptr != v_1.Args[0] {
  3568  			break
  3569  		}
  3570  		v.Reset(ssaop.OpLOONG64MOVWgpfp)
  3571  		v.AddArg(val)
  3572  		return true
  3573  	}
  3574  	// match: (MOVFload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3575  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3576  	// result: (MOVFload [off1+int32(off2)] {sym} ptr mem)
  3577  	for {
  3578  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3579  		sym := ssa.AuxToSym(v.Aux)
  3580  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3581  			break
  3582  		}
  3583  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3584  		ptr := v_0.Args[0]
  3585  		mem := v_1
  3586  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3587  			break
  3588  		}
  3589  		v.Reset(ssaop.OpLOONG64MOVFload)
  3590  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3591  		v.Aux = ssa.SymToAux(sym)
  3592  		v.AddArg2(ptr, mem)
  3593  		return true
  3594  	}
  3595  	// match: (MOVFload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3596  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3597  	// result: (MOVFload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  3598  	for {
  3599  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3600  		sym1 := ssa.AuxToSym(v.Aux)
  3601  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3602  			break
  3603  		}
  3604  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3605  		sym2 := ssa.AuxToSym(v_0.Aux)
  3606  		ptr := v_0.Args[0]
  3607  		mem := v_1
  3608  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3609  			break
  3610  		}
  3611  		v.Reset(ssaop.OpLOONG64MOVFload)
  3612  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3613  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3614  		v.AddArg2(ptr, mem)
  3615  		return true
  3616  	}
  3617  	// match: (MOVFload [off] {sym} (ADDV ptr idx) mem)
  3618  	// cond: off == 0 && sym == nil
  3619  	// result: (MOVFloadidx ptr idx mem)
  3620  	for {
  3621  		off := ssa.AuxIntToInt32(v.AuxInt)
  3622  		sym := ssa.AuxToSym(v.Aux)
  3623  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3624  			break
  3625  		}
  3626  		idx := v_0.Args[1]
  3627  		ptr := v_0.Args[0]
  3628  		mem := v_1
  3629  		if !(off == 0 && sym == nil) {
  3630  			break
  3631  		}
  3632  		v.Reset(ssaop.OpLOONG64MOVFloadidx)
  3633  		v.AddArg3(ptr, idx, mem)
  3634  		return true
  3635  	}
  3636  	// match: (MOVFload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3637  	// cond: off == 0 && sym == nil
  3638  	// result: (MOVFloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3639  	for {
  3640  		off := ssa.AuxIntToInt32(v.AuxInt)
  3641  		sym := ssa.AuxToSym(v.Aux)
  3642  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3643  			break
  3644  		}
  3645  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3646  		idx := v_0.Args[1]
  3647  		ptr := v_0.Args[0]
  3648  		mem := v_1
  3649  		if !(off == 0 && sym == nil) {
  3650  			break
  3651  		}
  3652  		v.Reset(ssaop.OpLOONG64MOVFloadidx)
  3653  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3654  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3655  		v0.AddArg(idx)
  3656  		v.AddArg3(ptr, v0, mem)
  3657  		return true
  3658  	}
  3659  	return false
  3660  }
  3661  func rewriteValue_OpLOONG64MOVFloadidx(v *ssa.Value) bool {
  3662  	v_2 := v.Args[2]
  3663  	v_1 := v.Args[1]
  3664  	v_0 := v.Args[0]
  3665  	// match: (MOVFloadidx ptr (MOVVconst [c]) mem)
  3666  	// cond: ssa.Is32Bit(c)
  3667  	// result: (MOVFload [int32(c)] ptr mem)
  3668  	for {
  3669  		ptr := v_0
  3670  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3671  			break
  3672  		}
  3673  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3674  		mem := v_2
  3675  		if !(ssa.Is32Bit(c)) {
  3676  			break
  3677  		}
  3678  		v.Reset(ssaop.OpLOONG64MOVFload)
  3679  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3680  		v.AddArg2(ptr, mem)
  3681  		return true
  3682  	}
  3683  	// match: (MOVFloadidx (MOVVconst [c]) ptr mem)
  3684  	// cond: ssa.Is32Bit(c)
  3685  	// result: (MOVFload [int32(c)] ptr mem)
  3686  	for {
  3687  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3688  			break
  3689  		}
  3690  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3691  		ptr := v_1
  3692  		mem := v_2
  3693  		if !(ssa.Is32Bit(c)) {
  3694  			break
  3695  		}
  3696  		v.Reset(ssaop.OpLOONG64MOVFload)
  3697  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3698  		v.AddArg2(ptr, mem)
  3699  		return true
  3700  	}
  3701  	return false
  3702  }
  3703  func rewriteValue_OpLOONG64MOVFstore(v *ssa.Value) bool {
  3704  	v_2 := v.Args[2]
  3705  	v_1 := v.Args[1]
  3706  	v_0 := v.Args[0]
  3707  	b := v.Block
  3708  	config := b.Func.Config
  3709  	typ := &b.Func.Config.Types
  3710  	// match: (MOVFstore [off] {sym} ptr (MOVWgpfp val) mem)
  3711  	// result: (MOVWstore [off] {sym} ptr val mem)
  3712  	for {
  3713  		off := ssa.AuxIntToInt32(v.AuxInt)
  3714  		sym := ssa.AuxToSym(v.Aux)
  3715  		ptr := v_0
  3716  		if v_1.Op != ssaop.OpLOONG64MOVWgpfp {
  3717  			break
  3718  		}
  3719  		val := v_1.Args[0]
  3720  		mem := v_2
  3721  		v.Reset(ssaop.OpLOONG64MOVWstore)
  3722  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3723  		v.Aux = ssa.SymToAux(sym)
  3724  		v.AddArg3(ptr, val, mem)
  3725  		return true
  3726  	}
  3727  	// match: (MOVFstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  3728  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3729  	// result: (MOVFstore [off1+int32(off2)] {sym} ptr val mem)
  3730  	for {
  3731  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3732  		sym := ssa.AuxToSym(v.Aux)
  3733  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3734  			break
  3735  		}
  3736  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3737  		ptr := v_0.Args[0]
  3738  		val := v_1
  3739  		mem := v_2
  3740  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3741  			break
  3742  		}
  3743  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3744  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3745  		v.Aux = ssa.SymToAux(sym)
  3746  		v.AddArg3(ptr, val, mem)
  3747  		return true
  3748  	}
  3749  	// match: (MOVFstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  3750  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3751  	// result: (MOVFstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  3752  	for {
  3753  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3754  		sym1 := ssa.AuxToSym(v.Aux)
  3755  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3756  			break
  3757  		}
  3758  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3759  		sym2 := ssa.AuxToSym(v_0.Aux)
  3760  		ptr := v_0.Args[0]
  3761  		val := v_1
  3762  		mem := v_2
  3763  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3764  			break
  3765  		}
  3766  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3767  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3768  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3769  		v.AddArg3(ptr, val, mem)
  3770  		return true
  3771  	}
  3772  	// match: (MOVFstore [off] {sym} (ADDV ptr idx) val mem)
  3773  	// cond: off == 0 && sym == nil
  3774  	// result: (MOVFstoreidx ptr idx val mem)
  3775  	for {
  3776  		off := ssa.AuxIntToInt32(v.AuxInt)
  3777  		sym := ssa.AuxToSym(v.Aux)
  3778  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3779  			break
  3780  		}
  3781  		idx := v_0.Args[1]
  3782  		ptr := v_0.Args[0]
  3783  		val := v_1
  3784  		mem := v_2
  3785  		if !(off == 0 && sym == nil) {
  3786  			break
  3787  		}
  3788  		v.Reset(ssaop.OpLOONG64MOVFstoreidx)
  3789  		v.AddArg4(ptr, idx, val, mem)
  3790  		return true
  3791  	}
  3792  	// match: (MOVFstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3793  	// cond: off == 0 && sym == nil
  3794  	// result: (MOVFstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3795  	for {
  3796  		off := ssa.AuxIntToInt32(v.AuxInt)
  3797  		sym := ssa.AuxToSym(v.Aux)
  3798  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3799  			break
  3800  		}
  3801  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3802  		idx := v_0.Args[1]
  3803  		ptr := v_0.Args[0]
  3804  		val := v_1
  3805  		mem := v_2
  3806  		if !(off == 0 && sym == nil) {
  3807  			break
  3808  		}
  3809  		v.Reset(ssaop.OpLOONG64MOVFstoreidx)
  3810  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3811  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3812  		v0.AddArg(idx)
  3813  		v.AddArg4(ptr, v0, val, mem)
  3814  		return true
  3815  	}
  3816  	return false
  3817  }
  3818  func rewriteValue_OpLOONG64MOVFstoreidx(v *ssa.Value) bool {
  3819  	v_3 := v.Args[3]
  3820  	v_2 := v.Args[2]
  3821  	v_1 := v.Args[1]
  3822  	v_0 := v.Args[0]
  3823  	// match: (MOVFstoreidx ptr (MOVVconst [c]) val mem)
  3824  	// cond: ssa.Is32Bit(c)
  3825  	// result: (MOVFstore [int32(c)] ptr val mem)
  3826  	for {
  3827  		ptr := v_0
  3828  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3829  			break
  3830  		}
  3831  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3832  		val := v_2
  3833  		mem := v_3
  3834  		if !(ssa.Is32Bit(c)) {
  3835  			break
  3836  		}
  3837  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3838  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3839  		v.AddArg3(ptr, val, mem)
  3840  		return true
  3841  	}
  3842  	// match: (MOVFstoreidx (MOVVconst [c]) idx val mem)
  3843  	// cond: ssa.Is32Bit(c)
  3844  	// result: (MOVFstore [int32(c)] idx val mem)
  3845  	for {
  3846  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3847  			break
  3848  		}
  3849  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3850  		idx := v_1
  3851  		val := v_2
  3852  		mem := v_3
  3853  		if !(ssa.Is32Bit(c)) {
  3854  			break
  3855  		}
  3856  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3857  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3858  		v.AddArg3(idx, val, mem)
  3859  		return true
  3860  	}
  3861  	return false
  3862  }
  3863  func rewriteValue_OpLOONG64MOVHUload(v *ssa.Value) bool {
  3864  	v_1 := v.Args[1]
  3865  	v_0 := v.Args[0]
  3866  	b := v.Block
  3867  	config := b.Func.Config
  3868  	typ := &b.Func.Config.Types
  3869  	// match: (MOVHUload [off] {sym} ptr (MOVHstore [off] {sym} ptr x _))
  3870  	// result: (MOVHUreg x)
  3871  	for {
  3872  		off := ssa.AuxIntToInt32(v.AuxInt)
  3873  		sym := ssa.AuxToSym(v.Aux)
  3874  		ptr := v_0
  3875  		if v_1.Op != ssaop.OpLOONG64MOVHstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  3876  			break
  3877  		}
  3878  		x := v_1.Args[1]
  3879  		if ptr != v_1.Args[0] {
  3880  			break
  3881  		}
  3882  		v.Reset(ssaop.OpLOONG64MOVHUreg)
  3883  		v.AddArg(x)
  3884  		return true
  3885  	}
  3886  	// match: (MOVHUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3887  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3888  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
  3889  	for {
  3890  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3891  		sym := ssa.AuxToSym(v.Aux)
  3892  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3893  			break
  3894  		}
  3895  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3896  		ptr := v_0.Args[0]
  3897  		mem := v_1
  3898  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3899  			break
  3900  		}
  3901  		v.Reset(ssaop.OpLOONG64MOVHUload)
  3902  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3903  		v.Aux = ssa.SymToAux(sym)
  3904  		v.AddArg2(ptr, mem)
  3905  		return true
  3906  	}
  3907  	// match: (MOVHUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3908  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3909  	// result: (MOVHUload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  3910  	for {
  3911  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3912  		sym1 := ssa.AuxToSym(v.Aux)
  3913  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3914  			break
  3915  		}
  3916  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3917  		sym2 := ssa.AuxToSym(v_0.Aux)
  3918  		ptr := v_0.Args[0]
  3919  		mem := v_1
  3920  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3921  			break
  3922  		}
  3923  		v.Reset(ssaop.OpLOONG64MOVHUload)
  3924  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3925  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3926  		v.AddArg2(ptr, mem)
  3927  		return true
  3928  	}
  3929  	// match: (MOVHUload [off] {sym} (ADDV ptr idx) mem)
  3930  	// cond: off == 0 && sym == nil
  3931  	// result: (MOVHUloadidx ptr idx mem)
  3932  	for {
  3933  		off := ssa.AuxIntToInt32(v.AuxInt)
  3934  		sym := ssa.AuxToSym(v.Aux)
  3935  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3936  			break
  3937  		}
  3938  		idx := v_0.Args[1]
  3939  		ptr := v_0.Args[0]
  3940  		mem := v_1
  3941  		if !(off == 0 && sym == nil) {
  3942  			break
  3943  		}
  3944  		v.Reset(ssaop.OpLOONG64MOVHUloadidx)
  3945  		v.AddArg3(ptr, idx, mem)
  3946  		return true
  3947  	}
  3948  	// match: (MOVHUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3949  	// cond: off == 0 && sym == nil
  3950  	// result: (MOVHUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3951  	for {
  3952  		off := ssa.AuxIntToInt32(v.AuxInt)
  3953  		sym := ssa.AuxToSym(v.Aux)
  3954  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3955  			break
  3956  		}
  3957  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3958  		idx := v_0.Args[1]
  3959  		ptr := v_0.Args[0]
  3960  		mem := v_1
  3961  		if !(off == 0 && sym == nil) {
  3962  			break
  3963  		}
  3964  		v.Reset(ssaop.OpLOONG64MOVHUloadidx)
  3965  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3966  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3967  		v0.AddArg(idx)
  3968  		v.AddArg3(ptr, v0, mem)
  3969  		return true
  3970  	}
  3971  	// match: (MOVHUload [off] {sym} (SB) _)
  3972  	// cond: ssa.SymIsRO(sym)
  3973  	// result: (MOVVconst [int64(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder))])
  3974  	for {
  3975  		off := ssa.AuxIntToInt32(v.AuxInt)
  3976  		sym := ssa.AuxToSym(v.Aux)
  3977  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  3978  			break
  3979  		}
  3980  		v.Reset(ssaop.OpLOONG64MOVVconst)
  3981  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder)))
  3982  		return true
  3983  	}
  3984  	return false
  3985  }
  3986  func rewriteValue_OpLOONG64MOVHUloadidx(v *ssa.Value) bool {
  3987  	v_2 := v.Args[2]
  3988  	v_1 := v.Args[1]
  3989  	v_0 := v.Args[0]
  3990  	// match: (MOVHUloadidx ptr (MOVVconst [c]) mem)
  3991  	// cond: ssa.Is32Bit(c)
  3992  	// result: (MOVHUload [int32(c)] ptr mem)
  3993  	for {
  3994  		ptr := v_0
  3995  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3996  			break
  3997  		}
  3998  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3999  		mem := v_2
  4000  		if !(ssa.Is32Bit(c)) {
  4001  			break
  4002  		}
  4003  		v.Reset(ssaop.OpLOONG64MOVHUload)
  4004  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4005  		v.AddArg2(ptr, mem)
  4006  		return true
  4007  	}
  4008  	// match: (MOVHUloadidx (MOVVconst [c]) ptr mem)
  4009  	// cond: ssa.Is32Bit(c)
  4010  	// result: (MOVHUload [int32(c)] ptr mem)
  4011  	for {
  4012  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4013  			break
  4014  		}
  4015  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4016  		ptr := v_1
  4017  		mem := v_2
  4018  		if !(ssa.Is32Bit(c)) {
  4019  			break
  4020  		}
  4021  		v.Reset(ssaop.OpLOONG64MOVHUload)
  4022  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4023  		v.AddArg2(ptr, mem)
  4024  		return true
  4025  	}
  4026  	return false
  4027  }
  4028  func rewriteValue_OpLOONG64MOVHUreg(v *ssa.Value) bool {
  4029  	v_0 := v.Args[0]
  4030  	// match: (MOVHUreg (SRLVconst [rc] x))
  4031  	// cond: rc < 16
  4032  	// result: (BSTRPICKV [rc + (15+rc)<<6] x)
  4033  	for {
  4034  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  4035  			break
  4036  		}
  4037  		rc := ssa.AuxIntToInt64(v_0.AuxInt)
  4038  		x := v_0.Args[0]
  4039  		if !(rc < 16) {
  4040  			break
  4041  		}
  4042  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  4043  		v.AuxInt = ssa.Int64ToAuxInt(rc + (15+rc)<<6)
  4044  		v.AddArg(x)
  4045  		return true
  4046  	}
  4047  	// match: (MOVHUreg x:(MOVBUload _ _))
  4048  	// result: (MOVVreg x)
  4049  	for {
  4050  		x := v_0
  4051  		if x.Op != ssaop.OpLOONG64MOVBUload {
  4052  			break
  4053  		}
  4054  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4055  		v.AddArg(x)
  4056  		return true
  4057  	}
  4058  	// match: (MOVHUreg x:(MOVHUload _ _))
  4059  	// result: (MOVVreg x)
  4060  	for {
  4061  		x := v_0
  4062  		if x.Op != ssaop.OpLOONG64MOVHUload {
  4063  			break
  4064  		}
  4065  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4066  		v.AddArg(x)
  4067  		return true
  4068  	}
  4069  	// match: (MOVHUreg x:(MOVBUloadidx _ _ _))
  4070  	// result: (MOVVreg x)
  4071  	for {
  4072  		x := v_0
  4073  		if x.Op != ssaop.OpLOONG64MOVBUloadidx {
  4074  			break
  4075  		}
  4076  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4077  		v.AddArg(x)
  4078  		return true
  4079  	}
  4080  	// match: (MOVHUreg x:(MOVHUloadidx _ _ _))
  4081  	// result: (MOVVreg x)
  4082  	for {
  4083  		x := v_0
  4084  		if x.Op != ssaop.OpLOONG64MOVHUloadidx {
  4085  			break
  4086  		}
  4087  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4088  		v.AddArg(x)
  4089  		return true
  4090  	}
  4091  	// match: (MOVHUreg x:(MOVBUreg _))
  4092  	// result: (MOVVreg x)
  4093  	for {
  4094  		x := v_0
  4095  		if x.Op != ssaop.OpLOONG64MOVBUreg {
  4096  			break
  4097  		}
  4098  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4099  		v.AddArg(x)
  4100  		return true
  4101  	}
  4102  	// match: (MOVHUreg x:(MOVHUreg _))
  4103  	// result: (MOVVreg x)
  4104  	for {
  4105  		x := v_0
  4106  		if x.Op != ssaop.OpLOONG64MOVHUreg {
  4107  			break
  4108  		}
  4109  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4110  		v.AddArg(x)
  4111  		return true
  4112  	}
  4113  	// match: (MOVHUreg (SLLVconst [lc] x))
  4114  	// cond: lc >= 16
  4115  	// result: (MOVVconst [0])
  4116  	for {
  4117  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  4118  			break
  4119  		}
  4120  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  4121  		if !(lc >= 16) {
  4122  			break
  4123  		}
  4124  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4125  		v.AuxInt = ssa.Int64ToAuxInt(0)
  4126  		return true
  4127  	}
  4128  	// match: (MOVHUreg (MOVVconst [c]))
  4129  	// result: (MOVVconst [int64(uint16(c))])
  4130  	for {
  4131  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4132  			break
  4133  		}
  4134  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4135  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4136  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint16(c)))
  4137  		return true
  4138  	}
  4139  	// match: (MOVHUreg x:(SRLconst [c] y))
  4140  	// cond: c >= 16
  4141  	// result: x
  4142  	for {
  4143  		x := v_0
  4144  		if x.Op != ssaop.OpLOONG64SRLconst {
  4145  			break
  4146  		}
  4147  		c := ssa.AuxIntToInt64(x.AuxInt)
  4148  		if !(c >= 16) {
  4149  			break
  4150  		}
  4151  		v.CopyOf(x)
  4152  		return true
  4153  	}
  4154  	// match: (MOVHUreg x:(ANDconst [c] y))
  4155  	// cond: c >= 0 && int64(uint16(c)) == c
  4156  	// result: x
  4157  	for {
  4158  		x := v_0
  4159  		if x.Op != ssaop.OpLOONG64ANDconst {
  4160  			break
  4161  		}
  4162  		c := ssa.AuxIntToInt64(x.AuxInt)
  4163  		if !(c >= 0 && int64(uint16(c)) == c) {
  4164  			break
  4165  		}
  4166  		v.CopyOf(x)
  4167  		return true
  4168  	}
  4169  	return false
  4170  }
  4171  func rewriteValue_OpLOONG64MOVHload(v *ssa.Value) bool {
  4172  	v_1 := v.Args[1]
  4173  	v_0 := v.Args[0]
  4174  	b := v.Block
  4175  	config := b.Func.Config
  4176  	typ := &b.Func.Config.Types
  4177  	// match: (MOVHload [off] {sym} ptr (MOVHstore [off] {sym} ptr x _))
  4178  	// result: (MOVHreg x)
  4179  	for {
  4180  		off := ssa.AuxIntToInt32(v.AuxInt)
  4181  		sym := ssa.AuxToSym(v.Aux)
  4182  		ptr := v_0
  4183  		if v_1.Op != ssaop.OpLOONG64MOVHstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4184  			break
  4185  		}
  4186  		x := v_1.Args[1]
  4187  		if ptr != v_1.Args[0] {
  4188  			break
  4189  		}
  4190  		v.Reset(ssaop.OpLOONG64MOVHreg)
  4191  		v.AddArg(x)
  4192  		return true
  4193  	}
  4194  	// match: (MOVHload [off1] {sym} (ADDVconst [off2] ptr) mem)
  4195  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4196  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
  4197  	for {
  4198  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4199  		sym := ssa.AuxToSym(v.Aux)
  4200  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4201  			break
  4202  		}
  4203  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4204  		ptr := v_0.Args[0]
  4205  		mem := v_1
  4206  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4207  			break
  4208  		}
  4209  		v.Reset(ssaop.OpLOONG64MOVHload)
  4210  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4211  		v.Aux = ssa.SymToAux(sym)
  4212  		v.AddArg2(ptr, mem)
  4213  		return true
  4214  	}
  4215  	// match: (MOVHload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  4216  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4217  	// result: (MOVHload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  4218  	for {
  4219  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4220  		sym1 := ssa.AuxToSym(v.Aux)
  4221  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4222  			break
  4223  		}
  4224  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4225  		sym2 := ssa.AuxToSym(v_0.Aux)
  4226  		ptr := v_0.Args[0]
  4227  		mem := v_1
  4228  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4229  			break
  4230  		}
  4231  		v.Reset(ssaop.OpLOONG64MOVHload)
  4232  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4233  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4234  		v.AddArg2(ptr, mem)
  4235  		return true
  4236  	}
  4237  	// match: (MOVHload [off] {sym} (ADDV ptr idx) mem)
  4238  	// cond: off == 0 && sym == nil
  4239  	// result: (MOVHloadidx ptr idx mem)
  4240  	for {
  4241  		off := ssa.AuxIntToInt32(v.AuxInt)
  4242  		sym := ssa.AuxToSym(v.Aux)
  4243  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4244  			break
  4245  		}
  4246  		idx := v_0.Args[1]
  4247  		ptr := v_0.Args[0]
  4248  		mem := v_1
  4249  		if !(off == 0 && sym == nil) {
  4250  			break
  4251  		}
  4252  		v.Reset(ssaop.OpLOONG64MOVHloadidx)
  4253  		v.AddArg3(ptr, idx, mem)
  4254  		return true
  4255  	}
  4256  	// match: (MOVHload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4257  	// cond: off == 0 && sym == nil
  4258  	// result: (MOVHloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4259  	for {
  4260  		off := ssa.AuxIntToInt32(v.AuxInt)
  4261  		sym := ssa.AuxToSym(v.Aux)
  4262  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4263  			break
  4264  		}
  4265  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4266  		idx := v_0.Args[1]
  4267  		ptr := v_0.Args[0]
  4268  		mem := v_1
  4269  		if !(off == 0 && sym == nil) {
  4270  			break
  4271  		}
  4272  		v.Reset(ssaop.OpLOONG64MOVHloadidx)
  4273  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4274  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4275  		v0.AddArg(idx)
  4276  		v.AddArg3(ptr, v0, mem)
  4277  		return true
  4278  	}
  4279  	// match: (MOVHload [off] {sym} (SB) _)
  4280  	// cond: ssa.SymIsRO(sym)
  4281  	// result: (MOVVconst [int64(int16(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder)))])
  4282  	for {
  4283  		off := ssa.AuxIntToInt32(v.AuxInt)
  4284  		sym := ssa.AuxToSym(v.Aux)
  4285  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  4286  			break
  4287  		}
  4288  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4289  		v.AuxInt = ssa.Int64ToAuxInt(int64(int16(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder))))
  4290  		return true
  4291  	}
  4292  	return false
  4293  }
  4294  func rewriteValue_OpLOONG64MOVHloadidx(v *ssa.Value) bool {
  4295  	v_2 := v.Args[2]
  4296  	v_1 := v.Args[1]
  4297  	v_0 := v.Args[0]
  4298  	// match: (MOVHloadidx ptr (MOVVconst [c]) mem)
  4299  	// cond: ssa.Is32Bit(c)
  4300  	// result: (MOVHload [int32(c)] ptr mem)
  4301  	for {
  4302  		ptr := v_0
  4303  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4304  			break
  4305  		}
  4306  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4307  		mem := v_2
  4308  		if !(ssa.Is32Bit(c)) {
  4309  			break
  4310  		}
  4311  		v.Reset(ssaop.OpLOONG64MOVHload)
  4312  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4313  		v.AddArg2(ptr, mem)
  4314  		return true
  4315  	}
  4316  	// match: (MOVHloadidx (MOVVconst [c]) ptr mem)
  4317  	// cond: ssa.Is32Bit(c)
  4318  	// result: (MOVHload [int32(c)] ptr mem)
  4319  	for {
  4320  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4321  			break
  4322  		}
  4323  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4324  		ptr := v_1
  4325  		mem := v_2
  4326  		if !(ssa.Is32Bit(c)) {
  4327  			break
  4328  		}
  4329  		v.Reset(ssaop.OpLOONG64MOVHload)
  4330  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4331  		v.AddArg2(ptr, mem)
  4332  		return true
  4333  	}
  4334  	return false
  4335  }
  4336  func rewriteValue_OpLOONG64MOVHreg(v *ssa.Value) bool {
  4337  	v_0 := v.Args[0]
  4338  	// match: (MOVHreg x:(MOVBload _ _))
  4339  	// result: (MOVVreg x)
  4340  	for {
  4341  		x := v_0
  4342  		if x.Op != ssaop.OpLOONG64MOVBload {
  4343  			break
  4344  		}
  4345  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4346  		v.AddArg(x)
  4347  		return true
  4348  	}
  4349  	// match: (MOVHreg x:(MOVBUload _ _))
  4350  	// result: (MOVVreg x)
  4351  	for {
  4352  		x := v_0
  4353  		if x.Op != ssaop.OpLOONG64MOVBUload {
  4354  			break
  4355  		}
  4356  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4357  		v.AddArg(x)
  4358  		return true
  4359  	}
  4360  	// match: (MOVHreg x:(MOVHload _ _))
  4361  	// result: (MOVVreg x)
  4362  	for {
  4363  		x := v_0
  4364  		if x.Op != ssaop.OpLOONG64MOVHload {
  4365  			break
  4366  		}
  4367  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4368  		v.AddArg(x)
  4369  		return true
  4370  	}
  4371  	// match: (MOVHreg x:(MOVBloadidx _ _ _))
  4372  	// result: (MOVVreg x)
  4373  	for {
  4374  		x := v_0
  4375  		if x.Op != ssaop.OpLOONG64MOVBloadidx {
  4376  			break
  4377  		}
  4378  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4379  		v.AddArg(x)
  4380  		return true
  4381  	}
  4382  	// match: (MOVHreg x:(MOVBUloadidx _ _ _))
  4383  	// result: (MOVVreg x)
  4384  	for {
  4385  		x := v_0
  4386  		if x.Op != ssaop.OpLOONG64MOVBUloadidx {
  4387  			break
  4388  		}
  4389  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4390  		v.AddArg(x)
  4391  		return true
  4392  	}
  4393  	// match: (MOVHreg x:(MOVHloadidx _ _ _))
  4394  	// result: (MOVVreg x)
  4395  	for {
  4396  		x := v_0
  4397  		if x.Op != ssaop.OpLOONG64MOVHloadidx {
  4398  			break
  4399  		}
  4400  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4401  		v.AddArg(x)
  4402  		return true
  4403  	}
  4404  	// match: (MOVHreg x:(MOVBreg _))
  4405  	// result: (MOVVreg x)
  4406  	for {
  4407  		x := v_0
  4408  		if x.Op != ssaop.OpLOONG64MOVBreg {
  4409  			break
  4410  		}
  4411  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4412  		v.AddArg(x)
  4413  		return true
  4414  	}
  4415  	// match: (MOVHreg x:(MOVBUreg _))
  4416  	// result: (MOVVreg x)
  4417  	for {
  4418  		x := v_0
  4419  		if x.Op != ssaop.OpLOONG64MOVBUreg {
  4420  			break
  4421  		}
  4422  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4423  		v.AddArg(x)
  4424  		return true
  4425  	}
  4426  	// match: (MOVHreg x:(MOVHreg _))
  4427  	// result: (MOVVreg x)
  4428  	for {
  4429  		x := v_0
  4430  		if x.Op != ssaop.OpLOONG64MOVHreg {
  4431  			break
  4432  		}
  4433  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4434  		v.AddArg(x)
  4435  		return true
  4436  	}
  4437  	// match: (MOVHreg (MOVVconst [c]))
  4438  	// result: (MOVVconst [int64(int16(c))])
  4439  	for {
  4440  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4441  			break
  4442  		}
  4443  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4444  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4445  		v.AuxInt = ssa.Int64ToAuxInt(int64(int16(c)))
  4446  		return true
  4447  	}
  4448  	// match: (MOVHreg x:(ANDconst [c] y))
  4449  	// cond: c >= 0 && int64(int16(c)) == c
  4450  	// result: x
  4451  	for {
  4452  		x := v_0
  4453  		if x.Op != ssaop.OpLOONG64ANDconst {
  4454  			break
  4455  		}
  4456  		c := ssa.AuxIntToInt64(x.AuxInt)
  4457  		if !(c >= 0 && int64(int16(c)) == c) {
  4458  			break
  4459  		}
  4460  		v.CopyOf(x)
  4461  		return true
  4462  	}
  4463  	return false
  4464  }
  4465  func rewriteValue_OpLOONG64MOVHstore(v *ssa.Value) bool {
  4466  	v_2 := v.Args[2]
  4467  	v_1 := v.Args[1]
  4468  	v_0 := v.Args[0]
  4469  	b := v.Block
  4470  	config := b.Func.Config
  4471  	typ := &b.Func.Config.Types
  4472  	// match: (MOVHstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  4473  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4474  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
  4475  	for {
  4476  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4477  		sym := ssa.AuxToSym(v.Aux)
  4478  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4479  			break
  4480  		}
  4481  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4482  		ptr := v_0.Args[0]
  4483  		val := v_1
  4484  		mem := v_2
  4485  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4486  			break
  4487  		}
  4488  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4489  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4490  		v.Aux = ssa.SymToAux(sym)
  4491  		v.AddArg3(ptr, val, mem)
  4492  		return true
  4493  	}
  4494  	// match: (MOVHstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  4495  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4496  	// result: (MOVHstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  4497  	for {
  4498  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4499  		sym1 := ssa.AuxToSym(v.Aux)
  4500  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4501  			break
  4502  		}
  4503  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4504  		sym2 := ssa.AuxToSym(v_0.Aux)
  4505  		ptr := v_0.Args[0]
  4506  		val := v_1
  4507  		mem := v_2
  4508  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4509  			break
  4510  		}
  4511  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4512  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4513  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4514  		v.AddArg3(ptr, val, mem)
  4515  		return true
  4516  	}
  4517  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  4518  	// result: (MOVHstore [off] {sym} ptr x mem)
  4519  	for {
  4520  		off := ssa.AuxIntToInt32(v.AuxInt)
  4521  		sym := ssa.AuxToSym(v.Aux)
  4522  		ptr := v_0
  4523  		if v_1.Op != ssaop.OpLOONG64MOVHreg {
  4524  			break
  4525  		}
  4526  		x := v_1.Args[0]
  4527  		mem := v_2
  4528  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4529  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4530  		v.Aux = ssa.SymToAux(sym)
  4531  		v.AddArg3(ptr, x, mem)
  4532  		return true
  4533  	}
  4534  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
  4535  	// result: (MOVHstore [off] {sym} ptr x mem)
  4536  	for {
  4537  		off := ssa.AuxIntToInt32(v.AuxInt)
  4538  		sym := ssa.AuxToSym(v.Aux)
  4539  		ptr := v_0
  4540  		if v_1.Op != ssaop.OpLOONG64MOVHUreg {
  4541  			break
  4542  		}
  4543  		x := v_1.Args[0]
  4544  		mem := v_2
  4545  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4546  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4547  		v.Aux = ssa.SymToAux(sym)
  4548  		v.AddArg3(ptr, x, mem)
  4549  		return true
  4550  	}
  4551  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
  4552  	// result: (MOVHstore [off] {sym} ptr x mem)
  4553  	for {
  4554  		off := ssa.AuxIntToInt32(v.AuxInt)
  4555  		sym := ssa.AuxToSym(v.Aux)
  4556  		ptr := v_0
  4557  		if v_1.Op != ssaop.OpLOONG64MOVWreg {
  4558  			break
  4559  		}
  4560  		x := v_1.Args[0]
  4561  		mem := v_2
  4562  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4563  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4564  		v.Aux = ssa.SymToAux(sym)
  4565  		v.AddArg3(ptr, x, mem)
  4566  		return true
  4567  	}
  4568  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
  4569  	// result: (MOVHstore [off] {sym} ptr x mem)
  4570  	for {
  4571  		off := ssa.AuxIntToInt32(v.AuxInt)
  4572  		sym := ssa.AuxToSym(v.Aux)
  4573  		ptr := v_0
  4574  		if v_1.Op != ssaop.OpLOONG64MOVWUreg {
  4575  			break
  4576  		}
  4577  		x := v_1.Args[0]
  4578  		mem := v_2
  4579  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4580  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4581  		v.Aux = ssa.SymToAux(sym)
  4582  		v.AddArg3(ptr, x, mem)
  4583  		return true
  4584  	}
  4585  	// match: (MOVHstore [off] {sym} (ADDV ptr idx) val mem)
  4586  	// cond: off == 0 && sym == nil
  4587  	// result: (MOVHstoreidx ptr idx val mem)
  4588  	for {
  4589  		off := ssa.AuxIntToInt32(v.AuxInt)
  4590  		sym := ssa.AuxToSym(v.Aux)
  4591  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4592  			break
  4593  		}
  4594  		idx := v_0.Args[1]
  4595  		ptr := v_0.Args[0]
  4596  		val := v_1
  4597  		mem := v_2
  4598  		if !(off == 0 && sym == nil) {
  4599  			break
  4600  		}
  4601  		v.Reset(ssaop.OpLOONG64MOVHstoreidx)
  4602  		v.AddArg4(ptr, idx, val, mem)
  4603  		return true
  4604  	}
  4605  	// match: (MOVHstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  4606  	// cond: off == 0 && sym == nil
  4607  	// result: (MOVHstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  4608  	for {
  4609  		off := ssa.AuxIntToInt32(v.AuxInt)
  4610  		sym := ssa.AuxToSym(v.Aux)
  4611  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4612  			break
  4613  		}
  4614  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4615  		idx := v_0.Args[1]
  4616  		ptr := v_0.Args[0]
  4617  		val := v_1
  4618  		mem := v_2
  4619  		if !(off == 0 && sym == nil) {
  4620  			break
  4621  		}
  4622  		v.Reset(ssaop.OpLOONG64MOVHstoreidx)
  4623  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4624  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4625  		v0.AddArg(idx)
  4626  		v.AddArg4(ptr, v0, val, mem)
  4627  		return true
  4628  	}
  4629  	return false
  4630  }
  4631  func rewriteValue_OpLOONG64MOVHstoreidx(v *ssa.Value) bool {
  4632  	v_3 := v.Args[3]
  4633  	v_2 := v.Args[2]
  4634  	v_1 := v.Args[1]
  4635  	v_0 := v.Args[0]
  4636  	// match: (MOVHstoreidx ptr (MOVVconst [c]) val mem)
  4637  	// cond: ssa.Is32Bit(c)
  4638  	// result: (MOVHstore [int32(c)] ptr val mem)
  4639  	for {
  4640  		ptr := v_0
  4641  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4642  			break
  4643  		}
  4644  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4645  		val := v_2
  4646  		mem := v_3
  4647  		if !(ssa.Is32Bit(c)) {
  4648  			break
  4649  		}
  4650  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4651  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4652  		v.AddArg3(ptr, val, mem)
  4653  		return true
  4654  	}
  4655  	// match: (MOVHstoreidx (MOVVconst [c]) idx val mem)
  4656  	// cond: ssa.Is32Bit(c)
  4657  	// result: (MOVHstore [int32(c)] idx val mem)
  4658  	for {
  4659  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4660  			break
  4661  		}
  4662  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4663  		idx := v_1
  4664  		val := v_2
  4665  		mem := v_3
  4666  		if !(ssa.Is32Bit(c)) {
  4667  			break
  4668  		}
  4669  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4670  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4671  		v.AddArg3(idx, val, mem)
  4672  		return true
  4673  	}
  4674  	return false
  4675  }
  4676  func rewriteValue_OpLOONG64MOVVload(v *ssa.Value) bool {
  4677  	v_1 := v.Args[1]
  4678  	v_0 := v.Args[0]
  4679  	b := v.Block
  4680  	config := b.Func.Config
  4681  	typ := &b.Func.Config.Types
  4682  	// match: (MOVVload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  4683  	// result: (MOVVfpgp val)
  4684  	for {
  4685  		off := ssa.AuxIntToInt32(v.AuxInt)
  4686  		sym := ssa.AuxToSym(v.Aux)
  4687  		ptr := v_0
  4688  		if v_1.Op != ssaop.OpLOONG64MOVDstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4689  			break
  4690  		}
  4691  		val := v_1.Args[1]
  4692  		if ptr != v_1.Args[0] {
  4693  			break
  4694  		}
  4695  		v.Reset(ssaop.OpLOONG64MOVVfpgp)
  4696  		v.AddArg(val)
  4697  		return true
  4698  	}
  4699  	// match: (MOVVload [off] {sym} ptr (MOVVstore [off] {sym} ptr x _))
  4700  	// result: (MOVVreg x)
  4701  	for {
  4702  		off := ssa.AuxIntToInt32(v.AuxInt)
  4703  		sym := ssa.AuxToSym(v.Aux)
  4704  		ptr := v_0
  4705  		if v_1.Op != ssaop.OpLOONG64MOVVstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4706  			break
  4707  		}
  4708  		x := v_1.Args[1]
  4709  		if ptr != v_1.Args[0] {
  4710  			break
  4711  		}
  4712  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4713  		v.AddArg(x)
  4714  		return true
  4715  	}
  4716  	// match: (MOVVload [off1] {sym} (ADDVconst [off2] ptr) mem)
  4717  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4718  	// result: (MOVVload [off1+int32(off2)] {sym} ptr mem)
  4719  	for {
  4720  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4721  		sym := ssa.AuxToSym(v.Aux)
  4722  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4723  			break
  4724  		}
  4725  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4726  		ptr := v_0.Args[0]
  4727  		mem := v_1
  4728  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4729  			break
  4730  		}
  4731  		v.Reset(ssaop.OpLOONG64MOVVload)
  4732  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4733  		v.Aux = ssa.SymToAux(sym)
  4734  		v.AddArg2(ptr, mem)
  4735  		return true
  4736  	}
  4737  	// match: (MOVVload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  4738  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4739  	// result: (MOVVload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  4740  	for {
  4741  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4742  		sym1 := ssa.AuxToSym(v.Aux)
  4743  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4744  			break
  4745  		}
  4746  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4747  		sym2 := ssa.AuxToSym(v_0.Aux)
  4748  		ptr := v_0.Args[0]
  4749  		mem := v_1
  4750  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4751  			break
  4752  		}
  4753  		v.Reset(ssaop.OpLOONG64MOVVload)
  4754  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4755  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4756  		v.AddArg2(ptr, mem)
  4757  		return true
  4758  	}
  4759  	// match: (MOVVload [off] {sym} (ADDV ptr idx) mem)
  4760  	// cond: off == 0 && sym == nil
  4761  	// result: (MOVVloadidx ptr idx mem)
  4762  	for {
  4763  		off := ssa.AuxIntToInt32(v.AuxInt)
  4764  		sym := ssa.AuxToSym(v.Aux)
  4765  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4766  			break
  4767  		}
  4768  		idx := v_0.Args[1]
  4769  		ptr := v_0.Args[0]
  4770  		mem := v_1
  4771  		if !(off == 0 && sym == nil) {
  4772  			break
  4773  		}
  4774  		v.Reset(ssaop.OpLOONG64MOVVloadidx)
  4775  		v.AddArg3(ptr, idx, mem)
  4776  		return true
  4777  	}
  4778  	// match: (MOVVload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4779  	// cond: off == 0 && sym == nil
  4780  	// result: (MOVVloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4781  	for {
  4782  		off := ssa.AuxIntToInt32(v.AuxInt)
  4783  		sym := ssa.AuxToSym(v.Aux)
  4784  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4785  			break
  4786  		}
  4787  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4788  		idx := v_0.Args[1]
  4789  		ptr := v_0.Args[0]
  4790  		mem := v_1
  4791  		if !(off == 0 && sym == nil) {
  4792  			break
  4793  		}
  4794  		v.Reset(ssaop.OpLOONG64MOVVloadidx)
  4795  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4796  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4797  		v0.AddArg(idx)
  4798  		v.AddArg3(ptr, v0, mem)
  4799  		return true
  4800  	}
  4801  	// match: (MOVVload [off] {sym} (SB) _)
  4802  	// cond: ssa.SymIsRO(sym)
  4803  	// result: (MOVVconst [int64(ssa.Read64(sym, int64(off), config.Ctxt.Arch.ByteOrder))])
  4804  	for {
  4805  		off := ssa.AuxIntToInt32(v.AuxInt)
  4806  		sym := ssa.AuxToSym(v.Aux)
  4807  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  4808  			break
  4809  		}
  4810  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4811  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read64(sym, int64(off), config.Ctxt.Arch.ByteOrder)))
  4812  		return true
  4813  	}
  4814  	return false
  4815  }
  4816  func rewriteValue_OpLOONG64MOVVloadidx(v *ssa.Value) bool {
  4817  	v_2 := v.Args[2]
  4818  	v_1 := v.Args[1]
  4819  	v_0 := v.Args[0]
  4820  	// match: (MOVVloadidx ptr (MOVVconst [c]) mem)
  4821  	// cond: ssa.Is32Bit(c)
  4822  	// result: (MOVVload [int32(c)] ptr mem)
  4823  	for {
  4824  		ptr := v_0
  4825  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4826  			break
  4827  		}
  4828  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4829  		mem := v_2
  4830  		if !(ssa.Is32Bit(c)) {
  4831  			break
  4832  		}
  4833  		v.Reset(ssaop.OpLOONG64MOVVload)
  4834  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4835  		v.AddArg2(ptr, mem)
  4836  		return true
  4837  	}
  4838  	// match: (MOVVloadidx (MOVVconst [c]) ptr mem)
  4839  	// cond: ssa.Is32Bit(c)
  4840  	// result: (MOVVload [int32(c)] ptr mem)
  4841  	for {
  4842  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4843  			break
  4844  		}
  4845  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4846  		ptr := v_1
  4847  		mem := v_2
  4848  		if !(ssa.Is32Bit(c)) {
  4849  			break
  4850  		}
  4851  		v.Reset(ssaop.OpLOONG64MOVVload)
  4852  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4853  		v.AddArg2(ptr, mem)
  4854  		return true
  4855  	}
  4856  	return false
  4857  }
  4858  func rewriteValue_OpLOONG64MOVVnop(v *ssa.Value) bool {
  4859  	v_0 := v.Args[0]
  4860  	// match: (MOVVnop (MOVVconst [c]))
  4861  	// result: (MOVVconst [c])
  4862  	for {
  4863  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4864  			break
  4865  		}
  4866  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4867  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4868  		v.AuxInt = ssa.Int64ToAuxInt(c)
  4869  		return true
  4870  	}
  4871  	return false
  4872  }
  4873  func rewriteValue_OpLOONG64MOVVreg(v *ssa.Value) bool {
  4874  	v_0 := v.Args[0]
  4875  	// match: (MOVVreg x)
  4876  	// cond: x.Uses == 1
  4877  	// result: (MOVVnop x)
  4878  	for {
  4879  		x := v_0
  4880  		if !(x.Uses == 1) {
  4881  			break
  4882  		}
  4883  		v.Reset(ssaop.OpLOONG64MOVVnop)
  4884  		v.AddArg(x)
  4885  		return true
  4886  	}
  4887  	// match: (MOVVreg (MOVVconst [c]))
  4888  	// result: (MOVVconst [c])
  4889  	for {
  4890  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4891  			break
  4892  		}
  4893  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4894  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4895  		v.AuxInt = ssa.Int64ToAuxInt(c)
  4896  		return true
  4897  	}
  4898  	return false
  4899  }
  4900  func rewriteValue_OpLOONG64MOVVstore(v *ssa.Value) bool {
  4901  	v_2 := v.Args[2]
  4902  	v_1 := v.Args[1]
  4903  	v_0 := v.Args[0]
  4904  	b := v.Block
  4905  	config := b.Func.Config
  4906  	typ := &b.Func.Config.Types
  4907  	// match: (MOVVstore [off] {sym} ptr (MOVVfpgp val) mem)
  4908  	// result: (MOVDstore [off] {sym} ptr val mem)
  4909  	for {
  4910  		off := ssa.AuxIntToInt32(v.AuxInt)
  4911  		sym := ssa.AuxToSym(v.Aux)
  4912  		ptr := v_0
  4913  		if v_1.Op != ssaop.OpLOONG64MOVVfpgp {
  4914  			break
  4915  		}
  4916  		val := v_1.Args[0]
  4917  		mem := v_2
  4918  		v.Reset(ssaop.OpLOONG64MOVDstore)
  4919  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4920  		v.Aux = ssa.SymToAux(sym)
  4921  		v.AddArg3(ptr, val, mem)
  4922  		return true
  4923  	}
  4924  	// match: (MOVVstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  4925  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4926  	// result: (MOVVstore [off1+int32(off2)] {sym} ptr val mem)
  4927  	for {
  4928  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4929  		sym := ssa.AuxToSym(v.Aux)
  4930  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4931  			break
  4932  		}
  4933  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4934  		ptr := v_0.Args[0]
  4935  		val := v_1
  4936  		mem := v_2
  4937  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4938  			break
  4939  		}
  4940  		v.Reset(ssaop.OpLOONG64MOVVstore)
  4941  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4942  		v.Aux = ssa.SymToAux(sym)
  4943  		v.AddArg3(ptr, val, mem)
  4944  		return true
  4945  	}
  4946  	// match: (MOVVstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  4947  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4948  	// result: (MOVVstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  4949  	for {
  4950  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4951  		sym1 := ssa.AuxToSym(v.Aux)
  4952  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4953  			break
  4954  		}
  4955  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4956  		sym2 := ssa.AuxToSym(v_0.Aux)
  4957  		ptr := v_0.Args[0]
  4958  		val := v_1
  4959  		mem := v_2
  4960  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4961  			break
  4962  		}
  4963  		v.Reset(ssaop.OpLOONG64MOVVstore)
  4964  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4965  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4966  		v.AddArg3(ptr, val, mem)
  4967  		return true
  4968  	}
  4969  	// match: (MOVVstore [off] {sym} (ADDV ptr idx) val mem)
  4970  	// cond: off == 0 && sym == nil
  4971  	// result: (MOVVstoreidx ptr idx val mem)
  4972  	for {
  4973  		off := ssa.AuxIntToInt32(v.AuxInt)
  4974  		sym := ssa.AuxToSym(v.Aux)
  4975  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4976  			break
  4977  		}
  4978  		idx := v_0.Args[1]
  4979  		ptr := v_0.Args[0]
  4980  		val := v_1
  4981  		mem := v_2
  4982  		if !(off == 0 && sym == nil) {
  4983  			break
  4984  		}
  4985  		v.Reset(ssaop.OpLOONG64MOVVstoreidx)
  4986  		v.AddArg4(ptr, idx, val, mem)
  4987  		return true
  4988  	}
  4989  	// match: (MOVVstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  4990  	// cond: off == 0 && sym == nil
  4991  	// result: (MOVVstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  4992  	for {
  4993  		off := ssa.AuxIntToInt32(v.AuxInt)
  4994  		sym := ssa.AuxToSym(v.Aux)
  4995  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4996  			break
  4997  		}
  4998  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4999  		idx := v_0.Args[1]
  5000  		ptr := v_0.Args[0]
  5001  		val := v_1
  5002  		mem := v_2
  5003  		if !(off == 0 && sym == nil) {
  5004  			break
  5005  		}
  5006  		v.Reset(ssaop.OpLOONG64MOVVstoreidx)
  5007  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  5008  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  5009  		v0.AddArg(idx)
  5010  		v.AddArg4(ptr, v0, val, mem)
  5011  		return true
  5012  	}
  5013  	return false
  5014  }
  5015  func rewriteValue_OpLOONG64MOVVstoreidx(v *ssa.Value) bool {
  5016  	v_3 := v.Args[3]
  5017  	v_2 := v.Args[2]
  5018  	v_1 := v.Args[1]
  5019  	v_0 := v.Args[0]
  5020  	// match: (MOVVstoreidx ptr (MOVVconst [c]) val mem)
  5021  	// cond: ssa.Is32Bit(c)
  5022  	// result: (MOVVstore [int32(c)] ptr val mem)
  5023  	for {
  5024  		ptr := v_0
  5025  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5026  			break
  5027  		}
  5028  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5029  		val := v_2
  5030  		mem := v_3
  5031  		if !(ssa.Is32Bit(c)) {
  5032  			break
  5033  		}
  5034  		v.Reset(ssaop.OpLOONG64MOVVstore)
  5035  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5036  		v.AddArg3(ptr, val, mem)
  5037  		return true
  5038  	}
  5039  	// match: (MOVVstoreidx (MOVVconst [c]) idx val mem)
  5040  	// cond: ssa.Is32Bit(c)
  5041  	// result: (MOVVstore [int32(c)] idx val mem)
  5042  	for {
  5043  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5044  			break
  5045  		}
  5046  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5047  		idx := v_1
  5048  		val := v_2
  5049  		mem := v_3
  5050  		if !(ssa.Is32Bit(c)) {
  5051  			break
  5052  		}
  5053  		v.Reset(ssaop.OpLOONG64MOVVstore)
  5054  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5055  		v.AddArg3(idx, val, mem)
  5056  		return true
  5057  	}
  5058  	return false
  5059  }
  5060  func rewriteValue_OpLOONG64MOVWUload(v *ssa.Value) bool {
  5061  	v_1 := v.Args[1]
  5062  	v_0 := v.Args[0]
  5063  	b := v.Block
  5064  	config := b.Func.Config
  5065  	typ := &b.Func.Config.Types
  5066  	// match: (MOVWUload [off] {sym} ptr (MOVFstore [off] {sym} ptr val _))
  5067  	// result: (ZeroExt32to64 (MOVWfpgp <typ.Float32> val))
  5068  	for {
  5069  		off := ssa.AuxIntToInt32(v.AuxInt)
  5070  		sym := ssa.AuxToSym(v.Aux)
  5071  		ptr := v_0
  5072  		if v_1.Op != ssaop.OpLOONG64MOVFstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  5073  			break
  5074  		}
  5075  		val := v_1.Args[1]
  5076  		if ptr != v_1.Args[0] {
  5077  			break
  5078  		}
  5079  		v.Reset(ssaop.OpZeroExt32to64)
  5080  		v0 := b.NewValue0(v_1.Pos, ssaop.OpLOONG64MOVWfpgp, typ.Float32)
  5081  		v0.AddArg(val)
  5082  		v.AddArg(v0)
  5083  		return true
  5084  	}
  5085  	// match: (MOVWUload [off] {sym} ptr (MOVWstore [off] {sym} ptr x _))
  5086  	// result: (MOVWUreg x)
  5087  	for {
  5088  		off := ssa.AuxIntToInt32(v.AuxInt)
  5089  		sym := ssa.AuxToSym(v.Aux)
  5090  		ptr := v_0
  5091  		if v_1.Op != ssaop.OpLOONG64MOVWstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  5092  			break
  5093  		}
  5094  		x := v_1.Args[1]
  5095  		if ptr != v_1.Args[0] {
  5096  			break
  5097  		}
  5098  		v.Reset(ssaop.OpLOONG64MOVWUreg)
  5099  		v.AddArg(x)
  5100  		return true
  5101  	}
  5102  	// match: (MOVWUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  5103  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5104  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
  5105  	for {
  5106  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5107  		sym := ssa.AuxToSym(v.Aux)
  5108  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  5109  			break
  5110  		}
  5111  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  5112  		ptr := v_0.Args[0]
  5113  		mem := v_1
  5114  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5115  			break
  5116  		}
  5117  		v.Reset(ssaop.OpLOONG64MOVWUload)
  5118  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5119  		v.Aux = ssa.SymToAux(sym)
  5120  		v.AddArg2(ptr, mem)
  5121  		return true
  5122  	}
  5123  	// match: (MOVWUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  5124  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5125  	// result: (MOVWUload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  5126  	for {
  5127  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5128  		sym1 := ssa.AuxToSym(v.Aux)
  5129  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  5130  			break
  5131  		}
  5132  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5133  		sym2 := ssa.AuxToSym(v_0.Aux)
  5134  		ptr := v_0.Args[0]
  5135  		mem := v_1
  5136  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5137  			break
  5138  		}
  5139  		v.Reset(ssaop.OpLOONG64MOVWUload)
  5140  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5141  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5142  		v.AddArg2(ptr, mem)
  5143  		return true
  5144  	}
  5145  	// match: (MOVWUload [off] {sym} (ADDV ptr idx) mem)
  5146  	// cond: off == 0 && sym == nil
  5147  	// result: (MOVWUloadidx ptr idx mem)
  5148  	for {
  5149  		off := ssa.AuxIntToInt32(v.AuxInt)
  5150  		sym := ssa.AuxToSym(v.Aux)
  5151  		if v_0.Op != ssaop.OpLOONG64ADDV {
  5152  			break
  5153  		}
  5154  		idx := v_0.Args[1]
  5155  		ptr := v_0.Args[0]
  5156  		mem := v_1
  5157  		if !(off == 0 && sym == nil) {
  5158  			break
  5159  		}
  5160  		v.Reset(ssaop.OpLOONG64MOVWUloadidx)
  5161  		v.AddArg3(ptr, idx, mem)
  5162  		return true
  5163  	}
  5164  	// match: (MOVWUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  5165  	// cond: off == 0 && sym == nil
  5166  	// result: (MOVWUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  5167  	for {
  5168  		off := ssa.AuxIntToInt32(v.AuxInt)
  5169  		sym := ssa.AuxToSym(v.Aux)
  5170  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  5171  			break
  5172  		}
  5173  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  5174  		idx := v_0.Args[1]
  5175  		ptr := v_0.Args[0]
  5176  		mem := v_1
  5177  		if !(off == 0 && sym == nil) {
  5178  			break
  5179  		}
  5180  		v.Reset(ssaop.OpLOONG64MOVWUloadidx)
  5181  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  5182  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  5183  		v0.AddArg(idx)
  5184  		v.AddArg3(ptr, v0, mem)
  5185  		return true
  5186  	}
  5187  	// match: (MOVWUload [off] {sym} (SB) _)
  5188  	// cond: ssa.SymIsRO(sym)
  5189  	// result: (MOVVconst [int64(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder))])
  5190  	for {
  5191  		off := ssa.AuxIntToInt32(v.AuxInt)
  5192  		sym := ssa.AuxToSym(v.Aux)
  5193  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  5194  			break
  5195  		}
  5196  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5197  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder)))
  5198  		return true
  5199  	}
  5200  	return false
  5201  }
  5202  func rewriteValue_OpLOONG64MOVWUloadidx(v *ssa.Value) bool {
  5203  	v_2 := v.Args[2]
  5204  	v_1 := v.Args[1]
  5205  	v_0 := v.Args[0]
  5206  	// match: (MOVWUloadidx ptr (MOVVconst [c]) mem)
  5207  	// cond: ssa.Is32Bit(c)
  5208  	// result: (MOVWUload [int32(c)] ptr mem)
  5209  	for {
  5210  		ptr := v_0
  5211  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5212  			break
  5213  		}
  5214  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5215  		mem := v_2
  5216  		if !(ssa.Is32Bit(c)) {
  5217  			break
  5218  		}
  5219  		v.Reset(ssaop.OpLOONG64MOVWUload)
  5220  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5221  		v.AddArg2(ptr, mem)
  5222  		return true
  5223  	}
  5224  	// match: (MOVWUloadidx (MOVVconst [c]) ptr mem)
  5225  	// cond: ssa.Is32Bit(c)
  5226  	// result: (MOVWUload [int32(c)] ptr mem)
  5227  	for {
  5228  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5229  			break
  5230  		}
  5231  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5232  		ptr := v_1
  5233  		mem := v_2
  5234  		if !(ssa.Is32Bit(c)) {
  5235  			break
  5236  		}
  5237  		v.Reset(ssaop.OpLOONG64MOVWUload)
  5238  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5239  		v.AddArg2(ptr, mem)
  5240  		return true
  5241  	}
  5242  	return false
  5243  }
  5244  func rewriteValue_OpLOONG64MOVWUreg(v *ssa.Value) bool {
  5245  	v_0 := v.Args[0]
  5246  	// match: (MOVWUreg (SRLVconst [rc] x))
  5247  	// cond: rc < 32
  5248  	// result: (BSTRPICKV [rc + (31+rc)<<6] x)
  5249  	for {
  5250  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  5251  			break
  5252  		}
  5253  		rc := ssa.AuxIntToInt64(v_0.AuxInt)
  5254  		x := v_0.Args[0]
  5255  		if !(rc < 32) {
  5256  			break
  5257  		}
  5258  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  5259  		v.AuxInt = ssa.Int64ToAuxInt(rc + (31+rc)<<6)
  5260  		v.AddArg(x)
  5261  		return true
  5262  	}
  5263  	// match: (MOVWUreg x:(MOVBUload _ _))
  5264  	// result: (MOVVreg x)
  5265  	for {
  5266  		x := v_0
  5267  		if x.Op != ssaop.OpLOONG64MOVBUload {
  5268  			break
  5269  		}
  5270  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5271  		v.AddArg(x)
  5272  		return true
  5273  	}
  5274  	// match: (MOVWUreg x:(MOVHUload _ _))
  5275  	// result: (MOVVreg x)
  5276  	for {
  5277  		x := v_0
  5278  		if x.Op != ssaop.OpLOONG64MOVHUload {
  5279  			break
  5280  		}
  5281  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5282  		v.AddArg(x)
  5283  		return true
  5284  	}
  5285  	// match: (MOVWUreg x:(MOVWUload _ _))
  5286  	// result: (MOVVreg x)
  5287  	for {
  5288  		x := v_0
  5289  		if x.Op != ssaop.OpLOONG64MOVWUload {
  5290  			break
  5291  		}
  5292  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5293  		v.AddArg(x)
  5294  		return true
  5295  	}
  5296  	// match: (MOVWUreg x:(MOVBUloadidx _ _ _))
  5297  	// result: (MOVVreg x)
  5298  	for {
  5299  		x := v_0
  5300  		if x.Op != ssaop.OpLOONG64MOVBUloadidx {
  5301  			break
  5302  		}
  5303  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5304  		v.AddArg(x)
  5305  		return true
  5306  	}
  5307  	// match: (MOVWUreg x:(MOVHUloadidx _ _ _))
  5308  	// result: (MOVVreg x)
  5309  	for {
  5310  		x := v_0
  5311  		if x.Op != ssaop.OpLOONG64MOVHUloadidx {
  5312  			break
  5313  		}
  5314  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5315  		v.AddArg(x)
  5316  		return true
  5317  	}
  5318  	// match: (MOVWUreg x:(MOVWUloadidx _ _ _))
  5319  	// result: (MOVVreg x)
  5320  	for {
  5321  		x := v_0
  5322  		if x.Op != ssaop.OpLOONG64MOVWUloadidx {
  5323  			break
  5324  		}
  5325  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5326  		v.AddArg(x)
  5327  		return true
  5328  	}
  5329  	// match: (MOVWUreg x:(MOVBUreg _))
  5330  	// result: (MOVVreg x)
  5331  	for {
  5332  		x := v_0
  5333  		if x.Op != ssaop.OpLOONG64MOVBUreg {
  5334  			break
  5335  		}
  5336  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5337  		v.AddArg(x)
  5338  		return true
  5339  	}
  5340  	// match: (MOVWUreg x:(MOVHUreg _))
  5341  	// result: (MOVVreg x)
  5342  	for {
  5343  		x := v_0
  5344  		if x.Op != ssaop.OpLOONG64MOVHUreg {
  5345  			break
  5346  		}
  5347  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5348  		v.AddArg(x)
  5349  		return true
  5350  	}
  5351  	// match: (MOVWUreg x:(MOVWUreg _))
  5352  	// result: (MOVVreg x)
  5353  	for {
  5354  		x := v_0
  5355  		if x.Op != ssaop.OpLOONG64MOVWUreg {
  5356  			break
  5357  		}
  5358  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5359  		v.AddArg(x)
  5360  		return true
  5361  	}
  5362  	// match: (MOVWUreg (SLLVconst [lc] x))
  5363  	// cond: lc >= 32
  5364  	// result: (MOVVconst [0])
  5365  	for {
  5366  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  5367  			break
  5368  		}
  5369  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  5370  		if !(lc >= 32) {
  5371  			break
  5372  		}
  5373  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5374  		v.AuxInt = ssa.Int64ToAuxInt(0)
  5375  		return true
  5376  	}
  5377  	// match: (MOVWUreg (MOVVconst [c]))
  5378  	// result: (MOVVconst [int64(uint32(c))])
  5379  	for {
  5380  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5381  			break
  5382  		}
  5383  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5384  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5385  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint32(c)))
  5386  		return true
  5387  	}
  5388  	// match: (MOVWUreg x:(SRLconst [c] y))
  5389  	// result: x
  5390  	for {
  5391  		x := v_0
  5392  		if x.Op != ssaop.OpLOONG64SRLconst {
  5393  			break
  5394  		}
  5395  		v.CopyOf(x)
  5396  		return true
  5397  	}
  5398  	// match: (MOVWUreg x:(ANDconst [c] y))
  5399  	// cond: c >= 0 && int64(uint32(c)) == c
  5400  	// result: x
  5401  	for {
  5402  		x := v_0
  5403  		if x.Op != ssaop.OpLOONG64ANDconst {
  5404  			break
  5405  		}
  5406  		c := ssa.AuxIntToInt64(x.AuxInt)
  5407  		if !(c >= 0 && int64(uint32(c)) == c) {
  5408  			break
  5409  		}
  5410  		v.CopyOf(x)
  5411  		return true
  5412  	}
  5413  	return false
  5414  }
  5415  func rewriteValue_OpLOONG64MOVWload(v *ssa.Value) bool {
  5416  	v_1 := v.Args[1]
  5417  	v_0 := v.Args[0]
  5418  	b := v.Block
  5419  	config := b.Func.Config
  5420  	typ := &b.Func.Config.Types
  5421  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off] {sym} ptr x _))
  5422  	// result: (MOVWreg x)
  5423  	for {
  5424  		off := ssa.AuxIntToInt32(v.AuxInt)
  5425  		sym := ssa.AuxToSym(v.Aux)
  5426  		ptr := v_0
  5427  		if v_1.Op != ssaop.OpLOONG64MOVWstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  5428  			break
  5429  		}
  5430  		x := v_1.Args[1]
  5431  		if ptr != v_1.Args[0] {
  5432  			break
  5433  		}
  5434  		v.Reset(ssaop.OpLOONG64MOVWreg)
  5435  		v.AddArg(x)
  5436  		return true
  5437  	}
  5438  	// match: (MOVWload [off1] {sym} (ADDVconst [off2] ptr) mem)
  5439  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5440  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
  5441  	for {
  5442  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5443  		sym := ssa.AuxToSym(v.Aux)
  5444  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  5445  			break
  5446  		}
  5447  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  5448  		ptr := v_0.Args[0]
  5449  		mem := v_1
  5450  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5451  			break
  5452  		}
  5453  		v.Reset(ssaop.OpLOONG64MOVWload)
  5454  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5455  		v.Aux = ssa.SymToAux(sym)
  5456  		v.AddArg2(ptr, mem)
  5457  		return true
  5458  	}
  5459  	// match: (MOVWload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  5460  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5461  	// result: (MOVWload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  5462  	for {
  5463  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5464  		sym1 := ssa.AuxToSym(v.Aux)
  5465  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  5466  			break
  5467  		}
  5468  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5469  		sym2 := ssa.AuxToSym(v_0.Aux)
  5470  		ptr := v_0.Args[0]
  5471  		mem := v_1
  5472  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5473  			break
  5474  		}
  5475  		v.Reset(ssaop.OpLOONG64MOVWload)
  5476  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5477  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5478  		v.AddArg2(ptr, mem)
  5479  		return true
  5480  	}
  5481  	// match: (MOVWload [off] {sym} (ADDV ptr idx) mem)
  5482  	// cond: off == 0 && sym == nil
  5483  	// result: (MOVWloadidx ptr idx mem)
  5484  	for {
  5485  		off := ssa.AuxIntToInt32(v.AuxInt)
  5486  		sym := ssa.AuxToSym(v.Aux)
  5487  		if v_0.Op != ssaop.OpLOONG64ADDV {
  5488  			break
  5489  		}
  5490  		idx := v_0.Args[1]
  5491  		ptr := v_0.Args[0]
  5492  		mem := v_1
  5493  		if !(off == 0 && sym == nil) {
  5494  			break
  5495  		}
  5496  		v.Reset(ssaop.OpLOONG64MOVWloadidx)
  5497  		v.AddArg3(ptr, idx, mem)
  5498  		return true
  5499  	}
  5500  	// match: (MOVWload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  5501  	// cond: off == 0 && sym == nil
  5502  	// result: (MOVWloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  5503  	for {
  5504  		off := ssa.AuxIntToInt32(v.AuxInt)
  5505  		sym := ssa.AuxToSym(v.Aux)
  5506  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  5507  			break
  5508  		}
  5509  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  5510  		idx := v_0.Args[1]
  5511  		ptr := v_0.Args[0]
  5512  		mem := v_1
  5513  		if !(off == 0 && sym == nil) {
  5514  			break
  5515  		}
  5516  		v.Reset(ssaop.OpLOONG64MOVWloadidx)
  5517  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  5518  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  5519  		v0.AddArg(idx)
  5520  		v.AddArg3(ptr, v0, mem)
  5521  		return true
  5522  	}
  5523  	// match: (MOVWload [off] {sym} (SB) _)
  5524  	// cond: ssa.SymIsRO(sym)
  5525  	// result: (MOVVconst [int64(int32(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder)))])
  5526  	for {
  5527  		off := ssa.AuxIntToInt32(v.AuxInt)
  5528  		sym := ssa.AuxToSym(v.Aux)
  5529  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  5530  			break
  5531  		}
  5532  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5533  		v.AuxInt = ssa.Int64ToAuxInt(int64(int32(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder))))
  5534  		return true
  5535  	}
  5536  	return false
  5537  }
  5538  func rewriteValue_OpLOONG64MOVWloadidx(v *ssa.Value) bool {
  5539  	v_2 := v.Args[2]
  5540  	v_1 := v.Args[1]
  5541  	v_0 := v.Args[0]
  5542  	// match: (MOVWloadidx ptr (MOVVconst [c]) mem)
  5543  	// cond: ssa.Is32Bit(c)
  5544  	// result: (MOVWload [int32(c)] ptr mem)
  5545  	for {
  5546  		ptr := v_0
  5547  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5548  			break
  5549  		}
  5550  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5551  		mem := v_2
  5552  		if !(ssa.Is32Bit(c)) {
  5553  			break
  5554  		}
  5555  		v.Reset(ssaop.OpLOONG64MOVWload)
  5556  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5557  		v.AddArg2(ptr, mem)
  5558  		return true
  5559  	}
  5560  	// match: (MOVWloadidx (MOVVconst [c]) ptr mem)
  5561  	// cond: ssa.Is32Bit(c)
  5562  	// result: (MOVWload [int32(c)] ptr mem)
  5563  	for {
  5564  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5565  			break
  5566  		}
  5567  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5568  		ptr := v_1
  5569  		mem := v_2
  5570  		if !(ssa.Is32Bit(c)) {
  5571  			break
  5572  		}
  5573  		v.Reset(ssaop.OpLOONG64MOVWload)
  5574  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5575  		v.AddArg2(ptr, mem)
  5576  		return true
  5577  	}
  5578  	return false
  5579  }
  5580  func rewriteValue_OpLOONG64MOVWreg(v *ssa.Value) bool {
  5581  	v_0 := v.Args[0]
  5582  	// match: (MOVWreg x:(MOVBload _ _))
  5583  	// result: (MOVVreg x)
  5584  	for {
  5585  		x := v_0
  5586  		if x.Op != ssaop.OpLOONG64MOVBload {
  5587  			break
  5588  		}
  5589  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5590  		v.AddArg(x)
  5591  		return true
  5592  	}
  5593  	// match: (MOVWreg x:(MOVBUload _ _))
  5594  	// result: (MOVVreg x)
  5595  	for {
  5596  		x := v_0
  5597  		if x.Op != ssaop.OpLOONG64MOVBUload {
  5598  			break
  5599  		}
  5600  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5601  		v.AddArg(x)
  5602  		return true
  5603  	}
  5604  	// match: (MOVWreg x:(MOVHload _ _))
  5605  	// result: (MOVVreg x)
  5606  	for {
  5607  		x := v_0
  5608  		if x.Op != ssaop.OpLOONG64MOVHload {
  5609  			break
  5610  		}
  5611  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5612  		v.AddArg(x)
  5613  		return true
  5614  	}
  5615  	// match: (MOVWreg x:(MOVHUload _ _))
  5616  	// result: (MOVVreg x)
  5617  	for {
  5618  		x := v_0
  5619  		if x.Op != ssaop.OpLOONG64MOVHUload {
  5620  			break
  5621  		}
  5622  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5623  		v.AddArg(x)
  5624  		return true
  5625  	}
  5626  	// match: (MOVWreg x:(MOVWload _ _))
  5627  	// result: (MOVVreg x)
  5628  	for {
  5629  		x := v_0
  5630  		if x.Op != ssaop.OpLOONG64MOVWload {
  5631  			break
  5632  		}
  5633  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5634  		v.AddArg(x)
  5635  		return true
  5636  	}
  5637  	// match: (MOVWreg x:(MOVBloadidx _ _ _))
  5638  	// result: (MOVVreg x)
  5639  	for {
  5640  		x := v_0
  5641  		if x.Op != ssaop.OpLOONG64MOVBloadidx {
  5642  			break
  5643  		}
  5644  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5645  		v.AddArg(x)
  5646  		return true
  5647  	}
  5648  	// match: (MOVWreg x:(MOVBUloadidx _ _ _))
  5649  	// result: (MOVVreg x)
  5650  	for {
  5651  		x := v_0
  5652  		if x.Op != ssaop.OpLOONG64MOVBUloadidx {
  5653  			break
  5654  		}
  5655  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5656  		v.AddArg(x)
  5657  		return true
  5658  	}
  5659  	// match: (MOVWreg x:(MOVHloadidx _ _ _))
  5660  	// result: (MOVVreg x)
  5661  	for {
  5662  		x := v_0
  5663  		if x.Op != ssaop.OpLOONG64MOVHloadidx {
  5664  			break
  5665  		}
  5666  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5667  		v.AddArg(x)
  5668  		return true
  5669  	}
  5670  	// match: (MOVWreg x:(MOVHUloadidx _ _ _))
  5671  	// result: (MOVVreg x)
  5672  	for {
  5673  		x := v_0
  5674  		if x.Op != ssaop.OpLOONG64MOVHUloadidx {
  5675  			break
  5676  		}
  5677  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5678  		v.AddArg(x)
  5679  		return true
  5680  	}
  5681  	// match: (MOVWreg x:(MOVWloadidx _ _ _))
  5682  	// result: (MOVVreg x)
  5683  	for {
  5684  		x := v_0
  5685  		if x.Op != ssaop.OpLOONG64MOVWloadidx {
  5686  			break
  5687  		}
  5688  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5689  		v.AddArg(x)
  5690  		return true
  5691  	}
  5692  	// match: (MOVWreg x:(MOVBreg _))
  5693  	// result: (MOVVreg x)
  5694  	for {
  5695  		x := v_0
  5696  		if x.Op != ssaop.OpLOONG64MOVBreg {
  5697  			break
  5698  		}
  5699  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5700  		v.AddArg(x)
  5701  		return true
  5702  	}
  5703  	// match: (MOVWreg x:(MOVBUreg _))
  5704  	// result: (MOVVreg x)
  5705  	for {
  5706  		x := v_0
  5707  		if x.Op != ssaop.OpLOONG64MOVBUreg {
  5708  			break
  5709  		}
  5710  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5711  		v.AddArg(x)
  5712  		return true
  5713  	}
  5714  	// match: (MOVWreg x:(MOVHreg _))
  5715  	// result: (MOVVreg x)
  5716  	for {
  5717  		x := v_0
  5718  		if x.Op != ssaop.OpLOONG64MOVHreg {
  5719  			break
  5720  		}
  5721  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5722  		v.AddArg(x)
  5723  		return true
  5724  	}
  5725  	// match: (MOVWreg x:(MOVWreg _))
  5726  	// result: (MOVVreg x)
  5727  	for {
  5728  		x := v_0
  5729  		if x.Op != ssaop.OpLOONG64MOVWreg {
  5730  			break
  5731  		}
  5732  		v.Reset(ssaop.OpLOONG64MOVVreg)
  5733  		v.AddArg(x)
  5734  		return true
  5735  	}
  5736  	// match: (MOVWreg (MOVVconst [c]))
  5737  	// result: (MOVVconst [int64(int32(c))])
  5738  	for {
  5739  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5740  			break
  5741  		}
  5742  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5743  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5744  		v.AuxInt = ssa.Int64ToAuxInt(int64(int32(c)))
  5745  		return true
  5746  	}
  5747  	// match: (MOVWreg x:(ANDconst [c] y))
  5748  	// cond: c >= 0 && int64(int32(c)) == c
  5749  	// result: x
  5750  	for {
  5751  		x := v_0
  5752  		if x.Op != ssaop.OpLOONG64ANDconst {
  5753  			break
  5754  		}
  5755  		c := ssa.AuxIntToInt64(x.AuxInt)
  5756  		if !(c >= 0 && int64(int32(c)) == c) {
  5757  			break
  5758  		}
  5759  		v.CopyOf(x)
  5760  		return true
  5761  	}
  5762  	return false
  5763  }
  5764  func rewriteValue_OpLOONG64MOVWstore(v *ssa.Value) bool {
  5765  	v_2 := v.Args[2]
  5766  	v_1 := v.Args[1]
  5767  	v_0 := v.Args[0]
  5768  	b := v.Block
  5769  	config := b.Func.Config
  5770  	typ := &b.Func.Config.Types
  5771  	// match: (MOVWstore [off] {sym} ptr (MOVWfpgp val) mem)
  5772  	// result: (MOVFstore [off] {sym} ptr val mem)
  5773  	for {
  5774  		off := ssa.AuxIntToInt32(v.AuxInt)
  5775  		sym := ssa.AuxToSym(v.Aux)
  5776  		ptr := v_0
  5777  		if v_1.Op != ssaop.OpLOONG64MOVWfpgp {
  5778  			break
  5779  		}
  5780  		val := v_1.Args[0]
  5781  		mem := v_2
  5782  		v.Reset(ssaop.OpLOONG64MOVFstore)
  5783  		v.AuxInt = ssa.Int32ToAuxInt(off)
  5784  		v.Aux = ssa.SymToAux(sym)
  5785  		v.AddArg3(ptr, val, mem)
  5786  		return true
  5787  	}
  5788  	// match: (MOVWstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  5789  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5790  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
  5791  	for {
  5792  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5793  		sym := ssa.AuxToSym(v.Aux)
  5794  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  5795  			break
  5796  		}
  5797  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  5798  		ptr := v_0.Args[0]
  5799  		val := v_1
  5800  		mem := v_2
  5801  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5802  			break
  5803  		}
  5804  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5805  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5806  		v.Aux = ssa.SymToAux(sym)
  5807  		v.AddArg3(ptr, val, mem)
  5808  		return true
  5809  	}
  5810  	// match: (MOVWstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  5811  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5812  	// result: (MOVWstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  5813  	for {
  5814  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5815  		sym1 := ssa.AuxToSym(v.Aux)
  5816  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  5817  			break
  5818  		}
  5819  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5820  		sym2 := ssa.AuxToSym(v_0.Aux)
  5821  		ptr := v_0.Args[0]
  5822  		val := v_1
  5823  		mem := v_2
  5824  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5825  			break
  5826  		}
  5827  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5828  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5829  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5830  		v.AddArg3(ptr, val, mem)
  5831  		return true
  5832  	}
  5833  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
  5834  	// result: (MOVWstore [off] {sym} ptr x mem)
  5835  	for {
  5836  		off := ssa.AuxIntToInt32(v.AuxInt)
  5837  		sym := ssa.AuxToSym(v.Aux)
  5838  		ptr := v_0
  5839  		if v_1.Op != ssaop.OpLOONG64MOVWreg {
  5840  			break
  5841  		}
  5842  		x := v_1.Args[0]
  5843  		mem := v_2
  5844  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5845  		v.AuxInt = ssa.Int32ToAuxInt(off)
  5846  		v.Aux = ssa.SymToAux(sym)
  5847  		v.AddArg3(ptr, x, mem)
  5848  		return true
  5849  	}
  5850  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
  5851  	// result: (MOVWstore [off] {sym} ptr x mem)
  5852  	for {
  5853  		off := ssa.AuxIntToInt32(v.AuxInt)
  5854  		sym := ssa.AuxToSym(v.Aux)
  5855  		ptr := v_0
  5856  		if v_1.Op != ssaop.OpLOONG64MOVWUreg {
  5857  			break
  5858  		}
  5859  		x := v_1.Args[0]
  5860  		mem := v_2
  5861  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5862  		v.AuxInt = ssa.Int32ToAuxInt(off)
  5863  		v.Aux = ssa.SymToAux(sym)
  5864  		v.AddArg3(ptr, x, mem)
  5865  		return true
  5866  	}
  5867  	// match: (MOVWstore [off] {sym} (ADDV ptr idx) val mem)
  5868  	// cond: off == 0 && sym == nil
  5869  	// result: (MOVWstoreidx ptr idx val mem)
  5870  	for {
  5871  		off := ssa.AuxIntToInt32(v.AuxInt)
  5872  		sym := ssa.AuxToSym(v.Aux)
  5873  		if v_0.Op != ssaop.OpLOONG64ADDV {
  5874  			break
  5875  		}
  5876  		idx := v_0.Args[1]
  5877  		ptr := v_0.Args[0]
  5878  		val := v_1
  5879  		mem := v_2
  5880  		if !(off == 0 && sym == nil) {
  5881  			break
  5882  		}
  5883  		v.Reset(ssaop.OpLOONG64MOVWstoreidx)
  5884  		v.AddArg4(ptr, idx, val, mem)
  5885  		return true
  5886  	}
  5887  	// match: (MOVWstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  5888  	// cond: off == 0 && sym == nil
  5889  	// result: (MOVWstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  5890  	for {
  5891  		off := ssa.AuxIntToInt32(v.AuxInt)
  5892  		sym := ssa.AuxToSym(v.Aux)
  5893  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  5894  			break
  5895  		}
  5896  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  5897  		idx := v_0.Args[1]
  5898  		ptr := v_0.Args[0]
  5899  		val := v_1
  5900  		mem := v_2
  5901  		if !(off == 0 && sym == nil) {
  5902  			break
  5903  		}
  5904  		v.Reset(ssaop.OpLOONG64MOVWstoreidx)
  5905  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  5906  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  5907  		v0.AddArg(idx)
  5908  		v.AddArg4(ptr, v0, val, mem)
  5909  		return true
  5910  	}
  5911  	return false
  5912  }
  5913  func rewriteValue_OpLOONG64MOVWstoreidx(v *ssa.Value) bool {
  5914  	v_3 := v.Args[3]
  5915  	v_2 := v.Args[2]
  5916  	v_1 := v.Args[1]
  5917  	v_0 := v.Args[0]
  5918  	// match: (MOVWstoreidx ptr (MOVVconst [c]) val mem)
  5919  	// cond: ssa.Is32Bit(c)
  5920  	// result: (MOVWstore [int32(c)] ptr val mem)
  5921  	for {
  5922  		ptr := v_0
  5923  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5924  			break
  5925  		}
  5926  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5927  		val := v_2
  5928  		mem := v_3
  5929  		if !(ssa.Is32Bit(c)) {
  5930  			break
  5931  		}
  5932  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5933  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5934  		v.AddArg3(ptr, val, mem)
  5935  		return true
  5936  	}
  5937  	// match: (MOVWstoreidx (MOVVconst [c]) idx val mem)
  5938  	// cond: ssa.Is32Bit(c)
  5939  	// result: (MOVWstore [int32(c)] idx val mem)
  5940  	for {
  5941  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5942  			break
  5943  		}
  5944  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5945  		idx := v_1
  5946  		val := v_2
  5947  		mem := v_3
  5948  		if !(ssa.Is32Bit(c)) {
  5949  			break
  5950  		}
  5951  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5952  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5953  		v.AddArg3(idx, val, mem)
  5954  		return true
  5955  	}
  5956  	return false
  5957  }
  5958  func rewriteValue_OpLOONG64MULV(v *ssa.Value) bool {
  5959  	v_1 := v.Args[1]
  5960  	v_0 := v.Args[0]
  5961  	b := v.Block
  5962  	config := b.Func.Config
  5963  	// match: (MULV r:(MOVWUreg x) s:(MOVWUreg y))
  5964  	// cond: r.Uses == 1 && s.Uses == 1
  5965  	// result: (MULWVWU x y)
  5966  	for {
  5967  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5968  			r := v_0
  5969  			if r.Op != ssaop.OpLOONG64MOVWUreg {
  5970  				continue
  5971  			}
  5972  			x := r.Args[0]
  5973  			s := v_1
  5974  			if s.Op != ssaop.OpLOONG64MOVWUreg {
  5975  				continue
  5976  			}
  5977  			y := s.Args[0]
  5978  			if !(r.Uses == 1 && s.Uses == 1) {
  5979  				continue
  5980  			}
  5981  			v.Reset(ssaop.OpLOONG64MULWVWU)
  5982  			v.AddArg2(x, y)
  5983  			return true
  5984  		}
  5985  		break
  5986  	}
  5987  	// match: (MULV r:(MOVWreg x) s:(MOVWreg y))
  5988  	// cond: r.Uses == 1 && s.Uses == 1
  5989  	// result: (MULWVW x y)
  5990  	for {
  5991  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5992  			r := v_0
  5993  			if r.Op != ssaop.OpLOONG64MOVWreg {
  5994  				continue
  5995  			}
  5996  			x := r.Args[0]
  5997  			s := v_1
  5998  			if s.Op != ssaop.OpLOONG64MOVWreg {
  5999  				continue
  6000  			}
  6001  			y := s.Args[0]
  6002  			if !(r.Uses == 1 && s.Uses == 1) {
  6003  				continue
  6004  			}
  6005  			v.Reset(ssaop.OpLOONG64MULWVW)
  6006  			v.AddArg2(x, y)
  6007  			return true
  6008  		}
  6009  		break
  6010  	}
  6011  	// match: (MULV _ (MOVVconst [0]))
  6012  	// result: (MOVVconst [0])
  6013  	for {
  6014  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6015  			if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  6016  				continue
  6017  			}
  6018  			v.Reset(ssaop.OpLOONG64MOVVconst)
  6019  			v.AuxInt = ssa.Int64ToAuxInt(0)
  6020  			return true
  6021  		}
  6022  		break
  6023  	}
  6024  	// match: (MULV x (MOVVconst [1]))
  6025  	// result: x
  6026  	for {
  6027  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6028  			x := v_0
  6029  			if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 1 {
  6030  				continue
  6031  			}
  6032  			v.CopyOf(x)
  6033  			return true
  6034  		}
  6035  		break
  6036  	}
  6037  	// match: (MULV x (MOVVconst [c]))
  6038  	// cond: ssa.CanMulStrengthReduce(config, c)
  6039  	// result: {ssa.MulStrengthReduce(v, x, c)}
  6040  	for {
  6041  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6042  			x := v_0
  6043  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6044  				continue
  6045  			}
  6046  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  6047  			if !(ssa.CanMulStrengthReduce(config, c)) {
  6048  				continue
  6049  			}
  6050  			v.CopyOf(ssa.MulStrengthReduce(v, x, c))
  6051  			return true
  6052  		}
  6053  		break
  6054  	}
  6055  	// match: (MULV (MOVVconst [c]) (MOVVconst [d]))
  6056  	// result: (MOVVconst [c*d])
  6057  	for {
  6058  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6059  			if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6060  				continue
  6061  			}
  6062  			c := ssa.AuxIntToInt64(v_0.AuxInt)
  6063  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6064  				continue
  6065  			}
  6066  			d := ssa.AuxIntToInt64(v_1.AuxInt)
  6067  			v.Reset(ssaop.OpLOONG64MOVVconst)
  6068  			v.AuxInt = ssa.Int64ToAuxInt(c * d)
  6069  			return true
  6070  		}
  6071  		break
  6072  	}
  6073  	return false
  6074  }
  6075  func rewriteValue_OpLOONG64NEGV(v *ssa.Value) bool {
  6076  	v_0 := v.Args[0]
  6077  	b := v.Block
  6078  	// match: (NEGV (SUBV x y))
  6079  	// result: (SUBV y x)
  6080  	for {
  6081  		if v_0.Op != ssaop.OpLOONG64SUBV {
  6082  			break
  6083  		}
  6084  		y := v_0.Args[1]
  6085  		x := v_0.Args[0]
  6086  		v.Reset(ssaop.OpLOONG64SUBV)
  6087  		v.AddArg2(y, x)
  6088  		return true
  6089  	}
  6090  	// match: (NEGV <t> s:(ADDVconst [c] (SUBV x y)))
  6091  	// cond: s.Uses == 1 && ssa.Is12Bit(-c)
  6092  	// result: (ADDVconst [-c] (SUBV <t> y x))
  6093  	for {
  6094  		t := v.Type
  6095  		s := v_0
  6096  		if s.Op != ssaop.OpLOONG64ADDVconst {
  6097  			break
  6098  		}
  6099  		c := ssa.AuxIntToInt64(s.AuxInt)
  6100  		s_0 := s.Args[0]
  6101  		if s_0.Op != ssaop.OpLOONG64SUBV {
  6102  			break
  6103  		}
  6104  		y := s_0.Args[1]
  6105  		x := s_0.Args[0]
  6106  		if !(s.Uses == 1 && ssa.Is12Bit(-c)) {
  6107  			break
  6108  		}
  6109  		v.Reset(ssaop.OpLOONG64ADDVconst)
  6110  		v.AuxInt = ssa.Int64ToAuxInt(-c)
  6111  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
  6112  		v0.AddArg2(y, x)
  6113  		v.AddArg(v0)
  6114  		return true
  6115  	}
  6116  	// match: (NEGV (NEGV x))
  6117  	// result: x
  6118  	for {
  6119  		if v_0.Op != ssaop.OpLOONG64NEGV {
  6120  			break
  6121  		}
  6122  		x := v_0.Args[0]
  6123  		v.CopyOf(x)
  6124  		return true
  6125  	}
  6126  	// match: (NEGV <t> s:(ADDVconst [c] (NEGV x)))
  6127  	// cond: s.Uses == 1 && ssa.Is12Bit(-c)
  6128  	// result: (ADDVconst [-c] x)
  6129  	for {
  6130  		s := v_0
  6131  		if s.Op != ssaop.OpLOONG64ADDVconst {
  6132  			break
  6133  		}
  6134  		c := ssa.AuxIntToInt64(s.AuxInt)
  6135  		s_0 := s.Args[0]
  6136  		if s_0.Op != ssaop.OpLOONG64NEGV {
  6137  			break
  6138  		}
  6139  		x := s_0.Args[0]
  6140  		if !(s.Uses == 1 && ssa.Is12Bit(-c)) {
  6141  			break
  6142  		}
  6143  		v.Reset(ssaop.OpLOONG64ADDVconst)
  6144  		v.AuxInt = ssa.Int64ToAuxInt(-c)
  6145  		v.AddArg(x)
  6146  		return true
  6147  	}
  6148  	// match: (NEGV (MOVVconst [c]))
  6149  	// result: (MOVVconst [-c])
  6150  	for {
  6151  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6152  			break
  6153  		}
  6154  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6155  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6156  		v.AuxInt = ssa.Int64ToAuxInt(-c)
  6157  		return true
  6158  	}
  6159  	return false
  6160  }
  6161  func rewriteValue_OpLOONG64NOR(v *ssa.Value) bool {
  6162  	v_1 := v.Args[1]
  6163  	v_0 := v.Args[0]
  6164  	// match: (NOR x (MOVVconst [c]))
  6165  	// cond: ssa.Is32Bit(c)
  6166  	// result: (NORconst [c] x)
  6167  	for {
  6168  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6169  			x := v_0
  6170  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6171  				continue
  6172  			}
  6173  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  6174  			if !(ssa.Is32Bit(c)) {
  6175  				continue
  6176  			}
  6177  			v.Reset(ssaop.OpLOONG64NORconst)
  6178  			v.AuxInt = ssa.Int64ToAuxInt(c)
  6179  			v.AddArg(x)
  6180  			return true
  6181  		}
  6182  		break
  6183  	}
  6184  	return false
  6185  }
  6186  func rewriteValue_OpLOONG64NORconst(v *ssa.Value) bool {
  6187  	v_0 := v.Args[0]
  6188  	// match: (NORconst [c] (MOVVconst [d]))
  6189  	// result: (MOVVconst [^(c|d)])
  6190  	for {
  6191  		c := ssa.AuxIntToInt64(v.AuxInt)
  6192  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6193  			break
  6194  		}
  6195  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6196  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6197  		v.AuxInt = ssa.Int64ToAuxInt(^(c | d))
  6198  		return true
  6199  	}
  6200  	return false
  6201  }
  6202  func rewriteValue_OpLOONG64OR(v *ssa.Value) bool {
  6203  	v_1 := v.Args[1]
  6204  	v_0 := v.Args[0]
  6205  	b := v.Block
  6206  	typ := &b.Func.Config.Types
  6207  	// match: (OR <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  6208  	// result: (REVB2H x)
  6209  	for {
  6210  		if v.Type != typ.UInt16 {
  6211  			break
  6212  		}
  6213  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6214  			if v_0.Op != ssaop.OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  6215  				continue
  6216  			}
  6217  			x := v_0.Args[0]
  6218  			if v_1.Op != ssaop.OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || ssa.AuxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  6219  				continue
  6220  			}
  6221  			v.Reset(ssaop.OpLOONG64REVB2H)
  6222  			v.AddArg(x)
  6223  			return true
  6224  		}
  6225  		break
  6226  	}
  6227  	// match: (OR (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  6228  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  6229  	// result: (REVB2H x)
  6230  	for {
  6231  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6232  			if v_0.Op != ssaop.OpLOONG64SRLconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  6233  				continue
  6234  			}
  6235  			v_0_0 := v_0.Args[0]
  6236  			if v_0_0.Op != ssaop.OpLOONG64ANDconst {
  6237  				continue
  6238  			}
  6239  			c1 := ssa.AuxIntToInt64(v_0_0.AuxInt)
  6240  			x := v_0_0.Args[0]
  6241  			if v_1.Op != ssaop.OpLOONG64SLLconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  6242  				continue
  6243  			}
  6244  			v_1_0 := v_1.Args[0]
  6245  			if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  6246  				continue
  6247  			}
  6248  			c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  6249  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  6250  				continue
  6251  			}
  6252  			v.Reset(ssaop.OpLOONG64REVB2H)
  6253  			v.AddArg(x)
  6254  			return true
  6255  		}
  6256  		break
  6257  	}
  6258  	// match: (OR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  6259  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  6260  	// result: (REVB4H x)
  6261  	for {
  6262  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6263  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  6264  				continue
  6265  			}
  6266  			v_0_0 := v_0.Args[0]
  6267  			if v_0_0.Op != ssaop.OpLOONG64AND {
  6268  				continue
  6269  			}
  6270  			_ = v_0_0.Args[1]
  6271  			v_0_0_0 := v_0_0.Args[0]
  6272  			v_0_0_1 := v_0_0.Args[1]
  6273  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  6274  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  6275  					continue
  6276  				}
  6277  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  6278  				x := v_0_0_1
  6279  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  6280  					continue
  6281  				}
  6282  				v_1_0 := v_1.Args[0]
  6283  				if v_1_0.Op != ssaop.OpLOONG64AND {
  6284  					continue
  6285  				}
  6286  				_ = v_1_0.Args[1]
  6287  				v_1_0_0 := v_1_0.Args[0]
  6288  				v_1_0_1 := v_1_0.Args[1]
  6289  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  6290  					if v_1_0_0.Op != ssaop.OpLOONG64MOVVconst {
  6291  						continue
  6292  					}
  6293  					c2 := ssa.AuxIntToInt64(v_1_0_0.AuxInt)
  6294  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  6295  						continue
  6296  					}
  6297  					v.Reset(ssaop.OpLOONG64REVB4H)
  6298  					v.AddArg(x)
  6299  					return true
  6300  				}
  6301  			}
  6302  		}
  6303  		break
  6304  	}
  6305  	// match: (OR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  6306  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  6307  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  6308  	for {
  6309  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6310  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  6311  				continue
  6312  			}
  6313  			v_0_0 := v_0.Args[0]
  6314  			if v_0_0.Op != ssaop.OpLOONG64AND {
  6315  				continue
  6316  			}
  6317  			_ = v_0_0.Args[1]
  6318  			v_0_0_0 := v_0_0.Args[0]
  6319  			v_0_0_1 := v_0_0.Args[1]
  6320  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  6321  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  6322  					continue
  6323  				}
  6324  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  6325  				x := v_0_0_1
  6326  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  6327  					continue
  6328  				}
  6329  				v_1_0 := v_1.Args[0]
  6330  				if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  6331  					continue
  6332  				}
  6333  				c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  6334  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  6335  					continue
  6336  				}
  6337  				v.Reset(ssaop.OpLOONG64REVB4H)
  6338  				v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, x.Type)
  6339  				v0.AuxInt = ssa.Int64ToAuxInt(0xffffffff)
  6340  				v0.AddArg(x)
  6341  				v.AddArg(v0)
  6342  				return true
  6343  			}
  6344  		}
  6345  		break
  6346  	}
  6347  	// match: (OR x (MOVVconst [c]))
  6348  	// cond: ssa.Is32Bit(c)
  6349  	// result: (ORconst [c] x)
  6350  	for {
  6351  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6352  			x := v_0
  6353  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6354  				continue
  6355  			}
  6356  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  6357  			if !(ssa.Is32Bit(c)) {
  6358  				continue
  6359  			}
  6360  			v.Reset(ssaop.OpLOONG64ORconst)
  6361  			v.AuxInt = ssa.Int64ToAuxInt(c)
  6362  			v.AddArg(x)
  6363  			return true
  6364  		}
  6365  		break
  6366  	}
  6367  	// match: (OR x x)
  6368  	// result: x
  6369  	for {
  6370  		x := v_0
  6371  		if x != v_1 {
  6372  			break
  6373  		}
  6374  		v.CopyOf(x)
  6375  		return true
  6376  	}
  6377  	// match: (OR x (NORconst [0] y))
  6378  	// result: (ORN x y)
  6379  	for {
  6380  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6381  			x := v_0
  6382  			if v_1.Op != ssaop.OpLOONG64NORconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  6383  				continue
  6384  			}
  6385  			y := v_1.Args[0]
  6386  			v.Reset(ssaop.OpLOONG64ORN)
  6387  			v.AddArg2(x, y)
  6388  			return true
  6389  		}
  6390  		break
  6391  	}
  6392  	return false
  6393  }
  6394  func rewriteValue_OpLOONG64ORN(v *ssa.Value) bool {
  6395  	v_1 := v.Args[1]
  6396  	v_0 := v.Args[0]
  6397  	// match: (ORN x (MOVVconst [-1]))
  6398  	// result: x
  6399  	for {
  6400  		x := v_0
  6401  		if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != -1 {
  6402  			break
  6403  		}
  6404  		v.CopyOf(x)
  6405  		return true
  6406  	}
  6407  	return false
  6408  }
  6409  func rewriteValue_OpLOONG64ORconst(v *ssa.Value) bool {
  6410  	v_0 := v.Args[0]
  6411  	// match: (ORconst [0] x)
  6412  	// result: x
  6413  	for {
  6414  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  6415  			break
  6416  		}
  6417  		x := v_0
  6418  		v.CopyOf(x)
  6419  		return true
  6420  	}
  6421  	// match: (ORconst [-1] _)
  6422  	// result: (MOVVconst [-1])
  6423  	for {
  6424  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
  6425  			break
  6426  		}
  6427  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6428  		v.AuxInt = ssa.Int64ToAuxInt(-1)
  6429  		return true
  6430  	}
  6431  	// match: (ORconst [c] (MOVVconst [d]))
  6432  	// result: (MOVVconst [c|d])
  6433  	for {
  6434  		c := ssa.AuxIntToInt64(v.AuxInt)
  6435  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6436  			break
  6437  		}
  6438  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6439  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6440  		v.AuxInt = ssa.Int64ToAuxInt(c | d)
  6441  		return true
  6442  	}
  6443  	// match: (ORconst [c] (ORconst [d] x))
  6444  	// cond: ssa.Is32Bit(c|d)
  6445  	// result: (ORconst [c|d] x)
  6446  	for {
  6447  		c := ssa.AuxIntToInt64(v.AuxInt)
  6448  		if v_0.Op != ssaop.OpLOONG64ORconst {
  6449  			break
  6450  		}
  6451  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6452  		x := v_0.Args[0]
  6453  		if !(ssa.Is32Bit(c | d)) {
  6454  			break
  6455  		}
  6456  		v.Reset(ssaop.OpLOONG64ORconst)
  6457  		v.AuxInt = ssa.Int64ToAuxInt(c | d)
  6458  		v.AddArg(x)
  6459  		return true
  6460  	}
  6461  	return false
  6462  }
  6463  func rewriteValue_OpLOONG64REMV(v *ssa.Value) bool {
  6464  	v_1 := v.Args[1]
  6465  	v_0 := v.Args[0]
  6466  	// match: (REMV (MOVVconst [c]) (MOVVconst [d]))
  6467  	// cond: d != 0
  6468  	// result: (MOVVconst [c%d])
  6469  	for {
  6470  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6471  			break
  6472  		}
  6473  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6474  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6475  			break
  6476  		}
  6477  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  6478  		if !(d != 0) {
  6479  			break
  6480  		}
  6481  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6482  		v.AuxInt = ssa.Int64ToAuxInt(c % d)
  6483  		return true
  6484  	}
  6485  	return false
  6486  }
  6487  func rewriteValue_OpLOONG64REMVU(v *ssa.Value) bool {
  6488  	v_1 := v.Args[1]
  6489  	v_0 := v.Args[0]
  6490  	// match: (REMVU _ (MOVVconst [1]))
  6491  	// result: (MOVVconst [0])
  6492  	for {
  6493  		if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 1 {
  6494  			break
  6495  		}
  6496  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6497  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6498  		return true
  6499  	}
  6500  	// match: (REMVU x (MOVVconst [c]))
  6501  	// cond: ssa.IsPowerOfTwo(c)
  6502  	// result: (ANDconst [c-1] x)
  6503  	for {
  6504  		x := v_0
  6505  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6506  			break
  6507  		}
  6508  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6509  		if !(ssa.IsPowerOfTwo(c)) {
  6510  			break
  6511  		}
  6512  		v.Reset(ssaop.OpLOONG64ANDconst)
  6513  		v.AuxInt = ssa.Int64ToAuxInt(c - 1)
  6514  		v.AddArg(x)
  6515  		return true
  6516  	}
  6517  	// match: (REMVU (MOVVconst [c]) (MOVVconst [d]))
  6518  	// cond: d != 0
  6519  	// result: (MOVVconst [int64(uint64(c)%uint64(d))])
  6520  	for {
  6521  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6522  			break
  6523  		}
  6524  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6525  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6526  			break
  6527  		}
  6528  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  6529  		if !(d != 0) {
  6530  			break
  6531  		}
  6532  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6533  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint64(c) % uint64(d)))
  6534  		return true
  6535  	}
  6536  	return false
  6537  }
  6538  func rewriteValue_OpLOONG64ROTR(v *ssa.Value) bool {
  6539  	v_1 := v.Args[1]
  6540  	v_0 := v.Args[0]
  6541  	// match: (ROTR x (MOVVconst [c]))
  6542  	// result: (ROTRconst x [c&31])
  6543  	for {
  6544  		x := v_0
  6545  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6546  			break
  6547  		}
  6548  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6549  		v.Reset(ssaop.OpLOONG64ROTRconst)
  6550  		v.AuxInt = ssa.Int64ToAuxInt(c & 31)
  6551  		v.AddArg(x)
  6552  		return true
  6553  	}
  6554  	return false
  6555  }
  6556  func rewriteValue_OpLOONG64ROTRV(v *ssa.Value) bool {
  6557  	v_1 := v.Args[1]
  6558  	v_0 := v.Args[0]
  6559  	// match: (ROTRV x (MOVVconst [c]))
  6560  	// result: (ROTRVconst x [c&63])
  6561  	for {
  6562  		x := v_0
  6563  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6564  			break
  6565  		}
  6566  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6567  		v.Reset(ssaop.OpLOONG64ROTRVconst)
  6568  		v.AuxInt = ssa.Int64ToAuxInt(c & 63)
  6569  		v.AddArg(x)
  6570  		return true
  6571  	}
  6572  	return false
  6573  }
  6574  func rewriteValue_OpLOONG64SGT(v *ssa.Value) bool {
  6575  	v_1 := v.Args[1]
  6576  	v_0 := v.Args[0]
  6577  	b := v.Block
  6578  	typ := &b.Func.Config.Types
  6579  	// match: (SGT (MOVVconst [c]) (NEGV (SUBVconst [d] x)))
  6580  	// cond: ssa.Is32Bit(d-c)
  6581  	// result: (SGT x (MOVVconst [d-c]))
  6582  	for {
  6583  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6584  			break
  6585  		}
  6586  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6587  		if v_1.Op != ssaop.OpLOONG64NEGV {
  6588  			break
  6589  		}
  6590  		v_1_0 := v_1.Args[0]
  6591  		if v_1_0.Op != ssaop.OpLOONG64SUBVconst {
  6592  			break
  6593  		}
  6594  		d := ssa.AuxIntToInt64(v_1_0.AuxInt)
  6595  		x := v_1_0.Args[0]
  6596  		if !(ssa.Is32Bit(d - c)) {
  6597  			break
  6598  		}
  6599  		v.Reset(ssaop.OpLOONG64SGT)
  6600  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  6601  		v0.AuxInt = ssa.Int64ToAuxInt(d - c)
  6602  		v.AddArg2(x, v0)
  6603  		return true
  6604  	}
  6605  	// match: (SGT (MOVVconst [c]) x)
  6606  	// cond: ssa.Is32Bit(c)
  6607  	// result: (SGTconst [c] x)
  6608  	for {
  6609  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6610  			break
  6611  		}
  6612  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6613  		x := v_1
  6614  		if !(ssa.Is32Bit(c)) {
  6615  			break
  6616  		}
  6617  		v.Reset(ssaop.OpLOONG64SGTconst)
  6618  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6619  		v.AddArg(x)
  6620  		return true
  6621  	}
  6622  	// match: (SGT x x)
  6623  	// result: (MOVVconst [0])
  6624  	for {
  6625  		x := v_0
  6626  		if x != v_1 {
  6627  			break
  6628  		}
  6629  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6630  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6631  		return true
  6632  	}
  6633  	return false
  6634  }
  6635  func rewriteValue_OpLOONG64SGTU(v *ssa.Value) bool {
  6636  	v_1 := v.Args[1]
  6637  	v_0 := v.Args[0]
  6638  	// match: (SGTU (MOVVconst [c]) x)
  6639  	// cond: ssa.Is32Bit(c)
  6640  	// result: (SGTUconst [c] x)
  6641  	for {
  6642  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6643  			break
  6644  		}
  6645  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6646  		x := v_1
  6647  		if !(ssa.Is32Bit(c)) {
  6648  			break
  6649  		}
  6650  		v.Reset(ssaop.OpLOONG64SGTUconst)
  6651  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6652  		v.AddArg(x)
  6653  		return true
  6654  	}
  6655  	// match: (SGTU x x)
  6656  	// result: (MOVVconst [0])
  6657  	for {
  6658  		x := v_0
  6659  		if x != v_1 {
  6660  			break
  6661  		}
  6662  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6663  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6664  		return true
  6665  	}
  6666  	return false
  6667  }
  6668  func rewriteValue_OpLOONG64SGTUconst(v *ssa.Value) bool {
  6669  	v_0 := v.Args[0]
  6670  	// match: (SGTUconst [c] (MOVVconst [d]))
  6671  	// cond: uint64(c)>uint64(d)
  6672  	// result: (MOVVconst [1])
  6673  	for {
  6674  		c := ssa.AuxIntToInt64(v.AuxInt)
  6675  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6676  			break
  6677  		}
  6678  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6679  		if !(uint64(c) > uint64(d)) {
  6680  			break
  6681  		}
  6682  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6683  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6684  		return true
  6685  	}
  6686  	// match: (SGTUconst [c] (MOVVconst [d]))
  6687  	// cond: uint64(c)<=uint64(d)
  6688  	// result: (MOVVconst [0])
  6689  	for {
  6690  		c := ssa.AuxIntToInt64(v.AuxInt)
  6691  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6692  			break
  6693  		}
  6694  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6695  		if !(uint64(c) <= uint64(d)) {
  6696  			break
  6697  		}
  6698  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6699  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6700  		return true
  6701  	}
  6702  	// match: (SGTUconst [c] (MOVBUreg _))
  6703  	// cond: 0xff < uint64(c)
  6704  	// result: (MOVVconst [1])
  6705  	for {
  6706  		c := ssa.AuxIntToInt64(v.AuxInt)
  6707  		if v_0.Op != ssaop.OpLOONG64MOVBUreg || !(0xff < uint64(c)) {
  6708  			break
  6709  		}
  6710  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6711  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6712  		return true
  6713  	}
  6714  	// match: (SGTUconst [c] (MOVHUreg _))
  6715  	// cond: 0xffff < uint64(c)
  6716  	// result: (MOVVconst [1])
  6717  	for {
  6718  		c := ssa.AuxIntToInt64(v.AuxInt)
  6719  		if v_0.Op != ssaop.OpLOONG64MOVHUreg || !(0xffff < uint64(c)) {
  6720  			break
  6721  		}
  6722  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6723  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6724  		return true
  6725  	}
  6726  	// match: (SGTUconst [c] (ANDconst [m] _))
  6727  	// cond: uint64(m) < uint64(c)
  6728  	// result: (MOVVconst [1])
  6729  	for {
  6730  		c := ssa.AuxIntToInt64(v.AuxInt)
  6731  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  6732  			break
  6733  		}
  6734  		m := ssa.AuxIntToInt64(v_0.AuxInt)
  6735  		if !(uint64(m) < uint64(c)) {
  6736  			break
  6737  		}
  6738  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6739  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6740  		return true
  6741  	}
  6742  	// match: (SGTUconst [c] (SRLVconst _ [d]))
  6743  	// cond: 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)
  6744  	// result: (MOVVconst [1])
  6745  	for {
  6746  		c := ssa.AuxIntToInt64(v.AuxInt)
  6747  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  6748  			break
  6749  		}
  6750  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6751  		if !(0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
  6752  			break
  6753  		}
  6754  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6755  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6756  		return true
  6757  	}
  6758  	return false
  6759  }
  6760  func rewriteValue_OpLOONG64SGTconst(v *ssa.Value) bool {
  6761  	v_0 := v.Args[0]
  6762  	// match: (SGTconst [c] (MOVVconst [d]))
  6763  	// cond: c>d
  6764  	// result: (MOVVconst [1])
  6765  	for {
  6766  		c := ssa.AuxIntToInt64(v.AuxInt)
  6767  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6768  			break
  6769  		}
  6770  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6771  		if !(c > d) {
  6772  			break
  6773  		}
  6774  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6775  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6776  		return true
  6777  	}
  6778  	// match: (SGTconst [c] (MOVVconst [d]))
  6779  	// cond: c<=d
  6780  	// result: (MOVVconst [0])
  6781  	for {
  6782  		c := ssa.AuxIntToInt64(v.AuxInt)
  6783  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6784  			break
  6785  		}
  6786  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6787  		if !(c <= d) {
  6788  			break
  6789  		}
  6790  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6791  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6792  		return true
  6793  	}
  6794  	// match: (SGTconst [c] (MOVBreg _))
  6795  	// cond: 0x7f < c
  6796  	// result: (MOVVconst [1])
  6797  	for {
  6798  		c := ssa.AuxIntToInt64(v.AuxInt)
  6799  		if v_0.Op != ssaop.OpLOONG64MOVBreg || !(0x7f < c) {
  6800  			break
  6801  		}
  6802  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6803  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6804  		return true
  6805  	}
  6806  	// match: (SGTconst [c] (MOVBreg _))
  6807  	// cond: c <= -0x80
  6808  	// result: (MOVVconst [0])
  6809  	for {
  6810  		c := ssa.AuxIntToInt64(v.AuxInt)
  6811  		if v_0.Op != ssaop.OpLOONG64MOVBreg || !(c <= -0x80) {
  6812  			break
  6813  		}
  6814  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6815  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6816  		return true
  6817  	}
  6818  	// match: (SGTconst [c] (MOVBUreg _))
  6819  	// cond: 0xff < c
  6820  	// result: (MOVVconst [1])
  6821  	for {
  6822  		c := ssa.AuxIntToInt64(v.AuxInt)
  6823  		if v_0.Op != ssaop.OpLOONG64MOVBUreg || !(0xff < c) {
  6824  			break
  6825  		}
  6826  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6827  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6828  		return true
  6829  	}
  6830  	// match: (SGTconst [c] (MOVBUreg _))
  6831  	// cond: c < 0
  6832  	// result: (MOVVconst [0])
  6833  	for {
  6834  		c := ssa.AuxIntToInt64(v.AuxInt)
  6835  		if v_0.Op != ssaop.OpLOONG64MOVBUreg || !(c < 0) {
  6836  			break
  6837  		}
  6838  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6839  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6840  		return true
  6841  	}
  6842  	// match: (SGTconst [c] (MOVHreg _))
  6843  	// cond: 0x7fff < c
  6844  	// result: (MOVVconst [1])
  6845  	for {
  6846  		c := ssa.AuxIntToInt64(v.AuxInt)
  6847  		if v_0.Op != ssaop.OpLOONG64MOVHreg || !(0x7fff < c) {
  6848  			break
  6849  		}
  6850  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6851  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6852  		return true
  6853  	}
  6854  	// match: (SGTconst [c] (MOVHreg _))
  6855  	// cond: c <= -0x8000
  6856  	// result: (MOVVconst [0])
  6857  	for {
  6858  		c := ssa.AuxIntToInt64(v.AuxInt)
  6859  		if v_0.Op != ssaop.OpLOONG64MOVHreg || !(c <= -0x8000) {
  6860  			break
  6861  		}
  6862  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6863  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6864  		return true
  6865  	}
  6866  	// match: (SGTconst [c] (MOVHUreg _))
  6867  	// cond: 0xffff < c
  6868  	// result: (MOVVconst [1])
  6869  	for {
  6870  		c := ssa.AuxIntToInt64(v.AuxInt)
  6871  		if v_0.Op != ssaop.OpLOONG64MOVHUreg || !(0xffff < c) {
  6872  			break
  6873  		}
  6874  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6875  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6876  		return true
  6877  	}
  6878  	// match: (SGTconst [c] (MOVHUreg _))
  6879  	// cond: c < 0
  6880  	// result: (MOVVconst [0])
  6881  	for {
  6882  		c := ssa.AuxIntToInt64(v.AuxInt)
  6883  		if v_0.Op != ssaop.OpLOONG64MOVHUreg || !(c < 0) {
  6884  			break
  6885  		}
  6886  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6887  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6888  		return true
  6889  	}
  6890  	// match: (SGTconst [c] (MOVWUreg _))
  6891  	// cond: c < 0
  6892  	// result: (MOVVconst [0])
  6893  	for {
  6894  		c := ssa.AuxIntToInt64(v.AuxInt)
  6895  		if v_0.Op != ssaop.OpLOONG64MOVWUreg || !(c < 0) {
  6896  			break
  6897  		}
  6898  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6899  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6900  		return true
  6901  	}
  6902  	// match: (SGTconst [c] (ANDconst [m] _))
  6903  	// cond: 0 <= m && m < c
  6904  	// result: (MOVVconst [1])
  6905  	for {
  6906  		c := ssa.AuxIntToInt64(v.AuxInt)
  6907  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  6908  			break
  6909  		}
  6910  		m := ssa.AuxIntToInt64(v_0.AuxInt)
  6911  		if !(0 <= m && m < c) {
  6912  			break
  6913  		}
  6914  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6915  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6916  		return true
  6917  	}
  6918  	// match: (SGTconst [c] (SRLVconst _ [d]))
  6919  	// cond: 0 <= c && 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)
  6920  	// result: (MOVVconst [1])
  6921  	for {
  6922  		c := ssa.AuxIntToInt64(v.AuxInt)
  6923  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  6924  			break
  6925  		}
  6926  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6927  		if !(0 <= c && 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
  6928  			break
  6929  		}
  6930  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6931  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6932  		return true
  6933  	}
  6934  	return false
  6935  }
  6936  func rewriteValue_OpLOONG64SLL(v *ssa.Value) bool {
  6937  	v_1 := v.Args[1]
  6938  	v_0 := v.Args[0]
  6939  	// match: (SLL _ (MOVVconst [c]))
  6940  	// cond: uint64(c)>=32
  6941  	// result: (MOVVconst [0])
  6942  	for {
  6943  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6944  			break
  6945  		}
  6946  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6947  		if !(uint64(c) >= 32) {
  6948  			break
  6949  		}
  6950  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6951  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6952  		return true
  6953  	}
  6954  	// match: (SLL x (MOVVconst [c]))
  6955  	// cond: uint64(c) >=0 && uint64(c) <=31
  6956  	// result: (SLLconst x [c])
  6957  	for {
  6958  		x := v_0
  6959  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6960  			break
  6961  		}
  6962  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6963  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  6964  			break
  6965  		}
  6966  		v.Reset(ssaop.OpLOONG64SLLconst)
  6967  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6968  		v.AddArg(x)
  6969  		return true
  6970  	}
  6971  	// match: (SLL x (ANDconst [31] y))
  6972  	// result: (SLL x y)
  6973  	for {
  6974  		x := v_0
  6975  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 31 {
  6976  			break
  6977  		}
  6978  		y := v_1.Args[0]
  6979  		v.Reset(ssaop.OpLOONG64SLL)
  6980  		v.AddArg2(x, y)
  6981  		return true
  6982  	}
  6983  	return false
  6984  }
  6985  func rewriteValue_OpLOONG64SLLV(v *ssa.Value) bool {
  6986  	v_1 := v.Args[1]
  6987  	v_0 := v.Args[0]
  6988  	// match: (SLLV _ (MOVVconst [c]))
  6989  	// cond: uint64(c)>=64
  6990  	// result: (MOVVconst [0])
  6991  	for {
  6992  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6993  			break
  6994  		}
  6995  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6996  		if !(uint64(c) >= 64) {
  6997  			break
  6998  		}
  6999  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7000  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7001  		return true
  7002  	}
  7003  	// match: (SLLV x (MOVVconst [c]))
  7004  	// result: (SLLVconst x [c])
  7005  	for {
  7006  		x := v_0
  7007  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7008  			break
  7009  		}
  7010  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7011  		v.Reset(ssaop.OpLOONG64SLLVconst)
  7012  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7013  		v.AddArg(x)
  7014  		return true
  7015  	}
  7016  	// match: (SLLV x (ANDconst [63] y))
  7017  	// result: (SLLV x y)
  7018  	for {
  7019  		x := v_0
  7020  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 63 {
  7021  			break
  7022  		}
  7023  		y := v_1.Args[0]
  7024  		v.Reset(ssaop.OpLOONG64SLLV)
  7025  		v.AddArg2(x, y)
  7026  		return true
  7027  	}
  7028  	return false
  7029  }
  7030  func rewriteValue_OpLOONG64SLLVconst(v *ssa.Value) bool {
  7031  	v_0 := v.Args[0]
  7032  	// match: (SLLVconst <t> [c] (ADDV x x))
  7033  	// cond: c < t.Size() * 8 - 1
  7034  	// result: (SLLVconst [c+1] x)
  7035  	for {
  7036  		t := v.Type
  7037  		c := ssa.AuxIntToInt64(v.AuxInt)
  7038  		if v_0.Op != ssaop.OpLOONG64ADDV {
  7039  			break
  7040  		}
  7041  		x := v_0.Args[1]
  7042  		if x != v_0.Args[0] || !(c < t.Size()*8-1) {
  7043  			break
  7044  		}
  7045  		v.Reset(ssaop.OpLOONG64SLLVconst)
  7046  		v.AuxInt = ssa.Int64ToAuxInt(c + 1)
  7047  		v.AddArg(x)
  7048  		return true
  7049  	}
  7050  	// match: (SLLVconst <t> [c] (ADDV x x))
  7051  	// cond: c >= t.Size() * 8 - 1
  7052  	// result: (MOVVconst [0])
  7053  	for {
  7054  		t := v.Type
  7055  		c := ssa.AuxIntToInt64(v.AuxInt)
  7056  		if v_0.Op != ssaop.OpLOONG64ADDV {
  7057  			break
  7058  		}
  7059  		x := v_0.Args[1]
  7060  		if x != v_0.Args[0] || !(c >= t.Size()*8-1) {
  7061  			break
  7062  		}
  7063  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7064  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7065  		return true
  7066  	}
  7067  	// match: (SLLVconst [c] (MOVVconst [d]))
  7068  	// result: (MOVVconst [d<<uint64(c)])
  7069  	for {
  7070  		c := ssa.AuxIntToInt64(v.AuxInt)
  7071  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7072  			break
  7073  		}
  7074  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7075  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7076  		v.AuxInt = ssa.Int64ToAuxInt(d << uint64(c))
  7077  		return true
  7078  	}
  7079  	return false
  7080  }
  7081  func rewriteValue_OpLOONG64SLLconst(v *ssa.Value) bool {
  7082  	v_0 := v.Args[0]
  7083  	// match: (SLLconst <t> [c] (ADDV x x))
  7084  	// cond: c < t.Size() * 8 - 1
  7085  	// result: (SLLconst [c+1] x)
  7086  	for {
  7087  		t := v.Type
  7088  		c := ssa.AuxIntToInt64(v.AuxInt)
  7089  		if v_0.Op != ssaop.OpLOONG64ADDV {
  7090  			break
  7091  		}
  7092  		x := v_0.Args[1]
  7093  		if x != v_0.Args[0] || !(c < t.Size()*8-1) {
  7094  			break
  7095  		}
  7096  		v.Reset(ssaop.OpLOONG64SLLconst)
  7097  		v.AuxInt = ssa.Int64ToAuxInt(c + 1)
  7098  		v.AddArg(x)
  7099  		return true
  7100  	}
  7101  	// match: (SLLconst <t> [c] (ADDV x x))
  7102  	// cond: c >= t.Size() * 8 - 1
  7103  	// result: (MOVVconst [0])
  7104  	for {
  7105  		t := v.Type
  7106  		c := ssa.AuxIntToInt64(v.AuxInt)
  7107  		if v_0.Op != ssaop.OpLOONG64ADDV {
  7108  			break
  7109  		}
  7110  		x := v_0.Args[1]
  7111  		if x != v_0.Args[0] || !(c >= t.Size()*8-1) {
  7112  			break
  7113  		}
  7114  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7115  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7116  		return true
  7117  	}
  7118  	return false
  7119  }
  7120  func rewriteValue_OpLOONG64SRA(v *ssa.Value) bool {
  7121  	v_1 := v.Args[1]
  7122  	v_0 := v.Args[0]
  7123  	// match: (SRA x (MOVVconst [c]))
  7124  	// cond: uint64(c)>=32
  7125  	// result: (SRAconst x [31])
  7126  	for {
  7127  		x := v_0
  7128  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7129  			break
  7130  		}
  7131  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7132  		if !(uint64(c) >= 32) {
  7133  			break
  7134  		}
  7135  		v.Reset(ssaop.OpLOONG64SRAconst)
  7136  		v.AuxInt = ssa.Int64ToAuxInt(31)
  7137  		v.AddArg(x)
  7138  		return true
  7139  	}
  7140  	// match: (SRA x (MOVVconst [c]))
  7141  	// cond: uint64(c) >=0 && uint64(c) <=31
  7142  	// result: (SRAconst x [c])
  7143  	for {
  7144  		x := v_0
  7145  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7146  			break
  7147  		}
  7148  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7149  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  7150  			break
  7151  		}
  7152  		v.Reset(ssaop.OpLOONG64SRAconst)
  7153  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7154  		v.AddArg(x)
  7155  		return true
  7156  	}
  7157  	// match: (SRA x (ANDconst [31] y))
  7158  	// result: (SRA x y)
  7159  	for {
  7160  		x := v_0
  7161  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 31 {
  7162  			break
  7163  		}
  7164  		y := v_1.Args[0]
  7165  		v.Reset(ssaop.OpLOONG64SRA)
  7166  		v.AddArg2(x, y)
  7167  		return true
  7168  	}
  7169  	return false
  7170  }
  7171  func rewriteValue_OpLOONG64SRAV(v *ssa.Value) bool {
  7172  	v_1 := v.Args[1]
  7173  	v_0 := v.Args[0]
  7174  	// match: (SRAV x (MOVVconst [c]))
  7175  	// cond: uint64(c)>=64
  7176  	// result: (SRAVconst x [63])
  7177  	for {
  7178  		x := v_0
  7179  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7180  			break
  7181  		}
  7182  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7183  		if !(uint64(c) >= 64) {
  7184  			break
  7185  		}
  7186  		v.Reset(ssaop.OpLOONG64SRAVconst)
  7187  		v.AuxInt = ssa.Int64ToAuxInt(63)
  7188  		v.AddArg(x)
  7189  		return true
  7190  	}
  7191  	// match: (SRAV x (MOVVconst [c]))
  7192  	// result: (SRAVconst x [c])
  7193  	for {
  7194  		x := v_0
  7195  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7196  			break
  7197  		}
  7198  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7199  		v.Reset(ssaop.OpLOONG64SRAVconst)
  7200  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7201  		v.AddArg(x)
  7202  		return true
  7203  	}
  7204  	// match: (SRAV x (ANDconst [63] y))
  7205  	// result: (SRAV x y)
  7206  	for {
  7207  		x := v_0
  7208  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 63 {
  7209  			break
  7210  		}
  7211  		y := v_1.Args[0]
  7212  		v.Reset(ssaop.OpLOONG64SRAV)
  7213  		v.AddArg2(x, y)
  7214  		return true
  7215  	}
  7216  	return false
  7217  }
  7218  func rewriteValue_OpLOONG64SRAVconst(v *ssa.Value) bool {
  7219  	v_0 := v.Args[0]
  7220  	b := v.Block
  7221  	// match: (SRAVconst [rc] (MOVWreg y))
  7222  	// cond: rc >= 0 && rc <= 31
  7223  	// result: (SRAconst [int64(rc)] y)
  7224  	for {
  7225  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7226  		if v_0.Op != ssaop.OpLOONG64MOVWreg {
  7227  			break
  7228  		}
  7229  		y := v_0.Args[0]
  7230  		if !(rc >= 0 && rc <= 31) {
  7231  			break
  7232  		}
  7233  		v.Reset(ssaop.OpLOONG64SRAconst)
  7234  		v.AuxInt = ssa.Int64ToAuxInt(int64(rc))
  7235  		v.AddArg(y)
  7236  		return true
  7237  	}
  7238  	// match: (SRAVconst <t> [rc] (MOVBreg y))
  7239  	// cond: rc >= 8
  7240  	// result: (SRAVconst [63] (SLLVconst <t> [56] y))
  7241  	for {
  7242  		t := v.Type
  7243  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7244  		if v_0.Op != ssaop.OpLOONG64MOVBreg {
  7245  			break
  7246  		}
  7247  		y := v_0.Args[0]
  7248  		if !(rc >= 8) {
  7249  			break
  7250  		}
  7251  		v.Reset(ssaop.OpLOONG64SRAVconst)
  7252  		v.AuxInt = ssa.Int64ToAuxInt(63)
  7253  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, t)
  7254  		v0.AuxInt = ssa.Int64ToAuxInt(56)
  7255  		v0.AddArg(y)
  7256  		v.AddArg(v0)
  7257  		return true
  7258  	}
  7259  	// match: (SRAVconst <t> [rc] (MOVHreg y))
  7260  	// cond: rc >= 16
  7261  	// result: (SRAVconst [63] (SLLVconst <t> [48] y))
  7262  	for {
  7263  		t := v.Type
  7264  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7265  		if v_0.Op != ssaop.OpLOONG64MOVHreg {
  7266  			break
  7267  		}
  7268  		y := v_0.Args[0]
  7269  		if !(rc >= 16) {
  7270  			break
  7271  		}
  7272  		v.Reset(ssaop.OpLOONG64SRAVconst)
  7273  		v.AuxInt = ssa.Int64ToAuxInt(63)
  7274  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, t)
  7275  		v0.AuxInt = ssa.Int64ToAuxInt(48)
  7276  		v0.AddArg(y)
  7277  		v.AddArg(v0)
  7278  		return true
  7279  	}
  7280  	// match: (SRAVconst <t> [rc] (MOVWreg y))
  7281  	// cond: rc >= 32
  7282  	// result: (SRAconst [31] y)
  7283  	for {
  7284  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7285  		if v_0.Op != ssaop.OpLOONG64MOVWreg {
  7286  			break
  7287  		}
  7288  		y := v_0.Args[0]
  7289  		if !(rc >= 32) {
  7290  			break
  7291  		}
  7292  		v.Reset(ssaop.OpLOONG64SRAconst)
  7293  		v.AuxInt = ssa.Int64ToAuxInt(31)
  7294  		v.AddArg(y)
  7295  		return true
  7296  	}
  7297  	// match: (SRAVconst [c] (MOVVconst [d]))
  7298  	// result: (MOVVconst [d>>uint64(c)])
  7299  	for {
  7300  		c := ssa.AuxIntToInt64(v.AuxInt)
  7301  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7302  			break
  7303  		}
  7304  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7305  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7306  		v.AuxInt = ssa.Int64ToAuxInt(d >> uint64(c))
  7307  		return true
  7308  	}
  7309  	return false
  7310  }
  7311  func rewriteValue_OpLOONG64SRL(v *ssa.Value) bool {
  7312  	v_1 := v.Args[1]
  7313  	v_0 := v.Args[0]
  7314  	// match: (SRL _ (MOVVconst [c]))
  7315  	// cond: uint64(c)>=32
  7316  	// result: (MOVVconst [0])
  7317  	for {
  7318  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7319  			break
  7320  		}
  7321  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7322  		if !(uint64(c) >= 32) {
  7323  			break
  7324  		}
  7325  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7326  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7327  		return true
  7328  	}
  7329  	// match: (SRL x (MOVVconst [c]))
  7330  	// cond: uint64(c) >=0 && uint64(c) <=31
  7331  	// result: (SRLconst x [c])
  7332  	for {
  7333  		x := v_0
  7334  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7335  			break
  7336  		}
  7337  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7338  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  7339  			break
  7340  		}
  7341  		v.Reset(ssaop.OpLOONG64SRLconst)
  7342  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7343  		v.AddArg(x)
  7344  		return true
  7345  	}
  7346  	// match: (SRL x (ANDconst [31] y))
  7347  	// result: (SRL x y)
  7348  	for {
  7349  		x := v_0
  7350  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 31 {
  7351  			break
  7352  		}
  7353  		y := v_1.Args[0]
  7354  		v.Reset(ssaop.OpLOONG64SRL)
  7355  		v.AddArg2(x, y)
  7356  		return true
  7357  	}
  7358  	return false
  7359  }
  7360  func rewriteValue_OpLOONG64SRLV(v *ssa.Value) bool {
  7361  	v_1 := v.Args[1]
  7362  	v_0 := v.Args[0]
  7363  	// match: (SRLV _ (MOVVconst [c]))
  7364  	// cond: uint64(c)>=64
  7365  	// result: (MOVVconst [0])
  7366  	for {
  7367  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7368  			break
  7369  		}
  7370  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7371  		if !(uint64(c) >= 64) {
  7372  			break
  7373  		}
  7374  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7375  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7376  		return true
  7377  	}
  7378  	// match: (SRLV x (MOVVconst [c]))
  7379  	// result: (SRLVconst x [c])
  7380  	for {
  7381  		x := v_0
  7382  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7383  			break
  7384  		}
  7385  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7386  		v.Reset(ssaop.OpLOONG64SRLVconst)
  7387  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7388  		v.AddArg(x)
  7389  		return true
  7390  	}
  7391  	// match: (SRLV x (ANDconst [63] y))
  7392  	// result: (SRLV x y)
  7393  	for {
  7394  		x := v_0
  7395  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 63 {
  7396  			break
  7397  		}
  7398  		y := v_1.Args[0]
  7399  		v.Reset(ssaop.OpLOONG64SRLV)
  7400  		v.AddArg2(x, y)
  7401  		return true
  7402  	}
  7403  	return false
  7404  }
  7405  func rewriteValue_OpLOONG64SRLVconst(v *ssa.Value) bool {
  7406  	v_0 := v.Args[0]
  7407  	// match: (SRLVconst [rc] (SLLVconst [lc] x))
  7408  	// cond: lc <= rc
  7409  	// result: (BSTRPICKV [rc-lc + ((64-lc)-1)<<6] x)
  7410  	for {
  7411  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7412  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  7413  			break
  7414  		}
  7415  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  7416  		x := v_0.Args[0]
  7417  		if !(lc <= rc) {
  7418  			break
  7419  		}
  7420  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  7421  		v.AuxInt = ssa.Int64ToAuxInt(rc - lc + ((64-lc)-1)<<6)
  7422  		v.AddArg(x)
  7423  		return true
  7424  	}
  7425  	// match: (SRLVconst [rc] (MOVWUreg x))
  7426  	// cond: rc < 32
  7427  	// result: (BSTRPICKV [rc + 31<<6] x)
  7428  	for {
  7429  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7430  		if v_0.Op != ssaop.OpLOONG64MOVWUreg {
  7431  			break
  7432  		}
  7433  		x := v_0.Args[0]
  7434  		if !(rc < 32) {
  7435  			break
  7436  		}
  7437  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  7438  		v.AuxInt = ssa.Int64ToAuxInt(rc + 31<<6)
  7439  		v.AddArg(x)
  7440  		return true
  7441  	}
  7442  	// match: (SRLVconst [rc] (MOVHUreg x))
  7443  	// cond: rc < 16
  7444  	// result: (BSTRPICKV [rc + 15<<6] x)
  7445  	for {
  7446  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7447  		if v_0.Op != ssaop.OpLOONG64MOVHUreg {
  7448  			break
  7449  		}
  7450  		x := v_0.Args[0]
  7451  		if !(rc < 16) {
  7452  			break
  7453  		}
  7454  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  7455  		v.AuxInt = ssa.Int64ToAuxInt(rc + 15<<6)
  7456  		v.AddArg(x)
  7457  		return true
  7458  	}
  7459  	// match: (SRLVconst [rc] (MOVBUreg x))
  7460  	// cond: rc < 8
  7461  	// result: (BSTRPICKV [rc + 7<<6] x)
  7462  	for {
  7463  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7464  		if v_0.Op != ssaop.OpLOONG64MOVBUreg {
  7465  			break
  7466  		}
  7467  		x := v_0.Args[0]
  7468  		if !(rc < 8) {
  7469  			break
  7470  		}
  7471  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  7472  		v.AuxInt = ssa.Int64ToAuxInt(rc + 7<<6)
  7473  		v.AddArg(x)
  7474  		return true
  7475  	}
  7476  	// match: (SRLVconst [rc] (MOVWUreg y))
  7477  	// cond: rc >= 0 && rc <= 31
  7478  	// result: (SRLconst [int64(rc)] y)
  7479  	for {
  7480  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7481  		if v_0.Op != ssaop.OpLOONG64MOVWUreg {
  7482  			break
  7483  		}
  7484  		y := v_0.Args[0]
  7485  		if !(rc >= 0 && rc <= 31) {
  7486  			break
  7487  		}
  7488  		v.Reset(ssaop.OpLOONG64SRLconst)
  7489  		v.AuxInt = ssa.Int64ToAuxInt(int64(rc))
  7490  		v.AddArg(y)
  7491  		return true
  7492  	}
  7493  	// match: (SRLVconst [rc] (MOVWUreg x))
  7494  	// cond: rc >= 32
  7495  	// result: (MOVVconst [0])
  7496  	for {
  7497  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7498  		if v_0.Op != ssaop.OpLOONG64MOVWUreg {
  7499  			break
  7500  		}
  7501  		if !(rc >= 32) {
  7502  			break
  7503  		}
  7504  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7505  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7506  		return true
  7507  	}
  7508  	// match: (SRLVconst [rc] (MOVHUreg x))
  7509  	// cond: rc >= 16
  7510  	// result: (MOVVconst [0])
  7511  	for {
  7512  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7513  		if v_0.Op != ssaop.OpLOONG64MOVHUreg {
  7514  			break
  7515  		}
  7516  		if !(rc >= 16) {
  7517  			break
  7518  		}
  7519  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7520  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7521  		return true
  7522  	}
  7523  	// match: (SRLVconst [rc] (MOVBUreg x))
  7524  	// cond: rc >= 8
  7525  	// result: (MOVVconst [0])
  7526  	for {
  7527  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7528  		if v_0.Op != ssaop.OpLOONG64MOVBUreg {
  7529  			break
  7530  		}
  7531  		if !(rc >= 8) {
  7532  			break
  7533  		}
  7534  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7535  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7536  		return true
  7537  	}
  7538  	// match: (SRLVconst [c] (MOVVconst [d]))
  7539  	// result: (MOVVconst [int64(uint64(d)>>uint64(c))])
  7540  	for {
  7541  		c := ssa.AuxIntToInt64(v.AuxInt)
  7542  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7543  			break
  7544  		}
  7545  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7546  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7547  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint64(d) >> uint64(c)))
  7548  		return true
  7549  	}
  7550  	return false
  7551  }
  7552  func rewriteValue_OpLOONG64SUBD(v *ssa.Value) bool {
  7553  	v_1 := v.Args[1]
  7554  	v_0 := v.Args[0]
  7555  	// match: (SUBD (MULD x y) z)
  7556  	// cond: z.Block.Func.UseFMA(v)
  7557  	// result: (FMSUBD x y z)
  7558  	for {
  7559  		if v_0.Op != ssaop.OpLOONG64MULD {
  7560  			break
  7561  		}
  7562  		y := v_0.Args[1]
  7563  		x := v_0.Args[0]
  7564  		z := v_1
  7565  		if !(z.Block.Func.UseFMA(v)) {
  7566  			break
  7567  		}
  7568  		v.Reset(ssaop.OpLOONG64FMSUBD)
  7569  		v.AddArg3(x, y, z)
  7570  		return true
  7571  	}
  7572  	// match: (SUBD z (MULD x y))
  7573  	// cond: z.Block.Func.UseFMA(v)
  7574  	// result: (FNMSUBD x y z)
  7575  	for {
  7576  		z := v_0
  7577  		if v_1.Op != ssaop.OpLOONG64MULD {
  7578  			break
  7579  		}
  7580  		y := v_1.Args[1]
  7581  		x := v_1.Args[0]
  7582  		if !(z.Block.Func.UseFMA(v)) {
  7583  			break
  7584  		}
  7585  		v.Reset(ssaop.OpLOONG64FNMSUBD)
  7586  		v.AddArg3(x, y, z)
  7587  		return true
  7588  	}
  7589  	// match: (SUBD z (NEGD (MULD x y)))
  7590  	// cond: z.Block.Func.UseFMA(v)
  7591  	// result: (FMADDD x y z)
  7592  	for {
  7593  		z := v_0
  7594  		if v_1.Op != ssaop.OpLOONG64NEGD {
  7595  			break
  7596  		}
  7597  		v_1_0 := v_1.Args[0]
  7598  		if v_1_0.Op != ssaop.OpLOONG64MULD {
  7599  			break
  7600  		}
  7601  		y := v_1_0.Args[1]
  7602  		x := v_1_0.Args[0]
  7603  		if !(z.Block.Func.UseFMA(v)) {
  7604  			break
  7605  		}
  7606  		v.Reset(ssaop.OpLOONG64FMADDD)
  7607  		v.AddArg3(x, y, z)
  7608  		return true
  7609  	}
  7610  	// match: (SUBD (NEGD (MULD x y)) z)
  7611  	// cond: z.Block.Func.UseFMA(v)
  7612  	// result: (FNMADDD x y z)
  7613  	for {
  7614  		if v_0.Op != ssaop.OpLOONG64NEGD {
  7615  			break
  7616  		}
  7617  		v_0_0 := v_0.Args[0]
  7618  		if v_0_0.Op != ssaop.OpLOONG64MULD {
  7619  			break
  7620  		}
  7621  		y := v_0_0.Args[1]
  7622  		x := v_0_0.Args[0]
  7623  		z := v_1
  7624  		if !(z.Block.Func.UseFMA(v)) {
  7625  			break
  7626  		}
  7627  		v.Reset(ssaop.OpLOONG64FNMADDD)
  7628  		v.AddArg3(x, y, z)
  7629  		return true
  7630  	}
  7631  	return false
  7632  }
  7633  func rewriteValue_OpLOONG64SUBF(v *ssa.Value) bool {
  7634  	v_1 := v.Args[1]
  7635  	v_0 := v.Args[0]
  7636  	// match: (SUBF (MULF x y) z)
  7637  	// cond: z.Block.Func.UseFMA(v)
  7638  	// result: (FMSUBF x y z)
  7639  	for {
  7640  		if v_0.Op != ssaop.OpLOONG64MULF {
  7641  			break
  7642  		}
  7643  		y := v_0.Args[1]
  7644  		x := v_0.Args[0]
  7645  		z := v_1
  7646  		if !(z.Block.Func.UseFMA(v)) {
  7647  			break
  7648  		}
  7649  		v.Reset(ssaop.OpLOONG64FMSUBF)
  7650  		v.AddArg3(x, y, z)
  7651  		return true
  7652  	}
  7653  	// match: (SUBF z (MULF x y))
  7654  	// cond: z.Block.Func.UseFMA(v)
  7655  	// result: (FNMSUBF x y z)
  7656  	for {
  7657  		z := v_0
  7658  		if v_1.Op != ssaop.OpLOONG64MULF {
  7659  			break
  7660  		}
  7661  		y := v_1.Args[1]
  7662  		x := v_1.Args[0]
  7663  		if !(z.Block.Func.UseFMA(v)) {
  7664  			break
  7665  		}
  7666  		v.Reset(ssaop.OpLOONG64FNMSUBF)
  7667  		v.AddArg3(x, y, z)
  7668  		return true
  7669  	}
  7670  	// match: (SUBF z (NEGF (MULF x y)))
  7671  	// cond: z.Block.Func.UseFMA(v)
  7672  	// result: (FMADDF x y z)
  7673  	for {
  7674  		z := v_0
  7675  		if v_1.Op != ssaop.OpLOONG64NEGF {
  7676  			break
  7677  		}
  7678  		v_1_0 := v_1.Args[0]
  7679  		if v_1_0.Op != ssaop.OpLOONG64MULF {
  7680  			break
  7681  		}
  7682  		y := v_1_0.Args[1]
  7683  		x := v_1_0.Args[0]
  7684  		if !(z.Block.Func.UseFMA(v)) {
  7685  			break
  7686  		}
  7687  		v.Reset(ssaop.OpLOONG64FMADDF)
  7688  		v.AddArg3(x, y, z)
  7689  		return true
  7690  	}
  7691  	// match: (SUBF (NEGF (MULF x y)) z)
  7692  	// cond: z.Block.Func.UseFMA(v)
  7693  	// result: (FNMADDF x y z)
  7694  	for {
  7695  		if v_0.Op != ssaop.OpLOONG64NEGF {
  7696  			break
  7697  		}
  7698  		v_0_0 := v_0.Args[0]
  7699  		if v_0_0.Op != ssaop.OpLOONG64MULF {
  7700  			break
  7701  		}
  7702  		y := v_0_0.Args[1]
  7703  		x := v_0_0.Args[0]
  7704  		z := v_1
  7705  		if !(z.Block.Func.UseFMA(v)) {
  7706  			break
  7707  		}
  7708  		v.Reset(ssaop.OpLOONG64FNMADDF)
  7709  		v.AddArg3(x, y, z)
  7710  		return true
  7711  	}
  7712  	return false
  7713  }
  7714  func rewriteValue_OpLOONG64SUBV(v *ssa.Value) bool {
  7715  	v_1 := v.Args[1]
  7716  	v_0 := v.Args[0]
  7717  	// match: (SUBV x (MOVVconst [c]))
  7718  	// cond: ssa.Is32Bit(c)
  7719  	// result: (SUBVconst [c] x)
  7720  	for {
  7721  		x := v_0
  7722  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7723  			break
  7724  		}
  7725  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7726  		if !(ssa.Is32Bit(c)) {
  7727  			break
  7728  		}
  7729  		v.Reset(ssaop.OpLOONG64SUBVconst)
  7730  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7731  		v.AddArg(x)
  7732  		return true
  7733  	}
  7734  	// match: (SUBV x (NEGV y))
  7735  	// result: (ADDV x y)
  7736  	for {
  7737  		x := v_0
  7738  		if v_1.Op != ssaop.OpLOONG64NEGV {
  7739  			break
  7740  		}
  7741  		y := v_1.Args[0]
  7742  		v.Reset(ssaop.OpLOONG64ADDV)
  7743  		v.AddArg2(x, y)
  7744  		return true
  7745  	}
  7746  	// match: (SUBV x x)
  7747  	// result: (MOVVconst [0])
  7748  	for {
  7749  		x := v_0
  7750  		if x != v_1 {
  7751  			break
  7752  		}
  7753  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7754  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7755  		return true
  7756  	}
  7757  	// match: (SUBV (MOVVconst [0]) x)
  7758  	// result: (NEGV x)
  7759  	for {
  7760  		if v_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
  7761  			break
  7762  		}
  7763  		x := v_1
  7764  		v.Reset(ssaop.OpLOONG64NEGV)
  7765  		v.AddArg(x)
  7766  		return true
  7767  	}
  7768  	// match: (SUBV (MOVVconst [c]) (NEGV (SUBVconst [d] x)))
  7769  	// result: (ADDVconst [c-d] x)
  7770  	for {
  7771  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7772  			break
  7773  		}
  7774  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7775  		if v_1.Op != ssaop.OpLOONG64NEGV {
  7776  			break
  7777  		}
  7778  		v_1_0 := v_1.Args[0]
  7779  		if v_1_0.Op != ssaop.OpLOONG64SUBVconst {
  7780  			break
  7781  		}
  7782  		d := ssa.AuxIntToInt64(v_1_0.AuxInt)
  7783  		x := v_1_0.Args[0]
  7784  		v.Reset(ssaop.OpLOONG64ADDVconst)
  7785  		v.AuxInt = ssa.Int64ToAuxInt(c - d)
  7786  		v.AddArg(x)
  7787  		return true
  7788  	}
  7789  	return false
  7790  }
  7791  func rewriteValue_OpLOONG64SUBVconst(v *ssa.Value) bool {
  7792  	v_0 := v.Args[0]
  7793  	// match: (SUBVconst [0] x)
  7794  	// result: x
  7795  	for {
  7796  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  7797  			break
  7798  		}
  7799  		x := v_0
  7800  		v.CopyOf(x)
  7801  		return true
  7802  	}
  7803  	// match: (SUBVconst [c] (MOVVconst [d]))
  7804  	// result: (MOVVconst [d-c])
  7805  	for {
  7806  		c := ssa.AuxIntToInt64(v.AuxInt)
  7807  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7808  			break
  7809  		}
  7810  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7811  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7812  		v.AuxInt = ssa.Int64ToAuxInt(d - c)
  7813  		return true
  7814  	}
  7815  	// match: (SUBVconst [c] (SUBVconst [d] x))
  7816  	// cond: ssa.Is32Bit(-c-d)
  7817  	// result: (ADDVconst [-c-d] x)
  7818  	for {
  7819  		c := ssa.AuxIntToInt64(v.AuxInt)
  7820  		if v_0.Op != ssaop.OpLOONG64SUBVconst {
  7821  			break
  7822  		}
  7823  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7824  		x := v_0.Args[0]
  7825  		if !(ssa.Is32Bit(-c - d)) {
  7826  			break
  7827  		}
  7828  		v.Reset(ssaop.OpLOONG64ADDVconst)
  7829  		v.AuxInt = ssa.Int64ToAuxInt(-c - d)
  7830  		v.AddArg(x)
  7831  		return true
  7832  	}
  7833  	// match: (SUBVconst [c] (ADDVconst [d] x))
  7834  	// cond: ssa.Is32Bit(-c+d)
  7835  	// result: (ADDVconst [-c+d] x)
  7836  	for {
  7837  		c := ssa.AuxIntToInt64(v.AuxInt)
  7838  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  7839  			break
  7840  		}
  7841  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7842  		x := v_0.Args[0]
  7843  		if !(ssa.Is32Bit(-c + d)) {
  7844  			break
  7845  		}
  7846  		v.Reset(ssaop.OpLOONG64ADDVconst)
  7847  		v.AuxInt = ssa.Int64ToAuxInt(-c + d)
  7848  		v.AddArg(x)
  7849  		return true
  7850  	}
  7851  	return false
  7852  }
  7853  func rewriteValue_OpLOONG64XOR(v *ssa.Value) bool {
  7854  	v_1 := v.Args[1]
  7855  	v_0 := v.Args[0]
  7856  	b := v.Block
  7857  	typ := &b.Func.Config.Types
  7858  	// match: (XOR <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  7859  	// result: (REVB2H x)
  7860  	for {
  7861  		if v.Type != typ.UInt16 {
  7862  			break
  7863  		}
  7864  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7865  			if v_0.Op != ssaop.OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7866  				continue
  7867  			}
  7868  			x := v_0.Args[0]
  7869  			if v_1.Op != ssaop.OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || ssa.AuxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  7870  				continue
  7871  			}
  7872  			v.Reset(ssaop.OpLOONG64REVB2H)
  7873  			v.AddArg(x)
  7874  			return true
  7875  		}
  7876  		break
  7877  	}
  7878  	// match: (XOR (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  7879  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  7880  	// result: (REVB2H x)
  7881  	for {
  7882  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7883  			if v_0.Op != ssaop.OpLOONG64SRLconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7884  				continue
  7885  			}
  7886  			v_0_0 := v_0.Args[0]
  7887  			if v_0_0.Op != ssaop.OpLOONG64ANDconst {
  7888  				continue
  7889  			}
  7890  			c1 := ssa.AuxIntToInt64(v_0_0.AuxInt)
  7891  			x := v_0_0.Args[0]
  7892  			if v_1.Op != ssaop.OpLOONG64SLLconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  7893  				continue
  7894  			}
  7895  			v_1_0 := v_1.Args[0]
  7896  			if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  7897  				continue
  7898  			}
  7899  			c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  7900  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  7901  				continue
  7902  			}
  7903  			v.Reset(ssaop.OpLOONG64REVB2H)
  7904  			v.AddArg(x)
  7905  			return true
  7906  		}
  7907  		break
  7908  	}
  7909  	// match: (XOR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  7910  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  7911  	// result: (REVB4H x)
  7912  	for {
  7913  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7914  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7915  				continue
  7916  			}
  7917  			v_0_0 := v_0.Args[0]
  7918  			if v_0_0.Op != ssaop.OpLOONG64AND {
  7919  				continue
  7920  			}
  7921  			_ = v_0_0.Args[1]
  7922  			v_0_0_0 := v_0_0.Args[0]
  7923  			v_0_0_1 := v_0_0.Args[1]
  7924  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  7925  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  7926  					continue
  7927  				}
  7928  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  7929  				x := v_0_0_1
  7930  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  7931  					continue
  7932  				}
  7933  				v_1_0 := v_1.Args[0]
  7934  				if v_1_0.Op != ssaop.OpLOONG64AND {
  7935  					continue
  7936  				}
  7937  				_ = v_1_0.Args[1]
  7938  				v_1_0_0 := v_1_0.Args[0]
  7939  				v_1_0_1 := v_1_0.Args[1]
  7940  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  7941  					if v_1_0_0.Op != ssaop.OpLOONG64MOVVconst {
  7942  						continue
  7943  					}
  7944  					c2 := ssa.AuxIntToInt64(v_1_0_0.AuxInt)
  7945  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  7946  						continue
  7947  					}
  7948  					v.Reset(ssaop.OpLOONG64REVB4H)
  7949  					v.AddArg(x)
  7950  					return true
  7951  				}
  7952  			}
  7953  		}
  7954  		break
  7955  	}
  7956  	// match: (XOR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  7957  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  7958  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  7959  	for {
  7960  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7961  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7962  				continue
  7963  			}
  7964  			v_0_0 := v_0.Args[0]
  7965  			if v_0_0.Op != ssaop.OpLOONG64AND {
  7966  				continue
  7967  			}
  7968  			_ = v_0_0.Args[1]
  7969  			v_0_0_0 := v_0_0.Args[0]
  7970  			v_0_0_1 := v_0_0.Args[1]
  7971  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  7972  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  7973  					continue
  7974  				}
  7975  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  7976  				x := v_0_0_1
  7977  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  7978  					continue
  7979  				}
  7980  				v_1_0 := v_1.Args[0]
  7981  				if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  7982  					continue
  7983  				}
  7984  				c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  7985  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  7986  					continue
  7987  				}
  7988  				v.Reset(ssaop.OpLOONG64REVB4H)
  7989  				v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, x.Type)
  7990  				v0.AuxInt = ssa.Int64ToAuxInt(0xffffffff)
  7991  				v0.AddArg(x)
  7992  				v.AddArg(v0)
  7993  				return true
  7994  			}
  7995  		}
  7996  		break
  7997  	}
  7998  	// match: (XOR x (MOVVconst [c]))
  7999  	// cond: ssa.Is32Bit(c)
  8000  	// result: (XORconst [c] x)
  8001  	for {
  8002  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8003  			x := v_0
  8004  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  8005  				continue
  8006  			}
  8007  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  8008  			if !(ssa.Is32Bit(c)) {
  8009  				continue
  8010  			}
  8011  			v.Reset(ssaop.OpLOONG64XORconst)
  8012  			v.AuxInt = ssa.Int64ToAuxInt(c)
  8013  			v.AddArg(x)
  8014  			return true
  8015  		}
  8016  		break
  8017  	}
  8018  	// match: (XOR x x)
  8019  	// result: (MOVVconst [0])
  8020  	for {
  8021  		x := v_0
  8022  		if x != v_1 {
  8023  			break
  8024  		}
  8025  		v.Reset(ssaop.OpLOONG64MOVVconst)
  8026  		v.AuxInt = ssa.Int64ToAuxInt(0)
  8027  		return true
  8028  	}
  8029  	return false
  8030  }
  8031  func rewriteValue_OpLOONG64XORconst(v *ssa.Value) bool {
  8032  	v_0 := v.Args[0]
  8033  	// match: (XORconst [0] x)
  8034  	// result: x
  8035  	for {
  8036  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  8037  			break
  8038  		}
  8039  		x := v_0
  8040  		v.CopyOf(x)
  8041  		return true
  8042  	}
  8043  	// match: (XORconst [-1] x)
  8044  	// result: (NORconst [0] x)
  8045  	for {
  8046  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
  8047  			break
  8048  		}
  8049  		x := v_0
  8050  		v.Reset(ssaop.OpLOONG64NORconst)
  8051  		v.AuxInt = ssa.Int64ToAuxInt(0)
  8052  		v.AddArg(x)
  8053  		return true
  8054  	}
  8055  	// match: (XORconst [c] (MOVVconst [d]))
  8056  	// result: (MOVVconst [c^d])
  8057  	for {
  8058  		c := ssa.AuxIntToInt64(v.AuxInt)
  8059  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  8060  			break
  8061  		}
  8062  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  8063  		v.Reset(ssaop.OpLOONG64MOVVconst)
  8064  		v.AuxInt = ssa.Int64ToAuxInt(c ^ d)
  8065  		return true
  8066  	}
  8067  	// match: (XORconst [c] (XORconst [d] x))
  8068  	// cond: ssa.Is32Bit(c^d)
  8069  	// result: (XORconst [c^d] x)
  8070  	for {
  8071  		c := ssa.AuxIntToInt64(v.AuxInt)
  8072  		if v_0.Op != ssaop.OpLOONG64XORconst {
  8073  			break
  8074  		}
  8075  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  8076  		x := v_0.Args[0]
  8077  		if !(ssa.Is32Bit(c ^ d)) {
  8078  			break
  8079  		}
  8080  		v.Reset(ssaop.OpLOONG64XORconst)
  8081  		v.AuxInt = ssa.Int64ToAuxInt(c ^ d)
  8082  		v.AddArg(x)
  8083  		return true
  8084  	}
  8085  	return false
  8086  }
  8087  func rewriteValue_OpLeq16(v *ssa.Value) bool {
  8088  	v_1 := v.Args[1]
  8089  	v_0 := v.Args[0]
  8090  	b := v.Block
  8091  	typ := &b.Func.Config.Types
  8092  	// match: (Leq16 x y)
  8093  	// result: (XOR (MOVVconst [1]) (SGT (SignExt16to64 x) (SignExt16to64 y)))
  8094  	for {
  8095  		x := v_0
  8096  		y := v_1
  8097  		v.Reset(ssaop.OpLOONG64XOR)
  8098  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8099  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  8100  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  8101  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  8102  		v2.AddArg(x)
  8103  		v3 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  8104  		v3.AddArg(y)
  8105  		v1.AddArg2(v2, v3)
  8106  		v.AddArg2(v0, v1)
  8107  		return true
  8108  	}
  8109  }
  8110  func rewriteValue_OpLeq16U(v *ssa.Value) bool {
  8111  	v_1 := v.Args[1]
  8112  	v_0 := v.Args[0]
  8113  	b := v.Block
  8114  	typ := &b.Func.Config.Types
  8115  	// match: (Leq16U x y)
  8116  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt16to64 x) (ZeroExt16to64 y)))
  8117  	for {
  8118  		x := v_0
  8119  		y := v_1
  8120  		v.Reset(ssaop.OpLOONG64XOR)
  8121  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8122  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  8123  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8124  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8125  		v2.AddArg(x)
  8126  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8127  		v3.AddArg(y)
  8128  		v1.AddArg2(v2, v3)
  8129  		v.AddArg2(v0, v1)
  8130  		return true
  8131  	}
  8132  }
  8133  func rewriteValue_OpLeq32(v *ssa.Value) bool {
  8134  	v_1 := v.Args[1]
  8135  	v_0 := v.Args[0]
  8136  	b := v.Block
  8137  	typ := &b.Func.Config.Types
  8138  	// match: (Leq32 x y)
  8139  	// result: (XOR (MOVVconst [1]) (SGT (SignExt32to64 x) (SignExt32to64 y)))
  8140  	for {
  8141  		x := v_0
  8142  		y := v_1
  8143  		v.Reset(ssaop.OpLOONG64XOR)
  8144  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8145  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  8146  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  8147  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  8148  		v2.AddArg(x)
  8149  		v3 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  8150  		v3.AddArg(y)
  8151  		v1.AddArg2(v2, v3)
  8152  		v.AddArg2(v0, v1)
  8153  		return true
  8154  	}
  8155  }
  8156  func rewriteValue_OpLeq32F(v *ssa.Value) bool {
  8157  	v_1 := v.Args[1]
  8158  	v_0 := v.Args[0]
  8159  	b := v.Block
  8160  	// match: (Leq32F x y)
  8161  	// result: (FPFlagTrue (CMPGEF y x))
  8162  	for {
  8163  		x := v_0
  8164  		y := v_1
  8165  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  8166  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGEF, types.TypeFlags)
  8167  		v0.AddArg2(y, x)
  8168  		v.AddArg(v0)
  8169  		return true
  8170  	}
  8171  }
  8172  func rewriteValue_OpLeq32U(v *ssa.Value) bool {
  8173  	v_1 := v.Args[1]
  8174  	v_0 := v.Args[0]
  8175  	b := v.Block
  8176  	typ := &b.Func.Config.Types
  8177  	// match: (Leq32U x y)
  8178  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt32to64 x) (ZeroExt32to64 y)))
  8179  	for {
  8180  		x := v_0
  8181  		y := v_1
  8182  		v.Reset(ssaop.OpLOONG64XOR)
  8183  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8184  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  8185  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8186  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8187  		v2.AddArg(x)
  8188  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8189  		v3.AddArg(y)
  8190  		v1.AddArg2(v2, v3)
  8191  		v.AddArg2(v0, v1)
  8192  		return true
  8193  	}
  8194  }
  8195  func rewriteValue_OpLeq64(v *ssa.Value) bool {
  8196  	v_1 := v.Args[1]
  8197  	v_0 := v.Args[0]
  8198  	b := v.Block
  8199  	typ := &b.Func.Config.Types
  8200  	// match: (Leq64 x y)
  8201  	// result: (XOR (MOVVconst [1]) (SGT x y))
  8202  	for {
  8203  		x := v_0
  8204  		y := v_1
  8205  		v.Reset(ssaop.OpLOONG64XOR)
  8206  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8207  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  8208  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  8209  		v1.AddArg2(x, y)
  8210  		v.AddArg2(v0, v1)
  8211  		return true
  8212  	}
  8213  }
  8214  func rewriteValue_OpLeq64F(v *ssa.Value) bool {
  8215  	v_1 := v.Args[1]
  8216  	v_0 := v.Args[0]
  8217  	b := v.Block
  8218  	// match: (Leq64F x y)
  8219  	// result: (FPFlagTrue (CMPGED y x))
  8220  	for {
  8221  		x := v_0
  8222  		y := v_1
  8223  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  8224  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGED, types.TypeFlags)
  8225  		v0.AddArg2(y, x)
  8226  		v.AddArg(v0)
  8227  		return true
  8228  	}
  8229  }
  8230  func rewriteValue_OpLeq64U(v *ssa.Value) bool {
  8231  	v_1 := v.Args[1]
  8232  	v_0 := v.Args[0]
  8233  	b := v.Block
  8234  	typ := &b.Func.Config.Types
  8235  	// match: (Leq64U x y)
  8236  	// result: (XOR (MOVVconst [1]) (SGTU x y))
  8237  	for {
  8238  		x := v_0
  8239  		y := v_1
  8240  		v.Reset(ssaop.OpLOONG64XOR)
  8241  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8242  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  8243  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8244  		v1.AddArg2(x, y)
  8245  		v.AddArg2(v0, v1)
  8246  		return true
  8247  	}
  8248  }
  8249  func rewriteValue_OpLeq8(v *ssa.Value) bool {
  8250  	v_1 := v.Args[1]
  8251  	v_0 := v.Args[0]
  8252  	b := v.Block
  8253  	typ := &b.Func.Config.Types
  8254  	// match: (Leq8 x y)
  8255  	// result: (XOR (MOVVconst [1]) (SGT (SignExt8to64 x) (SignExt8to64 y)))
  8256  	for {
  8257  		x := v_0
  8258  		y := v_1
  8259  		v.Reset(ssaop.OpLOONG64XOR)
  8260  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8261  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  8262  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  8263  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  8264  		v2.AddArg(x)
  8265  		v3 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  8266  		v3.AddArg(y)
  8267  		v1.AddArg2(v2, v3)
  8268  		v.AddArg2(v0, v1)
  8269  		return true
  8270  	}
  8271  }
  8272  func rewriteValue_OpLeq8U(v *ssa.Value) bool {
  8273  	v_1 := v.Args[1]
  8274  	v_0 := v.Args[0]
  8275  	b := v.Block
  8276  	typ := &b.Func.Config.Types
  8277  	// match: (Leq8U x y)
  8278  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt8to64 x) (ZeroExt8to64 y)))
  8279  	for {
  8280  		x := v_0
  8281  		y := v_1
  8282  		v.Reset(ssaop.OpLOONG64XOR)
  8283  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8284  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  8285  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8286  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8287  		v2.AddArg(x)
  8288  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8289  		v3.AddArg(y)
  8290  		v1.AddArg2(v2, v3)
  8291  		v.AddArg2(v0, v1)
  8292  		return true
  8293  	}
  8294  }
  8295  func rewriteValue_OpLess16(v *ssa.Value) bool {
  8296  	v_1 := v.Args[1]
  8297  	v_0 := v.Args[0]
  8298  	b := v.Block
  8299  	typ := &b.Func.Config.Types
  8300  	// match: (Less16 x y)
  8301  	// result: (SGT (SignExt16to64 y) (SignExt16to64 x))
  8302  	for {
  8303  		x := v_0
  8304  		y := v_1
  8305  		v.Reset(ssaop.OpLOONG64SGT)
  8306  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  8307  		v0.AddArg(y)
  8308  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  8309  		v1.AddArg(x)
  8310  		v.AddArg2(v0, v1)
  8311  		return true
  8312  	}
  8313  }
  8314  func rewriteValue_OpLess16U(v *ssa.Value) bool {
  8315  	v_1 := v.Args[1]
  8316  	v_0 := v.Args[0]
  8317  	b := v.Block
  8318  	typ := &b.Func.Config.Types
  8319  	// match: (Less16U x y)
  8320  	// result: (SGTU (ZeroExt16to64 y) (ZeroExt16to64 x))
  8321  	for {
  8322  		x := v_0
  8323  		y := v_1
  8324  		v.Reset(ssaop.OpLOONG64SGTU)
  8325  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8326  		v0.AddArg(y)
  8327  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8328  		v1.AddArg(x)
  8329  		v.AddArg2(v0, v1)
  8330  		return true
  8331  	}
  8332  }
  8333  func rewriteValue_OpLess32(v *ssa.Value) bool {
  8334  	v_1 := v.Args[1]
  8335  	v_0 := v.Args[0]
  8336  	b := v.Block
  8337  	typ := &b.Func.Config.Types
  8338  	// match: (Less32 x y)
  8339  	// result: (SGT (SignExt32to64 y) (SignExt32to64 x))
  8340  	for {
  8341  		x := v_0
  8342  		y := v_1
  8343  		v.Reset(ssaop.OpLOONG64SGT)
  8344  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  8345  		v0.AddArg(y)
  8346  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  8347  		v1.AddArg(x)
  8348  		v.AddArg2(v0, v1)
  8349  		return true
  8350  	}
  8351  }
  8352  func rewriteValue_OpLess32F(v *ssa.Value) bool {
  8353  	v_1 := v.Args[1]
  8354  	v_0 := v.Args[0]
  8355  	b := v.Block
  8356  	// match: (Less32F x y)
  8357  	// result: (FPFlagTrue (CMPGTF y x))
  8358  	for {
  8359  		x := v_0
  8360  		y := v_1
  8361  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  8362  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGTF, types.TypeFlags)
  8363  		v0.AddArg2(y, x)
  8364  		v.AddArg(v0)
  8365  		return true
  8366  	}
  8367  }
  8368  func rewriteValue_OpLess32U(v *ssa.Value) bool {
  8369  	v_1 := v.Args[1]
  8370  	v_0 := v.Args[0]
  8371  	b := v.Block
  8372  	typ := &b.Func.Config.Types
  8373  	// match: (Less32U x y)
  8374  	// result: (SGTU (ZeroExt32to64 y) (ZeroExt32to64 x))
  8375  	for {
  8376  		x := v_0
  8377  		y := v_1
  8378  		v.Reset(ssaop.OpLOONG64SGTU)
  8379  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8380  		v0.AddArg(y)
  8381  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8382  		v1.AddArg(x)
  8383  		v.AddArg2(v0, v1)
  8384  		return true
  8385  	}
  8386  }
  8387  func rewriteValue_OpLess64(v *ssa.Value) bool {
  8388  	v_1 := v.Args[1]
  8389  	v_0 := v.Args[0]
  8390  	// match: (Less64 x y)
  8391  	// result: (SGT y x)
  8392  	for {
  8393  		x := v_0
  8394  		y := v_1
  8395  		v.Reset(ssaop.OpLOONG64SGT)
  8396  		v.AddArg2(y, x)
  8397  		return true
  8398  	}
  8399  }
  8400  func rewriteValue_OpLess64F(v *ssa.Value) bool {
  8401  	v_1 := v.Args[1]
  8402  	v_0 := v.Args[0]
  8403  	b := v.Block
  8404  	// match: (Less64F x y)
  8405  	// result: (FPFlagTrue (CMPGTD y x))
  8406  	for {
  8407  		x := v_0
  8408  		y := v_1
  8409  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  8410  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGTD, types.TypeFlags)
  8411  		v0.AddArg2(y, x)
  8412  		v.AddArg(v0)
  8413  		return true
  8414  	}
  8415  }
  8416  func rewriteValue_OpLess64U(v *ssa.Value) bool {
  8417  	v_1 := v.Args[1]
  8418  	v_0 := v.Args[0]
  8419  	// match: (Less64U x y)
  8420  	// result: (SGTU y x)
  8421  	for {
  8422  		x := v_0
  8423  		y := v_1
  8424  		v.Reset(ssaop.OpLOONG64SGTU)
  8425  		v.AddArg2(y, x)
  8426  		return true
  8427  	}
  8428  }
  8429  func rewriteValue_OpLess8(v *ssa.Value) bool {
  8430  	v_1 := v.Args[1]
  8431  	v_0 := v.Args[0]
  8432  	b := v.Block
  8433  	typ := &b.Func.Config.Types
  8434  	// match: (Less8 x y)
  8435  	// result: (SGT (SignExt8to64 y) (SignExt8to64 x))
  8436  	for {
  8437  		x := v_0
  8438  		y := v_1
  8439  		v.Reset(ssaop.OpLOONG64SGT)
  8440  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  8441  		v0.AddArg(y)
  8442  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  8443  		v1.AddArg(x)
  8444  		v.AddArg2(v0, v1)
  8445  		return true
  8446  	}
  8447  }
  8448  func rewriteValue_OpLess8U(v *ssa.Value) bool {
  8449  	v_1 := v.Args[1]
  8450  	v_0 := v.Args[0]
  8451  	b := v.Block
  8452  	typ := &b.Func.Config.Types
  8453  	// match: (Less8U x y)
  8454  	// result: (SGTU (ZeroExt8to64 y) (ZeroExt8to64 x))
  8455  	for {
  8456  		x := v_0
  8457  		y := v_1
  8458  		v.Reset(ssaop.OpLOONG64SGTU)
  8459  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8460  		v0.AddArg(y)
  8461  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8462  		v1.AddArg(x)
  8463  		v.AddArg2(v0, v1)
  8464  		return true
  8465  	}
  8466  }
  8467  func rewriteValue_OpLoad(v *ssa.Value) bool {
  8468  	v_1 := v.Args[1]
  8469  	v_0 := v.Args[0]
  8470  	// match: (Load <t> ptr mem)
  8471  	// cond: t.IsBoolean()
  8472  	// result: (MOVBUload ptr mem)
  8473  	for {
  8474  		t := v.Type
  8475  		ptr := v_0
  8476  		mem := v_1
  8477  		if !(t.IsBoolean()) {
  8478  			break
  8479  		}
  8480  		v.Reset(ssaop.OpLOONG64MOVBUload)
  8481  		v.AddArg2(ptr, mem)
  8482  		return true
  8483  	}
  8484  	// match: (Load <t> ptr mem)
  8485  	// cond: (ssa.Is8BitInt(t) && t.IsSigned())
  8486  	// result: (MOVBload ptr mem)
  8487  	for {
  8488  		t := v.Type
  8489  		ptr := v_0
  8490  		mem := v_1
  8491  		if !(ssa.Is8BitInt(t) && t.IsSigned()) {
  8492  			break
  8493  		}
  8494  		v.Reset(ssaop.OpLOONG64MOVBload)
  8495  		v.AddArg2(ptr, mem)
  8496  		return true
  8497  	}
  8498  	// match: (Load <t> ptr mem)
  8499  	// cond: (ssa.Is8BitInt(t) && !t.IsSigned())
  8500  	// result: (MOVBUload ptr mem)
  8501  	for {
  8502  		t := v.Type
  8503  		ptr := v_0
  8504  		mem := v_1
  8505  		if !(ssa.Is8BitInt(t) && !t.IsSigned()) {
  8506  			break
  8507  		}
  8508  		v.Reset(ssaop.OpLOONG64MOVBUload)
  8509  		v.AddArg2(ptr, mem)
  8510  		return true
  8511  	}
  8512  	// match: (Load <t> ptr mem)
  8513  	// cond: (ssa.Is16BitInt(t) && t.IsSigned())
  8514  	// result: (MOVHload ptr mem)
  8515  	for {
  8516  		t := v.Type
  8517  		ptr := v_0
  8518  		mem := v_1
  8519  		if !(ssa.Is16BitInt(t) && t.IsSigned()) {
  8520  			break
  8521  		}
  8522  		v.Reset(ssaop.OpLOONG64MOVHload)
  8523  		v.AddArg2(ptr, mem)
  8524  		return true
  8525  	}
  8526  	// match: (Load <t> ptr mem)
  8527  	// cond: (ssa.Is16BitInt(t) && !t.IsSigned())
  8528  	// result: (MOVHUload ptr mem)
  8529  	for {
  8530  		t := v.Type
  8531  		ptr := v_0
  8532  		mem := v_1
  8533  		if !(ssa.Is16BitInt(t) && !t.IsSigned()) {
  8534  			break
  8535  		}
  8536  		v.Reset(ssaop.OpLOONG64MOVHUload)
  8537  		v.AddArg2(ptr, mem)
  8538  		return true
  8539  	}
  8540  	// match: (Load <t> ptr mem)
  8541  	// cond: (ssa.Is32BitInt(t) && t.IsSigned())
  8542  	// result: (MOVWload ptr mem)
  8543  	for {
  8544  		t := v.Type
  8545  		ptr := v_0
  8546  		mem := v_1
  8547  		if !(ssa.Is32BitInt(t) && t.IsSigned()) {
  8548  			break
  8549  		}
  8550  		v.Reset(ssaop.OpLOONG64MOVWload)
  8551  		v.AddArg2(ptr, mem)
  8552  		return true
  8553  	}
  8554  	// match: (Load <t> ptr mem)
  8555  	// cond: (ssa.Is32BitInt(t) && !t.IsSigned())
  8556  	// result: (MOVWUload ptr mem)
  8557  	for {
  8558  		t := v.Type
  8559  		ptr := v_0
  8560  		mem := v_1
  8561  		if !(ssa.Is32BitInt(t) && !t.IsSigned()) {
  8562  			break
  8563  		}
  8564  		v.Reset(ssaop.OpLOONG64MOVWUload)
  8565  		v.AddArg2(ptr, mem)
  8566  		return true
  8567  	}
  8568  	// match: (Load <t> ptr mem)
  8569  	// cond: (ssa.Is64BitInt(t) ||ssa.IsPtr(t))
  8570  	// result: (MOVVload ptr mem)
  8571  	for {
  8572  		t := v.Type
  8573  		ptr := v_0
  8574  		mem := v_1
  8575  		if !(ssa.Is64BitInt(t) || ssa.IsPtr(t)) {
  8576  			break
  8577  		}
  8578  		v.Reset(ssaop.OpLOONG64MOVVload)
  8579  		v.AddArg2(ptr, mem)
  8580  		return true
  8581  	}
  8582  	// match: (Load <t> ptr mem)
  8583  	// cond: ssa.Is32BitFloat(t)
  8584  	// result: (MOVFload ptr mem)
  8585  	for {
  8586  		t := v.Type
  8587  		ptr := v_0
  8588  		mem := v_1
  8589  		if !(ssa.Is32BitFloat(t)) {
  8590  			break
  8591  		}
  8592  		v.Reset(ssaop.OpLOONG64MOVFload)
  8593  		v.AddArg2(ptr, mem)
  8594  		return true
  8595  	}
  8596  	// match: (Load <t> ptr mem)
  8597  	// cond: ssa.Is64BitFloat(t)
  8598  	// result: (MOVDload ptr mem)
  8599  	for {
  8600  		t := v.Type
  8601  		ptr := v_0
  8602  		mem := v_1
  8603  		if !(ssa.Is64BitFloat(t)) {
  8604  			break
  8605  		}
  8606  		v.Reset(ssaop.OpLOONG64MOVDload)
  8607  		v.AddArg2(ptr, mem)
  8608  		return true
  8609  	}
  8610  	return false
  8611  }
  8612  func rewriteValue_OpLocalAddr(v *ssa.Value) bool {
  8613  	v_1 := v.Args[1]
  8614  	v_0 := v.Args[0]
  8615  	b := v.Block
  8616  	typ := &b.Func.Config.Types
  8617  	// match: (LocalAddr <t> {sym} base mem)
  8618  	// cond: t.Elem().HasPointers()
  8619  	// result: (MOVVaddr {sym} (SPanchored base mem))
  8620  	for {
  8621  		t := v.Type
  8622  		sym := ssa.AuxToSym(v.Aux)
  8623  		base := v_0
  8624  		mem := v_1
  8625  		if !(t.Elem().HasPointers()) {
  8626  			break
  8627  		}
  8628  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  8629  		v.Aux = ssa.SymToAux(sym)
  8630  		v0 := b.NewValue0(v.Pos, ssaop.OpSPanchored, typ.Uintptr)
  8631  		v0.AddArg2(base, mem)
  8632  		v.AddArg(v0)
  8633  		return true
  8634  	}
  8635  	// match: (LocalAddr <t> {sym} base _)
  8636  	// cond: !t.Elem().HasPointers()
  8637  	// result: (MOVVaddr {sym} base)
  8638  	for {
  8639  		t := v.Type
  8640  		sym := ssa.AuxToSym(v.Aux)
  8641  		base := v_0
  8642  		if !(!t.Elem().HasPointers()) {
  8643  			break
  8644  		}
  8645  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  8646  		v.Aux = ssa.SymToAux(sym)
  8647  		v.AddArg(base)
  8648  		return true
  8649  	}
  8650  	return false
  8651  }
  8652  func rewriteValue_OpLsh16x16(v *ssa.Value) bool {
  8653  	v_1 := v.Args[1]
  8654  	v_0 := v.Args[0]
  8655  	b := v.Block
  8656  	typ := &b.Func.Config.Types
  8657  	// match: (Lsh16x16 x y)
  8658  	// cond: ssa.ShiftIsBounded(v)
  8659  	// result: (SLLV x y)
  8660  	for {
  8661  		x := v_0
  8662  		y := v_1
  8663  		if !(ssa.ShiftIsBounded(v)) {
  8664  			break
  8665  		}
  8666  		v.Reset(ssaop.OpLOONG64SLLV)
  8667  		v.AddArg2(x, y)
  8668  		return true
  8669  	}
  8670  	// match: (Lsh16x16 <t> x y)
  8671  	// cond: !ssa.ShiftIsBounded(v)
  8672  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  8673  	for {
  8674  		t := v.Type
  8675  		x := v_0
  8676  		y := v_1
  8677  		if !(!ssa.ShiftIsBounded(v)) {
  8678  			break
  8679  		}
  8680  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8681  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8682  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8683  		v1.AddArg(y)
  8684  		v0.AddArg2(x, v1)
  8685  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8686  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8687  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8688  		v2.AddArg2(v3, v1)
  8689  		v.AddArg2(v0, v2)
  8690  		return true
  8691  	}
  8692  	return false
  8693  }
  8694  func rewriteValue_OpLsh16x32(v *ssa.Value) bool {
  8695  	v_1 := v.Args[1]
  8696  	v_0 := v.Args[0]
  8697  	b := v.Block
  8698  	typ := &b.Func.Config.Types
  8699  	// match: (Lsh16x32 x y)
  8700  	// cond: ssa.ShiftIsBounded(v)
  8701  	// result: (SLLV x y)
  8702  	for {
  8703  		x := v_0
  8704  		y := v_1
  8705  		if !(ssa.ShiftIsBounded(v)) {
  8706  			break
  8707  		}
  8708  		v.Reset(ssaop.OpLOONG64SLLV)
  8709  		v.AddArg2(x, y)
  8710  		return true
  8711  	}
  8712  	// match: (Lsh16x32 <t> x y)
  8713  	// cond: !ssa.ShiftIsBounded(v)
  8714  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  8715  	for {
  8716  		t := v.Type
  8717  		x := v_0
  8718  		y := v_1
  8719  		if !(!ssa.ShiftIsBounded(v)) {
  8720  			break
  8721  		}
  8722  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8723  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8724  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8725  		v1.AddArg(y)
  8726  		v0.AddArg2(x, v1)
  8727  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8728  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8729  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8730  		v2.AddArg2(v3, v1)
  8731  		v.AddArg2(v0, v2)
  8732  		return true
  8733  	}
  8734  	return false
  8735  }
  8736  func rewriteValue_OpLsh16x64(v *ssa.Value) bool {
  8737  	v_1 := v.Args[1]
  8738  	v_0 := v.Args[0]
  8739  	b := v.Block
  8740  	typ := &b.Func.Config.Types
  8741  	// match: (Lsh16x64 x y)
  8742  	// cond: ssa.ShiftIsBounded(v)
  8743  	// result: (SLLV x y)
  8744  	for {
  8745  		x := v_0
  8746  		y := v_1
  8747  		if !(ssa.ShiftIsBounded(v)) {
  8748  			break
  8749  		}
  8750  		v.Reset(ssaop.OpLOONG64SLLV)
  8751  		v.AddArg2(x, y)
  8752  		return true
  8753  	}
  8754  	// match: (Lsh16x64 <t> x y)
  8755  	// cond: !ssa.ShiftIsBounded(v)
  8756  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  8757  	for {
  8758  		t := v.Type
  8759  		x := v_0
  8760  		y := v_1
  8761  		if !(!ssa.ShiftIsBounded(v)) {
  8762  			break
  8763  		}
  8764  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8765  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8766  		v0.AddArg2(x, y)
  8767  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8768  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8769  		v2.AuxInt = ssa.Int64ToAuxInt(64)
  8770  		v1.AddArg2(v2, y)
  8771  		v.AddArg2(v0, v1)
  8772  		return true
  8773  	}
  8774  	return false
  8775  }
  8776  func rewriteValue_OpLsh16x8(v *ssa.Value) bool {
  8777  	v_1 := v.Args[1]
  8778  	v_0 := v.Args[0]
  8779  	b := v.Block
  8780  	typ := &b.Func.Config.Types
  8781  	// match: (Lsh16x8 x y)
  8782  	// cond: ssa.ShiftIsBounded(v)
  8783  	// result: (SLLV x y)
  8784  	for {
  8785  		x := v_0
  8786  		y := v_1
  8787  		if !(ssa.ShiftIsBounded(v)) {
  8788  			break
  8789  		}
  8790  		v.Reset(ssaop.OpLOONG64SLLV)
  8791  		v.AddArg2(x, y)
  8792  		return true
  8793  	}
  8794  	// match: (Lsh16x8 <t> x y)
  8795  	// cond: !ssa.ShiftIsBounded(v)
  8796  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  8797  	for {
  8798  		t := v.Type
  8799  		x := v_0
  8800  		y := v_1
  8801  		if !(!ssa.ShiftIsBounded(v)) {
  8802  			break
  8803  		}
  8804  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8805  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8806  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8807  		v1.AddArg(y)
  8808  		v0.AddArg2(x, v1)
  8809  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8810  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8811  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8812  		v2.AddArg2(v3, v1)
  8813  		v.AddArg2(v0, v2)
  8814  		return true
  8815  	}
  8816  	return false
  8817  }
  8818  func rewriteValue_OpLsh32x16(v *ssa.Value) bool {
  8819  	v_1 := v.Args[1]
  8820  	v_0 := v.Args[0]
  8821  	b := v.Block
  8822  	typ := &b.Func.Config.Types
  8823  	// match: (Lsh32x16 x y)
  8824  	// cond: ssa.ShiftIsBounded(v)
  8825  	// result: (SLL x y)
  8826  	for {
  8827  		x := v_0
  8828  		y := v_1
  8829  		if !(ssa.ShiftIsBounded(v)) {
  8830  			break
  8831  		}
  8832  		v.Reset(ssaop.OpLOONG64SLL)
  8833  		v.AddArg2(x, y)
  8834  		return true
  8835  	}
  8836  	// match: (Lsh32x16 <t> x y)
  8837  	// cond: !ssa.ShiftIsBounded(v)
  8838  	// result: (MASKEQZ (SLL <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt16to64 y)))
  8839  	for {
  8840  		t := v.Type
  8841  		x := v_0
  8842  		y := v_1
  8843  		if !(!ssa.ShiftIsBounded(v)) {
  8844  			break
  8845  		}
  8846  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8847  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8848  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8849  		v1.AddArg(y)
  8850  		v0.AddArg2(x, v1)
  8851  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8852  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8853  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  8854  		v2.AddArg2(v3, v1)
  8855  		v.AddArg2(v0, v2)
  8856  		return true
  8857  	}
  8858  	return false
  8859  }
  8860  func rewriteValue_OpLsh32x32(v *ssa.Value) bool {
  8861  	v_1 := v.Args[1]
  8862  	v_0 := v.Args[0]
  8863  	b := v.Block
  8864  	typ := &b.Func.Config.Types
  8865  	// match: (Lsh32x32 x y)
  8866  	// cond: ssa.ShiftIsBounded(v)
  8867  	// result: (SLL x y)
  8868  	for {
  8869  		x := v_0
  8870  		y := v_1
  8871  		if !(ssa.ShiftIsBounded(v)) {
  8872  			break
  8873  		}
  8874  		v.Reset(ssaop.OpLOONG64SLL)
  8875  		v.AddArg2(x, y)
  8876  		return true
  8877  	}
  8878  	// match: (Lsh32x32 <t> x y)
  8879  	// cond: !ssa.ShiftIsBounded(v)
  8880  	// result: (MASKEQZ (SLL <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt32to64 y)))
  8881  	for {
  8882  		t := v.Type
  8883  		x := v_0
  8884  		y := v_1
  8885  		if !(!ssa.ShiftIsBounded(v)) {
  8886  			break
  8887  		}
  8888  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8889  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8890  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8891  		v1.AddArg(y)
  8892  		v0.AddArg2(x, v1)
  8893  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8894  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8895  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  8896  		v2.AddArg2(v3, v1)
  8897  		v.AddArg2(v0, v2)
  8898  		return true
  8899  	}
  8900  	return false
  8901  }
  8902  func rewriteValue_OpLsh32x64(v *ssa.Value) bool {
  8903  	v_1 := v.Args[1]
  8904  	v_0 := v.Args[0]
  8905  	b := v.Block
  8906  	typ := &b.Func.Config.Types
  8907  	// match: (Lsh32x64 x y)
  8908  	// cond: ssa.ShiftIsBounded(v)
  8909  	// result: (SLL x y)
  8910  	for {
  8911  		x := v_0
  8912  		y := v_1
  8913  		if !(ssa.ShiftIsBounded(v)) {
  8914  			break
  8915  		}
  8916  		v.Reset(ssaop.OpLOONG64SLL)
  8917  		v.AddArg2(x, y)
  8918  		return true
  8919  	}
  8920  	// match: (Lsh32x64 <t> x y)
  8921  	// cond: !ssa.ShiftIsBounded(v)
  8922  	// result: (MASKEQZ (SLL <t> x y) (SGTU (MOVVconst <typ.UInt64> [32]) y))
  8923  	for {
  8924  		t := v.Type
  8925  		x := v_0
  8926  		y := v_1
  8927  		if !(!ssa.ShiftIsBounded(v)) {
  8928  			break
  8929  		}
  8930  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8931  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8932  		v0.AddArg2(x, y)
  8933  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8934  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8935  		v2.AuxInt = ssa.Int64ToAuxInt(32)
  8936  		v1.AddArg2(v2, y)
  8937  		v.AddArg2(v0, v1)
  8938  		return true
  8939  	}
  8940  	return false
  8941  }
  8942  func rewriteValue_OpLsh32x8(v *ssa.Value) bool {
  8943  	v_1 := v.Args[1]
  8944  	v_0 := v.Args[0]
  8945  	b := v.Block
  8946  	typ := &b.Func.Config.Types
  8947  	// match: (Lsh32x8 x y)
  8948  	// cond: ssa.ShiftIsBounded(v)
  8949  	// result: (SLL x y)
  8950  	for {
  8951  		x := v_0
  8952  		y := v_1
  8953  		if !(ssa.ShiftIsBounded(v)) {
  8954  			break
  8955  		}
  8956  		v.Reset(ssaop.OpLOONG64SLL)
  8957  		v.AddArg2(x, y)
  8958  		return true
  8959  	}
  8960  	// match: (Lsh32x8 <t> x y)
  8961  	// cond: !ssa.ShiftIsBounded(v)
  8962  	// result: (MASKEQZ (SLL <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt8to64 y)))
  8963  	for {
  8964  		t := v.Type
  8965  		x := v_0
  8966  		y := v_1
  8967  		if !(!ssa.ShiftIsBounded(v)) {
  8968  			break
  8969  		}
  8970  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8971  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8972  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8973  		v1.AddArg(y)
  8974  		v0.AddArg2(x, v1)
  8975  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8976  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8977  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  8978  		v2.AddArg2(v3, v1)
  8979  		v.AddArg2(v0, v2)
  8980  		return true
  8981  	}
  8982  	return false
  8983  }
  8984  func rewriteValue_OpLsh64x16(v *ssa.Value) bool {
  8985  	v_1 := v.Args[1]
  8986  	v_0 := v.Args[0]
  8987  	b := v.Block
  8988  	typ := &b.Func.Config.Types
  8989  	// match: (Lsh64x16 x y)
  8990  	// cond: ssa.ShiftIsBounded(v)
  8991  	// result: (SLLV x y)
  8992  	for {
  8993  		x := v_0
  8994  		y := v_1
  8995  		if !(ssa.ShiftIsBounded(v)) {
  8996  			break
  8997  		}
  8998  		v.Reset(ssaop.OpLOONG64SLLV)
  8999  		v.AddArg2(x, y)
  9000  		return true
  9001  	}
  9002  	// match: (Lsh64x16 <t> x y)
  9003  	// cond: !ssa.ShiftIsBounded(v)
  9004  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  9005  	for {
  9006  		t := v.Type
  9007  		x := v_0
  9008  		y := v_1
  9009  		if !(!ssa.ShiftIsBounded(v)) {
  9010  			break
  9011  		}
  9012  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9013  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  9014  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9015  		v1.AddArg(y)
  9016  		v0.AddArg2(x, v1)
  9017  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9018  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9019  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  9020  		v2.AddArg2(v3, v1)
  9021  		v.AddArg2(v0, v2)
  9022  		return true
  9023  	}
  9024  	return false
  9025  }
  9026  func rewriteValue_OpLsh64x32(v *ssa.Value) bool {
  9027  	v_1 := v.Args[1]
  9028  	v_0 := v.Args[0]
  9029  	b := v.Block
  9030  	typ := &b.Func.Config.Types
  9031  	// match: (Lsh64x32 x y)
  9032  	// cond: ssa.ShiftIsBounded(v)
  9033  	// result: (SLLV x y)
  9034  	for {
  9035  		x := v_0
  9036  		y := v_1
  9037  		if !(ssa.ShiftIsBounded(v)) {
  9038  			break
  9039  		}
  9040  		v.Reset(ssaop.OpLOONG64SLLV)
  9041  		v.AddArg2(x, y)
  9042  		return true
  9043  	}
  9044  	// match: (Lsh64x32 <t> x y)
  9045  	// cond: !ssa.ShiftIsBounded(v)
  9046  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  9047  	for {
  9048  		t := v.Type
  9049  		x := v_0
  9050  		y := v_1
  9051  		if !(!ssa.ShiftIsBounded(v)) {
  9052  			break
  9053  		}
  9054  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9055  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  9056  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9057  		v1.AddArg(y)
  9058  		v0.AddArg2(x, v1)
  9059  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9060  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9061  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  9062  		v2.AddArg2(v3, v1)
  9063  		v.AddArg2(v0, v2)
  9064  		return true
  9065  	}
  9066  	return false
  9067  }
  9068  func rewriteValue_OpLsh64x64(v *ssa.Value) bool {
  9069  	v_1 := v.Args[1]
  9070  	v_0 := v.Args[0]
  9071  	b := v.Block
  9072  	typ := &b.Func.Config.Types
  9073  	// match: (Lsh64x64 x y)
  9074  	// cond: ssa.ShiftIsBounded(v)
  9075  	// result: (SLLV x y)
  9076  	for {
  9077  		x := v_0
  9078  		y := v_1
  9079  		if !(ssa.ShiftIsBounded(v)) {
  9080  			break
  9081  		}
  9082  		v.Reset(ssaop.OpLOONG64SLLV)
  9083  		v.AddArg2(x, y)
  9084  		return true
  9085  	}
  9086  	// match: (Lsh64x64 <t> x y)
  9087  	// cond: !ssa.ShiftIsBounded(v)
  9088  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  9089  	for {
  9090  		t := v.Type
  9091  		x := v_0
  9092  		y := v_1
  9093  		if !(!ssa.ShiftIsBounded(v)) {
  9094  			break
  9095  		}
  9096  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9097  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  9098  		v0.AddArg2(x, y)
  9099  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9100  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9101  		v2.AuxInt = ssa.Int64ToAuxInt(64)
  9102  		v1.AddArg2(v2, y)
  9103  		v.AddArg2(v0, v1)
  9104  		return true
  9105  	}
  9106  	return false
  9107  }
  9108  func rewriteValue_OpLsh64x8(v *ssa.Value) bool {
  9109  	v_1 := v.Args[1]
  9110  	v_0 := v.Args[0]
  9111  	b := v.Block
  9112  	typ := &b.Func.Config.Types
  9113  	// match: (Lsh64x8 x y)
  9114  	// cond: ssa.ShiftIsBounded(v)
  9115  	// result: (SLLV x y)
  9116  	for {
  9117  		x := v_0
  9118  		y := v_1
  9119  		if !(ssa.ShiftIsBounded(v)) {
  9120  			break
  9121  		}
  9122  		v.Reset(ssaop.OpLOONG64SLLV)
  9123  		v.AddArg2(x, y)
  9124  		return true
  9125  	}
  9126  	// match: (Lsh64x8 <t> x y)
  9127  	// cond: !ssa.ShiftIsBounded(v)
  9128  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  9129  	for {
  9130  		t := v.Type
  9131  		x := v_0
  9132  		y := v_1
  9133  		if !(!ssa.ShiftIsBounded(v)) {
  9134  			break
  9135  		}
  9136  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9137  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  9138  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9139  		v1.AddArg(y)
  9140  		v0.AddArg2(x, v1)
  9141  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9142  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9143  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  9144  		v2.AddArg2(v3, v1)
  9145  		v.AddArg2(v0, v2)
  9146  		return true
  9147  	}
  9148  	return false
  9149  }
  9150  func rewriteValue_OpLsh8x16(v *ssa.Value) bool {
  9151  	v_1 := v.Args[1]
  9152  	v_0 := v.Args[0]
  9153  	b := v.Block
  9154  	typ := &b.Func.Config.Types
  9155  	// match: (Lsh8x16 x y)
  9156  	// cond: ssa.ShiftIsBounded(v)
  9157  	// result: (SLLV x y)
  9158  	for {
  9159  		x := v_0
  9160  		y := v_1
  9161  		if !(ssa.ShiftIsBounded(v)) {
  9162  			break
  9163  		}
  9164  		v.Reset(ssaop.OpLOONG64SLLV)
  9165  		v.AddArg2(x, y)
  9166  		return true
  9167  	}
  9168  	// match: (Lsh8x16 <t> x y)
  9169  	// cond: !ssa.ShiftIsBounded(v)
  9170  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  9171  	for {
  9172  		t := v.Type
  9173  		x := v_0
  9174  		y := v_1
  9175  		if !(!ssa.ShiftIsBounded(v)) {
  9176  			break
  9177  		}
  9178  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9179  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  9180  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9181  		v1.AddArg(y)
  9182  		v0.AddArg2(x, v1)
  9183  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9184  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9185  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  9186  		v2.AddArg2(v3, v1)
  9187  		v.AddArg2(v0, v2)
  9188  		return true
  9189  	}
  9190  	return false
  9191  }
  9192  func rewriteValue_OpLsh8x32(v *ssa.Value) bool {
  9193  	v_1 := v.Args[1]
  9194  	v_0 := v.Args[0]
  9195  	b := v.Block
  9196  	typ := &b.Func.Config.Types
  9197  	// match: (Lsh8x32 x y)
  9198  	// cond: ssa.ShiftIsBounded(v)
  9199  	// result: (SLLV x y)
  9200  	for {
  9201  		x := v_0
  9202  		y := v_1
  9203  		if !(ssa.ShiftIsBounded(v)) {
  9204  			break
  9205  		}
  9206  		v.Reset(ssaop.OpLOONG64SLLV)
  9207  		v.AddArg2(x, y)
  9208  		return true
  9209  	}
  9210  	// match: (Lsh8x32 <t> x y)
  9211  	// cond: !ssa.ShiftIsBounded(v)
  9212  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  9213  	for {
  9214  		t := v.Type
  9215  		x := v_0
  9216  		y := v_1
  9217  		if !(!ssa.ShiftIsBounded(v)) {
  9218  			break
  9219  		}
  9220  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9221  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  9222  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9223  		v1.AddArg(y)
  9224  		v0.AddArg2(x, v1)
  9225  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9226  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9227  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  9228  		v2.AddArg2(v3, v1)
  9229  		v.AddArg2(v0, v2)
  9230  		return true
  9231  	}
  9232  	return false
  9233  }
  9234  func rewriteValue_OpLsh8x64(v *ssa.Value) bool {
  9235  	v_1 := v.Args[1]
  9236  	v_0 := v.Args[0]
  9237  	b := v.Block
  9238  	typ := &b.Func.Config.Types
  9239  	// match: (Lsh8x64 x y)
  9240  	// cond: ssa.ShiftIsBounded(v)
  9241  	// result: (SLLV x y)
  9242  	for {
  9243  		x := v_0
  9244  		y := v_1
  9245  		if !(ssa.ShiftIsBounded(v)) {
  9246  			break
  9247  		}
  9248  		v.Reset(ssaop.OpLOONG64SLLV)
  9249  		v.AddArg2(x, y)
  9250  		return true
  9251  	}
  9252  	// match: (Lsh8x64 <t> x y)
  9253  	// cond: !ssa.ShiftIsBounded(v)
  9254  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  9255  	for {
  9256  		t := v.Type
  9257  		x := v_0
  9258  		y := v_1
  9259  		if !(!ssa.ShiftIsBounded(v)) {
  9260  			break
  9261  		}
  9262  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9263  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  9264  		v0.AddArg2(x, y)
  9265  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9266  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9267  		v2.AuxInt = ssa.Int64ToAuxInt(64)
  9268  		v1.AddArg2(v2, y)
  9269  		v.AddArg2(v0, v1)
  9270  		return true
  9271  	}
  9272  	return false
  9273  }
  9274  func rewriteValue_OpLsh8x8(v *ssa.Value) bool {
  9275  	v_1 := v.Args[1]
  9276  	v_0 := v.Args[0]
  9277  	b := v.Block
  9278  	typ := &b.Func.Config.Types
  9279  	// match: (Lsh8x8 x y)
  9280  	// cond: ssa.ShiftIsBounded(v)
  9281  	// result: (SLLV x y)
  9282  	for {
  9283  		x := v_0
  9284  		y := v_1
  9285  		if !(ssa.ShiftIsBounded(v)) {
  9286  			break
  9287  		}
  9288  		v.Reset(ssaop.OpLOONG64SLLV)
  9289  		v.AddArg2(x, y)
  9290  		return true
  9291  	}
  9292  	// match: (Lsh8x8 <t> x y)
  9293  	// cond: !ssa.ShiftIsBounded(v)
  9294  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  9295  	for {
  9296  		t := v.Type
  9297  		x := v_0
  9298  		y := v_1
  9299  		if !(!ssa.ShiftIsBounded(v)) {
  9300  			break
  9301  		}
  9302  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9303  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  9304  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9305  		v1.AddArg(y)
  9306  		v0.AddArg2(x, v1)
  9307  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9308  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9309  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  9310  		v2.AddArg2(v3, v1)
  9311  		v.AddArg2(v0, v2)
  9312  		return true
  9313  	}
  9314  	return false
  9315  }
  9316  func rewriteValue_OpMod16(v *ssa.Value) bool {
  9317  	v_1 := v.Args[1]
  9318  	v_0 := v.Args[0]
  9319  	b := v.Block
  9320  	typ := &b.Func.Config.Types
  9321  	// match: (Mod16 x y)
  9322  	// result: (REMV (SignExt16to64 x) (SignExt16to64 y))
  9323  	for {
  9324  		x := v_0
  9325  		y := v_1
  9326  		v.Reset(ssaop.OpLOONG64REMV)
  9327  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  9328  		v0.AddArg(x)
  9329  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  9330  		v1.AddArg(y)
  9331  		v.AddArg2(v0, v1)
  9332  		return true
  9333  	}
  9334  }
  9335  func rewriteValue_OpMod16u(v *ssa.Value) bool {
  9336  	v_1 := v.Args[1]
  9337  	v_0 := v.Args[0]
  9338  	b := v.Block
  9339  	typ := &b.Func.Config.Types
  9340  	// match: (Mod16u x y)
  9341  	// result: (REMVU (ZeroExt16to64 x) (ZeroExt16to64 y))
  9342  	for {
  9343  		x := v_0
  9344  		y := v_1
  9345  		v.Reset(ssaop.OpLOONG64REMVU)
  9346  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9347  		v0.AddArg(x)
  9348  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9349  		v1.AddArg(y)
  9350  		v.AddArg2(v0, v1)
  9351  		return true
  9352  	}
  9353  }
  9354  func rewriteValue_OpMod32(v *ssa.Value) bool {
  9355  	v_1 := v.Args[1]
  9356  	v_0 := v.Args[0]
  9357  	b := v.Block
  9358  	typ := &b.Func.Config.Types
  9359  	// match: (Mod32 x y)
  9360  	// result: (REMV (SignExt32to64 x) (SignExt32to64 y))
  9361  	for {
  9362  		x := v_0
  9363  		y := v_1
  9364  		v.Reset(ssaop.OpLOONG64REMV)
  9365  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  9366  		v0.AddArg(x)
  9367  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  9368  		v1.AddArg(y)
  9369  		v.AddArg2(v0, v1)
  9370  		return true
  9371  	}
  9372  }
  9373  func rewriteValue_OpMod32u(v *ssa.Value) bool {
  9374  	v_1 := v.Args[1]
  9375  	v_0 := v.Args[0]
  9376  	b := v.Block
  9377  	typ := &b.Func.Config.Types
  9378  	// match: (Mod32u x y)
  9379  	// result: (REMVU (ZeroExt32to64 x) (ZeroExt32to64 y))
  9380  	for {
  9381  		x := v_0
  9382  		y := v_1
  9383  		v.Reset(ssaop.OpLOONG64REMVU)
  9384  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9385  		v0.AddArg(x)
  9386  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9387  		v1.AddArg(y)
  9388  		v.AddArg2(v0, v1)
  9389  		return true
  9390  	}
  9391  }
  9392  func rewriteValue_OpMod64(v *ssa.Value) bool {
  9393  	v_1 := v.Args[1]
  9394  	v_0 := v.Args[0]
  9395  	// match: (Mod64 x y)
  9396  	// result: (REMV x y)
  9397  	for {
  9398  		x := v_0
  9399  		y := v_1
  9400  		v.Reset(ssaop.OpLOONG64REMV)
  9401  		v.AddArg2(x, y)
  9402  		return true
  9403  	}
  9404  }
  9405  func rewriteValue_OpMod8(v *ssa.Value) bool {
  9406  	v_1 := v.Args[1]
  9407  	v_0 := v.Args[0]
  9408  	b := v.Block
  9409  	typ := &b.Func.Config.Types
  9410  	// match: (Mod8 x y)
  9411  	// result: (REMV (SignExt8to64 x) (SignExt8to64 y))
  9412  	for {
  9413  		x := v_0
  9414  		y := v_1
  9415  		v.Reset(ssaop.OpLOONG64REMV)
  9416  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  9417  		v0.AddArg(x)
  9418  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  9419  		v1.AddArg(y)
  9420  		v.AddArg2(v0, v1)
  9421  		return true
  9422  	}
  9423  }
  9424  func rewriteValue_OpMod8u(v *ssa.Value) bool {
  9425  	v_1 := v.Args[1]
  9426  	v_0 := v.Args[0]
  9427  	b := v.Block
  9428  	typ := &b.Func.Config.Types
  9429  	// match: (Mod8u x y)
  9430  	// result: (REMVU (ZeroExt8to64 x) (ZeroExt8to64 y))
  9431  	for {
  9432  		x := v_0
  9433  		y := v_1
  9434  		v.Reset(ssaop.OpLOONG64REMVU)
  9435  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9436  		v0.AddArg(x)
  9437  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9438  		v1.AddArg(y)
  9439  		v.AddArg2(v0, v1)
  9440  		return true
  9441  	}
  9442  }
  9443  func rewriteValue_OpMove(v *ssa.Value) bool {
  9444  	v_2 := v.Args[2]
  9445  	v_1 := v.Args[1]
  9446  	v_0 := v.Args[0]
  9447  	b := v.Block
  9448  	typ := &b.Func.Config.Types
  9449  	// match: (Move [0] _ _ mem)
  9450  	// result: mem
  9451  	for {
  9452  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  9453  			break
  9454  		}
  9455  		mem := v_2
  9456  		v.CopyOf(mem)
  9457  		return true
  9458  	}
  9459  	// match: (Move [1] dst src mem)
  9460  	// result: (MOVBstore dst (MOVBUload src mem) mem)
  9461  	for {
  9462  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
  9463  			break
  9464  		}
  9465  		dst := v_0
  9466  		src := v_1
  9467  		mem := v_2
  9468  		v.Reset(ssaop.OpLOONG64MOVBstore)
  9469  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  9470  		v0.AddArg2(src, mem)
  9471  		v.AddArg3(dst, v0, mem)
  9472  		return true
  9473  	}
  9474  	// match: (Move [2] dst src mem)
  9475  	// result: (MOVHstore dst (MOVHUload src mem) mem)
  9476  	for {
  9477  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
  9478  			break
  9479  		}
  9480  		dst := v_0
  9481  		src := v_1
  9482  		mem := v_2
  9483  		v.Reset(ssaop.OpLOONG64MOVHstore)
  9484  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  9485  		v0.AddArg2(src, mem)
  9486  		v.AddArg3(dst, v0, mem)
  9487  		return true
  9488  	}
  9489  	// match: (Move [3] dst src mem)
  9490  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
  9491  	for {
  9492  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
  9493  			break
  9494  		}
  9495  		dst := v_0
  9496  		src := v_1
  9497  		mem := v_2
  9498  		v.Reset(ssaop.OpLOONG64MOVBstore)
  9499  		v.AuxInt = ssa.Int32ToAuxInt(2)
  9500  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  9501  		v0.AuxInt = ssa.Int32ToAuxInt(2)
  9502  		v0.AddArg2(src, mem)
  9503  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHstore, types.TypeMem)
  9504  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  9505  		v2.AddArg2(src, mem)
  9506  		v1.AddArg3(dst, v2, mem)
  9507  		v.AddArg3(dst, v0, v1)
  9508  		return true
  9509  	}
  9510  	// match: (Move [4] dst src mem)
  9511  	// result: (MOVWstore dst (MOVWUload src mem) mem)
  9512  	for {
  9513  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
  9514  			break
  9515  		}
  9516  		dst := v_0
  9517  		src := v_1
  9518  		mem := v_2
  9519  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9520  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9521  		v0.AddArg2(src, mem)
  9522  		v.AddArg3(dst, v0, mem)
  9523  		return true
  9524  	}
  9525  	// match: (Move [5] dst src mem)
  9526  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9527  	for {
  9528  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
  9529  			break
  9530  		}
  9531  		dst := v_0
  9532  		src := v_1
  9533  		mem := v_2
  9534  		v.Reset(ssaop.OpLOONG64MOVBstore)
  9535  		v.AuxInt = ssa.Int32ToAuxInt(4)
  9536  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  9537  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  9538  		v0.AddArg2(src, mem)
  9539  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
  9540  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9541  		v2.AddArg2(src, mem)
  9542  		v1.AddArg3(dst, v2, mem)
  9543  		v.AddArg3(dst, v0, v1)
  9544  		return true
  9545  	}
  9546  	// match: (Move [6] dst src mem)
  9547  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9548  	for {
  9549  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
  9550  			break
  9551  		}
  9552  		dst := v_0
  9553  		src := v_1
  9554  		mem := v_2
  9555  		v.Reset(ssaop.OpLOONG64MOVHstore)
  9556  		v.AuxInt = ssa.Int32ToAuxInt(4)
  9557  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  9558  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  9559  		v0.AddArg2(src, mem)
  9560  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
  9561  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9562  		v2.AddArg2(src, mem)
  9563  		v1.AddArg3(dst, v2, mem)
  9564  		v.AddArg3(dst, v0, v1)
  9565  		return true
  9566  	}
  9567  	// match: (Move [7] dst src mem)
  9568  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9569  	for {
  9570  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
  9571  			break
  9572  		}
  9573  		dst := v_0
  9574  		src := v_1
  9575  		mem := v_2
  9576  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9577  		v.AuxInt = ssa.Int32ToAuxInt(3)
  9578  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9579  		v0.AuxInt = ssa.Int32ToAuxInt(3)
  9580  		v0.AddArg2(src, mem)
  9581  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
  9582  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9583  		v2.AddArg2(src, mem)
  9584  		v1.AddArg3(dst, v2, mem)
  9585  		v.AddArg3(dst, v0, v1)
  9586  		return true
  9587  	}
  9588  	// match: (Move [8] dst src mem)
  9589  	// result: (MOVVstore dst (MOVVload src mem) mem)
  9590  	for {
  9591  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
  9592  			break
  9593  		}
  9594  		dst := v_0
  9595  		src := v_1
  9596  		mem := v_2
  9597  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9598  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9599  		v0.AddArg2(src, mem)
  9600  		v.AddArg3(dst, v0, mem)
  9601  		return true
  9602  	}
  9603  	// match: (Move [9] dst src mem)
  9604  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9605  	for {
  9606  		if ssa.AuxIntToInt64(v.AuxInt) != 9 {
  9607  			break
  9608  		}
  9609  		dst := v_0
  9610  		src := v_1
  9611  		mem := v_2
  9612  		v.Reset(ssaop.OpLOONG64MOVBstore)
  9613  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9614  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  9615  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9616  		v0.AddArg2(src, mem)
  9617  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9618  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9619  		v2.AddArg2(src, mem)
  9620  		v1.AddArg3(dst, v2, mem)
  9621  		v.AddArg3(dst, v0, v1)
  9622  		return true
  9623  	}
  9624  	// match: (Move [10] dst src mem)
  9625  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9626  	for {
  9627  		if ssa.AuxIntToInt64(v.AuxInt) != 10 {
  9628  			break
  9629  		}
  9630  		dst := v_0
  9631  		src := v_1
  9632  		mem := v_2
  9633  		v.Reset(ssaop.OpLOONG64MOVHstore)
  9634  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9635  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  9636  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9637  		v0.AddArg2(src, mem)
  9638  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9639  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9640  		v2.AddArg2(src, mem)
  9641  		v1.AddArg3(dst, v2, mem)
  9642  		v.AddArg3(dst, v0, v1)
  9643  		return true
  9644  	}
  9645  	// match: (Move [11] dst src mem)
  9646  	// result: (MOVWstore [7] dst (MOVWload [7] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9647  	for {
  9648  		if ssa.AuxIntToInt64(v.AuxInt) != 11 {
  9649  			break
  9650  		}
  9651  		dst := v_0
  9652  		src := v_1
  9653  		mem := v_2
  9654  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9655  		v.AuxInt = ssa.Int32ToAuxInt(7)
  9656  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWload, typ.Int32)
  9657  		v0.AuxInt = ssa.Int32ToAuxInt(7)
  9658  		v0.AddArg2(src, mem)
  9659  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9660  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9661  		v2.AddArg2(src, mem)
  9662  		v1.AddArg3(dst, v2, mem)
  9663  		v.AddArg3(dst, v0, v1)
  9664  		return true
  9665  	}
  9666  	// match: (Move [12] dst src mem)
  9667  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9668  	for {
  9669  		if ssa.AuxIntToInt64(v.AuxInt) != 12 {
  9670  			break
  9671  		}
  9672  		dst := v_0
  9673  		src := v_1
  9674  		mem := v_2
  9675  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9676  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9677  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9678  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9679  		v0.AddArg2(src, mem)
  9680  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9681  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9682  		v2.AddArg2(src, mem)
  9683  		v1.AddArg3(dst, v2, mem)
  9684  		v.AddArg3(dst, v0, v1)
  9685  		return true
  9686  	}
  9687  	// match: (Move [13] dst src mem)
  9688  	// result: (MOVVstore [5] dst (MOVVload [5] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9689  	for {
  9690  		if ssa.AuxIntToInt64(v.AuxInt) != 13 {
  9691  			break
  9692  		}
  9693  		dst := v_0
  9694  		src := v_1
  9695  		mem := v_2
  9696  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9697  		v.AuxInt = ssa.Int32ToAuxInt(5)
  9698  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9699  		v0.AuxInt = ssa.Int32ToAuxInt(5)
  9700  		v0.AddArg2(src, mem)
  9701  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9702  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9703  		v2.AddArg2(src, mem)
  9704  		v1.AddArg3(dst, v2, mem)
  9705  		v.AddArg3(dst, v0, v1)
  9706  		return true
  9707  	}
  9708  	// match: (Move [14] dst src mem)
  9709  	// result: (MOVVstore [6] dst (MOVVload [6] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9710  	for {
  9711  		if ssa.AuxIntToInt64(v.AuxInt) != 14 {
  9712  			break
  9713  		}
  9714  		dst := v_0
  9715  		src := v_1
  9716  		mem := v_2
  9717  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9718  		v.AuxInt = ssa.Int32ToAuxInt(6)
  9719  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9720  		v0.AuxInt = ssa.Int32ToAuxInt(6)
  9721  		v0.AddArg2(src, mem)
  9722  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9723  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9724  		v2.AddArg2(src, mem)
  9725  		v1.AddArg3(dst, v2, mem)
  9726  		v.AddArg3(dst, v0, v1)
  9727  		return true
  9728  	}
  9729  	// match: (Move [15] dst src mem)
  9730  	// result: (MOVVstore [7] dst (MOVVload [7] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9731  	for {
  9732  		if ssa.AuxIntToInt64(v.AuxInt) != 15 {
  9733  			break
  9734  		}
  9735  		dst := v_0
  9736  		src := v_1
  9737  		mem := v_2
  9738  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9739  		v.AuxInt = ssa.Int32ToAuxInt(7)
  9740  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9741  		v0.AuxInt = ssa.Int32ToAuxInt(7)
  9742  		v0.AddArg2(src, mem)
  9743  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9744  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9745  		v2.AddArg2(src, mem)
  9746  		v1.AddArg3(dst, v2, mem)
  9747  		v.AddArg3(dst, v0, v1)
  9748  		return true
  9749  	}
  9750  	// match: (Move [16] dst src mem)
  9751  	// result: (MOVVstore [8] dst (MOVVload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9752  	for {
  9753  		if ssa.AuxIntToInt64(v.AuxInt) != 16 {
  9754  			break
  9755  		}
  9756  		dst := v_0
  9757  		src := v_1
  9758  		mem := v_2
  9759  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9760  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9761  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9762  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9763  		v0.AddArg2(src, mem)
  9764  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9765  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9766  		v2.AddArg2(src, mem)
  9767  		v1.AddArg3(dst, v2, mem)
  9768  		v.AddArg3(dst, v0, v1)
  9769  		return true
  9770  	}
  9771  	// match: (Move [s] dst src mem)
  9772  	// cond: s > 16 && s < 192 && ssa.LogLargeCopyValue(v, s)
  9773  	// result: (LoweredMove [s] dst src mem)
  9774  	for {
  9775  		s := ssa.AuxIntToInt64(v.AuxInt)
  9776  		dst := v_0
  9777  		src := v_1
  9778  		mem := v_2
  9779  		if !(s > 16 && s < 192 && ssa.LogLargeCopyValue(v, s)) {
  9780  			break
  9781  		}
  9782  		v.Reset(ssaop.OpLOONG64LoweredMove)
  9783  		v.AuxInt = ssa.Int64ToAuxInt(s)
  9784  		v.AddArg3(dst, src, mem)
  9785  		return true
  9786  	}
  9787  	// match: (Move [s] dst src mem)
  9788  	// cond: s >= 192 && ssa.LogLargeCopyValue(v, s)
  9789  	// result: (LoweredMoveLoop [s] dst src mem)
  9790  	for {
  9791  		s := ssa.AuxIntToInt64(v.AuxInt)
  9792  		dst := v_0
  9793  		src := v_1
  9794  		mem := v_2
  9795  		if !(s >= 192 && ssa.LogLargeCopyValue(v, s)) {
  9796  			break
  9797  		}
  9798  		v.Reset(ssaop.OpLOONG64LoweredMoveLoop)
  9799  		v.AuxInt = ssa.Int64ToAuxInt(s)
  9800  		v.AddArg3(dst, src, mem)
  9801  		return true
  9802  	}
  9803  	return false
  9804  }
  9805  func rewriteValue_OpNeq16(v *ssa.Value) bool {
  9806  	v_1 := v.Args[1]
  9807  	v_0 := v.Args[0]
  9808  	b := v.Block
  9809  	typ := &b.Func.Config.Types
  9810  	// match: (Neq16 x y)
  9811  	// result: (SGTU (XOR (ZeroExt16to32 x) (ZeroExt16to64 y)) (MOVVconst [0]))
  9812  	for {
  9813  		x := v_0
  9814  		y := v_1
  9815  		v.Reset(ssaop.OpLOONG64SGTU)
  9816  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9817  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  9818  		v1.AddArg(x)
  9819  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9820  		v2.AddArg(y)
  9821  		v0.AddArg2(v1, v2)
  9822  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9823  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  9824  		v.AddArg2(v0, v3)
  9825  		return true
  9826  	}
  9827  }
  9828  func rewriteValue_OpNeq32(v *ssa.Value) bool {
  9829  	v_1 := v.Args[1]
  9830  	v_0 := v.Args[0]
  9831  	b := v.Block
  9832  	typ := &b.Func.Config.Types
  9833  	// match: (Neq32 x y)
  9834  	// result: (SGTU (XOR (ZeroExt32to64 x) (ZeroExt32to64 y)) (MOVVconst [0]))
  9835  	for {
  9836  		x := v_0
  9837  		y := v_1
  9838  		v.Reset(ssaop.OpLOONG64SGTU)
  9839  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9840  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9841  		v1.AddArg(x)
  9842  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9843  		v2.AddArg(y)
  9844  		v0.AddArg2(v1, v2)
  9845  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9846  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  9847  		v.AddArg2(v0, v3)
  9848  		return true
  9849  	}
  9850  }
  9851  func rewriteValue_OpNeq32F(v *ssa.Value) bool {
  9852  	v_1 := v.Args[1]
  9853  	v_0 := v.Args[0]
  9854  	b := v.Block
  9855  	// match: (Neq32F x y)
  9856  	// result: (FPFlagFalse (CMPEQF x y))
  9857  	for {
  9858  		x := v_0
  9859  		y := v_1
  9860  		v.Reset(ssaop.OpLOONG64FPFlagFalse)
  9861  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQF, types.TypeFlags)
  9862  		v0.AddArg2(x, y)
  9863  		v.AddArg(v0)
  9864  		return true
  9865  	}
  9866  }
  9867  func rewriteValue_OpNeq64(v *ssa.Value) bool {
  9868  	v_1 := v.Args[1]
  9869  	v_0 := v.Args[0]
  9870  	b := v.Block
  9871  	typ := &b.Func.Config.Types
  9872  	// match: (Neq64 x y)
  9873  	// result: (SGTU (XOR x y) (MOVVconst [0]))
  9874  	for {
  9875  		x := v_0
  9876  		y := v_1
  9877  		v.Reset(ssaop.OpLOONG64SGTU)
  9878  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9879  		v0.AddArg2(x, y)
  9880  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9881  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  9882  		v.AddArg2(v0, v1)
  9883  		return true
  9884  	}
  9885  }
  9886  func rewriteValue_OpNeq64F(v *ssa.Value) bool {
  9887  	v_1 := v.Args[1]
  9888  	v_0 := v.Args[0]
  9889  	b := v.Block
  9890  	// match: (Neq64F x y)
  9891  	// result: (FPFlagFalse (CMPEQD x y))
  9892  	for {
  9893  		x := v_0
  9894  		y := v_1
  9895  		v.Reset(ssaop.OpLOONG64FPFlagFalse)
  9896  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQD, types.TypeFlags)
  9897  		v0.AddArg2(x, y)
  9898  		v.AddArg(v0)
  9899  		return true
  9900  	}
  9901  }
  9902  func rewriteValue_OpNeq8(v *ssa.Value) bool {
  9903  	v_1 := v.Args[1]
  9904  	v_0 := v.Args[0]
  9905  	b := v.Block
  9906  	typ := &b.Func.Config.Types
  9907  	// match: (Neq8 x y)
  9908  	// result: (SGTU (XOR (ZeroExt8to64 x) (ZeroExt8to64 y)) (MOVVconst [0]))
  9909  	for {
  9910  		x := v_0
  9911  		y := v_1
  9912  		v.Reset(ssaop.OpLOONG64SGTU)
  9913  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9914  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9915  		v1.AddArg(x)
  9916  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9917  		v2.AddArg(y)
  9918  		v0.AddArg2(v1, v2)
  9919  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9920  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  9921  		v.AddArg2(v0, v3)
  9922  		return true
  9923  	}
  9924  }
  9925  func rewriteValue_OpNeqPtr(v *ssa.Value) bool {
  9926  	v_1 := v.Args[1]
  9927  	v_0 := v.Args[0]
  9928  	b := v.Block
  9929  	typ := &b.Func.Config.Types
  9930  	// match: (NeqPtr x y)
  9931  	// result: (SGTU (XOR x y) (MOVVconst [0]))
  9932  	for {
  9933  		x := v_0
  9934  		y := v_1
  9935  		v.Reset(ssaop.OpLOONG64SGTU)
  9936  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9937  		v0.AddArg2(x, y)
  9938  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9939  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  9940  		v.AddArg2(v0, v1)
  9941  		return true
  9942  	}
  9943  }
  9944  func rewriteValue_OpNot(v *ssa.Value) bool {
  9945  	v_0 := v.Args[0]
  9946  	// match: (Not x)
  9947  	// result: (XORconst [1] x)
  9948  	for {
  9949  		x := v_0
  9950  		v.Reset(ssaop.OpLOONG64XORconst)
  9951  		v.AuxInt = ssa.Int64ToAuxInt(1)
  9952  		v.AddArg(x)
  9953  		return true
  9954  	}
  9955  }
  9956  func rewriteValue_OpOffPtr(v *ssa.Value) bool {
  9957  	v_0 := v.Args[0]
  9958  	// match: (OffPtr [off] ptr:(SP))
  9959  	// result: (MOVVaddr [int32(off)] ptr)
  9960  	for {
  9961  		off := ssa.AuxIntToInt64(v.AuxInt)
  9962  		ptr := v_0
  9963  		if ptr.Op != ssaop.OpSP {
  9964  			break
  9965  		}
  9966  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  9967  		v.AuxInt = ssa.Int32ToAuxInt(int32(off))
  9968  		v.AddArg(ptr)
  9969  		return true
  9970  	}
  9971  	// match: (OffPtr [off] ptr)
  9972  	// result: (ADDVconst [off] ptr)
  9973  	for {
  9974  		off := ssa.AuxIntToInt64(v.AuxInt)
  9975  		ptr := v_0
  9976  		v.Reset(ssaop.OpLOONG64ADDVconst)
  9977  		v.AuxInt = ssa.Int64ToAuxInt(off)
  9978  		v.AddArg(ptr)
  9979  		return true
  9980  	}
  9981  }
  9982  func rewriteValue_OpPopCount16(v *ssa.Value) bool {
  9983  	v_0 := v.Args[0]
  9984  	b := v.Block
  9985  	typ := &b.Func.Config.Types
  9986  	// match: (PopCount16 <t> x)
  9987  	// result: (MOVWfpgp <t> (VPCNT16 <typ.Float32> (MOVWgpfp <typ.Float32> (ZeroExt16to32 x))))
  9988  	for {
  9989  		t := v.Type
  9990  		x := v_0
  9991  		v.Reset(ssaop.OpLOONG64MOVWfpgp)
  9992  		v.Type = t
  9993  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64VPCNT16, typ.Float32)
  9994  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWgpfp, typ.Float32)
  9995  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  9996  		v2.AddArg(x)
  9997  		v1.AddArg(v2)
  9998  		v0.AddArg(v1)
  9999  		v.AddArg(v0)
 10000  		return true
 10001  	}
 10002  }
 10003  func rewriteValue_OpPopCount32(v *ssa.Value) bool {
 10004  	v_0 := v.Args[0]
 10005  	b := v.Block
 10006  	typ := &b.Func.Config.Types
 10007  	// match: (PopCount32 <t> x)
 10008  	// result: (MOVWfpgp <t> (VPCNT32 <typ.Float32> (MOVWgpfp <typ.Float32> x)))
 10009  	for {
 10010  		t := v.Type
 10011  		x := v_0
 10012  		v.Reset(ssaop.OpLOONG64MOVWfpgp)
 10013  		v.Type = t
 10014  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64VPCNT32, typ.Float32)
 10015  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWgpfp, typ.Float32)
 10016  		v1.AddArg(x)
 10017  		v0.AddArg(v1)
 10018  		v.AddArg(v0)
 10019  		return true
 10020  	}
 10021  }
 10022  func rewriteValue_OpPopCount64(v *ssa.Value) bool {
 10023  	v_0 := v.Args[0]
 10024  	b := v.Block
 10025  	typ := &b.Func.Config.Types
 10026  	// match: (PopCount64 <t> x)
 10027  	// result: (MOVVfpgp <t> (VPCNT64 <typ.Float64> (MOVVgpfp <typ.Float64> x)))
 10028  	for {
 10029  		t := v.Type
 10030  		x := v_0
 10031  		v.Reset(ssaop.OpLOONG64MOVVfpgp)
 10032  		v.Type = t
 10033  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64VPCNT64, typ.Float64)
 10034  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVgpfp, typ.Float64)
 10035  		v1.AddArg(x)
 10036  		v0.AddArg(v1)
 10037  		v.AddArg(v0)
 10038  		return true
 10039  	}
 10040  }
 10041  func rewriteValue_OpPrefetchCache(v *ssa.Value) bool {
 10042  	v_1 := v.Args[1]
 10043  	v_0 := v.Args[0]
 10044  	// match: (PrefetchCache addr mem)
 10045  	// result: (PRELD addr mem [0])
 10046  	for {
 10047  		addr := v_0
 10048  		mem := v_1
 10049  		v.Reset(ssaop.OpLOONG64PRELD)
 10050  		v.AuxInt = ssa.Int64ToAuxInt(0)
 10051  		v.AddArg2(addr, mem)
 10052  		return true
 10053  	}
 10054  }
 10055  func rewriteValue_OpPrefetchCacheStreamed(v *ssa.Value) bool {
 10056  	v_1 := v.Args[1]
 10057  	v_0 := v.Args[0]
 10058  	// match: (PrefetchCacheStreamed addr mem)
 10059  	// result: (PRELDX addr mem [(((512 << 1) + (1 << 12)) << 5) + 2])
 10060  	for {
 10061  		addr := v_0
 10062  		mem := v_1
 10063  		v.Reset(ssaop.OpLOONG64PRELDX)
 10064  		v.AuxInt = ssa.Int64ToAuxInt((((512 << 1) + (1 << 12)) << 5) + 2)
 10065  		v.AddArg2(addr, mem)
 10066  		return true
 10067  	}
 10068  }
 10069  func rewriteValue_OpRotateLeft16(v *ssa.Value) bool {
 10070  	v_1 := v.Args[1]
 10071  	v_0 := v.Args[0]
 10072  	b := v.Block
 10073  	typ := &b.Func.Config.Types
 10074  	// match: (RotateLeft16 <t> x (MOVVconst [c]))
 10075  	// result: (Or16 (Lsh16x64 <t> x (MOVVconst [c&15])) (Rsh16Ux64 <t> x (MOVVconst [-c&15])))
 10076  	for {
 10077  		t := v.Type
 10078  		x := v_0
 10079  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
 10080  			break
 10081  		}
 10082  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10083  		v.Reset(ssaop.OpOr16)
 10084  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh16x64, t)
 10085  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10086  		v1.AuxInt = ssa.Int64ToAuxInt(c & 15)
 10087  		v0.AddArg2(x, v1)
 10088  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh16Ux64, t)
 10089  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10090  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 15)
 10091  		v2.AddArg2(x, v3)
 10092  		v.AddArg2(v0, v2)
 10093  		return true
 10094  	}
 10095  	// match: (RotateLeft16 <t> x y)
 10096  	// result: (ROTR <t> (OR <typ.UInt32> (ZeroExt16to32 x) (SLLVconst <t> (ZeroExt16to32 x) [16])) (NEGV <typ.Int64> y))
 10097  	for {
 10098  		t := v.Type
 10099  		x := v_0
 10100  		y := v_1
 10101  		v.Reset(ssaop.OpLOONG64ROTR)
 10102  		v.Type = t
 10103  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, typ.UInt32)
 10104  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
 10105  		v1.AddArg(x)
 10106  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, t)
 10107  		v2.AuxInt = ssa.Int64ToAuxInt(16)
 10108  		v2.AddArg(v1)
 10109  		v0.AddArg2(v1, v2)
 10110  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, typ.Int64)
 10111  		v3.AddArg(y)
 10112  		v.AddArg2(v0, v3)
 10113  		return true
 10114  	}
 10115  }
 10116  func rewriteValue_OpRotateLeft32(v *ssa.Value) bool {
 10117  	v_1 := v.Args[1]
 10118  	v_0 := v.Args[0]
 10119  	b := v.Block
 10120  	// match: (RotateLeft32 x y)
 10121  	// result: (ROTR x (NEGV <y.Type> y))
 10122  	for {
 10123  		x := v_0
 10124  		y := v_1
 10125  		v.Reset(ssaop.OpLOONG64ROTR)
 10126  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, y.Type)
 10127  		v0.AddArg(y)
 10128  		v.AddArg2(x, v0)
 10129  		return true
 10130  	}
 10131  }
 10132  func rewriteValue_OpRotateLeft64(v *ssa.Value) bool {
 10133  	v_1 := v.Args[1]
 10134  	v_0 := v.Args[0]
 10135  	b := v.Block
 10136  	// match: (RotateLeft64 x y)
 10137  	// result: (ROTRV x (NEGV <y.Type> y))
 10138  	for {
 10139  		x := v_0
 10140  		y := v_1
 10141  		v.Reset(ssaop.OpLOONG64ROTRV)
 10142  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, y.Type)
 10143  		v0.AddArg(y)
 10144  		v.AddArg2(x, v0)
 10145  		return true
 10146  	}
 10147  }
 10148  func rewriteValue_OpRotateLeft8(v *ssa.Value) bool {
 10149  	v_1 := v.Args[1]
 10150  	v_0 := v.Args[0]
 10151  	b := v.Block
 10152  	typ := &b.Func.Config.Types
 10153  	// match: (RotateLeft8 <t> x (MOVVconst [c]))
 10154  	// result: (Or8 (Lsh8x64 <t> x (MOVVconst [c&7])) (Rsh8Ux64 <t> x (MOVVconst [-c&7])))
 10155  	for {
 10156  		t := v.Type
 10157  		x := v_0
 10158  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
 10159  			break
 10160  		}
 10161  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10162  		v.Reset(ssaop.OpOr8)
 10163  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh8x64, t)
 10164  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10165  		v1.AuxInt = ssa.Int64ToAuxInt(c & 7)
 10166  		v0.AddArg2(x, v1)
 10167  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh8Ux64, t)
 10168  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10169  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 7)
 10170  		v2.AddArg2(x, v3)
 10171  		v.AddArg2(v0, v2)
 10172  		return true
 10173  	}
 10174  	// match: (RotateLeft8 <t> x y)
 10175  	// result: (OR <t> (SLLV <t> x (ANDconst <typ.Int64> [7] y)) (SRLV <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEGV <typ.Int64> y))))
 10176  	for {
 10177  		t := v.Type
 10178  		x := v_0
 10179  		y := v_1
 10180  		v.Reset(ssaop.OpLOONG64OR)
 10181  		v.Type = t
 10182  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
 10183  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.Int64)
 10184  		v1.AuxInt = ssa.Int64ToAuxInt(7)
 10185  		v1.AddArg(y)
 10186  		v0.AddArg2(x, v1)
 10187  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10188  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10189  		v3.AddArg(x)
 10190  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.Int64)
 10191  		v4.AuxInt = ssa.Int64ToAuxInt(7)
 10192  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, typ.Int64)
 10193  		v5.AddArg(y)
 10194  		v4.AddArg(v5)
 10195  		v2.AddArg2(v3, v4)
 10196  		v.AddArg2(v0, v2)
 10197  		return true
 10198  	}
 10199  }
 10200  func rewriteValue_OpRsh16Ux16(v *ssa.Value) bool {
 10201  	v_1 := v.Args[1]
 10202  	v_0 := v.Args[0]
 10203  	b := v.Block
 10204  	typ := &b.Func.Config.Types
 10205  	// match: (Rsh16Ux16 x y)
 10206  	// cond: ssa.ShiftIsBounded(v)
 10207  	// result: (SRLV (ZeroExt16to64 x) y)
 10208  	for {
 10209  		x := v_0
 10210  		y := v_1
 10211  		if !(ssa.ShiftIsBounded(v)) {
 10212  			break
 10213  		}
 10214  		v.Reset(ssaop.OpLOONG64SRLV)
 10215  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10216  		v0.AddArg(x)
 10217  		v.AddArg2(v0, y)
 10218  		return true
 10219  	}
 10220  	// match: (Rsh16Ux16 <t> x y)
 10221  	// cond: !ssa.ShiftIsBounded(v)
 10222  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 10223  	for {
 10224  		t := v.Type
 10225  		x := v_0
 10226  		y := v_1
 10227  		if !(!ssa.ShiftIsBounded(v)) {
 10228  			break
 10229  		}
 10230  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10231  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10232  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10233  		v1.AddArg(x)
 10234  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10235  		v2.AddArg(y)
 10236  		v0.AddArg2(v1, v2)
 10237  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10238  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10239  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 10240  		v3.AddArg2(v4, v2)
 10241  		v.AddArg2(v0, v3)
 10242  		return true
 10243  	}
 10244  	return false
 10245  }
 10246  func rewriteValue_OpRsh16Ux32(v *ssa.Value) bool {
 10247  	v_1 := v.Args[1]
 10248  	v_0 := v.Args[0]
 10249  	b := v.Block
 10250  	typ := &b.Func.Config.Types
 10251  	// match: (Rsh16Ux32 x y)
 10252  	// cond: ssa.ShiftIsBounded(v)
 10253  	// result: (SRLV (ZeroExt16to64 x) y)
 10254  	for {
 10255  		x := v_0
 10256  		y := v_1
 10257  		if !(ssa.ShiftIsBounded(v)) {
 10258  			break
 10259  		}
 10260  		v.Reset(ssaop.OpLOONG64SRLV)
 10261  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10262  		v0.AddArg(x)
 10263  		v.AddArg2(v0, y)
 10264  		return true
 10265  	}
 10266  	// match: (Rsh16Ux32 <t> x y)
 10267  	// cond: !ssa.ShiftIsBounded(v)
 10268  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 10269  	for {
 10270  		t := v.Type
 10271  		x := v_0
 10272  		y := v_1
 10273  		if !(!ssa.ShiftIsBounded(v)) {
 10274  			break
 10275  		}
 10276  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10277  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10278  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10279  		v1.AddArg(x)
 10280  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10281  		v2.AddArg(y)
 10282  		v0.AddArg2(v1, v2)
 10283  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10284  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10285  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 10286  		v3.AddArg2(v4, v2)
 10287  		v.AddArg2(v0, v3)
 10288  		return true
 10289  	}
 10290  	return false
 10291  }
 10292  func rewriteValue_OpRsh16Ux64(v *ssa.Value) bool {
 10293  	v_1 := v.Args[1]
 10294  	v_0 := v.Args[0]
 10295  	b := v.Block
 10296  	typ := &b.Func.Config.Types
 10297  	// match: (Rsh16Ux64 x y)
 10298  	// cond: ssa.ShiftIsBounded(v)
 10299  	// result: (SRLV (ZeroExt16to64 x) y)
 10300  	for {
 10301  		x := v_0
 10302  		y := v_1
 10303  		if !(ssa.ShiftIsBounded(v)) {
 10304  			break
 10305  		}
 10306  		v.Reset(ssaop.OpLOONG64SRLV)
 10307  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10308  		v0.AddArg(x)
 10309  		v.AddArg2(v0, y)
 10310  		return true
 10311  	}
 10312  	// match: (Rsh16Ux64 <t> x y)
 10313  	// cond: !ssa.ShiftIsBounded(v)
 10314  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 10315  	for {
 10316  		t := v.Type
 10317  		x := v_0
 10318  		y := v_1
 10319  		if !(!ssa.ShiftIsBounded(v)) {
 10320  			break
 10321  		}
 10322  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10323  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10324  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10325  		v1.AddArg(x)
 10326  		v0.AddArg2(v1, y)
 10327  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10328  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10329  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 10330  		v2.AddArg2(v3, y)
 10331  		v.AddArg2(v0, v2)
 10332  		return true
 10333  	}
 10334  	return false
 10335  }
 10336  func rewriteValue_OpRsh16Ux8(v *ssa.Value) bool {
 10337  	v_1 := v.Args[1]
 10338  	v_0 := v.Args[0]
 10339  	b := v.Block
 10340  	typ := &b.Func.Config.Types
 10341  	// match: (Rsh16Ux8 x y)
 10342  	// cond: ssa.ShiftIsBounded(v)
 10343  	// result: (SRLV (ZeroExt16to64 x) y)
 10344  	for {
 10345  		x := v_0
 10346  		y := v_1
 10347  		if !(ssa.ShiftIsBounded(v)) {
 10348  			break
 10349  		}
 10350  		v.Reset(ssaop.OpLOONG64SRLV)
 10351  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10352  		v0.AddArg(x)
 10353  		v.AddArg2(v0, y)
 10354  		return true
 10355  	}
 10356  	// match: (Rsh16Ux8 <t> x y)
 10357  	// cond: !ssa.ShiftIsBounded(v)
 10358  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 10359  	for {
 10360  		t := v.Type
 10361  		x := v_0
 10362  		y := v_1
 10363  		if !(!ssa.ShiftIsBounded(v)) {
 10364  			break
 10365  		}
 10366  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10367  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10368  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10369  		v1.AddArg(x)
 10370  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10371  		v2.AddArg(y)
 10372  		v0.AddArg2(v1, v2)
 10373  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10374  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10375  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 10376  		v3.AddArg2(v4, v2)
 10377  		v.AddArg2(v0, v3)
 10378  		return true
 10379  	}
 10380  	return false
 10381  }
 10382  func rewriteValue_OpRsh16x16(v *ssa.Value) bool {
 10383  	v_1 := v.Args[1]
 10384  	v_0 := v.Args[0]
 10385  	b := v.Block
 10386  	typ := &b.Func.Config.Types
 10387  	// match: (Rsh16x16 x y)
 10388  	// cond: ssa.ShiftIsBounded(v)
 10389  	// result: (SRAV (SignExt16to64 x) y)
 10390  	for {
 10391  		x := v_0
 10392  		y := v_1
 10393  		if !(ssa.ShiftIsBounded(v)) {
 10394  			break
 10395  		}
 10396  		v.Reset(ssaop.OpLOONG64SRAV)
 10397  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10398  		v0.AddArg(x)
 10399  		v.AddArg2(v0, y)
 10400  		return true
 10401  	}
 10402  	// match: (Rsh16x16 <t> x y)
 10403  	// cond: !ssa.ShiftIsBounded(v)
 10404  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 10405  	for {
 10406  		t := v.Type
 10407  		x := v_0
 10408  		y := v_1
 10409  		if !(!ssa.ShiftIsBounded(v)) {
 10410  			break
 10411  		}
 10412  		v.Reset(ssaop.OpLOONG64SRAV)
 10413  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10414  		v0.AddArg(x)
 10415  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10416  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10417  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10418  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10419  		v4.AddArg(y)
 10420  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10421  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 10422  		v3.AddArg2(v4, v5)
 10423  		v2.AddArg(v3)
 10424  		v1.AddArg2(v2, v4)
 10425  		v.AddArg2(v0, v1)
 10426  		return true
 10427  	}
 10428  	return false
 10429  }
 10430  func rewriteValue_OpRsh16x32(v *ssa.Value) bool {
 10431  	v_1 := v.Args[1]
 10432  	v_0 := v.Args[0]
 10433  	b := v.Block
 10434  	typ := &b.Func.Config.Types
 10435  	// match: (Rsh16x32 x y)
 10436  	// cond: ssa.ShiftIsBounded(v)
 10437  	// result: (SRAV (SignExt16to64 x) y)
 10438  	for {
 10439  		x := v_0
 10440  		y := v_1
 10441  		if !(ssa.ShiftIsBounded(v)) {
 10442  			break
 10443  		}
 10444  		v.Reset(ssaop.OpLOONG64SRAV)
 10445  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10446  		v0.AddArg(x)
 10447  		v.AddArg2(v0, y)
 10448  		return true
 10449  	}
 10450  	// match: (Rsh16x32 <t> x y)
 10451  	// cond: !ssa.ShiftIsBounded(v)
 10452  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 10453  	for {
 10454  		t := v.Type
 10455  		x := v_0
 10456  		y := v_1
 10457  		if !(!ssa.ShiftIsBounded(v)) {
 10458  			break
 10459  		}
 10460  		v.Reset(ssaop.OpLOONG64SRAV)
 10461  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10462  		v0.AddArg(x)
 10463  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10464  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10465  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10466  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10467  		v4.AddArg(y)
 10468  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10469  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 10470  		v3.AddArg2(v4, v5)
 10471  		v2.AddArg(v3)
 10472  		v1.AddArg2(v2, v4)
 10473  		v.AddArg2(v0, v1)
 10474  		return true
 10475  	}
 10476  	return false
 10477  }
 10478  func rewriteValue_OpRsh16x64(v *ssa.Value) bool {
 10479  	v_1 := v.Args[1]
 10480  	v_0 := v.Args[0]
 10481  	b := v.Block
 10482  	typ := &b.Func.Config.Types
 10483  	// match: (Rsh16x64 x y)
 10484  	// cond: ssa.ShiftIsBounded(v)
 10485  	// result: (SRAV (SignExt16to64 x) y)
 10486  	for {
 10487  		x := v_0
 10488  		y := v_1
 10489  		if !(ssa.ShiftIsBounded(v)) {
 10490  			break
 10491  		}
 10492  		v.Reset(ssaop.OpLOONG64SRAV)
 10493  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10494  		v0.AddArg(x)
 10495  		v.AddArg2(v0, y)
 10496  		return true
 10497  	}
 10498  	// match: (Rsh16x64 <t> x y)
 10499  	// cond: !ssa.ShiftIsBounded(v)
 10500  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 10501  	for {
 10502  		t := v.Type
 10503  		x := v_0
 10504  		y := v_1
 10505  		if !(!ssa.ShiftIsBounded(v)) {
 10506  			break
 10507  		}
 10508  		v.Reset(ssaop.OpLOONG64SRAV)
 10509  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10510  		v0.AddArg(x)
 10511  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10512  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10513  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10514  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10515  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 10516  		v3.AddArg2(y, v4)
 10517  		v2.AddArg(v3)
 10518  		v1.AddArg2(v2, y)
 10519  		v.AddArg2(v0, v1)
 10520  		return true
 10521  	}
 10522  	return false
 10523  }
 10524  func rewriteValue_OpRsh16x8(v *ssa.Value) bool {
 10525  	v_1 := v.Args[1]
 10526  	v_0 := v.Args[0]
 10527  	b := v.Block
 10528  	typ := &b.Func.Config.Types
 10529  	// match: (Rsh16x8 x y)
 10530  	// cond: ssa.ShiftIsBounded(v)
 10531  	// result: (SRAV (SignExt16to64 x) y)
 10532  	for {
 10533  		x := v_0
 10534  		y := v_1
 10535  		if !(ssa.ShiftIsBounded(v)) {
 10536  			break
 10537  		}
 10538  		v.Reset(ssaop.OpLOONG64SRAV)
 10539  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10540  		v0.AddArg(x)
 10541  		v.AddArg2(v0, y)
 10542  		return true
 10543  	}
 10544  	// match: (Rsh16x8 <t> x y)
 10545  	// cond: !ssa.ShiftIsBounded(v)
 10546  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 10547  	for {
 10548  		t := v.Type
 10549  		x := v_0
 10550  		y := v_1
 10551  		if !(!ssa.ShiftIsBounded(v)) {
 10552  			break
 10553  		}
 10554  		v.Reset(ssaop.OpLOONG64SRAV)
 10555  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10556  		v0.AddArg(x)
 10557  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10558  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10559  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10560  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10561  		v4.AddArg(y)
 10562  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10563  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 10564  		v3.AddArg2(v4, v5)
 10565  		v2.AddArg(v3)
 10566  		v1.AddArg2(v2, v4)
 10567  		v.AddArg2(v0, v1)
 10568  		return true
 10569  	}
 10570  	return false
 10571  }
 10572  func rewriteValue_OpRsh32Ux16(v *ssa.Value) bool {
 10573  	v_1 := v.Args[1]
 10574  	v_0 := v.Args[0]
 10575  	b := v.Block
 10576  	typ := &b.Func.Config.Types
 10577  	// match: (Rsh32Ux16 x y)
 10578  	// cond: ssa.ShiftIsBounded(v)
 10579  	// result: (SRL x y)
 10580  	for {
 10581  		x := v_0
 10582  		y := v_1
 10583  		if !(ssa.ShiftIsBounded(v)) {
 10584  			break
 10585  		}
 10586  		v.Reset(ssaop.OpLOONG64SRL)
 10587  		v.AddArg2(x, y)
 10588  		return true
 10589  	}
 10590  	// match: (Rsh32Ux16 <t> x y)
 10591  	// cond: !ssa.ShiftIsBounded(v)
 10592  	// result: (MASKEQZ (SRL <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt16to64 y)))
 10593  	for {
 10594  		t := v.Type
 10595  		x := v_0
 10596  		y := v_1
 10597  		if !(!ssa.ShiftIsBounded(v)) {
 10598  			break
 10599  		}
 10600  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10601  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10602  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10603  		v1.AddArg(y)
 10604  		v0.AddArg2(x, v1)
 10605  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10606  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10607  		v3.AuxInt = ssa.Int64ToAuxInt(32)
 10608  		v2.AddArg2(v3, v1)
 10609  		v.AddArg2(v0, v2)
 10610  		return true
 10611  	}
 10612  	return false
 10613  }
 10614  func rewriteValue_OpRsh32Ux32(v *ssa.Value) bool {
 10615  	v_1 := v.Args[1]
 10616  	v_0 := v.Args[0]
 10617  	b := v.Block
 10618  	typ := &b.Func.Config.Types
 10619  	// match: (Rsh32Ux32 x y)
 10620  	// cond: ssa.ShiftIsBounded(v)
 10621  	// result: (SRL x y)
 10622  	for {
 10623  		x := v_0
 10624  		y := v_1
 10625  		if !(ssa.ShiftIsBounded(v)) {
 10626  			break
 10627  		}
 10628  		v.Reset(ssaop.OpLOONG64SRL)
 10629  		v.AddArg2(x, y)
 10630  		return true
 10631  	}
 10632  	// match: (Rsh32Ux32 <t> x y)
 10633  	// cond: !ssa.ShiftIsBounded(v)
 10634  	// result: (MASKEQZ (SRL <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt32to64 y)))
 10635  	for {
 10636  		t := v.Type
 10637  		x := v_0
 10638  		y := v_1
 10639  		if !(!ssa.ShiftIsBounded(v)) {
 10640  			break
 10641  		}
 10642  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10643  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10644  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10645  		v1.AddArg(y)
 10646  		v0.AddArg2(x, v1)
 10647  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10648  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10649  		v3.AuxInt = ssa.Int64ToAuxInt(32)
 10650  		v2.AddArg2(v3, v1)
 10651  		v.AddArg2(v0, v2)
 10652  		return true
 10653  	}
 10654  	return false
 10655  }
 10656  func rewriteValue_OpRsh32Ux64(v *ssa.Value) bool {
 10657  	v_1 := v.Args[1]
 10658  	v_0 := v.Args[0]
 10659  	b := v.Block
 10660  	typ := &b.Func.Config.Types
 10661  	// match: (Rsh32Ux64 x y)
 10662  	// cond: ssa.ShiftIsBounded(v)
 10663  	// result: (SRL x y)
 10664  	for {
 10665  		x := v_0
 10666  		y := v_1
 10667  		if !(ssa.ShiftIsBounded(v)) {
 10668  			break
 10669  		}
 10670  		v.Reset(ssaop.OpLOONG64SRL)
 10671  		v.AddArg2(x, y)
 10672  		return true
 10673  	}
 10674  	// match: (Rsh32Ux64 <t> x y)
 10675  	// cond: !ssa.ShiftIsBounded(v)
 10676  	// result: (MASKEQZ (SRL <t> x y) (SGTU (MOVVconst <typ.UInt64> [32]) y))
 10677  	for {
 10678  		t := v.Type
 10679  		x := v_0
 10680  		y := v_1
 10681  		if !(!ssa.ShiftIsBounded(v)) {
 10682  			break
 10683  		}
 10684  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10685  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10686  		v0.AddArg2(x, y)
 10687  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10688  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10689  		v2.AuxInt = ssa.Int64ToAuxInt(32)
 10690  		v1.AddArg2(v2, y)
 10691  		v.AddArg2(v0, v1)
 10692  		return true
 10693  	}
 10694  	return false
 10695  }
 10696  func rewriteValue_OpRsh32Ux8(v *ssa.Value) bool {
 10697  	v_1 := v.Args[1]
 10698  	v_0 := v.Args[0]
 10699  	b := v.Block
 10700  	typ := &b.Func.Config.Types
 10701  	// match: (Rsh32Ux8 x y)
 10702  	// cond: ssa.ShiftIsBounded(v)
 10703  	// result: (SRL x y)
 10704  	for {
 10705  		x := v_0
 10706  		y := v_1
 10707  		if !(ssa.ShiftIsBounded(v)) {
 10708  			break
 10709  		}
 10710  		v.Reset(ssaop.OpLOONG64SRL)
 10711  		v.AddArg2(x, y)
 10712  		return true
 10713  	}
 10714  	// match: (Rsh32Ux8 <t> x y)
 10715  	// cond: !ssa.ShiftIsBounded(v)
 10716  	// result: (MASKEQZ (SRL <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt8to64 y)))
 10717  	for {
 10718  		t := v.Type
 10719  		x := v_0
 10720  		y := v_1
 10721  		if !(!ssa.ShiftIsBounded(v)) {
 10722  			break
 10723  		}
 10724  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10725  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10726  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10727  		v1.AddArg(y)
 10728  		v0.AddArg2(x, v1)
 10729  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10730  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10731  		v3.AuxInt = ssa.Int64ToAuxInt(32)
 10732  		v2.AddArg2(v3, v1)
 10733  		v.AddArg2(v0, v2)
 10734  		return true
 10735  	}
 10736  	return false
 10737  }
 10738  func rewriteValue_OpRsh32x16(v *ssa.Value) bool {
 10739  	v_1 := v.Args[1]
 10740  	v_0 := v.Args[0]
 10741  	b := v.Block
 10742  	typ := &b.Func.Config.Types
 10743  	// match: (Rsh32x16 x y)
 10744  	// cond: ssa.ShiftIsBounded(v)
 10745  	// result: (SRA x y)
 10746  	for {
 10747  		x := v_0
 10748  		y := v_1
 10749  		if !(ssa.ShiftIsBounded(v)) {
 10750  			break
 10751  		}
 10752  		v.Reset(ssaop.OpLOONG64SRA)
 10753  		v.AddArg2(x, y)
 10754  		return true
 10755  	}
 10756  	// match: (Rsh32x16 <t> x y)
 10757  	// cond: !ssa.ShiftIsBounded(v)
 10758  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt16to64 y)))
 10759  	for {
 10760  		t := v.Type
 10761  		x := v_0
 10762  		y := v_1
 10763  		if !(!ssa.ShiftIsBounded(v)) {
 10764  			break
 10765  		}
 10766  		v.Reset(ssaop.OpLOONG64SRA)
 10767  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10768  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10769  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10770  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10771  		v3.AddArg(y)
 10772  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10773  		v4.AuxInt = ssa.Int64ToAuxInt(31)
 10774  		v2.AddArg2(v3, v4)
 10775  		v1.AddArg(v2)
 10776  		v0.AddArg2(v1, v3)
 10777  		v.AddArg2(x, v0)
 10778  		return true
 10779  	}
 10780  	return false
 10781  }
 10782  func rewriteValue_OpRsh32x32(v *ssa.Value) bool {
 10783  	v_1 := v.Args[1]
 10784  	v_0 := v.Args[0]
 10785  	b := v.Block
 10786  	typ := &b.Func.Config.Types
 10787  	// match: (Rsh32x32 x y)
 10788  	// cond: ssa.ShiftIsBounded(v)
 10789  	// result: (SRA x y)
 10790  	for {
 10791  		x := v_0
 10792  		y := v_1
 10793  		if !(ssa.ShiftIsBounded(v)) {
 10794  			break
 10795  		}
 10796  		v.Reset(ssaop.OpLOONG64SRA)
 10797  		v.AddArg2(x, y)
 10798  		return true
 10799  	}
 10800  	// match: (Rsh32x32 <t> x y)
 10801  	// cond: !ssa.ShiftIsBounded(v)
 10802  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt32to64 y)))
 10803  	for {
 10804  		t := v.Type
 10805  		x := v_0
 10806  		y := v_1
 10807  		if !(!ssa.ShiftIsBounded(v)) {
 10808  			break
 10809  		}
 10810  		v.Reset(ssaop.OpLOONG64SRA)
 10811  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10812  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10813  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10814  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10815  		v3.AddArg(y)
 10816  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10817  		v4.AuxInt = ssa.Int64ToAuxInt(31)
 10818  		v2.AddArg2(v3, v4)
 10819  		v1.AddArg(v2)
 10820  		v0.AddArg2(v1, v3)
 10821  		v.AddArg2(x, v0)
 10822  		return true
 10823  	}
 10824  	return false
 10825  }
 10826  func rewriteValue_OpRsh32x64(v *ssa.Value) bool {
 10827  	v_1 := v.Args[1]
 10828  	v_0 := v.Args[0]
 10829  	b := v.Block
 10830  	typ := &b.Func.Config.Types
 10831  	// match: (Rsh32x64 x y)
 10832  	// cond: ssa.ShiftIsBounded(v)
 10833  	// result: (SRA x y)
 10834  	for {
 10835  		x := v_0
 10836  		y := v_1
 10837  		if !(ssa.ShiftIsBounded(v)) {
 10838  			break
 10839  		}
 10840  		v.Reset(ssaop.OpLOONG64SRA)
 10841  		v.AddArg2(x, y)
 10842  		return true
 10843  	}
 10844  	// match: (Rsh32x64 <t> x y)
 10845  	// cond: !ssa.ShiftIsBounded(v)
 10846  	// result: (SRA x (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [31]))) y))
 10847  	for {
 10848  		t := v.Type
 10849  		x := v_0
 10850  		y := v_1
 10851  		if !(!ssa.ShiftIsBounded(v)) {
 10852  			break
 10853  		}
 10854  		v.Reset(ssaop.OpLOONG64SRA)
 10855  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10856  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10857  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10858  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10859  		v3.AuxInt = ssa.Int64ToAuxInt(31)
 10860  		v2.AddArg2(y, v3)
 10861  		v1.AddArg(v2)
 10862  		v0.AddArg2(v1, y)
 10863  		v.AddArg2(x, v0)
 10864  		return true
 10865  	}
 10866  	return false
 10867  }
 10868  func rewriteValue_OpRsh32x8(v *ssa.Value) bool {
 10869  	v_1 := v.Args[1]
 10870  	v_0 := v.Args[0]
 10871  	b := v.Block
 10872  	typ := &b.Func.Config.Types
 10873  	// match: (Rsh32x8 x y)
 10874  	// cond: ssa.ShiftIsBounded(v)
 10875  	// result: (SRA x y)
 10876  	for {
 10877  		x := v_0
 10878  		y := v_1
 10879  		if !(ssa.ShiftIsBounded(v)) {
 10880  			break
 10881  		}
 10882  		v.Reset(ssaop.OpLOONG64SRA)
 10883  		v.AddArg2(x, y)
 10884  		return true
 10885  	}
 10886  	// match: (Rsh32x8 <t> x y)
 10887  	// cond: !ssa.ShiftIsBounded(v)
 10888  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt8to64 y)))
 10889  	for {
 10890  		t := v.Type
 10891  		x := v_0
 10892  		y := v_1
 10893  		if !(!ssa.ShiftIsBounded(v)) {
 10894  			break
 10895  		}
 10896  		v.Reset(ssaop.OpLOONG64SRA)
 10897  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10898  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10899  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10900  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10901  		v3.AddArg(y)
 10902  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10903  		v4.AuxInt = ssa.Int64ToAuxInt(31)
 10904  		v2.AddArg2(v3, v4)
 10905  		v1.AddArg(v2)
 10906  		v0.AddArg2(v1, v3)
 10907  		v.AddArg2(x, v0)
 10908  		return true
 10909  	}
 10910  	return false
 10911  }
 10912  func rewriteValue_OpRsh64Ux16(v *ssa.Value) bool {
 10913  	v_1 := v.Args[1]
 10914  	v_0 := v.Args[0]
 10915  	b := v.Block
 10916  	typ := &b.Func.Config.Types
 10917  	// match: (Rsh64Ux16 x y)
 10918  	// cond: ssa.ShiftIsBounded(v)
 10919  	// result: (SRLV x y)
 10920  	for {
 10921  		x := v_0
 10922  		y := v_1
 10923  		if !(ssa.ShiftIsBounded(v)) {
 10924  			break
 10925  		}
 10926  		v.Reset(ssaop.OpLOONG64SRLV)
 10927  		v.AddArg2(x, y)
 10928  		return true
 10929  	}
 10930  	// match: (Rsh64Ux16 <t> x y)
 10931  	// cond: !ssa.ShiftIsBounded(v)
 10932  	// result: (MASKEQZ (SRLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 10933  	for {
 10934  		t := v.Type
 10935  		x := v_0
 10936  		y := v_1
 10937  		if !(!ssa.ShiftIsBounded(v)) {
 10938  			break
 10939  		}
 10940  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10941  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10942  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10943  		v1.AddArg(y)
 10944  		v0.AddArg2(x, v1)
 10945  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10946  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10947  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 10948  		v2.AddArg2(v3, v1)
 10949  		v.AddArg2(v0, v2)
 10950  		return true
 10951  	}
 10952  	return false
 10953  }
 10954  func rewriteValue_OpRsh64Ux32(v *ssa.Value) bool {
 10955  	v_1 := v.Args[1]
 10956  	v_0 := v.Args[0]
 10957  	b := v.Block
 10958  	typ := &b.Func.Config.Types
 10959  	// match: (Rsh64Ux32 x y)
 10960  	// cond: ssa.ShiftIsBounded(v)
 10961  	// result: (SRLV x y)
 10962  	for {
 10963  		x := v_0
 10964  		y := v_1
 10965  		if !(ssa.ShiftIsBounded(v)) {
 10966  			break
 10967  		}
 10968  		v.Reset(ssaop.OpLOONG64SRLV)
 10969  		v.AddArg2(x, y)
 10970  		return true
 10971  	}
 10972  	// match: (Rsh64Ux32 <t> x y)
 10973  	// cond: !ssa.ShiftIsBounded(v)
 10974  	// result: (MASKEQZ (SRLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 10975  	for {
 10976  		t := v.Type
 10977  		x := v_0
 10978  		y := v_1
 10979  		if !(!ssa.ShiftIsBounded(v)) {
 10980  			break
 10981  		}
 10982  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10983  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10984  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10985  		v1.AddArg(y)
 10986  		v0.AddArg2(x, v1)
 10987  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10988  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10989  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 10990  		v2.AddArg2(v3, v1)
 10991  		v.AddArg2(v0, v2)
 10992  		return true
 10993  	}
 10994  	return false
 10995  }
 10996  func rewriteValue_OpRsh64Ux64(v *ssa.Value) bool {
 10997  	v_1 := v.Args[1]
 10998  	v_0 := v.Args[0]
 10999  	b := v.Block
 11000  	typ := &b.Func.Config.Types
 11001  	// match: (Rsh64Ux64 x y)
 11002  	// cond: ssa.ShiftIsBounded(v)
 11003  	// result: (SRLV x y)
 11004  	for {
 11005  		x := v_0
 11006  		y := v_1
 11007  		if !(ssa.ShiftIsBounded(v)) {
 11008  			break
 11009  		}
 11010  		v.Reset(ssaop.OpLOONG64SRLV)
 11011  		v.AddArg2(x, y)
 11012  		return true
 11013  	}
 11014  	// match: (Rsh64Ux64 <t> x y)
 11015  	// cond: !ssa.ShiftIsBounded(v)
 11016  	// result: (MASKEQZ (SRLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 11017  	for {
 11018  		t := v.Type
 11019  		x := v_0
 11020  		y := v_1
 11021  		if !(!ssa.ShiftIsBounded(v)) {
 11022  			break
 11023  		}
 11024  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 11025  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 11026  		v0.AddArg2(x, y)
 11027  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11028  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11029  		v2.AuxInt = ssa.Int64ToAuxInt(64)
 11030  		v1.AddArg2(v2, y)
 11031  		v.AddArg2(v0, v1)
 11032  		return true
 11033  	}
 11034  	return false
 11035  }
 11036  func rewriteValue_OpRsh64Ux8(v *ssa.Value) bool {
 11037  	v_1 := v.Args[1]
 11038  	v_0 := v.Args[0]
 11039  	b := v.Block
 11040  	typ := &b.Func.Config.Types
 11041  	// match: (Rsh64Ux8 x y)
 11042  	// cond: ssa.ShiftIsBounded(v)
 11043  	// result: (SRLV x y)
 11044  	for {
 11045  		x := v_0
 11046  		y := v_1
 11047  		if !(ssa.ShiftIsBounded(v)) {
 11048  			break
 11049  		}
 11050  		v.Reset(ssaop.OpLOONG64SRLV)
 11051  		v.AddArg2(x, y)
 11052  		return true
 11053  	}
 11054  	// match: (Rsh64Ux8 <t> x y)
 11055  	// cond: !ssa.ShiftIsBounded(v)
 11056  	// result: (MASKEQZ (SRLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 11057  	for {
 11058  		t := v.Type
 11059  		x := v_0
 11060  		y := v_1
 11061  		if !(!ssa.ShiftIsBounded(v)) {
 11062  			break
 11063  		}
 11064  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 11065  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 11066  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11067  		v1.AddArg(y)
 11068  		v0.AddArg2(x, v1)
 11069  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11070  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11071  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 11072  		v2.AddArg2(v3, v1)
 11073  		v.AddArg2(v0, v2)
 11074  		return true
 11075  	}
 11076  	return false
 11077  }
 11078  func rewriteValue_OpRsh64x16(v *ssa.Value) bool {
 11079  	v_1 := v.Args[1]
 11080  	v_0 := v.Args[0]
 11081  	b := v.Block
 11082  	typ := &b.Func.Config.Types
 11083  	// match: (Rsh64x16 x y)
 11084  	// cond: ssa.ShiftIsBounded(v)
 11085  	// result: (SRAV x y)
 11086  	for {
 11087  		x := v_0
 11088  		y := v_1
 11089  		if !(ssa.ShiftIsBounded(v)) {
 11090  			break
 11091  		}
 11092  		v.Reset(ssaop.OpLOONG64SRAV)
 11093  		v.AddArg2(x, y)
 11094  		return true
 11095  	}
 11096  	// match: (Rsh64x16 <t> x y)
 11097  	// cond: !ssa.ShiftIsBounded(v)
 11098  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 11099  	for {
 11100  		t := v.Type
 11101  		x := v_0
 11102  		y := v_1
 11103  		if !(!ssa.ShiftIsBounded(v)) {
 11104  			break
 11105  		}
 11106  		v.Reset(ssaop.OpLOONG64SRAV)
 11107  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11108  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11109  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11110  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 11111  		v3.AddArg(y)
 11112  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11113  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 11114  		v2.AddArg2(v3, v4)
 11115  		v1.AddArg(v2)
 11116  		v0.AddArg2(v1, v3)
 11117  		v.AddArg2(x, v0)
 11118  		return true
 11119  	}
 11120  	return false
 11121  }
 11122  func rewriteValue_OpRsh64x32(v *ssa.Value) bool {
 11123  	v_1 := v.Args[1]
 11124  	v_0 := v.Args[0]
 11125  	b := v.Block
 11126  	typ := &b.Func.Config.Types
 11127  	// match: (Rsh64x32 x y)
 11128  	// cond: ssa.ShiftIsBounded(v)
 11129  	// result: (SRAV x y)
 11130  	for {
 11131  		x := v_0
 11132  		y := v_1
 11133  		if !(ssa.ShiftIsBounded(v)) {
 11134  			break
 11135  		}
 11136  		v.Reset(ssaop.OpLOONG64SRAV)
 11137  		v.AddArg2(x, y)
 11138  		return true
 11139  	}
 11140  	// match: (Rsh64x32 <t> x y)
 11141  	// cond: !ssa.ShiftIsBounded(v)
 11142  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 11143  	for {
 11144  		t := v.Type
 11145  		x := v_0
 11146  		y := v_1
 11147  		if !(!ssa.ShiftIsBounded(v)) {
 11148  			break
 11149  		}
 11150  		v.Reset(ssaop.OpLOONG64SRAV)
 11151  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11152  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11153  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11154  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 11155  		v3.AddArg(y)
 11156  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11157  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 11158  		v2.AddArg2(v3, v4)
 11159  		v1.AddArg(v2)
 11160  		v0.AddArg2(v1, v3)
 11161  		v.AddArg2(x, v0)
 11162  		return true
 11163  	}
 11164  	return false
 11165  }
 11166  func rewriteValue_OpRsh64x64(v *ssa.Value) bool {
 11167  	v_1 := v.Args[1]
 11168  	v_0 := v.Args[0]
 11169  	b := v.Block
 11170  	typ := &b.Func.Config.Types
 11171  	// match: (Rsh64x64 x y)
 11172  	// cond: ssa.ShiftIsBounded(v)
 11173  	// result: (SRAV x y)
 11174  	for {
 11175  		x := v_0
 11176  		y := v_1
 11177  		if !(ssa.ShiftIsBounded(v)) {
 11178  			break
 11179  		}
 11180  		v.Reset(ssaop.OpLOONG64SRAV)
 11181  		v.AddArg2(x, y)
 11182  		return true
 11183  	}
 11184  	// match: (Rsh64x64 <t> x y)
 11185  	// cond: !ssa.ShiftIsBounded(v)
 11186  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 11187  	for {
 11188  		t := v.Type
 11189  		x := v_0
 11190  		y := v_1
 11191  		if !(!ssa.ShiftIsBounded(v)) {
 11192  			break
 11193  		}
 11194  		v.Reset(ssaop.OpLOONG64SRAV)
 11195  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11196  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11197  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11198  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11199  		v3.AuxInt = ssa.Int64ToAuxInt(63)
 11200  		v2.AddArg2(y, v3)
 11201  		v1.AddArg(v2)
 11202  		v0.AddArg2(v1, y)
 11203  		v.AddArg2(x, v0)
 11204  		return true
 11205  	}
 11206  	return false
 11207  }
 11208  func rewriteValue_OpRsh64x8(v *ssa.Value) bool {
 11209  	v_1 := v.Args[1]
 11210  	v_0 := v.Args[0]
 11211  	b := v.Block
 11212  	typ := &b.Func.Config.Types
 11213  	// match: (Rsh64x8 x y)
 11214  	// cond: ssa.ShiftIsBounded(v)
 11215  	// result: (SRAV x y)
 11216  	for {
 11217  		x := v_0
 11218  		y := v_1
 11219  		if !(ssa.ShiftIsBounded(v)) {
 11220  			break
 11221  		}
 11222  		v.Reset(ssaop.OpLOONG64SRAV)
 11223  		v.AddArg2(x, y)
 11224  		return true
 11225  	}
 11226  	// match: (Rsh64x8 <t> x y)
 11227  	// cond: !ssa.ShiftIsBounded(v)
 11228  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 11229  	for {
 11230  		t := v.Type
 11231  		x := v_0
 11232  		y := v_1
 11233  		if !(!ssa.ShiftIsBounded(v)) {
 11234  			break
 11235  		}
 11236  		v.Reset(ssaop.OpLOONG64SRAV)
 11237  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11238  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11239  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11240  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11241  		v3.AddArg(y)
 11242  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11243  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 11244  		v2.AddArg2(v3, v4)
 11245  		v1.AddArg(v2)
 11246  		v0.AddArg2(v1, v3)
 11247  		v.AddArg2(x, v0)
 11248  		return true
 11249  	}
 11250  	return false
 11251  }
 11252  func rewriteValue_OpRsh8Ux16(v *ssa.Value) bool {
 11253  	v_1 := v.Args[1]
 11254  	v_0 := v.Args[0]
 11255  	b := v.Block
 11256  	typ := &b.Func.Config.Types
 11257  	// match: (Rsh8Ux16 x y)
 11258  	// cond: ssa.ShiftIsBounded(v)
 11259  	// result: (SRLV (ZeroExt8to64 x) y)
 11260  	for {
 11261  		x := v_0
 11262  		y := v_1
 11263  		if !(ssa.ShiftIsBounded(v)) {
 11264  			break
 11265  		}
 11266  		v.Reset(ssaop.OpLOONG64SRLV)
 11267  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11268  		v0.AddArg(x)
 11269  		v.AddArg2(v0, y)
 11270  		return true
 11271  	}
 11272  	// match: (Rsh8Ux16 <t> x y)
 11273  	// cond: !ssa.ShiftIsBounded(v)
 11274  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 11275  	for {
 11276  		t := v.Type
 11277  		x := v_0
 11278  		y := v_1
 11279  		if !(!ssa.ShiftIsBounded(v)) {
 11280  			break
 11281  		}
 11282  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 11283  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 11284  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11285  		v1.AddArg(x)
 11286  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 11287  		v2.AddArg(y)
 11288  		v0.AddArg2(v1, v2)
 11289  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11290  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11291  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 11292  		v3.AddArg2(v4, v2)
 11293  		v.AddArg2(v0, v3)
 11294  		return true
 11295  	}
 11296  	return false
 11297  }
 11298  func rewriteValue_OpRsh8Ux32(v *ssa.Value) bool {
 11299  	v_1 := v.Args[1]
 11300  	v_0 := v.Args[0]
 11301  	b := v.Block
 11302  	typ := &b.Func.Config.Types
 11303  	// match: (Rsh8Ux32 x y)
 11304  	// cond: ssa.ShiftIsBounded(v)
 11305  	// result: (SRLV (ZeroExt8to64 x) y)
 11306  	for {
 11307  		x := v_0
 11308  		y := v_1
 11309  		if !(ssa.ShiftIsBounded(v)) {
 11310  			break
 11311  		}
 11312  		v.Reset(ssaop.OpLOONG64SRLV)
 11313  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11314  		v0.AddArg(x)
 11315  		v.AddArg2(v0, y)
 11316  		return true
 11317  	}
 11318  	// match: (Rsh8Ux32 <t> x y)
 11319  	// cond: !ssa.ShiftIsBounded(v)
 11320  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 11321  	for {
 11322  		t := v.Type
 11323  		x := v_0
 11324  		y := v_1
 11325  		if !(!ssa.ShiftIsBounded(v)) {
 11326  			break
 11327  		}
 11328  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 11329  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 11330  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11331  		v1.AddArg(x)
 11332  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 11333  		v2.AddArg(y)
 11334  		v0.AddArg2(v1, v2)
 11335  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11336  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11337  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 11338  		v3.AddArg2(v4, v2)
 11339  		v.AddArg2(v0, v3)
 11340  		return true
 11341  	}
 11342  	return false
 11343  }
 11344  func rewriteValue_OpRsh8Ux64(v *ssa.Value) bool {
 11345  	v_1 := v.Args[1]
 11346  	v_0 := v.Args[0]
 11347  	b := v.Block
 11348  	typ := &b.Func.Config.Types
 11349  	// match: (Rsh8Ux64 x y)
 11350  	// cond: ssa.ShiftIsBounded(v)
 11351  	// result: (SRLV (ZeroExt8to64 x) y)
 11352  	for {
 11353  		x := v_0
 11354  		y := v_1
 11355  		if !(ssa.ShiftIsBounded(v)) {
 11356  			break
 11357  		}
 11358  		v.Reset(ssaop.OpLOONG64SRLV)
 11359  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11360  		v0.AddArg(x)
 11361  		v.AddArg2(v0, y)
 11362  		return true
 11363  	}
 11364  	// match: (Rsh8Ux64 <t> x y)
 11365  	// cond: !ssa.ShiftIsBounded(v)
 11366  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 11367  	for {
 11368  		t := v.Type
 11369  		x := v_0
 11370  		y := v_1
 11371  		if !(!ssa.ShiftIsBounded(v)) {
 11372  			break
 11373  		}
 11374  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 11375  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 11376  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11377  		v1.AddArg(x)
 11378  		v0.AddArg2(v1, y)
 11379  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11380  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11381  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 11382  		v2.AddArg2(v3, y)
 11383  		v.AddArg2(v0, v2)
 11384  		return true
 11385  	}
 11386  	return false
 11387  }
 11388  func rewriteValue_OpRsh8Ux8(v *ssa.Value) bool {
 11389  	v_1 := v.Args[1]
 11390  	v_0 := v.Args[0]
 11391  	b := v.Block
 11392  	typ := &b.Func.Config.Types
 11393  	// match: (Rsh8Ux8 x y)
 11394  	// cond: ssa.ShiftIsBounded(v)
 11395  	// result: (SRLV (ZeroExt8to64 x) y)
 11396  	for {
 11397  		x := v_0
 11398  		y := v_1
 11399  		if !(ssa.ShiftIsBounded(v)) {
 11400  			break
 11401  		}
 11402  		v.Reset(ssaop.OpLOONG64SRLV)
 11403  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11404  		v0.AddArg(x)
 11405  		v.AddArg2(v0, y)
 11406  		return true
 11407  	}
 11408  	// match: (Rsh8Ux8 <t> x y)
 11409  	// cond: !ssa.ShiftIsBounded(v)
 11410  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 11411  	for {
 11412  		t := v.Type
 11413  		x := v_0
 11414  		y := v_1
 11415  		if !(!ssa.ShiftIsBounded(v)) {
 11416  			break
 11417  		}
 11418  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 11419  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 11420  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11421  		v1.AddArg(x)
 11422  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11423  		v2.AddArg(y)
 11424  		v0.AddArg2(v1, v2)
 11425  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11426  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11427  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 11428  		v3.AddArg2(v4, v2)
 11429  		v.AddArg2(v0, v3)
 11430  		return true
 11431  	}
 11432  	return false
 11433  }
 11434  func rewriteValue_OpRsh8x16(v *ssa.Value) bool {
 11435  	v_1 := v.Args[1]
 11436  	v_0 := v.Args[0]
 11437  	b := v.Block
 11438  	typ := &b.Func.Config.Types
 11439  	// match: (Rsh8x16 x y)
 11440  	// cond: ssa.ShiftIsBounded(v)
 11441  	// result: (SRAV (SignExt8to64 x) y)
 11442  	for {
 11443  		x := v_0
 11444  		y := v_1
 11445  		if !(ssa.ShiftIsBounded(v)) {
 11446  			break
 11447  		}
 11448  		v.Reset(ssaop.OpLOONG64SRAV)
 11449  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11450  		v0.AddArg(x)
 11451  		v.AddArg2(v0, y)
 11452  		return true
 11453  	}
 11454  	// match: (Rsh8x16 <t> x y)
 11455  	// cond: !ssa.ShiftIsBounded(v)
 11456  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 11457  	for {
 11458  		t := v.Type
 11459  		x := v_0
 11460  		y := v_1
 11461  		if !(!ssa.ShiftIsBounded(v)) {
 11462  			break
 11463  		}
 11464  		v.Reset(ssaop.OpLOONG64SRAV)
 11465  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11466  		v0.AddArg(x)
 11467  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11468  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11469  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11470  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 11471  		v4.AddArg(y)
 11472  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11473  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 11474  		v3.AddArg2(v4, v5)
 11475  		v2.AddArg(v3)
 11476  		v1.AddArg2(v2, v4)
 11477  		v.AddArg2(v0, v1)
 11478  		return true
 11479  	}
 11480  	return false
 11481  }
 11482  func rewriteValue_OpRsh8x32(v *ssa.Value) bool {
 11483  	v_1 := v.Args[1]
 11484  	v_0 := v.Args[0]
 11485  	b := v.Block
 11486  	typ := &b.Func.Config.Types
 11487  	// match: (Rsh8x32 x y)
 11488  	// cond: ssa.ShiftIsBounded(v)
 11489  	// result: (SRAV (SignExt8to64 x) y)
 11490  	for {
 11491  		x := v_0
 11492  		y := v_1
 11493  		if !(ssa.ShiftIsBounded(v)) {
 11494  			break
 11495  		}
 11496  		v.Reset(ssaop.OpLOONG64SRAV)
 11497  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11498  		v0.AddArg(x)
 11499  		v.AddArg2(v0, y)
 11500  		return true
 11501  	}
 11502  	// match: (Rsh8x32 <t> x y)
 11503  	// cond: !ssa.ShiftIsBounded(v)
 11504  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 11505  	for {
 11506  		t := v.Type
 11507  		x := v_0
 11508  		y := v_1
 11509  		if !(!ssa.ShiftIsBounded(v)) {
 11510  			break
 11511  		}
 11512  		v.Reset(ssaop.OpLOONG64SRAV)
 11513  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11514  		v0.AddArg(x)
 11515  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11516  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11517  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11518  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 11519  		v4.AddArg(y)
 11520  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11521  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 11522  		v3.AddArg2(v4, v5)
 11523  		v2.AddArg(v3)
 11524  		v1.AddArg2(v2, v4)
 11525  		v.AddArg2(v0, v1)
 11526  		return true
 11527  	}
 11528  	return false
 11529  }
 11530  func rewriteValue_OpRsh8x64(v *ssa.Value) bool {
 11531  	v_1 := v.Args[1]
 11532  	v_0 := v.Args[0]
 11533  	b := v.Block
 11534  	typ := &b.Func.Config.Types
 11535  	// match: (Rsh8x64 x y)
 11536  	// cond: ssa.ShiftIsBounded(v)
 11537  	// result: (SRAV (SignExt8to64 x) y)
 11538  	for {
 11539  		x := v_0
 11540  		y := v_1
 11541  		if !(ssa.ShiftIsBounded(v)) {
 11542  			break
 11543  		}
 11544  		v.Reset(ssaop.OpLOONG64SRAV)
 11545  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11546  		v0.AddArg(x)
 11547  		v.AddArg2(v0, y)
 11548  		return true
 11549  	}
 11550  	// match: (Rsh8x64 <t> x y)
 11551  	// cond: !ssa.ShiftIsBounded(v)
 11552  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 11553  	for {
 11554  		t := v.Type
 11555  		x := v_0
 11556  		y := v_1
 11557  		if !(!ssa.ShiftIsBounded(v)) {
 11558  			break
 11559  		}
 11560  		v.Reset(ssaop.OpLOONG64SRAV)
 11561  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11562  		v0.AddArg(x)
 11563  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11564  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11565  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11566  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11567  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 11568  		v3.AddArg2(y, v4)
 11569  		v2.AddArg(v3)
 11570  		v1.AddArg2(v2, y)
 11571  		v.AddArg2(v0, v1)
 11572  		return true
 11573  	}
 11574  	return false
 11575  }
 11576  func rewriteValue_OpRsh8x8(v *ssa.Value) bool {
 11577  	v_1 := v.Args[1]
 11578  	v_0 := v.Args[0]
 11579  	b := v.Block
 11580  	typ := &b.Func.Config.Types
 11581  	// match: (Rsh8x8 x y)
 11582  	// cond: ssa.ShiftIsBounded(v)
 11583  	// result: (SRAV (SignExt8to64 x) y)
 11584  	for {
 11585  		x := v_0
 11586  		y := v_1
 11587  		if !(ssa.ShiftIsBounded(v)) {
 11588  			break
 11589  		}
 11590  		v.Reset(ssaop.OpLOONG64SRAV)
 11591  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11592  		v0.AddArg(x)
 11593  		v.AddArg2(v0, y)
 11594  		return true
 11595  	}
 11596  	// match: (Rsh8x8 <t> x y)
 11597  	// cond: !ssa.ShiftIsBounded(v)
 11598  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 11599  	for {
 11600  		t := v.Type
 11601  		x := v_0
 11602  		y := v_1
 11603  		if !(!ssa.ShiftIsBounded(v)) {
 11604  			break
 11605  		}
 11606  		v.Reset(ssaop.OpLOONG64SRAV)
 11607  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11608  		v0.AddArg(x)
 11609  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11610  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11611  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11612  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11613  		v4.AddArg(y)
 11614  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11615  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 11616  		v3.AddArg2(v4, v5)
 11617  		v2.AddArg(v3)
 11618  		v1.AddArg2(v2, v4)
 11619  		v.AddArg2(v0, v1)
 11620  		return true
 11621  	}
 11622  	return false
 11623  }
 11624  func rewriteValue_OpSelect0(v *ssa.Value) bool {
 11625  	v_0 := v.Args[0]
 11626  	b := v.Block
 11627  	// match: (Select0 (Mul64uhilo x y))
 11628  	// result: (MULHVU x y)
 11629  	for {
 11630  		if v_0.Op != ssaop.OpMul64uhilo {
 11631  			break
 11632  		}
 11633  		y := v_0.Args[1]
 11634  		x := v_0.Args[0]
 11635  		v.Reset(ssaop.OpLOONG64MULHVU)
 11636  		v.AddArg2(x, y)
 11637  		return true
 11638  	}
 11639  	// match: (Select0 (Mul64uover x y))
 11640  	// result: (MULV x y)
 11641  	for {
 11642  		if v_0.Op != ssaop.OpMul64uover {
 11643  			break
 11644  		}
 11645  		y := v_0.Args[1]
 11646  		x := v_0.Args[0]
 11647  		v.Reset(ssaop.OpLOONG64MULV)
 11648  		v.AddArg2(x, y)
 11649  		return true
 11650  	}
 11651  	// match: (Select0 <t> (Add64carry x y c))
 11652  	// result: (ADDV (ADDV <t> x y) c)
 11653  	for {
 11654  		t := v.Type
 11655  		if v_0.Op != ssaop.OpAdd64carry {
 11656  			break
 11657  		}
 11658  		c := v_0.Args[2]
 11659  		x := v_0.Args[0]
 11660  		y := v_0.Args[1]
 11661  		v.Reset(ssaop.OpLOONG64ADDV)
 11662  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ADDV, t)
 11663  		v0.AddArg2(x, y)
 11664  		v.AddArg2(v0, c)
 11665  		return true
 11666  	}
 11667  	// match: (Select0 <t> (Sub64borrow x y c))
 11668  	// result: (SUBV (SUBV <t> x y) c)
 11669  	for {
 11670  		t := v.Type
 11671  		if v_0.Op != ssaop.OpSub64borrow {
 11672  			break
 11673  		}
 11674  		c := v_0.Args[2]
 11675  		x := v_0.Args[0]
 11676  		y := v_0.Args[1]
 11677  		v.Reset(ssaop.OpLOONG64SUBV)
 11678  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
 11679  		v0.AddArg2(x, y)
 11680  		v.AddArg2(v0, c)
 11681  		return true
 11682  	}
 11683  	return false
 11684  }
 11685  func rewriteValue_OpSelect1(v *ssa.Value) bool {
 11686  	v_0 := v.Args[0]
 11687  	b := v.Block
 11688  	typ := &b.Func.Config.Types
 11689  	// match: (Select1 (Mul64uhilo x y))
 11690  	// result: (MULV x y)
 11691  	for {
 11692  		if v_0.Op != ssaop.OpMul64uhilo {
 11693  			break
 11694  		}
 11695  		y := v_0.Args[1]
 11696  		x := v_0.Args[0]
 11697  		v.Reset(ssaop.OpLOONG64MULV)
 11698  		v.AddArg2(x, y)
 11699  		return true
 11700  	}
 11701  	// match: (Select1 (Mul64uover x y))
 11702  	// result: (SGTU <typ.Bool> (MULHVU x y) (MOVVconst <typ.UInt64> [0]))
 11703  	for {
 11704  		if v_0.Op != ssaop.OpMul64uover {
 11705  			break
 11706  		}
 11707  		y := v_0.Args[1]
 11708  		x := v_0.Args[0]
 11709  		v.Reset(ssaop.OpLOONG64SGTU)
 11710  		v.Type = typ.Bool
 11711  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MULHVU, typ.UInt64)
 11712  		v0.AddArg2(x, y)
 11713  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11714  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 11715  		v.AddArg2(v0, v1)
 11716  		return true
 11717  	}
 11718  	// match: (Select1 <t> (Add64carry x y c))
 11719  	// result: (OR (SGTU <t> x s:(ADDV <t> x y)) (SGTU <t> s (ADDV <t> s c)))
 11720  	for {
 11721  		t := v.Type
 11722  		if v_0.Op != ssaop.OpAdd64carry {
 11723  			break
 11724  		}
 11725  		c := v_0.Args[2]
 11726  		x := v_0.Args[0]
 11727  		y := v_0.Args[1]
 11728  		v.Reset(ssaop.OpLOONG64OR)
 11729  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11730  		s := b.NewValue0(v.Pos, ssaop.OpLOONG64ADDV, t)
 11731  		s.AddArg2(x, y)
 11732  		v0.AddArg2(x, s)
 11733  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11734  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64ADDV, t)
 11735  		v3.AddArg2(s, c)
 11736  		v2.AddArg2(s, v3)
 11737  		v.AddArg2(v0, v2)
 11738  		return true
 11739  	}
 11740  	// match: (Select1 <t> (Sub64borrow x y c))
 11741  	// result: (OR (SGTU <t> s:(SUBV <t> x y) x) (SGTU <t> (SUBV <t> s c) s))
 11742  	for {
 11743  		t := v.Type
 11744  		if v_0.Op != ssaop.OpSub64borrow {
 11745  			break
 11746  		}
 11747  		c := v_0.Args[2]
 11748  		x := v_0.Args[0]
 11749  		y := v_0.Args[1]
 11750  		v.Reset(ssaop.OpLOONG64OR)
 11751  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11752  		s := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
 11753  		s.AddArg2(x, y)
 11754  		v0.AddArg2(s, x)
 11755  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11756  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
 11757  		v3.AddArg2(s, c)
 11758  		v2.AddArg2(v3, s)
 11759  		v.AddArg2(v0, v2)
 11760  		return true
 11761  	}
 11762  	return false
 11763  }
 11764  func rewriteValue_OpSelectN(v *ssa.Value) bool {
 11765  	v_0 := v.Args[0]
 11766  	b := v.Block
 11767  	config := b.Func.Config
 11768  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVVconst [sz]) mem))
 11769  	// cond: sz >= 0 && ssa.IsSameCall(sym, "runtime.memmove") && call.Uses == 1 && ssa.IsInlinableMemmove(dst, src, sz, config) && ssa.Clobber(call)
 11770  	// result: (Move [sz] dst src mem)
 11771  	for {
 11772  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 11773  			break
 11774  		}
 11775  		call := v_0
 11776  		if call.Op != ssaop.OpLOONG64CALLstatic || len(call.Args) != 4 {
 11777  			break
 11778  		}
 11779  		sym := ssa.AuxToCall(call.Aux)
 11780  		mem := call.Args[3]
 11781  		dst := call.Args[0]
 11782  		src := call.Args[1]
 11783  		call_2 := call.Args[2]
 11784  		if call_2.Op != ssaop.OpLOONG64MOVVconst {
 11785  			break
 11786  		}
 11787  		sz := ssa.AuxIntToInt64(call_2.AuxInt)
 11788  		if !(sz >= 0 && ssa.IsSameCall(sym, "runtime.memmove") && call.Uses == 1 && ssa.IsInlinableMemmove(dst, src, sz, config) && ssa.Clobber(call)) {
 11789  			break
 11790  		}
 11791  		v.Reset(ssaop.OpMove)
 11792  		v.AuxInt = ssa.Int64ToAuxInt(sz)
 11793  		v.AddArg3(dst, src, mem)
 11794  		return true
 11795  	}
 11796  	return false
 11797  }
 11798  func rewriteValue_OpSlicemask(v *ssa.Value) bool {
 11799  	v_0 := v.Args[0]
 11800  	b := v.Block
 11801  	// match: (Slicemask <t> x)
 11802  	// result: (SRAVconst (NEGV <t> x) [63])
 11803  	for {
 11804  		t := v.Type
 11805  		x := v_0
 11806  		v.Reset(ssaop.OpLOONG64SRAVconst)
 11807  		v.AuxInt = ssa.Int64ToAuxInt(63)
 11808  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11809  		v0.AddArg(x)
 11810  		v.AddArg(v0)
 11811  		return true
 11812  	}
 11813  }
 11814  func rewriteValue_OpStore(v *ssa.Value) bool {
 11815  	v_2 := v.Args[2]
 11816  	v_1 := v.Args[1]
 11817  	v_0 := v.Args[0]
 11818  	// match: (Store {t} ptr val mem)
 11819  	// cond: t.Size() == 1
 11820  	// result: (MOVBstore ptr val mem)
 11821  	for {
 11822  		t := ssa.AuxToType(v.Aux)
 11823  		ptr := v_0
 11824  		val := v_1
 11825  		mem := v_2
 11826  		if !(t.Size() == 1) {
 11827  			break
 11828  		}
 11829  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11830  		v.AddArg3(ptr, val, mem)
 11831  		return true
 11832  	}
 11833  	// match: (Store {t} ptr val mem)
 11834  	// cond: t.Size() == 2
 11835  	// result: (MOVHstore ptr val mem)
 11836  	for {
 11837  		t := ssa.AuxToType(v.Aux)
 11838  		ptr := v_0
 11839  		val := v_1
 11840  		mem := v_2
 11841  		if !(t.Size() == 2) {
 11842  			break
 11843  		}
 11844  		v.Reset(ssaop.OpLOONG64MOVHstore)
 11845  		v.AddArg3(ptr, val, mem)
 11846  		return true
 11847  	}
 11848  	// match: (Store {t} ptr val mem)
 11849  	// cond: t.Size() == 4 && !t.IsFloat()
 11850  	// result: (MOVWstore ptr val mem)
 11851  	for {
 11852  		t := ssa.AuxToType(v.Aux)
 11853  		ptr := v_0
 11854  		val := v_1
 11855  		mem := v_2
 11856  		if !(t.Size() == 4 && !t.IsFloat()) {
 11857  			break
 11858  		}
 11859  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11860  		v.AddArg3(ptr, val, mem)
 11861  		return true
 11862  	}
 11863  	// match: (Store {t} ptr val mem)
 11864  	// cond: t.Size() == 8 && !t.IsFloat()
 11865  	// result: (MOVVstore ptr val mem)
 11866  	for {
 11867  		t := ssa.AuxToType(v.Aux)
 11868  		ptr := v_0
 11869  		val := v_1
 11870  		mem := v_2
 11871  		if !(t.Size() == 8 && !t.IsFloat()) {
 11872  			break
 11873  		}
 11874  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11875  		v.AddArg3(ptr, val, mem)
 11876  		return true
 11877  	}
 11878  	// match: (Store {t} ptr val mem)
 11879  	// cond: t.Size() == 4 && t.IsFloat()
 11880  	// result: (MOVFstore ptr val mem)
 11881  	for {
 11882  		t := ssa.AuxToType(v.Aux)
 11883  		ptr := v_0
 11884  		val := v_1
 11885  		mem := v_2
 11886  		if !(t.Size() == 4 && t.IsFloat()) {
 11887  			break
 11888  		}
 11889  		v.Reset(ssaop.OpLOONG64MOVFstore)
 11890  		v.AddArg3(ptr, val, mem)
 11891  		return true
 11892  	}
 11893  	// match: (Store {t} ptr val mem)
 11894  	// cond: t.Size() == 8 && t.IsFloat()
 11895  	// result: (MOVDstore ptr val mem)
 11896  	for {
 11897  		t := ssa.AuxToType(v.Aux)
 11898  		ptr := v_0
 11899  		val := v_1
 11900  		mem := v_2
 11901  		if !(t.Size() == 8 && t.IsFloat()) {
 11902  			break
 11903  		}
 11904  		v.Reset(ssaop.OpLOONG64MOVDstore)
 11905  		v.AddArg3(ptr, val, mem)
 11906  		return true
 11907  	}
 11908  	return false
 11909  }
 11910  func rewriteValue_OpZero(v *ssa.Value) bool {
 11911  	v_1 := v.Args[1]
 11912  	v_0 := v.Args[0]
 11913  	b := v.Block
 11914  	typ := &b.Func.Config.Types
 11915  	// match: (Zero [0] _ mem)
 11916  	// result: mem
 11917  	for {
 11918  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 11919  			break
 11920  		}
 11921  		mem := v_1
 11922  		v.CopyOf(mem)
 11923  		return true
 11924  	}
 11925  	// match: (Zero [1] ptr mem)
 11926  	// result: (MOVBstore ptr (MOVVconst [0]) mem)
 11927  	for {
 11928  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
 11929  			break
 11930  		}
 11931  		ptr := v_0
 11932  		mem := v_1
 11933  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11934  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11935  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11936  		v.AddArg3(ptr, v0, mem)
 11937  		return true
 11938  	}
 11939  	// match: (Zero [2] ptr mem)
 11940  	// result: (MOVHstore ptr (MOVVconst [0]) mem)
 11941  	for {
 11942  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
 11943  			break
 11944  		}
 11945  		ptr := v_0
 11946  		mem := v_1
 11947  		v.Reset(ssaop.OpLOONG64MOVHstore)
 11948  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11949  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11950  		v.AddArg3(ptr, v0, mem)
 11951  		return true
 11952  	}
 11953  	// match: (Zero [3] ptr mem)
 11954  	// result: (MOVBstore [2] ptr (MOVVconst [0]) (MOVHstore ptr (MOVVconst [0]) mem))
 11955  	for {
 11956  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
 11957  			break
 11958  		}
 11959  		ptr := v_0
 11960  		mem := v_1
 11961  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11962  		v.AuxInt = ssa.Int32ToAuxInt(2)
 11963  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11964  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11965  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHstore, types.TypeMem)
 11966  		v1.AddArg3(ptr, v0, mem)
 11967  		v.AddArg3(ptr, v0, v1)
 11968  		return true
 11969  	}
 11970  	// match: (Zero [4] {t} ptr mem)
 11971  	// result: (MOVWstore ptr (MOVVconst [0]) mem)
 11972  	for {
 11973  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
 11974  			break
 11975  		}
 11976  		ptr := v_0
 11977  		mem := v_1
 11978  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11979  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11980  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11981  		v.AddArg3(ptr, v0, mem)
 11982  		return true
 11983  	}
 11984  	// match: (Zero [5] ptr mem)
 11985  	// result: (MOVBstore [4] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11986  	for {
 11987  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
 11988  			break
 11989  		}
 11990  		ptr := v_0
 11991  		mem := v_1
 11992  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11993  		v.AuxInt = ssa.Int32ToAuxInt(4)
 11994  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11995  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11996  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
 11997  		v1.AddArg3(ptr, v0, mem)
 11998  		v.AddArg3(ptr, v0, v1)
 11999  		return true
 12000  	}
 12001  	// match: (Zero [6] ptr mem)
 12002  	// result: (MOVHstore [4] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 12003  	for {
 12004  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
 12005  			break
 12006  		}
 12007  		ptr := v_0
 12008  		mem := v_1
 12009  		v.Reset(ssaop.OpLOONG64MOVHstore)
 12010  		v.AuxInt = ssa.Int32ToAuxInt(4)
 12011  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12012  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 12013  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
 12014  		v1.AddArg3(ptr, v0, mem)
 12015  		v.AddArg3(ptr, v0, v1)
 12016  		return true
 12017  	}
 12018  	// match: (Zero [7] ptr mem)
 12019  	// result: (MOVWstore [3] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 12020  	for {
 12021  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
 12022  			break
 12023  		}
 12024  		ptr := v_0
 12025  		mem := v_1
 12026  		v.Reset(ssaop.OpLOONG64MOVWstore)
 12027  		v.AuxInt = ssa.Int32ToAuxInt(3)
 12028  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12029  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 12030  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
 12031  		v1.AddArg3(ptr, v0, mem)
 12032  		v.AddArg3(ptr, v0, v1)
 12033  		return true
 12034  	}
 12035  	// match: (Zero [8] {t} ptr mem)
 12036  	// result: (MOVVstore ptr (MOVVconst [0]) mem)
 12037  	for {
 12038  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
 12039  			break
 12040  		}
 12041  		ptr := v_0
 12042  		mem := v_1
 12043  		v.Reset(ssaop.OpLOONG64MOVVstore)
 12044  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12045  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 12046  		v.AddArg3(ptr, v0, mem)
 12047  		return true
 12048  	}
 12049  	// match: (Zero [9] ptr mem)
 12050  	// result: (MOVBstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12051  	for {
 12052  		if ssa.AuxIntToInt64(v.AuxInt) != 9 {
 12053  			break
 12054  		}
 12055  		ptr := v_0
 12056  		mem := v_1
 12057  		v.Reset(ssaop.OpLOONG64MOVBstore)
 12058  		v.AuxInt = ssa.Int32ToAuxInt(8)
 12059  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12060  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 12061  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 12062  		v1.AddArg3(ptr, v0, mem)
 12063  		v.AddArg3(ptr, v0, v1)
 12064  		return true
 12065  	}
 12066  	// match: (Zero [10] ptr mem)
 12067  	// result: (MOVHstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12068  	for {
 12069  		if ssa.AuxIntToInt64(v.AuxInt) != 10 {
 12070  			break
 12071  		}
 12072  		ptr := v_0
 12073  		mem := v_1
 12074  		v.Reset(ssaop.OpLOONG64MOVHstore)
 12075  		v.AuxInt = ssa.Int32ToAuxInt(8)
 12076  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12077  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 12078  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 12079  		v1.AddArg3(ptr, v0, mem)
 12080  		v.AddArg3(ptr, v0, v1)
 12081  		return true
 12082  	}
 12083  	// match: (Zero [11] ptr mem)
 12084  	// result: (MOVWstore [7] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12085  	for {
 12086  		if ssa.AuxIntToInt64(v.AuxInt) != 11 {
 12087  			break
 12088  		}
 12089  		ptr := v_0
 12090  		mem := v_1
 12091  		v.Reset(ssaop.OpLOONG64MOVWstore)
 12092  		v.AuxInt = ssa.Int32ToAuxInt(7)
 12093  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12094  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 12095  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 12096  		v1.AddArg3(ptr, v0, mem)
 12097  		v.AddArg3(ptr, v0, v1)
 12098  		return true
 12099  	}
 12100  	// match: (Zero [12] ptr mem)
 12101  	// result: (MOVWstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12102  	for {
 12103  		if ssa.AuxIntToInt64(v.AuxInt) != 12 {
 12104  			break
 12105  		}
 12106  		ptr := v_0
 12107  		mem := v_1
 12108  		v.Reset(ssaop.OpLOONG64MOVWstore)
 12109  		v.AuxInt = ssa.Int32ToAuxInt(8)
 12110  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12111  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 12112  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 12113  		v1.AddArg3(ptr, v0, mem)
 12114  		v.AddArg3(ptr, v0, v1)
 12115  		return true
 12116  	}
 12117  	// match: (Zero [13] ptr mem)
 12118  	// result: (MOVVstore [5] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12119  	for {
 12120  		if ssa.AuxIntToInt64(v.AuxInt) != 13 {
 12121  			break
 12122  		}
 12123  		ptr := v_0
 12124  		mem := v_1
 12125  		v.Reset(ssaop.OpLOONG64MOVVstore)
 12126  		v.AuxInt = ssa.Int32ToAuxInt(5)
 12127  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12128  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 12129  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 12130  		v1.AddArg3(ptr, v0, mem)
 12131  		v.AddArg3(ptr, v0, v1)
 12132  		return true
 12133  	}
 12134  	// match: (Zero [14] ptr mem)
 12135  	// result: (MOVVstore [6] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12136  	for {
 12137  		if ssa.AuxIntToInt64(v.AuxInt) != 14 {
 12138  			break
 12139  		}
 12140  		ptr := v_0
 12141  		mem := v_1
 12142  		v.Reset(ssaop.OpLOONG64MOVVstore)
 12143  		v.AuxInt = ssa.Int32ToAuxInt(6)
 12144  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12145  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 12146  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 12147  		v1.AddArg3(ptr, v0, mem)
 12148  		v.AddArg3(ptr, v0, v1)
 12149  		return true
 12150  	}
 12151  	// match: (Zero [15] ptr mem)
 12152  	// result: (MOVVstore [7] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12153  	for {
 12154  		if ssa.AuxIntToInt64(v.AuxInt) != 15 {
 12155  			break
 12156  		}
 12157  		ptr := v_0
 12158  		mem := v_1
 12159  		v.Reset(ssaop.OpLOONG64MOVVstore)
 12160  		v.AuxInt = ssa.Int32ToAuxInt(7)
 12161  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12162  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 12163  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 12164  		v1.AddArg3(ptr, v0, mem)
 12165  		v.AddArg3(ptr, v0, v1)
 12166  		return true
 12167  	}
 12168  	// match: (Zero [16] ptr mem)
 12169  	// result: (MOVVstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12170  	for {
 12171  		if ssa.AuxIntToInt64(v.AuxInt) != 16 {
 12172  			break
 12173  		}
 12174  		ptr := v_0
 12175  		mem := v_1
 12176  		v.Reset(ssaop.OpLOONG64MOVVstore)
 12177  		v.AuxInt = ssa.Int32ToAuxInt(8)
 12178  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12179  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 12180  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 12181  		v1.AddArg3(ptr, v0, mem)
 12182  		v.AddArg3(ptr, v0, v1)
 12183  		return true
 12184  	}
 12185  	// match: (Zero [s] ptr mem)
 12186  	// cond: s > 16 && s < 192
 12187  	// result: (LoweredZero [s] ptr mem)
 12188  	for {
 12189  		s := ssa.AuxIntToInt64(v.AuxInt)
 12190  		ptr := v_0
 12191  		mem := v_1
 12192  		if !(s > 16 && s < 192) {
 12193  			break
 12194  		}
 12195  		v.Reset(ssaop.OpLOONG64LoweredZero)
 12196  		v.AuxInt = ssa.Int64ToAuxInt(s)
 12197  		v.AddArg2(ptr, mem)
 12198  		return true
 12199  	}
 12200  	// match: (Zero [s] ptr mem)
 12201  	// cond: s >= 192
 12202  	// result: (LoweredZeroLoop [s] ptr mem)
 12203  	for {
 12204  		s := ssa.AuxIntToInt64(v.AuxInt)
 12205  		ptr := v_0
 12206  		mem := v_1
 12207  		if !(s >= 192) {
 12208  			break
 12209  		}
 12210  		v.Reset(ssaop.OpLOONG64LoweredZeroLoop)
 12211  		v.AuxInt = ssa.Int64ToAuxInt(s)
 12212  		v.AddArg2(ptr, mem)
 12213  		return true
 12214  	}
 12215  	return false
 12216  }
 12217  func RewriteBlock(b *ssa.Block) bool {
 12218  	typ := &b.Func.Config.Types
 12219  	switch b.Kind {
 12220  	case block.BlockLOONG64BEQ:
 12221  		// match: (BEQ (MOVVconst [0]) cond yes no)
 12222  		// result: (EQZ cond yes no)
 12223  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12224  			v_0 := b.Controls[0]
 12225  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12226  				break
 12227  			}
 12228  			cond := b.Controls[1]
 12229  			b.ResetWithControl(block.BlockLOONG64EQZ, cond)
 12230  			return true
 12231  		}
 12232  		// match: (BEQ cond (MOVVconst [0]) yes no)
 12233  		// result: (EQZ cond yes no)
 12234  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 12235  			cond := b.Controls[0]
 12236  			v_1 := b.Controls[1]
 12237  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 12238  				break
 12239  			}
 12240  			b.ResetWithControl(block.BlockLOONG64EQZ, cond)
 12241  			return true
 12242  		}
 12243  	case block.BlockLOONG64BGE:
 12244  		// match: (BGE (MOVVconst [0]) cond yes no)
 12245  		// result: (LEZ cond yes no)
 12246  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12247  			v_0 := b.Controls[0]
 12248  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12249  				break
 12250  			}
 12251  			cond := b.Controls[1]
 12252  			b.ResetWithControl(block.BlockLOONG64LEZ, cond)
 12253  			return true
 12254  		}
 12255  		// match: (BGE cond (MOVVconst [0]) yes no)
 12256  		// result: (GEZ cond yes no)
 12257  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 12258  			cond := b.Controls[0]
 12259  			v_1 := b.Controls[1]
 12260  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 12261  				break
 12262  			}
 12263  			b.ResetWithControl(block.BlockLOONG64GEZ, cond)
 12264  			return true
 12265  		}
 12266  	case block.BlockLOONG64BGEU:
 12267  		// match: (BGEU (MOVVconst [0]) cond yes no)
 12268  		// result: (EQZ cond yes no)
 12269  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12270  			v_0 := b.Controls[0]
 12271  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12272  				break
 12273  			}
 12274  			cond := b.Controls[1]
 12275  			b.ResetWithControl(block.BlockLOONG64EQZ, cond)
 12276  			return true
 12277  		}
 12278  	case block.BlockLOONG64BLT:
 12279  		// match: (BLT (MOVVconst [0]) cond yes no)
 12280  		// result: (GTZ cond yes no)
 12281  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12282  			v_0 := b.Controls[0]
 12283  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12284  				break
 12285  			}
 12286  			cond := b.Controls[1]
 12287  			b.ResetWithControl(block.BlockLOONG64GTZ, cond)
 12288  			return true
 12289  		}
 12290  		// match: (BLT cond (MOVVconst [0]) yes no)
 12291  		// result: (LTZ cond yes no)
 12292  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 12293  			cond := b.Controls[0]
 12294  			v_1 := b.Controls[1]
 12295  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 12296  				break
 12297  			}
 12298  			b.ResetWithControl(block.BlockLOONG64LTZ, cond)
 12299  			return true
 12300  		}
 12301  	case block.BlockLOONG64BLTU:
 12302  		// match: (BLTU (MOVVconst [0]) cond yes no)
 12303  		// result: (NEZ cond yes no)
 12304  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12305  			v_0 := b.Controls[0]
 12306  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12307  				break
 12308  			}
 12309  			cond := b.Controls[1]
 12310  			b.ResetWithControl(block.BlockLOONG64NEZ, cond)
 12311  			return true
 12312  		}
 12313  	case block.BlockLOONG64BNE:
 12314  		// match: (BNE (MOVVconst [0]) cond yes no)
 12315  		// result: (NEZ cond yes no)
 12316  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12317  			v_0 := b.Controls[0]
 12318  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12319  				break
 12320  			}
 12321  			cond := b.Controls[1]
 12322  			b.ResetWithControl(block.BlockLOONG64NEZ, cond)
 12323  			return true
 12324  		}
 12325  		// match: (BNE cond (MOVVconst [0]) yes no)
 12326  		// result: (NEZ cond yes no)
 12327  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 12328  			cond := b.Controls[0]
 12329  			v_1 := b.Controls[1]
 12330  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 12331  				break
 12332  			}
 12333  			b.ResetWithControl(block.BlockLOONG64NEZ, cond)
 12334  			return true
 12335  		}
 12336  	case block.BlockLOONG64EQZ:
 12337  		// match: (EQZ (FPFlagTrue cmp) yes no)
 12338  		// result: (FPF cmp yes no)
 12339  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagTrue {
 12340  			v_0 := b.Controls[0]
 12341  			cmp := v_0.Args[0]
 12342  			b.ResetWithControl(block.BlockLOONG64FPF, cmp)
 12343  			return true
 12344  		}
 12345  		// match: (EQZ (FPFlagFalse cmp) yes no)
 12346  		// result: (FPT cmp yes no)
 12347  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagFalse {
 12348  			v_0 := b.Controls[0]
 12349  			cmp := v_0.Args[0]
 12350  			b.ResetWithControl(block.BlockLOONG64FPT, cmp)
 12351  			return true
 12352  		}
 12353  		// match: (EQZ (XORconst [1] cmp:(SGT _ _)) yes no)
 12354  		// result: (NEZ cmp yes no)
 12355  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12356  			v_0 := b.Controls[0]
 12357  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12358  				break
 12359  			}
 12360  			cmp := v_0.Args[0]
 12361  			if cmp.Op != ssaop.OpLOONG64SGT {
 12362  				break
 12363  			}
 12364  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 12365  			return true
 12366  		}
 12367  		// match: (EQZ (XORconst [1] cmp:(SGTU _ _)) yes no)
 12368  		// result: (NEZ cmp yes no)
 12369  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12370  			v_0 := b.Controls[0]
 12371  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12372  				break
 12373  			}
 12374  			cmp := v_0.Args[0]
 12375  			if cmp.Op != ssaop.OpLOONG64SGTU {
 12376  				break
 12377  			}
 12378  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 12379  			return true
 12380  		}
 12381  		// match: (EQZ (XORconst [1] cmp:(SGTconst _)) yes no)
 12382  		// result: (NEZ cmp yes no)
 12383  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12384  			v_0 := b.Controls[0]
 12385  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12386  				break
 12387  			}
 12388  			cmp := v_0.Args[0]
 12389  			if cmp.Op != ssaop.OpLOONG64SGTconst {
 12390  				break
 12391  			}
 12392  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 12393  			return true
 12394  		}
 12395  		// match: (EQZ (XORconst [1] cmp:(SGTUconst _)) yes no)
 12396  		// result: (NEZ cmp yes no)
 12397  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12398  			v_0 := b.Controls[0]
 12399  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12400  				break
 12401  			}
 12402  			cmp := v_0.Args[0]
 12403  			if cmp.Op != ssaop.OpLOONG64SGTUconst {
 12404  				break
 12405  			}
 12406  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 12407  			return true
 12408  		}
 12409  		// match: (EQZ (SGTUconst [1] x) yes no)
 12410  		// result: (NEZ x yes no)
 12411  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 12412  			v_0 := b.Controls[0]
 12413  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12414  				break
 12415  			}
 12416  			x := v_0.Args[0]
 12417  			b.ResetWithControl(block.BlockLOONG64NEZ, x)
 12418  			return true
 12419  		}
 12420  		// match: (EQZ (SGTU x (MOVVconst [0])) yes no)
 12421  		// result: (EQZ x yes no)
 12422  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12423  			v_0 := b.Controls[0]
 12424  			_ = v_0.Args[1]
 12425  			x := v_0.Args[0]
 12426  			v_0_1 := v_0.Args[1]
 12427  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 12428  				break
 12429  			}
 12430  			b.ResetWithControl(block.BlockLOONG64EQZ, x)
 12431  			return true
 12432  		}
 12433  		// match: (EQZ (SGTconst [0] x) yes no)
 12434  		// result: (GEZ x yes no)
 12435  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 12436  			v_0 := b.Controls[0]
 12437  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12438  				break
 12439  			}
 12440  			x := v_0.Args[0]
 12441  			b.ResetWithControl(block.BlockLOONG64GEZ, x)
 12442  			return true
 12443  		}
 12444  		// match: (EQZ (SGT x (MOVVconst [0])) yes no)
 12445  		// result: (LEZ x yes no)
 12446  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 12447  			v_0 := b.Controls[0]
 12448  			_ = v_0.Args[1]
 12449  			x := v_0.Args[0]
 12450  			v_0_1 := v_0.Args[1]
 12451  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 12452  				break
 12453  			}
 12454  			b.ResetWithControl(block.BlockLOONG64LEZ, x)
 12455  			return true
 12456  		}
 12457  		// match: (EQZ (SGTU (MOVVconst [c]) y) yes no)
 12458  		// cond: c >= -2048 && c <= 2047
 12459  		// result: (EQZ (SGTUconst [c] y) yes no)
 12460  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12461  			v_0 := b.Controls[0]
 12462  			y := v_0.Args[1]
 12463  			v_0_0 := v_0.Args[0]
 12464  			if v_0_0.Op != ssaop.OpLOONG64MOVVconst {
 12465  				break
 12466  			}
 12467  			c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 12468  			if !(c >= -2048 && c <= 2047) {
 12469  				break
 12470  			}
 12471  			v0 := b.NewValue0(v_0.Pos, ssaop.OpLOONG64SGTUconst, typ.Bool)
 12472  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12473  			v0.AddArg(y)
 12474  			b.ResetWithControl(block.BlockLOONG64EQZ, v0)
 12475  			return true
 12476  		}
 12477  		// match: (EQZ (SUBV x y) yes no)
 12478  		// result: (BEQ x y yes no)
 12479  		for b.Controls[0].Op == ssaop.OpLOONG64SUBV {
 12480  			v_0 := b.Controls[0]
 12481  			y := v_0.Args[1]
 12482  			x := v_0.Args[0]
 12483  			b.ResetWithControl2(block.BlockLOONG64BEQ, x, y)
 12484  			return true
 12485  		}
 12486  		// match: (EQZ (SGT x y) yes no)
 12487  		// result: (BGE y x yes no)
 12488  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 12489  			v_0 := b.Controls[0]
 12490  			y := v_0.Args[1]
 12491  			x := v_0.Args[0]
 12492  			b.ResetWithControl2(block.BlockLOONG64BGE, y, x)
 12493  			return true
 12494  		}
 12495  		// match: (EQZ (SGTU x y) yes no)
 12496  		// result: (BGEU y x yes no)
 12497  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12498  			v_0 := b.Controls[0]
 12499  			y := v_0.Args[1]
 12500  			x := v_0.Args[0]
 12501  			b.ResetWithControl2(block.BlockLOONG64BGEU, y, x)
 12502  			return true
 12503  		}
 12504  		// match: (EQZ (SGTconst [c] y) yes no)
 12505  		// result: (BGE y (MOVVconst [c]) yes no)
 12506  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 12507  			v_0 := b.Controls[0]
 12508  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12509  			y := v_0.Args[0]
 12510  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12511  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12512  			b.ResetWithControl2(block.BlockLOONG64BGE, y, v0)
 12513  			return true
 12514  		}
 12515  		// match: (EQZ (SGTUconst [c] y) yes no)
 12516  		// result: (BGEU y (MOVVconst [c]) yes no)
 12517  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 12518  			v_0 := b.Controls[0]
 12519  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12520  			y := v_0.Args[0]
 12521  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12522  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12523  			b.ResetWithControl2(block.BlockLOONG64BGEU, y, v0)
 12524  			return true
 12525  		}
 12526  		// match: (EQZ (MOVVconst [0]) yes no)
 12527  		// result: (First yes no)
 12528  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12529  			v_0 := b.Controls[0]
 12530  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12531  				break
 12532  			}
 12533  			b.Reset(block.BlockFirst)
 12534  			return true
 12535  		}
 12536  		// match: (EQZ (MOVVconst [c]) yes no)
 12537  		// cond: c != 0
 12538  		// result: (First no yes)
 12539  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12540  			v_0 := b.Controls[0]
 12541  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12542  			if !(c != 0) {
 12543  				break
 12544  			}
 12545  			b.Reset(block.BlockFirst)
 12546  			b.SwapSuccessors()
 12547  			return true
 12548  		}
 12549  		// match: (EQZ (NEGV x) yes no)
 12550  		// result: (EQZ x yes no)
 12551  		for b.Controls[0].Op == ssaop.OpLOONG64NEGV {
 12552  			v_0 := b.Controls[0]
 12553  			x := v_0.Args[0]
 12554  			b.ResetWithControl(block.BlockLOONG64EQZ, x)
 12555  			return true
 12556  		}
 12557  	case block.BlockLOONG64GEZ:
 12558  		// match: (GEZ (MOVVconst [c]) yes no)
 12559  		// cond: c >= 0
 12560  		// result: (First yes no)
 12561  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12562  			v_0 := b.Controls[0]
 12563  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12564  			if !(c >= 0) {
 12565  				break
 12566  			}
 12567  			b.Reset(block.BlockFirst)
 12568  			return true
 12569  		}
 12570  		// match: (GEZ (MOVVconst [c]) yes no)
 12571  		// cond: c < 0
 12572  		// result: (First no yes)
 12573  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12574  			v_0 := b.Controls[0]
 12575  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12576  			if !(c < 0) {
 12577  				break
 12578  			}
 12579  			b.Reset(block.BlockFirst)
 12580  			b.SwapSuccessors()
 12581  			return true
 12582  		}
 12583  	case block.BlockLOONG64GTZ:
 12584  		// match: (GTZ (MOVVconst [c]) yes no)
 12585  		// cond: c > 0
 12586  		// result: (First yes no)
 12587  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12588  			v_0 := b.Controls[0]
 12589  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12590  			if !(c > 0) {
 12591  				break
 12592  			}
 12593  			b.Reset(block.BlockFirst)
 12594  			return true
 12595  		}
 12596  		// match: (GTZ (MOVVconst [c]) yes no)
 12597  		// cond: c <= 0
 12598  		// result: (First no yes)
 12599  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12600  			v_0 := b.Controls[0]
 12601  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12602  			if !(c <= 0) {
 12603  				break
 12604  			}
 12605  			b.Reset(block.BlockFirst)
 12606  			b.SwapSuccessors()
 12607  			return true
 12608  		}
 12609  	case block.BlockIf:
 12610  		// match: (If cond yes no)
 12611  		// result: (NEZ (MOVBUreg <typ.UInt64> cond) yes no)
 12612  		for {
 12613  			cond := b.Controls[0]
 12614  			v0 := b.NewValue0(cond.Pos, ssaop.OpLOONG64MOVBUreg, typ.UInt64)
 12615  			v0.AddArg(cond)
 12616  			b.ResetWithControl(block.BlockLOONG64NEZ, v0)
 12617  			return true
 12618  		}
 12619  	case block.BlockJumpTable:
 12620  		// match: (JumpTable idx)
 12621  		// result: (JUMPTABLE {ssa.MakeJumpTableSym(b)} idx (MOVVaddr <typ.Uintptr> {ssa.MakeJumpTableSym(b)} (SB)))
 12622  		for {
 12623  			idx := b.Controls[0]
 12624  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVaddr, typ.Uintptr)
 12625  			v0.Aux = ssa.SymToAux(ssa.MakeJumpTableSym(b))
 12626  			v1 := b.NewValue0(b.Pos, ssaop.OpSB, typ.Uintptr)
 12627  			v0.AddArg(v1)
 12628  			b.ResetWithControl2(block.BlockLOONG64JUMPTABLE, idx, v0)
 12629  			b.Aux = ssa.SymToAux(ssa.MakeJumpTableSym(b))
 12630  			return true
 12631  		}
 12632  	case block.BlockLOONG64LEZ:
 12633  		// match: (LEZ (MOVVconst [c]) yes no)
 12634  		// cond: c <= 0
 12635  		// result: (First yes no)
 12636  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12637  			v_0 := b.Controls[0]
 12638  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12639  			if !(c <= 0) {
 12640  				break
 12641  			}
 12642  			b.Reset(block.BlockFirst)
 12643  			return true
 12644  		}
 12645  		// match: (LEZ (MOVVconst [c]) yes no)
 12646  		// cond: c > 0
 12647  		// result: (First no yes)
 12648  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12649  			v_0 := b.Controls[0]
 12650  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12651  			if !(c > 0) {
 12652  				break
 12653  			}
 12654  			b.Reset(block.BlockFirst)
 12655  			b.SwapSuccessors()
 12656  			return true
 12657  		}
 12658  	case block.BlockLOONG64LTZ:
 12659  		// match: (LTZ (MOVVconst [c]) yes no)
 12660  		// cond: c < 0
 12661  		// result: (First yes no)
 12662  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12663  			v_0 := b.Controls[0]
 12664  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12665  			if !(c < 0) {
 12666  				break
 12667  			}
 12668  			b.Reset(block.BlockFirst)
 12669  			return true
 12670  		}
 12671  		// match: (LTZ (MOVVconst [c]) yes no)
 12672  		// cond: c >= 0
 12673  		// result: (First no yes)
 12674  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12675  			v_0 := b.Controls[0]
 12676  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12677  			if !(c >= 0) {
 12678  				break
 12679  			}
 12680  			b.Reset(block.BlockFirst)
 12681  			b.SwapSuccessors()
 12682  			return true
 12683  		}
 12684  	case block.BlockLOONG64NEZ:
 12685  		// match: (NEZ (FPFlagTrue cmp) yes no)
 12686  		// result: (FPT cmp yes no)
 12687  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagTrue {
 12688  			v_0 := b.Controls[0]
 12689  			cmp := v_0.Args[0]
 12690  			b.ResetWithControl(block.BlockLOONG64FPT, cmp)
 12691  			return true
 12692  		}
 12693  		// match: (NEZ (FPFlagFalse cmp) yes no)
 12694  		// result: (FPF cmp yes no)
 12695  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagFalse {
 12696  			v_0 := b.Controls[0]
 12697  			cmp := v_0.Args[0]
 12698  			b.ResetWithControl(block.BlockLOONG64FPF, cmp)
 12699  			return true
 12700  		}
 12701  		// match: (NEZ (XORconst [1] cmp:(SGT _ _)) yes no)
 12702  		// result: (EQZ cmp yes no)
 12703  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12704  			v_0 := b.Controls[0]
 12705  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12706  				break
 12707  			}
 12708  			cmp := v_0.Args[0]
 12709  			if cmp.Op != ssaop.OpLOONG64SGT {
 12710  				break
 12711  			}
 12712  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12713  			return true
 12714  		}
 12715  		// match: (NEZ (XORconst [1] cmp:(SGTU _ _)) yes no)
 12716  		// result: (EQZ cmp yes no)
 12717  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12718  			v_0 := b.Controls[0]
 12719  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12720  				break
 12721  			}
 12722  			cmp := v_0.Args[0]
 12723  			if cmp.Op != ssaop.OpLOONG64SGTU {
 12724  				break
 12725  			}
 12726  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12727  			return true
 12728  		}
 12729  		// match: (NEZ (XORconst [1] cmp:(SGTconst _)) yes no)
 12730  		// result: (EQZ cmp yes no)
 12731  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12732  			v_0 := b.Controls[0]
 12733  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12734  				break
 12735  			}
 12736  			cmp := v_0.Args[0]
 12737  			if cmp.Op != ssaop.OpLOONG64SGTconst {
 12738  				break
 12739  			}
 12740  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12741  			return true
 12742  		}
 12743  		// match: (NEZ (XORconst [1] cmp:(SGTUconst _)) yes no)
 12744  		// result: (EQZ cmp yes no)
 12745  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12746  			v_0 := b.Controls[0]
 12747  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12748  				break
 12749  			}
 12750  			cmp := v_0.Args[0]
 12751  			if cmp.Op != ssaop.OpLOONG64SGTUconst {
 12752  				break
 12753  			}
 12754  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12755  			return true
 12756  		}
 12757  		// match: (NEZ (SGTUconst [1] x) yes no)
 12758  		// result: (EQZ x yes no)
 12759  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 12760  			v_0 := b.Controls[0]
 12761  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12762  				break
 12763  			}
 12764  			x := v_0.Args[0]
 12765  			b.ResetWithControl(block.BlockLOONG64EQZ, x)
 12766  			return true
 12767  		}
 12768  		// match: (NEZ (SGTU x (MOVVconst [0])) yes no)
 12769  		// result: (NEZ x yes no)
 12770  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12771  			v_0 := b.Controls[0]
 12772  			_ = v_0.Args[1]
 12773  			x := v_0.Args[0]
 12774  			v_0_1 := v_0.Args[1]
 12775  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 12776  				break
 12777  			}
 12778  			b.ResetWithControl(block.BlockLOONG64NEZ, x)
 12779  			return true
 12780  		}
 12781  		// match: (NEZ (SGTconst [0] x) yes no)
 12782  		// result: (LTZ x yes no)
 12783  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 12784  			v_0 := b.Controls[0]
 12785  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12786  				break
 12787  			}
 12788  			x := v_0.Args[0]
 12789  			b.ResetWithControl(block.BlockLOONG64LTZ, x)
 12790  			return true
 12791  		}
 12792  		// match: (NEZ (SGT x (MOVVconst [0])) yes no)
 12793  		// result: (GTZ x yes no)
 12794  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 12795  			v_0 := b.Controls[0]
 12796  			_ = v_0.Args[1]
 12797  			x := v_0.Args[0]
 12798  			v_0_1 := v_0.Args[1]
 12799  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 12800  				break
 12801  			}
 12802  			b.ResetWithControl(block.BlockLOONG64GTZ, x)
 12803  			return true
 12804  		}
 12805  		// match: (NEZ (SGTU (MOVVconst [c]) y) yes no)
 12806  		// cond: c >= -2048 && c <= 2047
 12807  		// result: (NEZ (SGTUconst [c] y) yes no)
 12808  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12809  			v_0 := b.Controls[0]
 12810  			y := v_0.Args[1]
 12811  			v_0_0 := v_0.Args[0]
 12812  			if v_0_0.Op != ssaop.OpLOONG64MOVVconst {
 12813  				break
 12814  			}
 12815  			c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 12816  			if !(c >= -2048 && c <= 2047) {
 12817  				break
 12818  			}
 12819  			v0 := b.NewValue0(v_0.Pos, ssaop.OpLOONG64SGTUconst, typ.Bool)
 12820  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12821  			v0.AddArg(y)
 12822  			b.ResetWithControl(block.BlockLOONG64NEZ, v0)
 12823  			return true
 12824  		}
 12825  		// match: (NEZ (SUBV x y) yes no)
 12826  		// result: (BNE x y yes no)
 12827  		for b.Controls[0].Op == ssaop.OpLOONG64SUBV {
 12828  			v_0 := b.Controls[0]
 12829  			y := v_0.Args[1]
 12830  			x := v_0.Args[0]
 12831  			b.ResetWithControl2(block.BlockLOONG64BNE, x, y)
 12832  			return true
 12833  		}
 12834  		// match: (NEZ (SGT x y) yes no)
 12835  		// result: (BLT y x yes no)
 12836  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 12837  			v_0 := b.Controls[0]
 12838  			y := v_0.Args[1]
 12839  			x := v_0.Args[0]
 12840  			b.ResetWithControl2(block.BlockLOONG64BLT, y, x)
 12841  			return true
 12842  		}
 12843  		// match: (NEZ (SGTU x y) yes no)
 12844  		// result: (BLTU y x yes no)
 12845  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12846  			v_0 := b.Controls[0]
 12847  			y := v_0.Args[1]
 12848  			x := v_0.Args[0]
 12849  			b.ResetWithControl2(block.BlockLOONG64BLTU, y, x)
 12850  			return true
 12851  		}
 12852  		// match: (NEZ (SGTconst [c] y) yes no)
 12853  		// result: (BLT y (MOVVconst [c]) yes no)
 12854  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 12855  			v_0 := b.Controls[0]
 12856  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12857  			y := v_0.Args[0]
 12858  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12859  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12860  			b.ResetWithControl2(block.BlockLOONG64BLT, y, v0)
 12861  			return true
 12862  		}
 12863  		// match: (NEZ (SGTUconst [c] y) yes no)
 12864  		// result: (BLTU y (MOVVconst [c]) yes no)
 12865  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 12866  			v_0 := b.Controls[0]
 12867  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12868  			y := v_0.Args[0]
 12869  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12870  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12871  			b.ResetWithControl2(block.BlockLOONG64BLTU, y, v0)
 12872  			return true
 12873  		}
 12874  		// match: (NEZ (MOVVconst [0]) yes no)
 12875  		// result: (First no yes)
 12876  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12877  			v_0 := b.Controls[0]
 12878  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12879  				break
 12880  			}
 12881  			b.Reset(block.BlockFirst)
 12882  			b.SwapSuccessors()
 12883  			return true
 12884  		}
 12885  		// match: (NEZ (MOVVconst [c]) yes no)
 12886  		// cond: c != 0
 12887  		// result: (First yes no)
 12888  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12889  			v_0 := b.Controls[0]
 12890  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12891  			if !(c != 0) {
 12892  				break
 12893  			}
 12894  			b.Reset(block.BlockFirst)
 12895  			return true
 12896  		}
 12897  		// match: (NEZ (NEGV x) yes no)
 12898  		// result: (NEZ x yes no)
 12899  		for b.Controls[0].Op == ssaop.OpLOONG64NEGV {
 12900  			v_0 := b.Controls[0]
 12901  			x := v_0.Args[0]
 12902  			b.ResetWithControl(block.BlockLOONG64NEZ, x)
 12903  			return true
 12904  		}
 12905  	}
 12906  	return false
 12907  }
 12908  

View as plain text