Source file src/cmd/compile/internal/ssa/rewriteLOONG64.go

     1  // Code generated from _gen/LOONG64.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  import "cmd/compile/internal/types"
     6  
     7  func rewriteValueLOONG64(v *Value) bool {
     8  	switch v.Op {
     9  	case OpAbs:
    10  		v.Op = OpLOONG64ABSD
    11  		return true
    12  	case OpAdd16:
    13  		v.Op = OpLOONG64ADDV
    14  		return true
    15  	case OpAdd32:
    16  		v.Op = OpLOONG64ADDV
    17  		return true
    18  	case OpAdd32F:
    19  		v.Op = OpLOONG64ADDF
    20  		return true
    21  	case OpAdd64:
    22  		v.Op = OpLOONG64ADDV
    23  		return true
    24  	case OpAdd64F:
    25  		v.Op = OpLOONG64ADDD
    26  		return true
    27  	case OpAdd8:
    28  		v.Op = OpLOONG64ADDV
    29  		return true
    30  	case OpAddPtr:
    31  		v.Op = OpLOONG64ADDV
    32  		return true
    33  	case OpAddr:
    34  		return rewriteValueLOONG64_OpAddr(v)
    35  	case OpAnd16:
    36  		v.Op = OpLOONG64AND
    37  		return true
    38  	case OpAnd32:
    39  		v.Op = OpLOONG64AND
    40  		return true
    41  	case OpAnd64:
    42  		v.Op = OpLOONG64AND
    43  		return true
    44  	case OpAnd8:
    45  		v.Op = OpLOONG64AND
    46  		return true
    47  	case OpAndB:
    48  		v.Op = OpLOONG64AND
    49  		return true
    50  	case OpAtomicAdd32:
    51  		v.Op = OpLOONG64LoweredAtomicAdd32
    52  		return true
    53  	case OpAtomicAdd64:
    54  		v.Op = OpLOONG64LoweredAtomicAdd64
    55  		return true
    56  	case OpAtomicAnd32:
    57  		v.Op = OpLOONG64LoweredAtomicAnd32
    58  		return true
    59  	case OpAtomicAnd32value:
    60  		v.Op = OpLOONG64LoweredAtomicAnd32value
    61  		return true
    62  	case OpAtomicAnd64value:
    63  		v.Op = OpLOONG64LoweredAtomicAnd64value
    64  		return true
    65  	case OpAtomicAnd8:
    66  		return rewriteValueLOONG64_OpAtomicAnd8(v)
    67  	case OpAtomicCompareAndSwap32:
    68  		return rewriteValueLOONG64_OpAtomicCompareAndSwap32(v)
    69  	case OpAtomicCompareAndSwap32Variant:
    70  		return rewriteValueLOONG64_OpAtomicCompareAndSwap32Variant(v)
    71  	case OpAtomicCompareAndSwap64:
    72  		v.Op = OpLOONG64LoweredAtomicCas64
    73  		return true
    74  	case OpAtomicCompareAndSwap64Variant:
    75  		v.Op = OpLOONG64LoweredAtomicCas64Variant
    76  		return true
    77  	case OpAtomicExchange32:
    78  		v.Op = OpLOONG64LoweredAtomicExchange32
    79  		return true
    80  	case OpAtomicExchange64:
    81  		v.Op = OpLOONG64LoweredAtomicExchange64
    82  		return true
    83  	case OpAtomicExchange8Variant:
    84  		v.Op = OpLOONG64LoweredAtomicExchange8Variant
    85  		return true
    86  	case OpAtomicLoad32:
    87  		v.Op = OpLOONG64LoweredAtomicLoad32
    88  		return true
    89  	case OpAtomicLoad64:
    90  		v.Op = OpLOONG64LoweredAtomicLoad64
    91  		return true
    92  	case OpAtomicLoad8:
    93  		v.Op = OpLOONG64LoweredAtomicLoad8
    94  		return true
    95  	case OpAtomicLoadPtr:
    96  		v.Op = OpLOONG64LoweredAtomicLoad64
    97  		return true
    98  	case OpAtomicOr32:
    99  		v.Op = OpLOONG64LoweredAtomicOr32
   100  		return true
   101  	case OpAtomicOr32value:
   102  		v.Op = OpLOONG64LoweredAtomicOr32value
   103  		return true
   104  	case OpAtomicOr64value:
   105  		v.Op = OpLOONG64LoweredAtomicOr64value
   106  		return true
   107  	case OpAtomicOr8:
   108  		return rewriteValueLOONG64_OpAtomicOr8(v)
   109  	case OpAtomicStore32:
   110  		v.Op = OpLOONG64LoweredAtomicStore32
   111  		return true
   112  	case OpAtomicStore32Variant:
   113  		v.Op = OpLOONG64LoweredAtomicStore32Variant
   114  		return true
   115  	case OpAtomicStore64:
   116  		v.Op = OpLOONG64LoweredAtomicStore64
   117  		return true
   118  	case OpAtomicStore64Variant:
   119  		v.Op = OpLOONG64LoweredAtomicStore64Variant
   120  		return true
   121  	case OpAtomicStore8:
   122  		v.Op = OpLOONG64LoweredAtomicStore8
   123  		return true
   124  	case OpAtomicStore8Variant:
   125  		v.Op = OpLOONG64LoweredAtomicStore8Variant
   126  		return true
   127  	case OpAtomicStorePtrNoWB:
   128  		v.Op = OpLOONG64LoweredAtomicStore64
   129  		return true
   130  	case OpAvg64u:
   131  		return rewriteValueLOONG64_OpAvg64u(v)
   132  	case OpBitLen16:
   133  		return rewriteValueLOONG64_OpBitLen16(v)
   134  	case OpBitLen32:
   135  		return rewriteValueLOONG64_OpBitLen32(v)
   136  	case OpBitLen64:
   137  		return rewriteValueLOONG64_OpBitLen64(v)
   138  	case OpBitLen8:
   139  		return rewriteValueLOONG64_OpBitLen8(v)
   140  	case OpBitRev16:
   141  		return rewriteValueLOONG64_OpBitRev16(v)
   142  	case OpBitRev32:
   143  		v.Op = OpLOONG64BITREVW
   144  		return true
   145  	case OpBitRev64:
   146  		v.Op = OpLOONG64BITREVV
   147  		return true
   148  	case OpBitRev8:
   149  		v.Op = OpLOONG64BITREV4B
   150  		return true
   151  	case OpBswap16:
   152  		v.Op = OpLOONG64REVB2H
   153  		return true
   154  	case OpBswap32:
   155  		v.Op = OpLOONG64REVB2W
   156  		return true
   157  	case OpBswap64:
   158  		v.Op = OpLOONG64REVBV
   159  		return true
   160  	case OpClosureCall:
   161  		v.Op = OpLOONG64CALLclosure
   162  		return true
   163  	case OpCom16:
   164  		return rewriteValueLOONG64_OpCom16(v)
   165  	case OpCom32:
   166  		return rewriteValueLOONG64_OpCom32(v)
   167  	case OpCom64:
   168  		return rewriteValueLOONG64_OpCom64(v)
   169  	case OpCom8:
   170  		return rewriteValueLOONG64_OpCom8(v)
   171  	case OpCondSelect:
   172  		return rewriteValueLOONG64_OpCondSelect(v)
   173  	case OpConst16:
   174  		return rewriteValueLOONG64_OpConst16(v)
   175  	case OpConst32:
   176  		return rewriteValueLOONG64_OpConst32(v)
   177  	case OpConst32F:
   178  		return rewriteValueLOONG64_OpConst32F(v)
   179  	case OpConst64:
   180  		return rewriteValueLOONG64_OpConst64(v)
   181  	case OpConst64F:
   182  		return rewriteValueLOONG64_OpConst64F(v)
   183  	case OpConst8:
   184  		return rewriteValueLOONG64_OpConst8(v)
   185  	case OpConstBool:
   186  		return rewriteValueLOONG64_OpConstBool(v)
   187  	case OpConstNil:
   188  		return rewriteValueLOONG64_OpConstNil(v)
   189  	case OpCopysign:
   190  		v.Op = OpLOONG64FCOPYSGD
   191  		return true
   192  	case OpCtz16:
   193  		return rewriteValueLOONG64_OpCtz16(v)
   194  	case OpCtz16NonZero:
   195  		v.Op = OpCtz64
   196  		return true
   197  	case OpCtz32:
   198  		v.Op = OpLOONG64CTZW
   199  		return true
   200  	case OpCtz32NonZero:
   201  		v.Op = OpCtz64
   202  		return true
   203  	case OpCtz64:
   204  		v.Op = OpLOONG64CTZV
   205  		return true
   206  	case OpCtz64NonZero:
   207  		v.Op = OpCtz64
   208  		return true
   209  	case OpCtz8:
   210  		return rewriteValueLOONG64_OpCtz8(v)
   211  	case OpCtz8NonZero:
   212  		v.Op = OpCtz64
   213  		return true
   214  	case OpCvt32Fto32:
   215  		v.Op = OpLOONG64TRUNCFW
   216  		return true
   217  	case OpCvt32Fto64:
   218  		v.Op = OpLOONG64TRUNCFV
   219  		return true
   220  	case OpCvt32Fto64F:
   221  		v.Op = OpLOONG64MOVFD
   222  		return true
   223  	case OpCvt32to32F:
   224  		v.Op = OpLOONG64MOVWF
   225  		return true
   226  	case OpCvt32to64F:
   227  		v.Op = OpLOONG64MOVWD
   228  		return true
   229  	case OpCvt64Fto32:
   230  		v.Op = OpLOONG64TRUNCDW
   231  		return true
   232  	case OpCvt64Fto32F:
   233  		v.Op = OpLOONG64MOVDF
   234  		return true
   235  	case OpCvt64Fto64:
   236  		v.Op = OpLOONG64TRUNCDV
   237  		return true
   238  	case OpCvt64to32F:
   239  		v.Op = OpLOONG64MOVVF
   240  		return true
   241  	case OpCvt64to64F:
   242  		v.Op = OpLOONG64MOVVD
   243  		return true
   244  	case OpCvtBoolToUint8:
   245  		v.Op = OpCopy
   246  		return true
   247  	case OpDiv16:
   248  		return rewriteValueLOONG64_OpDiv16(v)
   249  	case OpDiv16u:
   250  		return rewriteValueLOONG64_OpDiv16u(v)
   251  	case OpDiv32:
   252  		return rewriteValueLOONG64_OpDiv32(v)
   253  	case OpDiv32F:
   254  		v.Op = OpLOONG64DIVF
   255  		return true
   256  	case OpDiv32u:
   257  		return rewriteValueLOONG64_OpDiv32u(v)
   258  	case OpDiv64:
   259  		return rewriteValueLOONG64_OpDiv64(v)
   260  	case OpDiv64F:
   261  		v.Op = OpLOONG64DIVD
   262  		return true
   263  	case OpDiv64u:
   264  		v.Op = OpLOONG64DIVVU
   265  		return true
   266  	case OpDiv8:
   267  		return rewriteValueLOONG64_OpDiv8(v)
   268  	case OpDiv8u:
   269  		return rewriteValueLOONG64_OpDiv8u(v)
   270  	case OpEq16:
   271  		return rewriteValueLOONG64_OpEq16(v)
   272  	case OpEq32:
   273  		return rewriteValueLOONG64_OpEq32(v)
   274  	case OpEq32F:
   275  		return rewriteValueLOONG64_OpEq32F(v)
   276  	case OpEq64:
   277  		return rewriteValueLOONG64_OpEq64(v)
   278  	case OpEq64F:
   279  		return rewriteValueLOONG64_OpEq64F(v)
   280  	case OpEq8:
   281  		return rewriteValueLOONG64_OpEq8(v)
   282  	case OpEqB:
   283  		return rewriteValueLOONG64_OpEqB(v)
   284  	case OpEqPtr:
   285  		return rewriteValueLOONG64_OpEqPtr(v)
   286  	case OpFMA:
   287  		v.Op = OpLOONG64FMADDD
   288  		return true
   289  	case OpGetCallerPC:
   290  		v.Op = OpLOONG64LoweredGetCallerPC
   291  		return true
   292  	case OpGetCallerSP:
   293  		v.Op = OpLOONG64LoweredGetCallerSP
   294  		return true
   295  	case OpGetClosurePtr:
   296  		v.Op = OpLOONG64LoweredGetClosurePtr
   297  		return true
   298  	case OpHmul32:
   299  		v.Op = OpLOONG64MULH
   300  		return true
   301  	case OpHmul32u:
   302  		v.Op = OpLOONG64MULHU
   303  		return true
   304  	case OpHmul64:
   305  		v.Op = OpLOONG64MULHV
   306  		return true
   307  	case OpHmul64u:
   308  		v.Op = OpLOONG64MULHVU
   309  		return true
   310  	case OpInterCall:
   311  		v.Op = OpLOONG64CALLinter
   312  		return true
   313  	case OpIsInBounds:
   314  		return rewriteValueLOONG64_OpIsInBounds(v)
   315  	case OpIsNonNil:
   316  		return rewriteValueLOONG64_OpIsNonNil(v)
   317  	case OpIsSliceInBounds:
   318  		return rewriteValueLOONG64_OpIsSliceInBounds(v)
   319  	case OpLOONG64ADDD:
   320  		return rewriteValueLOONG64_OpLOONG64ADDD(v)
   321  	case OpLOONG64ADDF:
   322  		return rewriteValueLOONG64_OpLOONG64ADDF(v)
   323  	case OpLOONG64ADDV:
   324  		return rewriteValueLOONG64_OpLOONG64ADDV(v)
   325  	case OpLOONG64ADDVconst:
   326  		return rewriteValueLOONG64_OpLOONG64ADDVconst(v)
   327  	case OpLOONG64ADDshiftLLV:
   328  		return rewriteValueLOONG64_OpLOONG64ADDshiftLLV(v)
   329  	case OpLOONG64AND:
   330  		return rewriteValueLOONG64_OpLOONG64AND(v)
   331  	case OpLOONG64ANDconst:
   332  		return rewriteValueLOONG64_OpLOONG64ANDconst(v)
   333  	case OpLOONG64DIVV:
   334  		return rewriteValueLOONG64_OpLOONG64DIVV(v)
   335  	case OpLOONG64DIVVU:
   336  		return rewriteValueLOONG64_OpLOONG64DIVVU(v)
   337  	case OpLOONG64LoweredPanicBoundsCR:
   338  		return rewriteValueLOONG64_OpLOONG64LoweredPanicBoundsCR(v)
   339  	case OpLOONG64LoweredPanicBoundsRC:
   340  		return rewriteValueLOONG64_OpLOONG64LoweredPanicBoundsRC(v)
   341  	case OpLOONG64LoweredPanicBoundsRR:
   342  		return rewriteValueLOONG64_OpLOONG64LoweredPanicBoundsRR(v)
   343  	case OpLOONG64MASKEQZ:
   344  		return rewriteValueLOONG64_OpLOONG64MASKEQZ(v)
   345  	case OpLOONG64MASKNEZ:
   346  		return rewriteValueLOONG64_OpLOONG64MASKNEZ(v)
   347  	case OpLOONG64MOVBUload:
   348  		return rewriteValueLOONG64_OpLOONG64MOVBUload(v)
   349  	case OpLOONG64MOVBUloadidx:
   350  		return rewriteValueLOONG64_OpLOONG64MOVBUloadidx(v)
   351  	case OpLOONG64MOVBUreg:
   352  		return rewriteValueLOONG64_OpLOONG64MOVBUreg(v)
   353  	case OpLOONG64MOVBload:
   354  		return rewriteValueLOONG64_OpLOONG64MOVBload(v)
   355  	case OpLOONG64MOVBloadidx:
   356  		return rewriteValueLOONG64_OpLOONG64MOVBloadidx(v)
   357  	case OpLOONG64MOVBreg:
   358  		return rewriteValueLOONG64_OpLOONG64MOVBreg(v)
   359  	case OpLOONG64MOVBstore:
   360  		return rewriteValueLOONG64_OpLOONG64MOVBstore(v)
   361  	case OpLOONG64MOVBstoreidx:
   362  		return rewriteValueLOONG64_OpLOONG64MOVBstoreidx(v)
   363  	case OpLOONG64MOVDload:
   364  		return rewriteValueLOONG64_OpLOONG64MOVDload(v)
   365  	case OpLOONG64MOVDloadidx:
   366  		return rewriteValueLOONG64_OpLOONG64MOVDloadidx(v)
   367  	case OpLOONG64MOVDstore:
   368  		return rewriteValueLOONG64_OpLOONG64MOVDstore(v)
   369  	case OpLOONG64MOVDstoreidx:
   370  		return rewriteValueLOONG64_OpLOONG64MOVDstoreidx(v)
   371  	case OpLOONG64MOVFload:
   372  		return rewriteValueLOONG64_OpLOONG64MOVFload(v)
   373  	case OpLOONG64MOVFloadidx:
   374  		return rewriteValueLOONG64_OpLOONG64MOVFloadidx(v)
   375  	case OpLOONG64MOVFstore:
   376  		return rewriteValueLOONG64_OpLOONG64MOVFstore(v)
   377  	case OpLOONG64MOVFstoreidx:
   378  		return rewriteValueLOONG64_OpLOONG64MOVFstoreidx(v)
   379  	case OpLOONG64MOVHUload:
   380  		return rewriteValueLOONG64_OpLOONG64MOVHUload(v)
   381  	case OpLOONG64MOVHUloadidx:
   382  		return rewriteValueLOONG64_OpLOONG64MOVHUloadidx(v)
   383  	case OpLOONG64MOVHUreg:
   384  		return rewriteValueLOONG64_OpLOONG64MOVHUreg(v)
   385  	case OpLOONG64MOVHload:
   386  		return rewriteValueLOONG64_OpLOONG64MOVHload(v)
   387  	case OpLOONG64MOVHloadidx:
   388  		return rewriteValueLOONG64_OpLOONG64MOVHloadidx(v)
   389  	case OpLOONG64MOVHreg:
   390  		return rewriteValueLOONG64_OpLOONG64MOVHreg(v)
   391  	case OpLOONG64MOVHstore:
   392  		return rewriteValueLOONG64_OpLOONG64MOVHstore(v)
   393  	case OpLOONG64MOVHstoreidx:
   394  		return rewriteValueLOONG64_OpLOONG64MOVHstoreidx(v)
   395  	case OpLOONG64MOVVload:
   396  		return rewriteValueLOONG64_OpLOONG64MOVVload(v)
   397  	case OpLOONG64MOVVloadidx:
   398  		return rewriteValueLOONG64_OpLOONG64MOVVloadidx(v)
   399  	case OpLOONG64MOVVnop:
   400  		return rewriteValueLOONG64_OpLOONG64MOVVnop(v)
   401  	case OpLOONG64MOVVreg:
   402  		return rewriteValueLOONG64_OpLOONG64MOVVreg(v)
   403  	case OpLOONG64MOVVstore:
   404  		return rewriteValueLOONG64_OpLOONG64MOVVstore(v)
   405  	case OpLOONG64MOVVstoreidx:
   406  		return rewriteValueLOONG64_OpLOONG64MOVVstoreidx(v)
   407  	case OpLOONG64MOVWUload:
   408  		return rewriteValueLOONG64_OpLOONG64MOVWUload(v)
   409  	case OpLOONG64MOVWUloadidx:
   410  		return rewriteValueLOONG64_OpLOONG64MOVWUloadidx(v)
   411  	case OpLOONG64MOVWUreg:
   412  		return rewriteValueLOONG64_OpLOONG64MOVWUreg(v)
   413  	case OpLOONG64MOVWload:
   414  		return rewriteValueLOONG64_OpLOONG64MOVWload(v)
   415  	case OpLOONG64MOVWloadidx:
   416  		return rewriteValueLOONG64_OpLOONG64MOVWloadidx(v)
   417  	case OpLOONG64MOVWreg:
   418  		return rewriteValueLOONG64_OpLOONG64MOVWreg(v)
   419  	case OpLOONG64MOVWstore:
   420  		return rewriteValueLOONG64_OpLOONG64MOVWstore(v)
   421  	case OpLOONG64MOVWstoreidx:
   422  		return rewriteValueLOONG64_OpLOONG64MOVWstoreidx(v)
   423  	case OpLOONG64MULV:
   424  		return rewriteValueLOONG64_OpLOONG64MULV(v)
   425  	case OpLOONG64NEGV:
   426  		return rewriteValueLOONG64_OpLOONG64NEGV(v)
   427  	case OpLOONG64NOR:
   428  		return rewriteValueLOONG64_OpLOONG64NOR(v)
   429  	case OpLOONG64NORconst:
   430  		return rewriteValueLOONG64_OpLOONG64NORconst(v)
   431  	case OpLOONG64OR:
   432  		return rewriteValueLOONG64_OpLOONG64OR(v)
   433  	case OpLOONG64ORN:
   434  		return rewriteValueLOONG64_OpLOONG64ORN(v)
   435  	case OpLOONG64ORconst:
   436  		return rewriteValueLOONG64_OpLOONG64ORconst(v)
   437  	case OpLOONG64REMV:
   438  		return rewriteValueLOONG64_OpLOONG64REMV(v)
   439  	case OpLOONG64REMVU:
   440  		return rewriteValueLOONG64_OpLOONG64REMVU(v)
   441  	case OpLOONG64ROTR:
   442  		return rewriteValueLOONG64_OpLOONG64ROTR(v)
   443  	case OpLOONG64ROTRV:
   444  		return rewriteValueLOONG64_OpLOONG64ROTRV(v)
   445  	case OpLOONG64SGT:
   446  		return rewriteValueLOONG64_OpLOONG64SGT(v)
   447  	case OpLOONG64SGTU:
   448  		return rewriteValueLOONG64_OpLOONG64SGTU(v)
   449  	case OpLOONG64SGTUconst:
   450  		return rewriteValueLOONG64_OpLOONG64SGTUconst(v)
   451  	case OpLOONG64SGTconst:
   452  		return rewriteValueLOONG64_OpLOONG64SGTconst(v)
   453  	case OpLOONG64SLL:
   454  		return rewriteValueLOONG64_OpLOONG64SLL(v)
   455  	case OpLOONG64SLLV:
   456  		return rewriteValueLOONG64_OpLOONG64SLLV(v)
   457  	case OpLOONG64SLLVconst:
   458  		return rewriteValueLOONG64_OpLOONG64SLLVconst(v)
   459  	case OpLOONG64SLLconst:
   460  		return rewriteValueLOONG64_OpLOONG64SLLconst(v)
   461  	case OpLOONG64SRA:
   462  		return rewriteValueLOONG64_OpLOONG64SRA(v)
   463  	case OpLOONG64SRAV:
   464  		return rewriteValueLOONG64_OpLOONG64SRAV(v)
   465  	case OpLOONG64SRAVconst:
   466  		return rewriteValueLOONG64_OpLOONG64SRAVconst(v)
   467  	case OpLOONG64SRL:
   468  		return rewriteValueLOONG64_OpLOONG64SRL(v)
   469  	case OpLOONG64SRLV:
   470  		return rewriteValueLOONG64_OpLOONG64SRLV(v)
   471  	case OpLOONG64SRLVconst:
   472  		return rewriteValueLOONG64_OpLOONG64SRLVconst(v)
   473  	case OpLOONG64SUBD:
   474  		return rewriteValueLOONG64_OpLOONG64SUBD(v)
   475  	case OpLOONG64SUBF:
   476  		return rewriteValueLOONG64_OpLOONG64SUBF(v)
   477  	case OpLOONG64SUBV:
   478  		return rewriteValueLOONG64_OpLOONG64SUBV(v)
   479  	case OpLOONG64SUBVconst:
   480  		return rewriteValueLOONG64_OpLOONG64SUBVconst(v)
   481  	case OpLOONG64XOR:
   482  		return rewriteValueLOONG64_OpLOONG64XOR(v)
   483  	case OpLOONG64XORconst:
   484  		return rewriteValueLOONG64_OpLOONG64XORconst(v)
   485  	case OpLeq16:
   486  		return rewriteValueLOONG64_OpLeq16(v)
   487  	case OpLeq16U:
   488  		return rewriteValueLOONG64_OpLeq16U(v)
   489  	case OpLeq32:
   490  		return rewriteValueLOONG64_OpLeq32(v)
   491  	case OpLeq32F:
   492  		return rewriteValueLOONG64_OpLeq32F(v)
   493  	case OpLeq32U:
   494  		return rewriteValueLOONG64_OpLeq32U(v)
   495  	case OpLeq64:
   496  		return rewriteValueLOONG64_OpLeq64(v)
   497  	case OpLeq64F:
   498  		return rewriteValueLOONG64_OpLeq64F(v)
   499  	case OpLeq64U:
   500  		return rewriteValueLOONG64_OpLeq64U(v)
   501  	case OpLeq8:
   502  		return rewriteValueLOONG64_OpLeq8(v)
   503  	case OpLeq8U:
   504  		return rewriteValueLOONG64_OpLeq8U(v)
   505  	case OpLess16:
   506  		return rewriteValueLOONG64_OpLess16(v)
   507  	case OpLess16U:
   508  		return rewriteValueLOONG64_OpLess16U(v)
   509  	case OpLess32:
   510  		return rewriteValueLOONG64_OpLess32(v)
   511  	case OpLess32F:
   512  		return rewriteValueLOONG64_OpLess32F(v)
   513  	case OpLess32U:
   514  		return rewriteValueLOONG64_OpLess32U(v)
   515  	case OpLess64:
   516  		return rewriteValueLOONG64_OpLess64(v)
   517  	case OpLess64F:
   518  		return rewriteValueLOONG64_OpLess64F(v)
   519  	case OpLess64U:
   520  		return rewriteValueLOONG64_OpLess64U(v)
   521  	case OpLess8:
   522  		return rewriteValueLOONG64_OpLess8(v)
   523  	case OpLess8U:
   524  		return rewriteValueLOONG64_OpLess8U(v)
   525  	case OpLoad:
   526  		return rewriteValueLOONG64_OpLoad(v)
   527  	case OpLocalAddr:
   528  		return rewriteValueLOONG64_OpLocalAddr(v)
   529  	case OpLsh16x16:
   530  		return rewriteValueLOONG64_OpLsh16x16(v)
   531  	case OpLsh16x32:
   532  		return rewriteValueLOONG64_OpLsh16x32(v)
   533  	case OpLsh16x64:
   534  		return rewriteValueLOONG64_OpLsh16x64(v)
   535  	case OpLsh16x8:
   536  		return rewriteValueLOONG64_OpLsh16x8(v)
   537  	case OpLsh32x16:
   538  		return rewriteValueLOONG64_OpLsh32x16(v)
   539  	case OpLsh32x32:
   540  		return rewriteValueLOONG64_OpLsh32x32(v)
   541  	case OpLsh32x64:
   542  		return rewriteValueLOONG64_OpLsh32x64(v)
   543  	case OpLsh32x8:
   544  		return rewriteValueLOONG64_OpLsh32x8(v)
   545  	case OpLsh64x16:
   546  		return rewriteValueLOONG64_OpLsh64x16(v)
   547  	case OpLsh64x32:
   548  		return rewriteValueLOONG64_OpLsh64x32(v)
   549  	case OpLsh64x64:
   550  		return rewriteValueLOONG64_OpLsh64x64(v)
   551  	case OpLsh64x8:
   552  		return rewriteValueLOONG64_OpLsh64x8(v)
   553  	case OpLsh8x16:
   554  		return rewriteValueLOONG64_OpLsh8x16(v)
   555  	case OpLsh8x32:
   556  		return rewriteValueLOONG64_OpLsh8x32(v)
   557  	case OpLsh8x64:
   558  		return rewriteValueLOONG64_OpLsh8x64(v)
   559  	case OpLsh8x8:
   560  		return rewriteValueLOONG64_OpLsh8x8(v)
   561  	case OpMax32F:
   562  		v.Op = OpLOONG64FMAXF
   563  		return true
   564  	case OpMax64F:
   565  		v.Op = OpLOONG64FMAXD
   566  		return true
   567  	case OpMin32F:
   568  		v.Op = OpLOONG64FMINF
   569  		return true
   570  	case OpMin64F:
   571  		v.Op = OpLOONG64FMIND
   572  		return true
   573  	case OpMod16:
   574  		return rewriteValueLOONG64_OpMod16(v)
   575  	case OpMod16u:
   576  		return rewriteValueLOONG64_OpMod16u(v)
   577  	case OpMod32:
   578  		return rewriteValueLOONG64_OpMod32(v)
   579  	case OpMod32u:
   580  		return rewriteValueLOONG64_OpMod32u(v)
   581  	case OpMod64:
   582  		return rewriteValueLOONG64_OpMod64(v)
   583  	case OpMod64u:
   584  		v.Op = OpLOONG64REMVU
   585  		return true
   586  	case OpMod8:
   587  		return rewriteValueLOONG64_OpMod8(v)
   588  	case OpMod8u:
   589  		return rewriteValueLOONG64_OpMod8u(v)
   590  	case OpMove:
   591  		return rewriteValueLOONG64_OpMove(v)
   592  	case OpMul16:
   593  		v.Op = OpLOONG64MULV
   594  		return true
   595  	case OpMul32:
   596  		v.Op = OpLOONG64MULV
   597  		return true
   598  	case OpMul32F:
   599  		v.Op = OpLOONG64MULF
   600  		return true
   601  	case OpMul64:
   602  		v.Op = OpLOONG64MULV
   603  		return true
   604  	case OpMul64F:
   605  		v.Op = OpLOONG64MULD
   606  		return true
   607  	case OpMul8:
   608  		v.Op = OpLOONG64MULV
   609  		return true
   610  	case OpNeg16:
   611  		v.Op = OpLOONG64NEGV
   612  		return true
   613  	case OpNeg32:
   614  		v.Op = OpLOONG64NEGV
   615  		return true
   616  	case OpNeg32F:
   617  		v.Op = OpLOONG64NEGF
   618  		return true
   619  	case OpNeg64:
   620  		v.Op = OpLOONG64NEGV
   621  		return true
   622  	case OpNeg64F:
   623  		v.Op = OpLOONG64NEGD
   624  		return true
   625  	case OpNeg8:
   626  		v.Op = OpLOONG64NEGV
   627  		return true
   628  	case OpNeq16:
   629  		return rewriteValueLOONG64_OpNeq16(v)
   630  	case OpNeq32:
   631  		return rewriteValueLOONG64_OpNeq32(v)
   632  	case OpNeq32F:
   633  		return rewriteValueLOONG64_OpNeq32F(v)
   634  	case OpNeq64:
   635  		return rewriteValueLOONG64_OpNeq64(v)
   636  	case OpNeq64F:
   637  		return rewriteValueLOONG64_OpNeq64F(v)
   638  	case OpNeq8:
   639  		return rewriteValueLOONG64_OpNeq8(v)
   640  	case OpNeqB:
   641  		v.Op = OpLOONG64XOR
   642  		return true
   643  	case OpNeqPtr:
   644  		return rewriteValueLOONG64_OpNeqPtr(v)
   645  	case OpNilCheck:
   646  		v.Op = OpLOONG64LoweredNilCheck
   647  		return true
   648  	case OpNot:
   649  		return rewriteValueLOONG64_OpNot(v)
   650  	case OpOffPtr:
   651  		return rewriteValueLOONG64_OpOffPtr(v)
   652  	case OpOr16:
   653  		v.Op = OpLOONG64OR
   654  		return true
   655  	case OpOr32:
   656  		v.Op = OpLOONG64OR
   657  		return true
   658  	case OpOr64:
   659  		v.Op = OpLOONG64OR
   660  		return true
   661  	case OpOr8:
   662  		v.Op = OpLOONG64OR
   663  		return true
   664  	case OpOrB:
   665  		v.Op = OpLOONG64OR
   666  		return true
   667  	case OpPanicBounds:
   668  		v.Op = OpLOONG64LoweredPanicBoundsRR
   669  		return true
   670  	case OpPopCount16:
   671  		return rewriteValueLOONG64_OpPopCount16(v)
   672  	case OpPopCount32:
   673  		return rewriteValueLOONG64_OpPopCount32(v)
   674  	case OpPopCount64:
   675  		return rewriteValueLOONG64_OpPopCount64(v)
   676  	case OpPrefetchCache:
   677  		return rewriteValueLOONG64_OpPrefetchCache(v)
   678  	case OpPrefetchCacheStreamed:
   679  		return rewriteValueLOONG64_OpPrefetchCacheStreamed(v)
   680  	case OpPubBarrier:
   681  		v.Op = OpLOONG64LoweredPubBarrier
   682  		return true
   683  	case OpRotateLeft16:
   684  		return rewriteValueLOONG64_OpRotateLeft16(v)
   685  	case OpRotateLeft32:
   686  		return rewriteValueLOONG64_OpRotateLeft32(v)
   687  	case OpRotateLeft64:
   688  		return rewriteValueLOONG64_OpRotateLeft64(v)
   689  	case OpRotateLeft8:
   690  		return rewriteValueLOONG64_OpRotateLeft8(v)
   691  	case OpRound32F:
   692  		v.Op = OpLOONG64LoweredRound32F
   693  		return true
   694  	case OpRound64F:
   695  		v.Op = OpLOONG64LoweredRound64F
   696  		return true
   697  	case OpRsh16Ux16:
   698  		return rewriteValueLOONG64_OpRsh16Ux16(v)
   699  	case OpRsh16Ux32:
   700  		return rewriteValueLOONG64_OpRsh16Ux32(v)
   701  	case OpRsh16Ux64:
   702  		return rewriteValueLOONG64_OpRsh16Ux64(v)
   703  	case OpRsh16Ux8:
   704  		return rewriteValueLOONG64_OpRsh16Ux8(v)
   705  	case OpRsh16x16:
   706  		return rewriteValueLOONG64_OpRsh16x16(v)
   707  	case OpRsh16x32:
   708  		return rewriteValueLOONG64_OpRsh16x32(v)
   709  	case OpRsh16x64:
   710  		return rewriteValueLOONG64_OpRsh16x64(v)
   711  	case OpRsh16x8:
   712  		return rewriteValueLOONG64_OpRsh16x8(v)
   713  	case OpRsh32Ux16:
   714  		return rewriteValueLOONG64_OpRsh32Ux16(v)
   715  	case OpRsh32Ux32:
   716  		return rewriteValueLOONG64_OpRsh32Ux32(v)
   717  	case OpRsh32Ux64:
   718  		return rewriteValueLOONG64_OpRsh32Ux64(v)
   719  	case OpRsh32Ux8:
   720  		return rewriteValueLOONG64_OpRsh32Ux8(v)
   721  	case OpRsh32x16:
   722  		return rewriteValueLOONG64_OpRsh32x16(v)
   723  	case OpRsh32x32:
   724  		return rewriteValueLOONG64_OpRsh32x32(v)
   725  	case OpRsh32x64:
   726  		return rewriteValueLOONG64_OpRsh32x64(v)
   727  	case OpRsh32x8:
   728  		return rewriteValueLOONG64_OpRsh32x8(v)
   729  	case OpRsh64Ux16:
   730  		return rewriteValueLOONG64_OpRsh64Ux16(v)
   731  	case OpRsh64Ux32:
   732  		return rewriteValueLOONG64_OpRsh64Ux32(v)
   733  	case OpRsh64Ux64:
   734  		return rewriteValueLOONG64_OpRsh64Ux64(v)
   735  	case OpRsh64Ux8:
   736  		return rewriteValueLOONG64_OpRsh64Ux8(v)
   737  	case OpRsh64x16:
   738  		return rewriteValueLOONG64_OpRsh64x16(v)
   739  	case OpRsh64x32:
   740  		return rewriteValueLOONG64_OpRsh64x32(v)
   741  	case OpRsh64x64:
   742  		return rewriteValueLOONG64_OpRsh64x64(v)
   743  	case OpRsh64x8:
   744  		return rewriteValueLOONG64_OpRsh64x8(v)
   745  	case OpRsh8Ux16:
   746  		return rewriteValueLOONG64_OpRsh8Ux16(v)
   747  	case OpRsh8Ux32:
   748  		return rewriteValueLOONG64_OpRsh8Ux32(v)
   749  	case OpRsh8Ux64:
   750  		return rewriteValueLOONG64_OpRsh8Ux64(v)
   751  	case OpRsh8Ux8:
   752  		return rewriteValueLOONG64_OpRsh8Ux8(v)
   753  	case OpRsh8x16:
   754  		return rewriteValueLOONG64_OpRsh8x16(v)
   755  	case OpRsh8x32:
   756  		return rewriteValueLOONG64_OpRsh8x32(v)
   757  	case OpRsh8x64:
   758  		return rewriteValueLOONG64_OpRsh8x64(v)
   759  	case OpRsh8x8:
   760  		return rewriteValueLOONG64_OpRsh8x8(v)
   761  	case OpSelect0:
   762  		return rewriteValueLOONG64_OpSelect0(v)
   763  	case OpSelect1:
   764  		return rewriteValueLOONG64_OpSelect1(v)
   765  	case OpSelectN:
   766  		return rewriteValueLOONG64_OpSelectN(v)
   767  	case OpSignExt16to32:
   768  		v.Op = OpLOONG64MOVHreg
   769  		return true
   770  	case OpSignExt16to64:
   771  		v.Op = OpLOONG64MOVHreg
   772  		return true
   773  	case OpSignExt32to64:
   774  		v.Op = OpLOONG64MOVWreg
   775  		return true
   776  	case OpSignExt8to16:
   777  		v.Op = OpLOONG64MOVBreg
   778  		return true
   779  	case OpSignExt8to32:
   780  		v.Op = OpLOONG64MOVBreg
   781  		return true
   782  	case OpSignExt8to64:
   783  		v.Op = OpLOONG64MOVBreg
   784  		return true
   785  	case OpSlicemask:
   786  		return rewriteValueLOONG64_OpSlicemask(v)
   787  	case OpSqrt:
   788  		v.Op = OpLOONG64SQRTD
   789  		return true
   790  	case OpSqrt32:
   791  		v.Op = OpLOONG64SQRTF
   792  		return true
   793  	case OpStaticCall:
   794  		v.Op = OpLOONG64CALLstatic
   795  		return true
   796  	case OpStore:
   797  		return rewriteValueLOONG64_OpStore(v)
   798  	case OpSub16:
   799  		v.Op = OpLOONG64SUBV
   800  		return true
   801  	case OpSub32:
   802  		v.Op = OpLOONG64SUBV
   803  		return true
   804  	case OpSub32F:
   805  		v.Op = OpLOONG64SUBF
   806  		return true
   807  	case OpSub64:
   808  		v.Op = OpLOONG64SUBV
   809  		return true
   810  	case OpSub64F:
   811  		v.Op = OpLOONG64SUBD
   812  		return true
   813  	case OpSub8:
   814  		v.Op = OpLOONG64SUBV
   815  		return true
   816  	case OpSubPtr:
   817  		v.Op = OpLOONG64SUBV
   818  		return true
   819  	case OpTailCall:
   820  		v.Op = OpLOONG64CALLtail
   821  		return true
   822  	case OpTrunc16to8:
   823  		v.Op = OpCopy
   824  		return true
   825  	case OpTrunc32to16:
   826  		v.Op = OpCopy
   827  		return true
   828  	case OpTrunc32to8:
   829  		v.Op = OpCopy
   830  		return true
   831  	case OpTrunc64to16:
   832  		v.Op = OpCopy
   833  		return true
   834  	case OpTrunc64to32:
   835  		v.Op = OpCopy
   836  		return true
   837  	case OpTrunc64to8:
   838  		v.Op = OpCopy
   839  		return true
   840  	case OpWB:
   841  		v.Op = OpLOONG64LoweredWB
   842  		return true
   843  	case OpXor16:
   844  		v.Op = OpLOONG64XOR
   845  		return true
   846  	case OpXor32:
   847  		v.Op = OpLOONG64XOR
   848  		return true
   849  	case OpXor64:
   850  		v.Op = OpLOONG64XOR
   851  		return true
   852  	case OpXor8:
   853  		v.Op = OpLOONG64XOR
   854  		return true
   855  	case OpZero:
   856  		return rewriteValueLOONG64_OpZero(v)
   857  	case OpZeroExt16to32:
   858  		v.Op = OpLOONG64MOVHUreg
   859  		return true
   860  	case OpZeroExt16to64:
   861  		v.Op = OpLOONG64MOVHUreg
   862  		return true
   863  	case OpZeroExt32to64:
   864  		v.Op = OpLOONG64MOVWUreg
   865  		return true
   866  	case OpZeroExt8to16:
   867  		v.Op = OpLOONG64MOVBUreg
   868  		return true
   869  	case OpZeroExt8to32:
   870  		v.Op = OpLOONG64MOVBUreg
   871  		return true
   872  	case OpZeroExt8to64:
   873  		v.Op = OpLOONG64MOVBUreg
   874  		return true
   875  	}
   876  	return false
   877  }
   878  func rewriteValueLOONG64_OpAddr(v *Value) bool {
   879  	v_0 := v.Args[0]
   880  	// match: (Addr {sym} base)
   881  	// result: (MOVVaddr {sym} base)
   882  	for {
   883  		sym := auxToSym(v.Aux)
   884  		base := v_0
   885  		v.reset(OpLOONG64MOVVaddr)
   886  		v.Aux = symToAux(sym)
   887  		v.AddArg(base)
   888  		return true
   889  	}
   890  }
   891  func rewriteValueLOONG64_OpAtomicAnd8(v *Value) bool {
   892  	v_2 := v.Args[2]
   893  	v_1 := v.Args[1]
   894  	v_0 := v.Args[0]
   895  	b := v.Block
   896  	typ := &b.Func.Config.Types
   897  	// match: (AtomicAnd8 ptr val mem)
   898  	// 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)
   899  	for {
   900  		ptr := v_0
   901  		val := v_1
   902  		mem := v_2
   903  		v.reset(OpLOONG64LoweredAtomicAnd32)
   904  		v0 := b.NewValue0(v.Pos, OpLOONG64AND, typ.Uintptr)
   905  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
   906  		v1.AuxInt = int64ToAuxInt(^3)
   907  		v0.AddArg2(v1, ptr)
   908  		v2 := b.NewValue0(v.Pos, OpLOONG64NORconst, typ.UInt32)
   909  		v2.AuxInt = int64ToAuxInt(0)
   910  		v3 := b.NewValue0(v.Pos, OpLOONG64SLLV, typ.UInt32)
   911  		v4 := b.NewValue0(v.Pos, OpLOONG64XORconst, typ.UInt32)
   912  		v4.AuxInt = int64ToAuxInt(0xff)
   913  		v5 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
   914  		v5.AddArg(val)
   915  		v4.AddArg(v5)
   916  		v6 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.UInt64)
   917  		v6.AuxInt = int64ToAuxInt(3)
   918  		v7 := b.NewValue0(v.Pos, OpLOONG64ANDconst, typ.UInt64)
   919  		v7.AuxInt = int64ToAuxInt(3)
   920  		v7.AddArg(ptr)
   921  		v6.AddArg(v7)
   922  		v3.AddArg2(v4, v6)
   923  		v2.AddArg(v3)
   924  		v.AddArg3(v0, v2, mem)
   925  		return true
   926  	}
   927  }
   928  func rewriteValueLOONG64_OpAtomicCompareAndSwap32(v *Value) bool {
   929  	v_3 := v.Args[3]
   930  	v_2 := v.Args[2]
   931  	v_1 := v.Args[1]
   932  	v_0 := v.Args[0]
   933  	b := v.Block
   934  	typ := &b.Func.Config.Types
   935  	// match: (AtomicCompareAndSwap32 ptr old new mem)
   936  	// result: (LoweredAtomicCas32 ptr (SignExt32to64 old) new mem)
   937  	for {
   938  		ptr := v_0
   939  		old := v_1
   940  		new := v_2
   941  		mem := v_3
   942  		v.reset(OpLOONG64LoweredAtomicCas32)
   943  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
   944  		v0.AddArg(old)
   945  		v.AddArg4(ptr, v0, new, mem)
   946  		return true
   947  	}
   948  }
   949  func rewriteValueLOONG64_OpAtomicCompareAndSwap32Variant(v *Value) bool {
   950  	v_3 := v.Args[3]
   951  	v_2 := v.Args[2]
   952  	v_1 := v.Args[1]
   953  	v_0 := v.Args[0]
   954  	b := v.Block
   955  	typ := &b.Func.Config.Types
   956  	// match: (AtomicCompareAndSwap32Variant ptr old new mem)
   957  	// result: (LoweredAtomicCas32Variant ptr (SignExt32to64 old) new mem)
   958  	for {
   959  		ptr := v_0
   960  		old := v_1
   961  		new := v_2
   962  		mem := v_3
   963  		v.reset(OpLOONG64LoweredAtomicCas32Variant)
   964  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
   965  		v0.AddArg(old)
   966  		v.AddArg4(ptr, v0, new, mem)
   967  		return true
   968  	}
   969  }
   970  func rewriteValueLOONG64_OpAtomicOr8(v *Value) bool {
   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: (AtomicOr8 ptr val mem)
   977  	// result: (LoweredAtomicOr32 (AND <typ.Uintptr> (MOVVconst [^3]) ptr) (SLLV <typ.UInt32> (ZeroExt8to32 val) (SLLVconst <typ.UInt64> [3] (ANDconst <typ.UInt64> [3] ptr))) mem)
   978  	for {
   979  		ptr := v_0
   980  		val := v_1
   981  		mem := v_2
   982  		v.reset(OpLOONG64LoweredAtomicOr32)
   983  		v0 := b.NewValue0(v.Pos, OpLOONG64AND, typ.Uintptr)
   984  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
   985  		v1.AuxInt = int64ToAuxInt(^3)
   986  		v0.AddArg2(v1, ptr)
   987  		v2 := b.NewValue0(v.Pos, OpLOONG64SLLV, typ.UInt32)
   988  		v3 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
   989  		v3.AddArg(val)
   990  		v4 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.UInt64)
   991  		v4.AuxInt = int64ToAuxInt(3)
   992  		v5 := b.NewValue0(v.Pos, OpLOONG64ANDconst, typ.UInt64)
   993  		v5.AuxInt = int64ToAuxInt(3)
   994  		v5.AddArg(ptr)
   995  		v4.AddArg(v5)
   996  		v2.AddArg2(v3, v4)
   997  		v.AddArg3(v0, v2, mem)
   998  		return true
   999  	}
  1000  }
  1001  func rewriteValueLOONG64_OpAvg64u(v *Value) bool {
  1002  	v_1 := v.Args[1]
  1003  	v_0 := v.Args[0]
  1004  	b := v.Block
  1005  	// match: (Avg64u <t> x y)
  1006  	// result: (ADDV (SRLVconst <t> (SUBV <t> x y) [1]) y)
  1007  	for {
  1008  		t := v.Type
  1009  		x := v_0
  1010  		y := v_1
  1011  		v.reset(OpLOONG64ADDV)
  1012  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLVconst, t)
  1013  		v0.AuxInt = int64ToAuxInt(1)
  1014  		v1 := b.NewValue0(v.Pos, OpLOONG64SUBV, t)
  1015  		v1.AddArg2(x, y)
  1016  		v0.AddArg(v1)
  1017  		v.AddArg2(v0, y)
  1018  		return true
  1019  	}
  1020  }
  1021  func rewriteValueLOONG64_OpBitLen16(v *Value) bool {
  1022  	v_0 := v.Args[0]
  1023  	b := v.Block
  1024  	typ := &b.Func.Config.Types
  1025  	// match: (BitLen16 x)
  1026  	// result: (BitLen64 (ZeroExt16to64 x))
  1027  	for {
  1028  		x := v_0
  1029  		v.reset(OpBitLen64)
  1030  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1031  		v0.AddArg(x)
  1032  		v.AddArg(v0)
  1033  		return true
  1034  	}
  1035  }
  1036  func rewriteValueLOONG64_OpBitLen32(v *Value) bool {
  1037  	v_0 := v.Args[0]
  1038  	b := v.Block
  1039  	// match: (BitLen32 <t> x)
  1040  	// result: (NEGV <t> (SUBVconst <t> [32] (CLZW <t> x)))
  1041  	for {
  1042  		t := v.Type
  1043  		x := v_0
  1044  		v.reset(OpLOONG64NEGV)
  1045  		v.Type = t
  1046  		v0 := b.NewValue0(v.Pos, OpLOONG64SUBVconst, t)
  1047  		v0.AuxInt = int64ToAuxInt(32)
  1048  		v1 := b.NewValue0(v.Pos, OpLOONG64CLZW, t)
  1049  		v1.AddArg(x)
  1050  		v0.AddArg(v1)
  1051  		v.AddArg(v0)
  1052  		return true
  1053  	}
  1054  }
  1055  func rewriteValueLOONG64_OpBitLen64(v *Value) bool {
  1056  	v_0 := v.Args[0]
  1057  	b := v.Block
  1058  	// match: (BitLen64 <t> x)
  1059  	// result: (NEGV <t> (SUBVconst <t> [64] (CLZV <t> x)))
  1060  	for {
  1061  		t := v.Type
  1062  		x := v_0
  1063  		v.reset(OpLOONG64NEGV)
  1064  		v.Type = t
  1065  		v0 := b.NewValue0(v.Pos, OpLOONG64SUBVconst, t)
  1066  		v0.AuxInt = int64ToAuxInt(64)
  1067  		v1 := b.NewValue0(v.Pos, OpLOONG64CLZV, t)
  1068  		v1.AddArg(x)
  1069  		v0.AddArg(v1)
  1070  		v.AddArg(v0)
  1071  		return true
  1072  	}
  1073  }
  1074  func rewriteValueLOONG64_OpBitLen8(v *Value) bool {
  1075  	v_0 := v.Args[0]
  1076  	b := v.Block
  1077  	typ := &b.Func.Config.Types
  1078  	// match: (BitLen8 x)
  1079  	// result: (BitLen64 (ZeroExt8to64 x))
  1080  	for {
  1081  		x := v_0
  1082  		v.reset(OpBitLen64)
  1083  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1084  		v0.AddArg(x)
  1085  		v.AddArg(v0)
  1086  		return true
  1087  	}
  1088  }
  1089  func rewriteValueLOONG64_OpBitRev16(v *Value) bool {
  1090  	v_0 := v.Args[0]
  1091  	b := v.Block
  1092  	// match: (BitRev16 <t> x)
  1093  	// result: (REVB2H (BITREV4B <t> x))
  1094  	for {
  1095  		t := v.Type
  1096  		x := v_0
  1097  		v.reset(OpLOONG64REVB2H)
  1098  		v0 := b.NewValue0(v.Pos, OpLOONG64BITREV4B, t)
  1099  		v0.AddArg(x)
  1100  		v.AddArg(v0)
  1101  		return true
  1102  	}
  1103  }
  1104  func rewriteValueLOONG64_OpCom16(v *Value) bool {
  1105  	v_0 := v.Args[0]
  1106  	b := v.Block
  1107  	typ := &b.Func.Config.Types
  1108  	// match: (Com16 x)
  1109  	// result: (NOR (MOVVconst [0]) x)
  1110  	for {
  1111  		x := v_0
  1112  		v.reset(OpLOONG64NOR)
  1113  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1114  		v0.AuxInt = int64ToAuxInt(0)
  1115  		v.AddArg2(v0, x)
  1116  		return true
  1117  	}
  1118  }
  1119  func rewriteValueLOONG64_OpCom32(v *Value) bool {
  1120  	v_0 := v.Args[0]
  1121  	b := v.Block
  1122  	typ := &b.Func.Config.Types
  1123  	// match: (Com32 x)
  1124  	// result: (NOR (MOVVconst [0]) x)
  1125  	for {
  1126  		x := v_0
  1127  		v.reset(OpLOONG64NOR)
  1128  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1129  		v0.AuxInt = int64ToAuxInt(0)
  1130  		v.AddArg2(v0, x)
  1131  		return true
  1132  	}
  1133  }
  1134  func rewriteValueLOONG64_OpCom64(v *Value) bool {
  1135  	v_0 := v.Args[0]
  1136  	b := v.Block
  1137  	typ := &b.Func.Config.Types
  1138  	// match: (Com64 x)
  1139  	// result: (NOR (MOVVconst [0]) x)
  1140  	for {
  1141  		x := v_0
  1142  		v.reset(OpLOONG64NOR)
  1143  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1144  		v0.AuxInt = int64ToAuxInt(0)
  1145  		v.AddArg2(v0, x)
  1146  		return true
  1147  	}
  1148  }
  1149  func rewriteValueLOONG64_OpCom8(v *Value) bool {
  1150  	v_0 := v.Args[0]
  1151  	b := v.Block
  1152  	typ := &b.Func.Config.Types
  1153  	// match: (Com8 x)
  1154  	// result: (NOR (MOVVconst [0]) x)
  1155  	for {
  1156  		x := v_0
  1157  		v.reset(OpLOONG64NOR)
  1158  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1159  		v0.AuxInt = int64ToAuxInt(0)
  1160  		v.AddArg2(v0, x)
  1161  		return true
  1162  	}
  1163  }
  1164  func rewriteValueLOONG64_OpCondSelect(v *Value) bool {
  1165  	v_2 := v.Args[2]
  1166  	v_1 := v.Args[1]
  1167  	v_0 := v.Args[0]
  1168  	b := v.Block
  1169  	// match: (CondSelect <t> x y cond)
  1170  	// result: (OR (MASKEQZ <t> x cond) (MASKNEZ <t> y cond))
  1171  	for {
  1172  		t := v.Type
  1173  		x := v_0
  1174  		y := v_1
  1175  		cond := v_2
  1176  		v.reset(OpLOONG64OR)
  1177  		v0 := b.NewValue0(v.Pos, OpLOONG64MASKEQZ, t)
  1178  		v0.AddArg2(x, cond)
  1179  		v1 := b.NewValue0(v.Pos, OpLOONG64MASKNEZ, t)
  1180  		v1.AddArg2(y, cond)
  1181  		v.AddArg2(v0, v1)
  1182  		return true
  1183  	}
  1184  }
  1185  func rewriteValueLOONG64_OpConst16(v *Value) bool {
  1186  	// match: (Const16 [val])
  1187  	// result: (MOVVconst [int64(val)])
  1188  	for {
  1189  		val := auxIntToInt16(v.AuxInt)
  1190  		v.reset(OpLOONG64MOVVconst)
  1191  		v.AuxInt = int64ToAuxInt(int64(val))
  1192  		return true
  1193  	}
  1194  }
  1195  func rewriteValueLOONG64_OpConst32(v *Value) bool {
  1196  	// match: (Const32 [val])
  1197  	// result: (MOVVconst [int64(val)])
  1198  	for {
  1199  		val := auxIntToInt32(v.AuxInt)
  1200  		v.reset(OpLOONG64MOVVconst)
  1201  		v.AuxInt = int64ToAuxInt(int64(val))
  1202  		return true
  1203  	}
  1204  }
  1205  func rewriteValueLOONG64_OpConst32F(v *Value) bool {
  1206  	// match: (Const32F [val])
  1207  	// result: (MOVFconst [float64(val)])
  1208  	for {
  1209  		val := auxIntToFloat32(v.AuxInt)
  1210  		v.reset(OpLOONG64MOVFconst)
  1211  		v.AuxInt = float64ToAuxInt(float64(val))
  1212  		return true
  1213  	}
  1214  }
  1215  func rewriteValueLOONG64_OpConst64(v *Value) bool {
  1216  	// match: (Const64 [val])
  1217  	// result: (MOVVconst [int64(val)])
  1218  	for {
  1219  		val := auxIntToInt64(v.AuxInt)
  1220  		v.reset(OpLOONG64MOVVconst)
  1221  		v.AuxInt = int64ToAuxInt(int64(val))
  1222  		return true
  1223  	}
  1224  }
  1225  func rewriteValueLOONG64_OpConst64F(v *Value) bool {
  1226  	// match: (Const64F [val])
  1227  	// result: (MOVDconst [float64(val)])
  1228  	for {
  1229  		val := auxIntToFloat64(v.AuxInt)
  1230  		v.reset(OpLOONG64MOVDconst)
  1231  		v.AuxInt = float64ToAuxInt(float64(val))
  1232  		return true
  1233  	}
  1234  }
  1235  func rewriteValueLOONG64_OpConst8(v *Value) bool {
  1236  	// match: (Const8 [val])
  1237  	// result: (MOVVconst [int64(val)])
  1238  	for {
  1239  		val := auxIntToInt8(v.AuxInt)
  1240  		v.reset(OpLOONG64MOVVconst)
  1241  		v.AuxInt = int64ToAuxInt(int64(val))
  1242  		return true
  1243  	}
  1244  }
  1245  func rewriteValueLOONG64_OpConstBool(v *Value) bool {
  1246  	// match: (ConstBool [t])
  1247  	// result: (MOVVconst [int64(b2i(t))])
  1248  	for {
  1249  		t := auxIntToBool(v.AuxInt)
  1250  		v.reset(OpLOONG64MOVVconst)
  1251  		v.AuxInt = int64ToAuxInt(int64(b2i(t)))
  1252  		return true
  1253  	}
  1254  }
  1255  func rewriteValueLOONG64_OpConstNil(v *Value) bool {
  1256  	// match: (ConstNil)
  1257  	// result: (MOVVconst [0])
  1258  	for {
  1259  		v.reset(OpLOONG64MOVVconst)
  1260  		v.AuxInt = int64ToAuxInt(0)
  1261  		return true
  1262  	}
  1263  }
  1264  func rewriteValueLOONG64_OpCtz16(v *Value) bool {
  1265  	v_0 := v.Args[0]
  1266  	b := v.Block
  1267  	typ := &b.Func.Config.Types
  1268  	// match: (Ctz16 x)
  1269  	// result: (CTZV (OR <typ.UInt64> x (MOVVconst [1<<16])))
  1270  	for {
  1271  		x := v_0
  1272  		v.reset(OpLOONG64CTZV)
  1273  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, typ.UInt64)
  1274  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1275  		v1.AuxInt = int64ToAuxInt(1 << 16)
  1276  		v0.AddArg2(x, v1)
  1277  		v.AddArg(v0)
  1278  		return true
  1279  	}
  1280  }
  1281  func rewriteValueLOONG64_OpCtz8(v *Value) bool {
  1282  	v_0 := v.Args[0]
  1283  	b := v.Block
  1284  	typ := &b.Func.Config.Types
  1285  	// match: (Ctz8 x)
  1286  	// result: (CTZV (OR <typ.UInt64> x (MOVVconst [1<<8])))
  1287  	for {
  1288  		x := v_0
  1289  		v.reset(OpLOONG64CTZV)
  1290  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, typ.UInt64)
  1291  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1292  		v1.AuxInt = int64ToAuxInt(1 << 8)
  1293  		v0.AddArg2(x, v1)
  1294  		v.AddArg(v0)
  1295  		return true
  1296  	}
  1297  }
  1298  func rewriteValueLOONG64_OpDiv16(v *Value) bool {
  1299  	v_1 := v.Args[1]
  1300  	v_0 := v.Args[0]
  1301  	b := v.Block
  1302  	typ := &b.Func.Config.Types
  1303  	// match: (Div16 x y)
  1304  	// result: (DIVV (SignExt16to64 x) (SignExt16to64 y))
  1305  	for {
  1306  		x := v_0
  1307  		y := v_1
  1308  		v.reset(OpLOONG64DIVV)
  1309  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  1310  		v0.AddArg(x)
  1311  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  1312  		v1.AddArg(y)
  1313  		v.AddArg2(v0, v1)
  1314  		return true
  1315  	}
  1316  }
  1317  func rewriteValueLOONG64_OpDiv16u(v *Value) bool {
  1318  	v_1 := v.Args[1]
  1319  	v_0 := v.Args[0]
  1320  	b := v.Block
  1321  	typ := &b.Func.Config.Types
  1322  	// match: (Div16u x y)
  1323  	// result: (DIVVU (ZeroExt16to64 x) (ZeroExt16to64 y))
  1324  	for {
  1325  		x := v_0
  1326  		y := v_1
  1327  		v.reset(OpLOONG64DIVVU)
  1328  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1329  		v0.AddArg(x)
  1330  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1331  		v1.AddArg(y)
  1332  		v.AddArg2(v0, v1)
  1333  		return true
  1334  	}
  1335  }
  1336  func rewriteValueLOONG64_OpDiv32(v *Value) bool {
  1337  	v_1 := v.Args[1]
  1338  	v_0 := v.Args[0]
  1339  	b := v.Block
  1340  	typ := &b.Func.Config.Types
  1341  	// match: (Div32 x y)
  1342  	// result: (DIVV (SignExt32to64 x) (SignExt32to64 y))
  1343  	for {
  1344  		x := v_0
  1345  		y := v_1
  1346  		v.reset(OpLOONG64DIVV)
  1347  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1348  		v0.AddArg(x)
  1349  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1350  		v1.AddArg(y)
  1351  		v.AddArg2(v0, v1)
  1352  		return true
  1353  	}
  1354  }
  1355  func rewriteValueLOONG64_OpDiv32u(v *Value) bool {
  1356  	v_1 := v.Args[1]
  1357  	v_0 := v.Args[0]
  1358  	b := v.Block
  1359  	typ := &b.Func.Config.Types
  1360  	// match: (Div32u x y)
  1361  	// result: (DIVVU (ZeroExt32to64 x) (ZeroExt32to64 y))
  1362  	for {
  1363  		x := v_0
  1364  		y := v_1
  1365  		v.reset(OpLOONG64DIVVU)
  1366  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1367  		v0.AddArg(x)
  1368  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1369  		v1.AddArg(y)
  1370  		v.AddArg2(v0, v1)
  1371  		return true
  1372  	}
  1373  }
  1374  func rewriteValueLOONG64_OpDiv64(v *Value) bool {
  1375  	v_1 := v.Args[1]
  1376  	v_0 := v.Args[0]
  1377  	// match: (Div64 x y)
  1378  	// result: (DIVV x y)
  1379  	for {
  1380  		x := v_0
  1381  		y := v_1
  1382  		v.reset(OpLOONG64DIVV)
  1383  		v.AddArg2(x, y)
  1384  		return true
  1385  	}
  1386  }
  1387  func rewriteValueLOONG64_OpDiv8(v *Value) bool {
  1388  	v_1 := v.Args[1]
  1389  	v_0 := v.Args[0]
  1390  	b := v.Block
  1391  	typ := &b.Func.Config.Types
  1392  	// match: (Div8 x y)
  1393  	// result: (DIVV (SignExt8to64 x) (SignExt8to64 y))
  1394  	for {
  1395  		x := v_0
  1396  		y := v_1
  1397  		v.reset(OpLOONG64DIVV)
  1398  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1399  		v0.AddArg(x)
  1400  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1401  		v1.AddArg(y)
  1402  		v.AddArg2(v0, v1)
  1403  		return true
  1404  	}
  1405  }
  1406  func rewriteValueLOONG64_OpDiv8u(v *Value) bool {
  1407  	v_1 := v.Args[1]
  1408  	v_0 := v.Args[0]
  1409  	b := v.Block
  1410  	typ := &b.Func.Config.Types
  1411  	// match: (Div8u x y)
  1412  	// result: (DIVVU (ZeroExt8to64 x) (ZeroExt8to64 y))
  1413  	for {
  1414  		x := v_0
  1415  		y := v_1
  1416  		v.reset(OpLOONG64DIVVU)
  1417  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1418  		v0.AddArg(x)
  1419  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1420  		v1.AddArg(y)
  1421  		v.AddArg2(v0, v1)
  1422  		return true
  1423  	}
  1424  }
  1425  func rewriteValueLOONG64_OpEq16(v *Value) bool {
  1426  	v_1 := v.Args[1]
  1427  	v_0 := v.Args[0]
  1428  	b := v.Block
  1429  	typ := &b.Func.Config.Types
  1430  	// match: (Eq16 x y)
  1431  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt16to64 x) (ZeroExt16to64 y)))
  1432  	for {
  1433  		x := v_0
  1434  		y := v_1
  1435  		v.reset(OpLOONG64SGTU)
  1436  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1437  		v0.AuxInt = int64ToAuxInt(1)
  1438  		v1 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  1439  		v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1440  		v2.AddArg(x)
  1441  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1442  		v3.AddArg(y)
  1443  		v1.AddArg2(v2, v3)
  1444  		v.AddArg2(v0, v1)
  1445  		return true
  1446  	}
  1447  }
  1448  func rewriteValueLOONG64_OpEq32(v *Value) bool {
  1449  	v_1 := v.Args[1]
  1450  	v_0 := v.Args[0]
  1451  	b := v.Block
  1452  	typ := &b.Func.Config.Types
  1453  	// match: (Eq32 x y)
  1454  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt32to64 x) (ZeroExt32to64 y)))
  1455  	for {
  1456  		x := v_0
  1457  		y := v_1
  1458  		v.reset(OpLOONG64SGTU)
  1459  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1460  		v0.AuxInt = int64ToAuxInt(1)
  1461  		v1 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  1462  		v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1463  		v2.AddArg(x)
  1464  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1465  		v3.AddArg(y)
  1466  		v1.AddArg2(v2, v3)
  1467  		v.AddArg2(v0, v1)
  1468  		return true
  1469  	}
  1470  }
  1471  func rewriteValueLOONG64_OpEq32F(v *Value) bool {
  1472  	v_1 := v.Args[1]
  1473  	v_0 := v.Args[0]
  1474  	b := v.Block
  1475  	// match: (Eq32F x y)
  1476  	// result: (FPFlagTrue (CMPEQF x y))
  1477  	for {
  1478  		x := v_0
  1479  		y := v_1
  1480  		v.reset(OpLOONG64FPFlagTrue)
  1481  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPEQF, types.TypeFlags)
  1482  		v0.AddArg2(x, y)
  1483  		v.AddArg(v0)
  1484  		return true
  1485  	}
  1486  }
  1487  func rewriteValueLOONG64_OpEq64(v *Value) bool {
  1488  	v_1 := v.Args[1]
  1489  	v_0 := v.Args[0]
  1490  	b := v.Block
  1491  	typ := &b.Func.Config.Types
  1492  	// match: (Eq64 x y)
  1493  	// result: (SGTU (MOVVconst [1]) (XOR x y))
  1494  	for {
  1495  		x := v_0
  1496  		y := v_1
  1497  		v.reset(OpLOONG64SGTU)
  1498  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1499  		v0.AuxInt = int64ToAuxInt(1)
  1500  		v1 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  1501  		v1.AddArg2(x, y)
  1502  		v.AddArg2(v0, v1)
  1503  		return true
  1504  	}
  1505  }
  1506  func rewriteValueLOONG64_OpEq64F(v *Value) bool {
  1507  	v_1 := v.Args[1]
  1508  	v_0 := v.Args[0]
  1509  	b := v.Block
  1510  	// match: (Eq64F x y)
  1511  	// result: (FPFlagTrue (CMPEQD x y))
  1512  	for {
  1513  		x := v_0
  1514  		y := v_1
  1515  		v.reset(OpLOONG64FPFlagTrue)
  1516  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPEQD, types.TypeFlags)
  1517  		v0.AddArg2(x, y)
  1518  		v.AddArg(v0)
  1519  		return true
  1520  	}
  1521  }
  1522  func rewriteValueLOONG64_OpEq8(v *Value) bool {
  1523  	v_1 := v.Args[1]
  1524  	v_0 := v.Args[0]
  1525  	b := v.Block
  1526  	typ := &b.Func.Config.Types
  1527  	// match: (Eq8 x y)
  1528  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt8to64 x) (ZeroExt8to64 y)))
  1529  	for {
  1530  		x := v_0
  1531  		y := v_1
  1532  		v.reset(OpLOONG64SGTU)
  1533  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1534  		v0.AuxInt = int64ToAuxInt(1)
  1535  		v1 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  1536  		v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1537  		v2.AddArg(x)
  1538  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1539  		v3.AddArg(y)
  1540  		v1.AddArg2(v2, v3)
  1541  		v.AddArg2(v0, v1)
  1542  		return true
  1543  	}
  1544  }
  1545  func rewriteValueLOONG64_OpEqB(v *Value) bool {
  1546  	v_1 := v.Args[1]
  1547  	v_0 := v.Args[0]
  1548  	b := v.Block
  1549  	typ := &b.Func.Config.Types
  1550  	// match: (EqB x y)
  1551  	// result: (XOR (MOVVconst [1]) (XOR <typ.Bool> x y))
  1552  	for {
  1553  		x := v_0
  1554  		y := v_1
  1555  		v.reset(OpLOONG64XOR)
  1556  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1557  		v0.AuxInt = int64ToAuxInt(1)
  1558  		v1 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.Bool)
  1559  		v1.AddArg2(x, y)
  1560  		v.AddArg2(v0, v1)
  1561  		return true
  1562  	}
  1563  }
  1564  func rewriteValueLOONG64_OpEqPtr(v *Value) bool {
  1565  	v_1 := v.Args[1]
  1566  	v_0 := v.Args[0]
  1567  	b := v.Block
  1568  	typ := &b.Func.Config.Types
  1569  	// match: (EqPtr x y)
  1570  	// result: (SGTU (MOVVconst [1]) (XOR x y))
  1571  	for {
  1572  		x := v_0
  1573  		y := v_1
  1574  		v.reset(OpLOONG64SGTU)
  1575  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1576  		v0.AuxInt = int64ToAuxInt(1)
  1577  		v1 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  1578  		v1.AddArg2(x, y)
  1579  		v.AddArg2(v0, v1)
  1580  		return true
  1581  	}
  1582  }
  1583  func rewriteValueLOONG64_OpIsInBounds(v *Value) bool {
  1584  	v_1 := v.Args[1]
  1585  	v_0 := v.Args[0]
  1586  	// match: (IsInBounds idx len)
  1587  	// result: (SGTU len idx)
  1588  	for {
  1589  		idx := v_0
  1590  		len := v_1
  1591  		v.reset(OpLOONG64SGTU)
  1592  		v.AddArg2(len, idx)
  1593  		return true
  1594  	}
  1595  }
  1596  func rewriteValueLOONG64_OpIsNonNil(v *Value) bool {
  1597  	v_0 := v.Args[0]
  1598  	b := v.Block
  1599  	typ := &b.Func.Config.Types
  1600  	// match: (IsNonNil ptr)
  1601  	// result: (SGTU ptr (MOVVconst [0]))
  1602  	for {
  1603  		ptr := v_0
  1604  		v.reset(OpLOONG64SGTU)
  1605  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1606  		v0.AuxInt = int64ToAuxInt(0)
  1607  		v.AddArg2(ptr, v0)
  1608  		return true
  1609  	}
  1610  }
  1611  func rewriteValueLOONG64_OpIsSliceInBounds(v *Value) bool {
  1612  	v_1 := v.Args[1]
  1613  	v_0 := v.Args[0]
  1614  	b := v.Block
  1615  	typ := &b.Func.Config.Types
  1616  	// match: (IsSliceInBounds idx len)
  1617  	// result: (XOR (MOVVconst [1]) (SGTU idx len))
  1618  	for {
  1619  		idx := v_0
  1620  		len := v_1
  1621  		v.reset(OpLOONG64XOR)
  1622  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  1623  		v0.AuxInt = int64ToAuxInt(1)
  1624  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  1625  		v1.AddArg2(idx, len)
  1626  		v.AddArg2(v0, v1)
  1627  		return true
  1628  	}
  1629  }
  1630  func rewriteValueLOONG64_OpLOONG64ADDD(v *Value) bool {
  1631  	v_1 := v.Args[1]
  1632  	v_0 := v.Args[0]
  1633  	// match: (ADDD (MULD x y) z)
  1634  	// cond: z.Block.Func.useFMA(v)
  1635  	// result: (FMADDD x y z)
  1636  	for {
  1637  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1638  			if v_0.Op != OpLOONG64MULD {
  1639  				continue
  1640  			}
  1641  			y := v_0.Args[1]
  1642  			x := v_0.Args[0]
  1643  			z := v_1
  1644  			if !(z.Block.Func.useFMA(v)) {
  1645  				continue
  1646  			}
  1647  			v.reset(OpLOONG64FMADDD)
  1648  			v.AddArg3(x, y, z)
  1649  			return true
  1650  		}
  1651  		break
  1652  	}
  1653  	// match: (ADDD z (NEGD (MULD x y)))
  1654  	// cond: z.Block.Func.useFMA(v)
  1655  	// result: (FNMSUBD x y z)
  1656  	for {
  1657  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1658  			z := v_0
  1659  			if v_1.Op != OpLOONG64NEGD {
  1660  				continue
  1661  			}
  1662  			v_1_0 := v_1.Args[0]
  1663  			if v_1_0.Op != OpLOONG64MULD {
  1664  				continue
  1665  			}
  1666  			y := v_1_0.Args[1]
  1667  			x := v_1_0.Args[0]
  1668  			if !(z.Block.Func.useFMA(v)) {
  1669  				continue
  1670  			}
  1671  			v.reset(OpLOONG64FNMSUBD)
  1672  			v.AddArg3(x, y, z)
  1673  			return true
  1674  		}
  1675  		break
  1676  	}
  1677  	return false
  1678  }
  1679  func rewriteValueLOONG64_OpLOONG64ADDF(v *Value) bool {
  1680  	v_1 := v.Args[1]
  1681  	v_0 := v.Args[0]
  1682  	// match: (ADDF (MULF x y) z)
  1683  	// cond: z.Block.Func.useFMA(v)
  1684  	// result: (FMADDF x y z)
  1685  	for {
  1686  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1687  			if v_0.Op != OpLOONG64MULF {
  1688  				continue
  1689  			}
  1690  			y := v_0.Args[1]
  1691  			x := v_0.Args[0]
  1692  			z := v_1
  1693  			if !(z.Block.Func.useFMA(v)) {
  1694  				continue
  1695  			}
  1696  			v.reset(OpLOONG64FMADDF)
  1697  			v.AddArg3(x, y, z)
  1698  			return true
  1699  		}
  1700  		break
  1701  	}
  1702  	// match: (ADDF z (NEGF (MULF x y)))
  1703  	// cond: z.Block.Func.useFMA(v)
  1704  	// result: (FNMSUBF x y z)
  1705  	for {
  1706  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1707  			z := v_0
  1708  			if v_1.Op != OpLOONG64NEGF {
  1709  				continue
  1710  			}
  1711  			v_1_0 := v_1.Args[0]
  1712  			if v_1_0.Op != OpLOONG64MULF {
  1713  				continue
  1714  			}
  1715  			y := v_1_0.Args[1]
  1716  			x := v_1_0.Args[0]
  1717  			if !(z.Block.Func.useFMA(v)) {
  1718  				continue
  1719  			}
  1720  			v.reset(OpLOONG64FNMSUBF)
  1721  			v.AddArg3(x, y, z)
  1722  			return true
  1723  		}
  1724  		break
  1725  	}
  1726  	return false
  1727  }
  1728  func rewriteValueLOONG64_OpLOONG64ADDV(v *Value) bool {
  1729  	v_1 := v.Args[1]
  1730  	v_0 := v.Args[0]
  1731  	b := v.Block
  1732  	typ := &b.Func.Config.Types
  1733  	// match: (ADDV <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  1734  	// result: (REVB2H x)
  1735  	for {
  1736  		if v.Type != typ.UInt16 {
  1737  			break
  1738  		}
  1739  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1740  			if v_0.Op != OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || auxIntToInt64(v_0.AuxInt) != 8 {
  1741  				continue
  1742  			}
  1743  			x := v_0.Args[0]
  1744  			if v_1.Op != OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || auxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  1745  				continue
  1746  			}
  1747  			v.reset(OpLOONG64REVB2H)
  1748  			v.AddArg(x)
  1749  			return true
  1750  		}
  1751  		break
  1752  	}
  1753  	// match: (ADDV (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  1754  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  1755  	// result: (REVB2H x)
  1756  	for {
  1757  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1758  			if v_0.Op != OpLOONG64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1759  				continue
  1760  			}
  1761  			v_0_0 := v_0.Args[0]
  1762  			if v_0_0.Op != OpLOONG64ANDconst {
  1763  				continue
  1764  			}
  1765  			c1 := auxIntToInt64(v_0_0.AuxInt)
  1766  			x := v_0_0.Args[0]
  1767  			if v_1.Op != OpLOONG64SLLconst || auxIntToInt64(v_1.AuxInt) != 8 {
  1768  				continue
  1769  			}
  1770  			v_1_0 := v_1.Args[0]
  1771  			if v_1_0.Op != OpLOONG64ANDconst {
  1772  				continue
  1773  			}
  1774  			c2 := auxIntToInt64(v_1_0.AuxInt)
  1775  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  1776  				continue
  1777  			}
  1778  			v.reset(OpLOONG64REVB2H)
  1779  			v.AddArg(x)
  1780  			return true
  1781  		}
  1782  		break
  1783  	}
  1784  	// match: (ADDV (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  1785  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  1786  	// result: (REVB4H x)
  1787  	for {
  1788  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1789  			if v_0.Op != OpLOONG64SRLVconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1790  				continue
  1791  			}
  1792  			v_0_0 := v_0.Args[0]
  1793  			if v_0_0.Op != OpLOONG64AND {
  1794  				continue
  1795  			}
  1796  			_ = v_0_0.Args[1]
  1797  			v_0_0_0 := v_0_0.Args[0]
  1798  			v_0_0_1 := v_0_0.Args[1]
  1799  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  1800  				if v_0_0_0.Op != OpLOONG64MOVVconst {
  1801  					continue
  1802  				}
  1803  				c1 := auxIntToInt64(v_0_0_0.AuxInt)
  1804  				x := v_0_0_1
  1805  				if v_1.Op != OpLOONG64SLLVconst || auxIntToInt64(v_1.AuxInt) != 8 {
  1806  					continue
  1807  				}
  1808  				v_1_0 := v_1.Args[0]
  1809  				if v_1_0.Op != OpLOONG64AND {
  1810  					continue
  1811  				}
  1812  				_ = v_1_0.Args[1]
  1813  				v_1_0_0 := v_1_0.Args[0]
  1814  				v_1_0_1 := v_1_0.Args[1]
  1815  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  1816  					if v_1_0_0.Op != OpLOONG64MOVVconst {
  1817  						continue
  1818  					}
  1819  					c2 := auxIntToInt64(v_1_0_0.AuxInt)
  1820  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  1821  						continue
  1822  					}
  1823  					v.reset(OpLOONG64REVB4H)
  1824  					v.AddArg(x)
  1825  					return true
  1826  				}
  1827  			}
  1828  		}
  1829  		break
  1830  	}
  1831  	// match: (ADDV (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  1832  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  1833  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  1834  	for {
  1835  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1836  			if v_0.Op != OpLOONG64SRLVconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1837  				continue
  1838  			}
  1839  			v_0_0 := v_0.Args[0]
  1840  			if v_0_0.Op != OpLOONG64AND {
  1841  				continue
  1842  			}
  1843  			_ = v_0_0.Args[1]
  1844  			v_0_0_0 := v_0_0.Args[0]
  1845  			v_0_0_1 := v_0_0.Args[1]
  1846  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  1847  				if v_0_0_0.Op != OpLOONG64MOVVconst {
  1848  					continue
  1849  				}
  1850  				c1 := auxIntToInt64(v_0_0_0.AuxInt)
  1851  				x := v_0_0_1
  1852  				if v_1.Op != OpLOONG64SLLVconst || auxIntToInt64(v_1.AuxInt) != 8 {
  1853  					continue
  1854  				}
  1855  				v_1_0 := v_1.Args[0]
  1856  				if v_1_0.Op != OpLOONG64ANDconst {
  1857  					continue
  1858  				}
  1859  				c2 := auxIntToInt64(v_1_0.AuxInt)
  1860  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  1861  					continue
  1862  				}
  1863  				v.reset(OpLOONG64REVB4H)
  1864  				v0 := b.NewValue0(v.Pos, OpLOONG64ANDconst, x.Type)
  1865  				v0.AuxInt = int64ToAuxInt(0xffffffff)
  1866  				v0.AddArg(x)
  1867  				v.AddArg(v0)
  1868  				return true
  1869  			}
  1870  		}
  1871  		break
  1872  	}
  1873  	// match: (ADDV x (MOVVconst <t> [c]))
  1874  	// cond: is32Bit(c) && !t.IsPtr()
  1875  	// result: (ADDVconst [c] x)
  1876  	for {
  1877  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1878  			x := v_0
  1879  			if v_1.Op != OpLOONG64MOVVconst {
  1880  				continue
  1881  			}
  1882  			t := v_1.Type
  1883  			c := auxIntToInt64(v_1.AuxInt)
  1884  			if !(is32Bit(c) && !t.IsPtr()) {
  1885  				continue
  1886  			}
  1887  			v.reset(OpLOONG64ADDVconst)
  1888  			v.AuxInt = int64ToAuxInt(c)
  1889  			v.AddArg(x)
  1890  			return true
  1891  		}
  1892  		break
  1893  	}
  1894  	// match: (ADDV x0 x1:(SLLVconst [c] y))
  1895  	// cond: x1.Uses == 1 && c > 0 && c <= 4
  1896  	// result: (ADDshiftLLV x0 y [c])
  1897  	for {
  1898  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1899  			x0 := v_0
  1900  			x1 := v_1
  1901  			if x1.Op != OpLOONG64SLLVconst {
  1902  				continue
  1903  			}
  1904  			c := auxIntToInt64(x1.AuxInt)
  1905  			y := x1.Args[0]
  1906  			if !(x1.Uses == 1 && c > 0 && c <= 4) {
  1907  				continue
  1908  			}
  1909  			v.reset(OpLOONG64ADDshiftLLV)
  1910  			v.AuxInt = int64ToAuxInt(c)
  1911  			v.AddArg2(x0, y)
  1912  			return true
  1913  		}
  1914  		break
  1915  	}
  1916  	// match: (ADDV x (NEGV y))
  1917  	// result: (SUBV x y)
  1918  	for {
  1919  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1920  			x := v_0
  1921  			if v_1.Op != OpLOONG64NEGV {
  1922  				continue
  1923  			}
  1924  			y := v_1.Args[0]
  1925  			v.reset(OpLOONG64SUBV)
  1926  			v.AddArg2(x, y)
  1927  			return true
  1928  		}
  1929  		break
  1930  	}
  1931  	return false
  1932  }
  1933  func rewriteValueLOONG64_OpLOONG64ADDVconst(v *Value) bool {
  1934  	v_0 := v.Args[0]
  1935  	// match: (ADDVconst [off1] (MOVVaddr [off2] {sym} ptr))
  1936  	// cond: is32Bit(off1+int64(off2))
  1937  	// result: (MOVVaddr [int32(off1)+int32(off2)] {sym} ptr)
  1938  	for {
  1939  		off1 := auxIntToInt64(v.AuxInt)
  1940  		if v_0.Op != OpLOONG64MOVVaddr {
  1941  			break
  1942  		}
  1943  		off2 := auxIntToInt32(v_0.AuxInt)
  1944  		sym := auxToSym(v_0.Aux)
  1945  		ptr := v_0.Args[0]
  1946  		if !(is32Bit(off1 + int64(off2))) {
  1947  			break
  1948  		}
  1949  		v.reset(OpLOONG64MOVVaddr)
  1950  		v.AuxInt = int32ToAuxInt(int32(off1) + int32(off2))
  1951  		v.Aux = symToAux(sym)
  1952  		v.AddArg(ptr)
  1953  		return true
  1954  	}
  1955  	// match: (ADDVconst [0] x)
  1956  	// result: x
  1957  	for {
  1958  		if auxIntToInt64(v.AuxInt) != 0 {
  1959  			break
  1960  		}
  1961  		x := v_0
  1962  		v.copyOf(x)
  1963  		return true
  1964  	}
  1965  	// match: (ADDVconst [c] (MOVVconst [d]))
  1966  	// result: (MOVVconst [c+d])
  1967  	for {
  1968  		c := auxIntToInt64(v.AuxInt)
  1969  		if v_0.Op != OpLOONG64MOVVconst {
  1970  			break
  1971  		}
  1972  		d := auxIntToInt64(v_0.AuxInt)
  1973  		v.reset(OpLOONG64MOVVconst)
  1974  		v.AuxInt = int64ToAuxInt(c + d)
  1975  		return true
  1976  	}
  1977  	// match: (ADDVconst [c] (ADDVconst [d] x))
  1978  	// cond: is32Bit(c+d)
  1979  	// result: (ADDVconst [c+d] x)
  1980  	for {
  1981  		c := auxIntToInt64(v.AuxInt)
  1982  		if v_0.Op != OpLOONG64ADDVconst {
  1983  			break
  1984  		}
  1985  		d := auxIntToInt64(v_0.AuxInt)
  1986  		x := v_0.Args[0]
  1987  		if !(is32Bit(c + d)) {
  1988  			break
  1989  		}
  1990  		v.reset(OpLOONG64ADDVconst)
  1991  		v.AuxInt = int64ToAuxInt(c + d)
  1992  		v.AddArg(x)
  1993  		return true
  1994  	}
  1995  	// match: (ADDVconst [c] (SUBVconst [d] x))
  1996  	// cond: is32Bit(c-d)
  1997  	// result: (ADDVconst [c-d] x)
  1998  	for {
  1999  		c := auxIntToInt64(v.AuxInt)
  2000  		if v_0.Op != OpLOONG64SUBVconst {
  2001  			break
  2002  		}
  2003  		d := auxIntToInt64(v_0.AuxInt)
  2004  		x := v_0.Args[0]
  2005  		if !(is32Bit(c - d)) {
  2006  			break
  2007  		}
  2008  		v.reset(OpLOONG64ADDVconst)
  2009  		v.AuxInt = int64ToAuxInt(c - d)
  2010  		v.AddArg(x)
  2011  		return true
  2012  	}
  2013  	// match: (ADDVconst [c] x)
  2014  	// cond: is32Bit(c) && c&0xffff == 0 && c != 0
  2015  	// result: (ADDV16const [c] x)
  2016  	for {
  2017  		c := auxIntToInt64(v.AuxInt)
  2018  		x := v_0
  2019  		if !(is32Bit(c) && c&0xffff == 0 && c != 0) {
  2020  			break
  2021  		}
  2022  		v.reset(OpLOONG64ADDV16const)
  2023  		v.AuxInt = int64ToAuxInt(c)
  2024  		v.AddArg(x)
  2025  		return true
  2026  	}
  2027  	return false
  2028  }
  2029  func rewriteValueLOONG64_OpLOONG64ADDshiftLLV(v *Value) bool {
  2030  	v_1 := v.Args[1]
  2031  	v_0 := v.Args[0]
  2032  	// match: (ADDshiftLLV x (MOVVconst [c]) [d])
  2033  	// cond: is12Bit(c<<d)
  2034  	// result: (ADDVconst x [c<<d])
  2035  	for {
  2036  		d := auxIntToInt64(v.AuxInt)
  2037  		x := v_0
  2038  		if v_1.Op != OpLOONG64MOVVconst {
  2039  			break
  2040  		}
  2041  		c := auxIntToInt64(v_1.AuxInt)
  2042  		if !(is12Bit(c << d)) {
  2043  			break
  2044  		}
  2045  		v.reset(OpLOONG64ADDVconst)
  2046  		v.AuxInt = int64ToAuxInt(c << d)
  2047  		v.AddArg(x)
  2048  		return true
  2049  	}
  2050  	return false
  2051  }
  2052  func rewriteValueLOONG64_OpLOONG64AND(v *Value) bool {
  2053  	v_1 := v.Args[1]
  2054  	v_0 := v.Args[0]
  2055  	// match: (AND x (MOVVconst [c]))
  2056  	// cond: is32Bit(c)
  2057  	// result: (ANDconst [c] x)
  2058  	for {
  2059  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2060  			x := v_0
  2061  			if v_1.Op != OpLOONG64MOVVconst {
  2062  				continue
  2063  			}
  2064  			c := auxIntToInt64(v_1.AuxInt)
  2065  			if !(is32Bit(c)) {
  2066  				continue
  2067  			}
  2068  			v.reset(OpLOONG64ANDconst)
  2069  			v.AuxInt = int64ToAuxInt(c)
  2070  			v.AddArg(x)
  2071  			return true
  2072  		}
  2073  		break
  2074  	}
  2075  	// match: (AND x x)
  2076  	// result: x
  2077  	for {
  2078  		x := v_0
  2079  		if x != v_1 {
  2080  			break
  2081  		}
  2082  		v.copyOf(x)
  2083  		return true
  2084  	}
  2085  	// match: (AND x (NORconst [0] y))
  2086  	// result: (ANDN x y)
  2087  	for {
  2088  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2089  			x := v_0
  2090  			if v_1.Op != OpLOONG64NORconst || auxIntToInt64(v_1.AuxInt) != 0 {
  2091  				continue
  2092  			}
  2093  			y := v_1.Args[0]
  2094  			v.reset(OpLOONG64ANDN)
  2095  			v.AddArg2(x, y)
  2096  			return true
  2097  		}
  2098  		break
  2099  	}
  2100  	return false
  2101  }
  2102  func rewriteValueLOONG64_OpLOONG64ANDconst(v *Value) bool {
  2103  	v_0 := v.Args[0]
  2104  	// match: (ANDconst [0] _)
  2105  	// result: (MOVVconst [0])
  2106  	for {
  2107  		if auxIntToInt64(v.AuxInt) != 0 {
  2108  			break
  2109  		}
  2110  		v.reset(OpLOONG64MOVVconst)
  2111  		v.AuxInt = int64ToAuxInt(0)
  2112  		return true
  2113  	}
  2114  	// match: (ANDconst [-1] x)
  2115  	// result: x
  2116  	for {
  2117  		if auxIntToInt64(v.AuxInt) != -1 {
  2118  			break
  2119  		}
  2120  		x := v_0
  2121  		v.copyOf(x)
  2122  		return true
  2123  	}
  2124  	// match: (ANDconst [c] (MOVVconst [d]))
  2125  	// result: (MOVVconst [c&d])
  2126  	for {
  2127  		c := auxIntToInt64(v.AuxInt)
  2128  		if v_0.Op != OpLOONG64MOVVconst {
  2129  			break
  2130  		}
  2131  		d := auxIntToInt64(v_0.AuxInt)
  2132  		v.reset(OpLOONG64MOVVconst)
  2133  		v.AuxInt = int64ToAuxInt(c & d)
  2134  		return true
  2135  	}
  2136  	// match: (ANDconst [c] (ANDconst [d] x))
  2137  	// result: (ANDconst [c&d] x)
  2138  	for {
  2139  		c := auxIntToInt64(v.AuxInt)
  2140  		if v_0.Op != OpLOONG64ANDconst {
  2141  			break
  2142  		}
  2143  		d := auxIntToInt64(v_0.AuxInt)
  2144  		x := v_0.Args[0]
  2145  		v.reset(OpLOONG64ANDconst)
  2146  		v.AuxInt = int64ToAuxInt(c & d)
  2147  		v.AddArg(x)
  2148  		return true
  2149  	}
  2150  	return false
  2151  }
  2152  func rewriteValueLOONG64_OpLOONG64DIVV(v *Value) bool {
  2153  	v_1 := v.Args[1]
  2154  	v_0 := v.Args[0]
  2155  	// match: (DIVV (MOVVconst [c]) (MOVVconst [d]))
  2156  	// cond: d != 0
  2157  	// result: (MOVVconst [c/d])
  2158  	for {
  2159  		if v_0.Op != OpLOONG64MOVVconst {
  2160  			break
  2161  		}
  2162  		c := auxIntToInt64(v_0.AuxInt)
  2163  		if v_1.Op != OpLOONG64MOVVconst {
  2164  			break
  2165  		}
  2166  		d := auxIntToInt64(v_1.AuxInt)
  2167  		if !(d != 0) {
  2168  			break
  2169  		}
  2170  		v.reset(OpLOONG64MOVVconst)
  2171  		v.AuxInt = int64ToAuxInt(c / d)
  2172  		return true
  2173  	}
  2174  	return false
  2175  }
  2176  func rewriteValueLOONG64_OpLOONG64DIVVU(v *Value) bool {
  2177  	v_1 := v.Args[1]
  2178  	v_0 := v.Args[0]
  2179  	// match: (DIVVU x (MOVVconst [1]))
  2180  	// result: x
  2181  	for {
  2182  		x := v_0
  2183  		if v_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_1.AuxInt) != 1 {
  2184  			break
  2185  		}
  2186  		v.copyOf(x)
  2187  		return true
  2188  	}
  2189  	// match: (DIVVU x (MOVVconst [c]))
  2190  	// cond: isPowerOfTwo(c)
  2191  	// result: (SRLVconst [log64(c)] x)
  2192  	for {
  2193  		x := v_0
  2194  		if v_1.Op != OpLOONG64MOVVconst {
  2195  			break
  2196  		}
  2197  		c := auxIntToInt64(v_1.AuxInt)
  2198  		if !(isPowerOfTwo(c)) {
  2199  			break
  2200  		}
  2201  		v.reset(OpLOONG64SRLVconst)
  2202  		v.AuxInt = int64ToAuxInt(log64(c))
  2203  		v.AddArg(x)
  2204  		return true
  2205  	}
  2206  	// match: (DIVVU (MOVVconst [c]) (MOVVconst [d]))
  2207  	// cond: d != 0
  2208  	// result: (MOVVconst [int64(uint64(c)/uint64(d))])
  2209  	for {
  2210  		if v_0.Op != OpLOONG64MOVVconst {
  2211  			break
  2212  		}
  2213  		c := auxIntToInt64(v_0.AuxInt)
  2214  		if v_1.Op != OpLOONG64MOVVconst {
  2215  			break
  2216  		}
  2217  		d := auxIntToInt64(v_1.AuxInt)
  2218  		if !(d != 0) {
  2219  			break
  2220  		}
  2221  		v.reset(OpLOONG64MOVVconst)
  2222  		v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
  2223  		return true
  2224  	}
  2225  	return false
  2226  }
  2227  func rewriteValueLOONG64_OpLOONG64LoweredPanicBoundsCR(v *Value) bool {
  2228  	v_1 := v.Args[1]
  2229  	v_0 := v.Args[0]
  2230  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVVconst [c]) mem)
  2231  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  2232  	for {
  2233  		kind := auxIntToInt64(v.AuxInt)
  2234  		p := auxToPanicBoundsC(v.Aux)
  2235  		if v_0.Op != OpLOONG64MOVVconst {
  2236  			break
  2237  		}
  2238  		c := auxIntToInt64(v_0.AuxInt)
  2239  		mem := v_1
  2240  		v.reset(OpLOONG64LoweredPanicBoundsCC)
  2241  		v.AuxInt = int64ToAuxInt(kind)
  2242  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: p.C, Cy: c})
  2243  		v.AddArg(mem)
  2244  		return true
  2245  	}
  2246  	return false
  2247  }
  2248  func rewriteValueLOONG64_OpLOONG64LoweredPanicBoundsRC(v *Value) bool {
  2249  	v_1 := v.Args[1]
  2250  	v_0 := v.Args[0]
  2251  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVVconst [c]) mem)
  2252  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  2253  	for {
  2254  		kind := auxIntToInt64(v.AuxInt)
  2255  		p := auxToPanicBoundsC(v.Aux)
  2256  		if v_0.Op != OpLOONG64MOVVconst {
  2257  			break
  2258  		}
  2259  		c := auxIntToInt64(v_0.AuxInt)
  2260  		mem := v_1
  2261  		v.reset(OpLOONG64LoweredPanicBoundsCC)
  2262  		v.AuxInt = int64ToAuxInt(kind)
  2263  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: c, Cy: p.C})
  2264  		v.AddArg(mem)
  2265  		return true
  2266  	}
  2267  	return false
  2268  }
  2269  func rewriteValueLOONG64_OpLOONG64LoweredPanicBoundsRR(v *Value) bool {
  2270  	v_2 := v.Args[2]
  2271  	v_1 := v.Args[1]
  2272  	v_0 := v.Args[0]
  2273  	// match: (LoweredPanicBoundsRR [kind] x (MOVVconst [c]) mem)
  2274  	// result: (LoweredPanicBoundsRC [kind] x {PanicBoundsC{C:c}} mem)
  2275  	for {
  2276  		kind := auxIntToInt64(v.AuxInt)
  2277  		x := v_0
  2278  		if v_1.Op != OpLOONG64MOVVconst {
  2279  			break
  2280  		}
  2281  		c := auxIntToInt64(v_1.AuxInt)
  2282  		mem := v_2
  2283  		v.reset(OpLOONG64LoweredPanicBoundsRC)
  2284  		v.AuxInt = int64ToAuxInt(kind)
  2285  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  2286  		v.AddArg2(x, mem)
  2287  		return true
  2288  	}
  2289  	// match: (LoweredPanicBoundsRR [kind] (MOVVconst [c]) y mem)
  2290  	// result: (LoweredPanicBoundsCR [kind] {PanicBoundsC{C:c}} y mem)
  2291  	for {
  2292  		kind := auxIntToInt64(v.AuxInt)
  2293  		if v_0.Op != OpLOONG64MOVVconst {
  2294  			break
  2295  		}
  2296  		c := auxIntToInt64(v_0.AuxInt)
  2297  		y := v_1
  2298  		mem := v_2
  2299  		v.reset(OpLOONG64LoweredPanicBoundsCR)
  2300  		v.AuxInt = int64ToAuxInt(kind)
  2301  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  2302  		v.AddArg2(y, mem)
  2303  		return true
  2304  	}
  2305  	return false
  2306  }
  2307  func rewriteValueLOONG64_OpLOONG64MASKEQZ(v *Value) bool {
  2308  	v_1 := v.Args[1]
  2309  	v_0 := v.Args[0]
  2310  	// match: (MASKEQZ (MOVVconst [0]) cond)
  2311  	// result: (MOVVconst [0])
  2312  	for {
  2313  		if v_0.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0.AuxInt) != 0 {
  2314  			break
  2315  		}
  2316  		v.reset(OpLOONG64MOVVconst)
  2317  		v.AuxInt = int64ToAuxInt(0)
  2318  		return true
  2319  	}
  2320  	// match: (MASKEQZ x (MOVVconst [c]))
  2321  	// cond: c == 0
  2322  	// result: (MOVVconst [0])
  2323  	for {
  2324  		if v_1.Op != OpLOONG64MOVVconst {
  2325  			break
  2326  		}
  2327  		c := auxIntToInt64(v_1.AuxInt)
  2328  		if !(c == 0) {
  2329  			break
  2330  		}
  2331  		v.reset(OpLOONG64MOVVconst)
  2332  		v.AuxInt = int64ToAuxInt(0)
  2333  		return true
  2334  	}
  2335  	// match: (MASKEQZ x (MOVVconst [c]))
  2336  	// cond: c != 0
  2337  	// result: x
  2338  	for {
  2339  		x := v_0
  2340  		if v_1.Op != OpLOONG64MOVVconst {
  2341  			break
  2342  		}
  2343  		c := auxIntToInt64(v_1.AuxInt)
  2344  		if !(c != 0) {
  2345  			break
  2346  		}
  2347  		v.copyOf(x)
  2348  		return true
  2349  	}
  2350  	return false
  2351  }
  2352  func rewriteValueLOONG64_OpLOONG64MASKNEZ(v *Value) bool {
  2353  	v_0 := v.Args[0]
  2354  	// match: (MASKNEZ (MOVVconst [0]) cond)
  2355  	// result: (MOVVconst [0])
  2356  	for {
  2357  		if v_0.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0.AuxInt) != 0 {
  2358  			break
  2359  		}
  2360  		v.reset(OpLOONG64MOVVconst)
  2361  		v.AuxInt = int64ToAuxInt(0)
  2362  		return true
  2363  	}
  2364  	return false
  2365  }
  2366  func rewriteValueLOONG64_OpLOONG64MOVBUload(v *Value) bool {
  2367  	v_1 := v.Args[1]
  2368  	v_0 := v.Args[0]
  2369  	b := v.Block
  2370  	config := b.Func.Config
  2371  	typ := &b.Func.Config.Types
  2372  	// match: (MOVBUload [off] {sym} ptr (MOVBstore [off] {sym} ptr x _))
  2373  	// result: (MOVBUreg x)
  2374  	for {
  2375  		off := auxIntToInt32(v.AuxInt)
  2376  		sym := auxToSym(v.Aux)
  2377  		ptr := v_0
  2378  		if v_1.Op != OpLOONG64MOVBstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  2379  			break
  2380  		}
  2381  		x := v_1.Args[1]
  2382  		if ptr != v_1.Args[0] {
  2383  			break
  2384  		}
  2385  		v.reset(OpLOONG64MOVBUreg)
  2386  		v.AddArg(x)
  2387  		return true
  2388  	}
  2389  	// match: (MOVBUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  2390  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  2391  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
  2392  	for {
  2393  		off1 := auxIntToInt32(v.AuxInt)
  2394  		sym := auxToSym(v.Aux)
  2395  		if v_0.Op != OpLOONG64ADDVconst {
  2396  			break
  2397  		}
  2398  		off2 := auxIntToInt64(v_0.AuxInt)
  2399  		ptr := v_0.Args[0]
  2400  		mem := v_1
  2401  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  2402  			break
  2403  		}
  2404  		v.reset(OpLOONG64MOVBUload)
  2405  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  2406  		v.Aux = symToAux(sym)
  2407  		v.AddArg2(ptr, mem)
  2408  		return true
  2409  	}
  2410  	// match: (MOVBUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  2411  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  2412  	// result: (MOVBUload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  2413  	for {
  2414  		off1 := auxIntToInt32(v.AuxInt)
  2415  		sym1 := auxToSym(v.Aux)
  2416  		if v_0.Op != OpLOONG64MOVVaddr {
  2417  			break
  2418  		}
  2419  		off2 := auxIntToInt32(v_0.AuxInt)
  2420  		sym2 := auxToSym(v_0.Aux)
  2421  		ptr := v_0.Args[0]
  2422  		mem := v_1
  2423  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  2424  			break
  2425  		}
  2426  		v.reset(OpLOONG64MOVBUload)
  2427  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  2428  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2429  		v.AddArg2(ptr, mem)
  2430  		return true
  2431  	}
  2432  	// match: (MOVBUload [off] {sym} (ADDV ptr idx) mem)
  2433  	// cond: off == 0 && sym == nil
  2434  	// result: (MOVBUloadidx ptr idx mem)
  2435  	for {
  2436  		off := auxIntToInt32(v.AuxInt)
  2437  		sym := auxToSym(v.Aux)
  2438  		if v_0.Op != OpLOONG64ADDV {
  2439  			break
  2440  		}
  2441  		idx := v_0.Args[1]
  2442  		ptr := v_0.Args[0]
  2443  		mem := v_1
  2444  		if !(off == 0 && sym == nil) {
  2445  			break
  2446  		}
  2447  		v.reset(OpLOONG64MOVBUloadidx)
  2448  		v.AddArg3(ptr, idx, mem)
  2449  		return true
  2450  	}
  2451  	// match: (MOVBUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  2452  	// cond: off == 0 && sym == nil
  2453  	// result: (MOVBUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  2454  	for {
  2455  		off := auxIntToInt32(v.AuxInt)
  2456  		sym := auxToSym(v.Aux)
  2457  		if v_0.Op != OpLOONG64ADDshiftLLV {
  2458  			break
  2459  		}
  2460  		shift := auxIntToInt64(v_0.AuxInt)
  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(OpLOONG64MOVBUloadidx)
  2468  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  2469  		v0.AuxInt = int64ToAuxInt(shift)
  2470  		v0.AddArg(idx)
  2471  		v.AddArg3(ptr, v0, mem)
  2472  		return true
  2473  	}
  2474  	// match: (MOVBUload [off] {sym} (SB) _)
  2475  	// cond: symIsRO(sym)
  2476  	// result: (MOVVconst [int64(read8(sym, int64(off)))])
  2477  	for {
  2478  		off := auxIntToInt32(v.AuxInt)
  2479  		sym := auxToSym(v.Aux)
  2480  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  2481  			break
  2482  		}
  2483  		v.reset(OpLOONG64MOVVconst)
  2484  		v.AuxInt = int64ToAuxInt(int64(read8(sym, int64(off))))
  2485  		return true
  2486  	}
  2487  	return false
  2488  }
  2489  func rewriteValueLOONG64_OpLOONG64MOVBUloadidx(v *Value) bool {
  2490  	v_2 := v.Args[2]
  2491  	v_1 := v.Args[1]
  2492  	v_0 := v.Args[0]
  2493  	// match: (MOVBUloadidx ptr (MOVVconst [c]) mem)
  2494  	// cond: is32Bit(c)
  2495  	// result: (MOVBUload [int32(c)] ptr mem)
  2496  	for {
  2497  		ptr := v_0
  2498  		if v_1.Op != OpLOONG64MOVVconst {
  2499  			break
  2500  		}
  2501  		c := auxIntToInt64(v_1.AuxInt)
  2502  		mem := v_2
  2503  		if !(is32Bit(c)) {
  2504  			break
  2505  		}
  2506  		v.reset(OpLOONG64MOVBUload)
  2507  		v.AuxInt = int32ToAuxInt(int32(c))
  2508  		v.AddArg2(ptr, mem)
  2509  		return true
  2510  	}
  2511  	// match: (MOVBUloadidx (MOVVconst [c]) ptr mem)
  2512  	// cond: is32Bit(c)
  2513  	// result: (MOVBUload [int32(c)] ptr mem)
  2514  	for {
  2515  		if v_0.Op != OpLOONG64MOVVconst {
  2516  			break
  2517  		}
  2518  		c := auxIntToInt64(v_0.AuxInt)
  2519  		ptr := v_1
  2520  		mem := v_2
  2521  		if !(is32Bit(c)) {
  2522  			break
  2523  		}
  2524  		v.reset(OpLOONG64MOVBUload)
  2525  		v.AuxInt = int32ToAuxInt(int32(c))
  2526  		v.AddArg2(ptr, mem)
  2527  		return true
  2528  	}
  2529  	return false
  2530  }
  2531  func rewriteValueLOONG64_OpLOONG64MOVBUreg(v *Value) bool {
  2532  	v_0 := v.Args[0]
  2533  	// match: (MOVBUreg (SRLVconst [rc] x))
  2534  	// cond: rc < 8
  2535  	// result: (BSTRPICKV [rc + (7+rc)<<6] x)
  2536  	for {
  2537  		if v_0.Op != OpLOONG64SRLVconst {
  2538  			break
  2539  		}
  2540  		rc := auxIntToInt64(v_0.AuxInt)
  2541  		x := v_0.Args[0]
  2542  		if !(rc < 8) {
  2543  			break
  2544  		}
  2545  		v.reset(OpLOONG64BSTRPICKV)
  2546  		v.AuxInt = int64ToAuxInt(rc + (7+rc)<<6)
  2547  		v.AddArg(x)
  2548  		return true
  2549  	}
  2550  	// match: (MOVBUreg x:(SGT _ _))
  2551  	// result: x
  2552  	for {
  2553  		x := v_0
  2554  		if x.Op != OpLOONG64SGT {
  2555  			break
  2556  		}
  2557  		v.copyOf(x)
  2558  		return true
  2559  	}
  2560  	// match: (MOVBUreg x:(SGTU _ _))
  2561  	// result: x
  2562  	for {
  2563  		x := v_0
  2564  		if x.Op != OpLOONG64SGTU {
  2565  			break
  2566  		}
  2567  		v.copyOf(x)
  2568  		return true
  2569  	}
  2570  	// match: (MOVBUreg x:(XOR (MOVVconst [1]) (SGT _ _)))
  2571  	// result: x
  2572  	for {
  2573  		x := v_0
  2574  		if x.Op != OpLOONG64XOR {
  2575  			break
  2576  		}
  2577  		_ = x.Args[1]
  2578  		x_0 := x.Args[0]
  2579  		x_1 := x.Args[1]
  2580  		for _i0 := 0; _i0 <= 1; _i0, x_0, x_1 = _i0+1, x_1, x_0 {
  2581  			if x_0.Op != OpLOONG64MOVVconst || auxIntToInt64(x_0.AuxInt) != 1 || x_1.Op != OpLOONG64SGT {
  2582  				continue
  2583  			}
  2584  			v.copyOf(x)
  2585  			return true
  2586  		}
  2587  		break
  2588  	}
  2589  	// match: (MOVBUreg x:(XOR (MOVVconst [1]) (SGTU _ _)))
  2590  	// result: x
  2591  	for {
  2592  		x := v_0
  2593  		if x.Op != OpLOONG64XOR {
  2594  			break
  2595  		}
  2596  		_ = x.Args[1]
  2597  		x_0 := x.Args[0]
  2598  		x_1 := x.Args[1]
  2599  		for _i0 := 0; _i0 <= 1; _i0, x_0, x_1 = _i0+1, x_1, x_0 {
  2600  			if x_0.Op != OpLOONG64MOVVconst || auxIntToInt64(x_0.AuxInt) != 1 || x_1.Op != OpLOONG64SGTU {
  2601  				continue
  2602  			}
  2603  			v.copyOf(x)
  2604  			return true
  2605  		}
  2606  		break
  2607  	}
  2608  	// match: (MOVBUreg x:(MOVBUload _ _))
  2609  	// result: (MOVVreg x)
  2610  	for {
  2611  		x := v_0
  2612  		if x.Op != OpLOONG64MOVBUload {
  2613  			break
  2614  		}
  2615  		v.reset(OpLOONG64MOVVreg)
  2616  		v.AddArg(x)
  2617  		return true
  2618  	}
  2619  	// match: (MOVBUreg x:(MOVBUloadidx _ _ _))
  2620  	// result: (MOVVreg x)
  2621  	for {
  2622  		x := v_0
  2623  		if x.Op != OpLOONG64MOVBUloadidx {
  2624  			break
  2625  		}
  2626  		v.reset(OpLOONG64MOVVreg)
  2627  		v.AddArg(x)
  2628  		return true
  2629  	}
  2630  	// match: (MOVBUreg x:(MOVBUreg _))
  2631  	// result: (MOVVreg x)
  2632  	for {
  2633  		x := v_0
  2634  		if x.Op != OpLOONG64MOVBUreg {
  2635  			break
  2636  		}
  2637  		v.reset(OpLOONG64MOVVreg)
  2638  		v.AddArg(x)
  2639  		return true
  2640  	}
  2641  	// match: (MOVBUreg (SLLVconst [lc] x))
  2642  	// cond: lc >= 8
  2643  	// result: (MOVVconst [0])
  2644  	for {
  2645  		if v_0.Op != OpLOONG64SLLVconst {
  2646  			break
  2647  		}
  2648  		lc := auxIntToInt64(v_0.AuxInt)
  2649  		if !(lc >= 8) {
  2650  			break
  2651  		}
  2652  		v.reset(OpLOONG64MOVVconst)
  2653  		v.AuxInt = int64ToAuxInt(0)
  2654  		return true
  2655  	}
  2656  	// match: (MOVBUreg (MOVVconst [c]))
  2657  	// result: (MOVVconst [int64(uint8(c))])
  2658  	for {
  2659  		if v_0.Op != OpLOONG64MOVVconst {
  2660  			break
  2661  		}
  2662  		c := auxIntToInt64(v_0.AuxInt)
  2663  		v.reset(OpLOONG64MOVVconst)
  2664  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
  2665  		return true
  2666  	}
  2667  	// match: (MOVBUreg (ANDconst [c] x))
  2668  	// result: (ANDconst [c&0xff] x)
  2669  	for {
  2670  		if v_0.Op != OpLOONG64ANDconst {
  2671  			break
  2672  		}
  2673  		c := auxIntToInt64(v_0.AuxInt)
  2674  		x := v_0.Args[0]
  2675  		v.reset(OpLOONG64ANDconst)
  2676  		v.AuxInt = int64ToAuxInt(c & 0xff)
  2677  		v.AddArg(x)
  2678  		return true
  2679  	}
  2680  	// match: (MOVBUreg x:(ANDconst [c] y))
  2681  	// cond: c >= 0 && int64(uint8(c)) == c
  2682  	// result: x
  2683  	for {
  2684  		x := v_0
  2685  		if x.Op != OpLOONG64ANDconst {
  2686  			break
  2687  		}
  2688  		c := auxIntToInt64(x.AuxInt)
  2689  		if !(c >= 0 && int64(uint8(c)) == c) {
  2690  			break
  2691  		}
  2692  		v.copyOf(x)
  2693  		return true
  2694  	}
  2695  	return false
  2696  }
  2697  func rewriteValueLOONG64_OpLOONG64MOVBload(v *Value) bool {
  2698  	v_1 := v.Args[1]
  2699  	v_0 := v.Args[0]
  2700  	b := v.Block
  2701  	config := b.Func.Config
  2702  	typ := &b.Func.Config.Types
  2703  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off] {sym} ptr x _))
  2704  	// result: (MOVBreg x)
  2705  	for {
  2706  		off := auxIntToInt32(v.AuxInt)
  2707  		sym := auxToSym(v.Aux)
  2708  		ptr := v_0
  2709  		if v_1.Op != OpLOONG64MOVBstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  2710  			break
  2711  		}
  2712  		x := v_1.Args[1]
  2713  		if ptr != v_1.Args[0] {
  2714  			break
  2715  		}
  2716  		v.reset(OpLOONG64MOVBreg)
  2717  		v.AddArg(x)
  2718  		return true
  2719  	}
  2720  	// match: (MOVBload [off1] {sym} (ADDVconst [off2] ptr) mem)
  2721  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  2722  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
  2723  	for {
  2724  		off1 := auxIntToInt32(v.AuxInt)
  2725  		sym := auxToSym(v.Aux)
  2726  		if v_0.Op != OpLOONG64ADDVconst {
  2727  			break
  2728  		}
  2729  		off2 := auxIntToInt64(v_0.AuxInt)
  2730  		ptr := v_0.Args[0]
  2731  		mem := v_1
  2732  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  2733  			break
  2734  		}
  2735  		v.reset(OpLOONG64MOVBload)
  2736  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  2737  		v.Aux = symToAux(sym)
  2738  		v.AddArg2(ptr, mem)
  2739  		return true
  2740  	}
  2741  	// match: (MOVBload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  2742  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  2743  	// result: (MOVBload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  2744  	for {
  2745  		off1 := auxIntToInt32(v.AuxInt)
  2746  		sym1 := auxToSym(v.Aux)
  2747  		if v_0.Op != OpLOONG64MOVVaddr {
  2748  			break
  2749  		}
  2750  		off2 := auxIntToInt32(v_0.AuxInt)
  2751  		sym2 := auxToSym(v_0.Aux)
  2752  		ptr := v_0.Args[0]
  2753  		mem := v_1
  2754  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  2755  			break
  2756  		}
  2757  		v.reset(OpLOONG64MOVBload)
  2758  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  2759  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2760  		v.AddArg2(ptr, mem)
  2761  		return true
  2762  	}
  2763  	// match: (MOVBload [off] {sym} (ADDV ptr idx) mem)
  2764  	// cond: off == 0 && sym == nil
  2765  	// result: (MOVBloadidx ptr idx mem)
  2766  	for {
  2767  		off := auxIntToInt32(v.AuxInt)
  2768  		sym := auxToSym(v.Aux)
  2769  		if v_0.Op != OpLOONG64ADDV {
  2770  			break
  2771  		}
  2772  		idx := v_0.Args[1]
  2773  		ptr := v_0.Args[0]
  2774  		mem := v_1
  2775  		if !(off == 0 && sym == nil) {
  2776  			break
  2777  		}
  2778  		v.reset(OpLOONG64MOVBloadidx)
  2779  		v.AddArg3(ptr, idx, mem)
  2780  		return true
  2781  	}
  2782  	// match: (MOVBload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  2783  	// cond: off == 0 && sym == nil
  2784  	// result: (MOVBloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  2785  	for {
  2786  		off := auxIntToInt32(v.AuxInt)
  2787  		sym := auxToSym(v.Aux)
  2788  		if v_0.Op != OpLOONG64ADDshiftLLV {
  2789  			break
  2790  		}
  2791  		shift := auxIntToInt64(v_0.AuxInt)
  2792  		idx := v_0.Args[1]
  2793  		ptr := v_0.Args[0]
  2794  		mem := v_1
  2795  		if !(off == 0 && sym == nil) {
  2796  			break
  2797  		}
  2798  		v.reset(OpLOONG64MOVBloadidx)
  2799  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  2800  		v0.AuxInt = int64ToAuxInt(shift)
  2801  		v0.AddArg(idx)
  2802  		v.AddArg3(ptr, v0, mem)
  2803  		return true
  2804  	}
  2805  	// match: (MOVBload [off] {sym} (SB) _)
  2806  	// cond: symIsRO(sym)
  2807  	// result: (MOVVconst [int64(int8(read8(sym, int64(off))))])
  2808  	for {
  2809  		off := auxIntToInt32(v.AuxInt)
  2810  		sym := auxToSym(v.Aux)
  2811  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  2812  			break
  2813  		}
  2814  		v.reset(OpLOONG64MOVVconst)
  2815  		v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, int64(off)))))
  2816  		return true
  2817  	}
  2818  	return false
  2819  }
  2820  func rewriteValueLOONG64_OpLOONG64MOVBloadidx(v *Value) bool {
  2821  	v_2 := v.Args[2]
  2822  	v_1 := v.Args[1]
  2823  	v_0 := v.Args[0]
  2824  	// match: (MOVBloadidx ptr (MOVVconst [c]) mem)
  2825  	// cond: is32Bit(c)
  2826  	// result: (MOVBload [int32(c)] ptr mem)
  2827  	for {
  2828  		ptr := v_0
  2829  		if v_1.Op != OpLOONG64MOVVconst {
  2830  			break
  2831  		}
  2832  		c := auxIntToInt64(v_1.AuxInt)
  2833  		mem := v_2
  2834  		if !(is32Bit(c)) {
  2835  			break
  2836  		}
  2837  		v.reset(OpLOONG64MOVBload)
  2838  		v.AuxInt = int32ToAuxInt(int32(c))
  2839  		v.AddArg2(ptr, mem)
  2840  		return true
  2841  	}
  2842  	// match: (MOVBloadidx (MOVVconst [c]) ptr mem)
  2843  	// cond: is32Bit(c)
  2844  	// result: (MOVBload [int32(c)] ptr mem)
  2845  	for {
  2846  		if v_0.Op != OpLOONG64MOVVconst {
  2847  			break
  2848  		}
  2849  		c := auxIntToInt64(v_0.AuxInt)
  2850  		ptr := v_1
  2851  		mem := v_2
  2852  		if !(is32Bit(c)) {
  2853  			break
  2854  		}
  2855  		v.reset(OpLOONG64MOVBload)
  2856  		v.AuxInt = int32ToAuxInt(int32(c))
  2857  		v.AddArg2(ptr, mem)
  2858  		return true
  2859  	}
  2860  	return false
  2861  }
  2862  func rewriteValueLOONG64_OpLOONG64MOVBreg(v *Value) bool {
  2863  	v_0 := v.Args[0]
  2864  	// match: (MOVBreg x:(MOVBload _ _))
  2865  	// result: (MOVVreg x)
  2866  	for {
  2867  		x := v_0
  2868  		if x.Op != OpLOONG64MOVBload {
  2869  			break
  2870  		}
  2871  		v.reset(OpLOONG64MOVVreg)
  2872  		v.AddArg(x)
  2873  		return true
  2874  	}
  2875  	// match: (MOVBreg x:(MOVBloadidx _ _ _))
  2876  	// result: (MOVVreg x)
  2877  	for {
  2878  		x := v_0
  2879  		if x.Op != OpLOONG64MOVBloadidx {
  2880  			break
  2881  		}
  2882  		v.reset(OpLOONG64MOVVreg)
  2883  		v.AddArg(x)
  2884  		return true
  2885  	}
  2886  	// match: (MOVBreg x:(MOVBreg _))
  2887  	// result: (MOVVreg x)
  2888  	for {
  2889  		x := v_0
  2890  		if x.Op != OpLOONG64MOVBreg {
  2891  			break
  2892  		}
  2893  		v.reset(OpLOONG64MOVVreg)
  2894  		v.AddArg(x)
  2895  		return true
  2896  	}
  2897  	// match: (MOVBreg (MOVVconst [c]))
  2898  	// result: (MOVVconst [int64(int8(c))])
  2899  	for {
  2900  		if v_0.Op != OpLOONG64MOVVconst {
  2901  			break
  2902  		}
  2903  		c := auxIntToInt64(v_0.AuxInt)
  2904  		v.reset(OpLOONG64MOVVconst)
  2905  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  2906  		return true
  2907  	}
  2908  	// match: (MOVBreg x:(ANDconst [c] y))
  2909  	// cond: c >= 0 && int64(int8(c)) == c
  2910  	// result: x
  2911  	for {
  2912  		x := v_0
  2913  		if x.Op != OpLOONG64ANDconst {
  2914  			break
  2915  		}
  2916  		c := auxIntToInt64(x.AuxInt)
  2917  		if !(c >= 0 && int64(int8(c)) == c) {
  2918  			break
  2919  		}
  2920  		v.copyOf(x)
  2921  		return true
  2922  	}
  2923  	return false
  2924  }
  2925  func rewriteValueLOONG64_OpLOONG64MOVBstore(v *Value) bool {
  2926  	v_2 := v.Args[2]
  2927  	v_1 := v.Args[1]
  2928  	v_0 := v.Args[0]
  2929  	b := v.Block
  2930  	config := b.Func.Config
  2931  	typ := &b.Func.Config.Types
  2932  	// match: (MOVBstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  2933  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  2934  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
  2935  	for {
  2936  		off1 := auxIntToInt32(v.AuxInt)
  2937  		sym := auxToSym(v.Aux)
  2938  		if v_0.Op != OpLOONG64ADDVconst {
  2939  			break
  2940  		}
  2941  		off2 := auxIntToInt64(v_0.AuxInt)
  2942  		ptr := v_0.Args[0]
  2943  		val := v_1
  2944  		mem := v_2
  2945  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  2946  			break
  2947  		}
  2948  		v.reset(OpLOONG64MOVBstore)
  2949  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  2950  		v.Aux = symToAux(sym)
  2951  		v.AddArg3(ptr, val, mem)
  2952  		return true
  2953  	}
  2954  	// match: (MOVBstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  2955  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  2956  	// result: (MOVBstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  2957  	for {
  2958  		off1 := auxIntToInt32(v.AuxInt)
  2959  		sym1 := auxToSym(v.Aux)
  2960  		if v_0.Op != OpLOONG64MOVVaddr {
  2961  			break
  2962  		}
  2963  		off2 := auxIntToInt32(v_0.AuxInt)
  2964  		sym2 := auxToSym(v_0.Aux)
  2965  		ptr := v_0.Args[0]
  2966  		val := v_1
  2967  		mem := v_2
  2968  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  2969  			break
  2970  		}
  2971  		v.reset(OpLOONG64MOVBstore)
  2972  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  2973  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2974  		v.AddArg3(ptr, val, mem)
  2975  		return true
  2976  	}
  2977  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  2978  	// result: (MOVBstore [off] {sym} ptr x mem)
  2979  	for {
  2980  		off := auxIntToInt32(v.AuxInt)
  2981  		sym := auxToSym(v.Aux)
  2982  		ptr := v_0
  2983  		if v_1.Op != OpLOONG64MOVBreg {
  2984  			break
  2985  		}
  2986  		x := v_1.Args[0]
  2987  		mem := v_2
  2988  		v.reset(OpLOONG64MOVBstore)
  2989  		v.AuxInt = int32ToAuxInt(off)
  2990  		v.Aux = symToAux(sym)
  2991  		v.AddArg3(ptr, x, mem)
  2992  		return true
  2993  	}
  2994  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  2995  	// result: (MOVBstore [off] {sym} ptr x mem)
  2996  	for {
  2997  		off := auxIntToInt32(v.AuxInt)
  2998  		sym := auxToSym(v.Aux)
  2999  		ptr := v_0
  3000  		if v_1.Op != OpLOONG64MOVBUreg {
  3001  			break
  3002  		}
  3003  		x := v_1.Args[0]
  3004  		mem := v_2
  3005  		v.reset(OpLOONG64MOVBstore)
  3006  		v.AuxInt = int32ToAuxInt(off)
  3007  		v.Aux = symToAux(sym)
  3008  		v.AddArg3(ptr, x, mem)
  3009  		return true
  3010  	}
  3011  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  3012  	// result: (MOVBstore [off] {sym} ptr x mem)
  3013  	for {
  3014  		off := auxIntToInt32(v.AuxInt)
  3015  		sym := auxToSym(v.Aux)
  3016  		ptr := v_0
  3017  		if v_1.Op != OpLOONG64MOVHreg {
  3018  			break
  3019  		}
  3020  		x := v_1.Args[0]
  3021  		mem := v_2
  3022  		v.reset(OpLOONG64MOVBstore)
  3023  		v.AuxInt = int32ToAuxInt(off)
  3024  		v.Aux = symToAux(sym)
  3025  		v.AddArg3(ptr, x, mem)
  3026  		return true
  3027  	}
  3028  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  3029  	// result: (MOVBstore [off] {sym} ptr x mem)
  3030  	for {
  3031  		off := auxIntToInt32(v.AuxInt)
  3032  		sym := auxToSym(v.Aux)
  3033  		ptr := v_0
  3034  		if v_1.Op != OpLOONG64MOVHUreg {
  3035  			break
  3036  		}
  3037  		x := v_1.Args[0]
  3038  		mem := v_2
  3039  		v.reset(OpLOONG64MOVBstore)
  3040  		v.AuxInt = int32ToAuxInt(off)
  3041  		v.Aux = symToAux(sym)
  3042  		v.AddArg3(ptr, x, mem)
  3043  		return true
  3044  	}
  3045  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  3046  	// result: (MOVBstore [off] {sym} ptr x mem)
  3047  	for {
  3048  		off := auxIntToInt32(v.AuxInt)
  3049  		sym := auxToSym(v.Aux)
  3050  		ptr := v_0
  3051  		if v_1.Op != OpLOONG64MOVWreg {
  3052  			break
  3053  		}
  3054  		x := v_1.Args[0]
  3055  		mem := v_2
  3056  		v.reset(OpLOONG64MOVBstore)
  3057  		v.AuxInt = int32ToAuxInt(off)
  3058  		v.Aux = symToAux(sym)
  3059  		v.AddArg3(ptr, x, mem)
  3060  		return true
  3061  	}
  3062  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
  3063  	// result: (MOVBstore [off] {sym} ptr x mem)
  3064  	for {
  3065  		off := auxIntToInt32(v.AuxInt)
  3066  		sym := auxToSym(v.Aux)
  3067  		ptr := v_0
  3068  		if v_1.Op != OpLOONG64MOVWUreg {
  3069  			break
  3070  		}
  3071  		x := v_1.Args[0]
  3072  		mem := v_2
  3073  		v.reset(OpLOONG64MOVBstore)
  3074  		v.AuxInt = int32ToAuxInt(off)
  3075  		v.Aux = symToAux(sym)
  3076  		v.AddArg3(ptr, x, mem)
  3077  		return true
  3078  	}
  3079  	// match: (MOVBstore [off] {sym} (ADDV ptr idx) val mem)
  3080  	// cond: off == 0 && sym == nil
  3081  	// result: (MOVBstoreidx ptr idx val mem)
  3082  	for {
  3083  		off := auxIntToInt32(v.AuxInt)
  3084  		sym := auxToSym(v.Aux)
  3085  		if v_0.Op != OpLOONG64ADDV {
  3086  			break
  3087  		}
  3088  		idx := v_0.Args[1]
  3089  		ptr := v_0.Args[0]
  3090  		val := v_1
  3091  		mem := v_2
  3092  		if !(off == 0 && sym == nil) {
  3093  			break
  3094  		}
  3095  		v.reset(OpLOONG64MOVBstoreidx)
  3096  		v.AddArg4(ptr, idx, val, mem)
  3097  		return true
  3098  	}
  3099  	// match: (MOVBstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3100  	// cond: off == 0 && sym == nil
  3101  	// result: (MOVBstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3102  	for {
  3103  		off := auxIntToInt32(v.AuxInt)
  3104  		sym := auxToSym(v.Aux)
  3105  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3106  			break
  3107  		}
  3108  		shift := auxIntToInt64(v_0.AuxInt)
  3109  		idx := v_0.Args[1]
  3110  		ptr := v_0.Args[0]
  3111  		val := v_1
  3112  		mem := v_2
  3113  		if !(off == 0 && sym == nil) {
  3114  			break
  3115  		}
  3116  		v.reset(OpLOONG64MOVBstoreidx)
  3117  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3118  		v0.AuxInt = int64ToAuxInt(shift)
  3119  		v0.AddArg(idx)
  3120  		v.AddArg4(ptr, v0, val, mem)
  3121  		return true
  3122  	}
  3123  	return false
  3124  }
  3125  func rewriteValueLOONG64_OpLOONG64MOVBstoreidx(v *Value) bool {
  3126  	v_3 := v.Args[3]
  3127  	v_2 := v.Args[2]
  3128  	v_1 := v.Args[1]
  3129  	v_0 := v.Args[0]
  3130  	// match: (MOVBstoreidx ptr (MOVVconst [c]) val mem)
  3131  	// cond: is32Bit(c)
  3132  	// result: (MOVBstore [int32(c)] ptr val mem)
  3133  	for {
  3134  		ptr := v_0
  3135  		if v_1.Op != OpLOONG64MOVVconst {
  3136  			break
  3137  		}
  3138  		c := auxIntToInt64(v_1.AuxInt)
  3139  		val := v_2
  3140  		mem := v_3
  3141  		if !(is32Bit(c)) {
  3142  			break
  3143  		}
  3144  		v.reset(OpLOONG64MOVBstore)
  3145  		v.AuxInt = int32ToAuxInt(int32(c))
  3146  		v.AddArg3(ptr, val, mem)
  3147  		return true
  3148  	}
  3149  	// match: (MOVBstoreidx (MOVVconst [c]) idx val mem)
  3150  	// cond: is32Bit(c)
  3151  	// result: (MOVBstore [int32(c)] idx val mem)
  3152  	for {
  3153  		if v_0.Op != OpLOONG64MOVVconst {
  3154  			break
  3155  		}
  3156  		c := auxIntToInt64(v_0.AuxInt)
  3157  		idx := v_1
  3158  		val := v_2
  3159  		mem := v_3
  3160  		if !(is32Bit(c)) {
  3161  			break
  3162  		}
  3163  		v.reset(OpLOONG64MOVBstore)
  3164  		v.AuxInt = int32ToAuxInt(int32(c))
  3165  		v.AddArg3(idx, val, mem)
  3166  		return true
  3167  	}
  3168  	return false
  3169  }
  3170  func rewriteValueLOONG64_OpLOONG64MOVDload(v *Value) bool {
  3171  	v_1 := v.Args[1]
  3172  	v_0 := v.Args[0]
  3173  	b := v.Block
  3174  	config := b.Func.Config
  3175  	typ := &b.Func.Config.Types
  3176  	// match: (MOVDload [off] {sym} ptr (MOVVstore [off] {sym} ptr val _))
  3177  	// result: (MOVVgpfp val)
  3178  	for {
  3179  		off := auxIntToInt32(v.AuxInt)
  3180  		sym := auxToSym(v.Aux)
  3181  		ptr := v_0
  3182  		if v_1.Op != OpLOONG64MOVVstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  3183  			break
  3184  		}
  3185  		val := v_1.Args[1]
  3186  		if ptr != v_1.Args[0] {
  3187  			break
  3188  		}
  3189  		v.reset(OpLOONG64MOVVgpfp)
  3190  		v.AddArg(val)
  3191  		return true
  3192  	}
  3193  	// match: (MOVDload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3194  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3195  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
  3196  	for {
  3197  		off1 := auxIntToInt32(v.AuxInt)
  3198  		sym := auxToSym(v.Aux)
  3199  		if v_0.Op != OpLOONG64ADDVconst {
  3200  			break
  3201  		}
  3202  		off2 := auxIntToInt64(v_0.AuxInt)
  3203  		ptr := v_0.Args[0]
  3204  		mem := v_1
  3205  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3206  			break
  3207  		}
  3208  		v.reset(OpLOONG64MOVDload)
  3209  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3210  		v.Aux = symToAux(sym)
  3211  		v.AddArg2(ptr, mem)
  3212  		return true
  3213  	}
  3214  	// match: (MOVDload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3215  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3216  	// result: (MOVDload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  3217  	for {
  3218  		off1 := auxIntToInt32(v.AuxInt)
  3219  		sym1 := auxToSym(v.Aux)
  3220  		if v_0.Op != OpLOONG64MOVVaddr {
  3221  			break
  3222  		}
  3223  		off2 := auxIntToInt32(v_0.AuxInt)
  3224  		sym2 := auxToSym(v_0.Aux)
  3225  		ptr := v_0.Args[0]
  3226  		mem := v_1
  3227  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3228  			break
  3229  		}
  3230  		v.reset(OpLOONG64MOVDload)
  3231  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3232  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3233  		v.AddArg2(ptr, mem)
  3234  		return true
  3235  	}
  3236  	// match: (MOVDload [off] {sym} (ADDV ptr idx) mem)
  3237  	// cond: off == 0 && sym == nil
  3238  	// result: (MOVDloadidx ptr idx mem)
  3239  	for {
  3240  		off := auxIntToInt32(v.AuxInt)
  3241  		sym := auxToSym(v.Aux)
  3242  		if v_0.Op != OpLOONG64ADDV {
  3243  			break
  3244  		}
  3245  		idx := v_0.Args[1]
  3246  		ptr := v_0.Args[0]
  3247  		mem := v_1
  3248  		if !(off == 0 && sym == nil) {
  3249  			break
  3250  		}
  3251  		v.reset(OpLOONG64MOVDloadidx)
  3252  		v.AddArg3(ptr, idx, mem)
  3253  		return true
  3254  	}
  3255  	// match: (MOVDload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3256  	// cond: off == 0 && sym == nil
  3257  	// result: (MOVDloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3258  	for {
  3259  		off := auxIntToInt32(v.AuxInt)
  3260  		sym := auxToSym(v.Aux)
  3261  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3262  			break
  3263  		}
  3264  		shift := auxIntToInt64(v_0.AuxInt)
  3265  		idx := v_0.Args[1]
  3266  		ptr := v_0.Args[0]
  3267  		mem := v_1
  3268  		if !(off == 0 && sym == nil) {
  3269  			break
  3270  		}
  3271  		v.reset(OpLOONG64MOVDloadidx)
  3272  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3273  		v0.AuxInt = int64ToAuxInt(shift)
  3274  		v0.AddArg(idx)
  3275  		v.AddArg3(ptr, v0, mem)
  3276  		return true
  3277  	}
  3278  	return false
  3279  }
  3280  func rewriteValueLOONG64_OpLOONG64MOVDloadidx(v *Value) bool {
  3281  	v_2 := v.Args[2]
  3282  	v_1 := v.Args[1]
  3283  	v_0 := v.Args[0]
  3284  	// match: (MOVDloadidx ptr (MOVVconst [c]) mem)
  3285  	// cond: is32Bit(c)
  3286  	// result: (MOVDload [int32(c)] ptr mem)
  3287  	for {
  3288  		ptr := v_0
  3289  		if v_1.Op != OpLOONG64MOVVconst {
  3290  			break
  3291  		}
  3292  		c := auxIntToInt64(v_1.AuxInt)
  3293  		mem := v_2
  3294  		if !(is32Bit(c)) {
  3295  			break
  3296  		}
  3297  		v.reset(OpLOONG64MOVDload)
  3298  		v.AuxInt = int32ToAuxInt(int32(c))
  3299  		v.AddArg2(ptr, mem)
  3300  		return true
  3301  	}
  3302  	// match: (MOVDloadidx (MOVVconst [c]) ptr mem)
  3303  	// cond: is32Bit(c)
  3304  	// result: (MOVDload [int32(c)] ptr mem)
  3305  	for {
  3306  		if v_0.Op != OpLOONG64MOVVconst {
  3307  			break
  3308  		}
  3309  		c := auxIntToInt64(v_0.AuxInt)
  3310  		ptr := v_1
  3311  		mem := v_2
  3312  		if !(is32Bit(c)) {
  3313  			break
  3314  		}
  3315  		v.reset(OpLOONG64MOVDload)
  3316  		v.AuxInt = int32ToAuxInt(int32(c))
  3317  		v.AddArg2(ptr, mem)
  3318  		return true
  3319  	}
  3320  	return false
  3321  }
  3322  func rewriteValueLOONG64_OpLOONG64MOVDstore(v *Value) bool {
  3323  	v_2 := v.Args[2]
  3324  	v_1 := v.Args[1]
  3325  	v_0 := v.Args[0]
  3326  	b := v.Block
  3327  	config := b.Func.Config
  3328  	typ := &b.Func.Config.Types
  3329  	// match: (MOVDstore [off] {sym} ptr (MOVVgpfp val) mem)
  3330  	// result: (MOVVstore [off] {sym} ptr val mem)
  3331  	for {
  3332  		off := auxIntToInt32(v.AuxInt)
  3333  		sym := auxToSym(v.Aux)
  3334  		ptr := v_0
  3335  		if v_1.Op != OpLOONG64MOVVgpfp {
  3336  			break
  3337  		}
  3338  		val := v_1.Args[0]
  3339  		mem := v_2
  3340  		v.reset(OpLOONG64MOVVstore)
  3341  		v.AuxInt = int32ToAuxInt(off)
  3342  		v.Aux = symToAux(sym)
  3343  		v.AddArg3(ptr, val, mem)
  3344  		return true
  3345  	}
  3346  	// match: (MOVDstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  3347  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3348  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
  3349  	for {
  3350  		off1 := auxIntToInt32(v.AuxInt)
  3351  		sym := auxToSym(v.Aux)
  3352  		if v_0.Op != OpLOONG64ADDVconst {
  3353  			break
  3354  		}
  3355  		off2 := auxIntToInt64(v_0.AuxInt)
  3356  		ptr := v_0.Args[0]
  3357  		val := v_1
  3358  		mem := v_2
  3359  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3360  			break
  3361  		}
  3362  		v.reset(OpLOONG64MOVDstore)
  3363  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3364  		v.Aux = symToAux(sym)
  3365  		v.AddArg3(ptr, val, mem)
  3366  		return true
  3367  	}
  3368  	// match: (MOVDstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  3369  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3370  	// result: (MOVDstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  3371  	for {
  3372  		off1 := auxIntToInt32(v.AuxInt)
  3373  		sym1 := auxToSym(v.Aux)
  3374  		if v_0.Op != OpLOONG64MOVVaddr {
  3375  			break
  3376  		}
  3377  		off2 := auxIntToInt32(v_0.AuxInt)
  3378  		sym2 := auxToSym(v_0.Aux)
  3379  		ptr := v_0.Args[0]
  3380  		val := v_1
  3381  		mem := v_2
  3382  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3383  			break
  3384  		}
  3385  		v.reset(OpLOONG64MOVDstore)
  3386  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3387  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3388  		v.AddArg3(ptr, val, mem)
  3389  		return true
  3390  	}
  3391  	// match: (MOVDstore [off] {sym} (ADDV ptr idx) val mem)
  3392  	// cond: off == 0 && sym == nil
  3393  	// result: (MOVDstoreidx ptr idx val mem)
  3394  	for {
  3395  		off := auxIntToInt32(v.AuxInt)
  3396  		sym := auxToSym(v.Aux)
  3397  		if v_0.Op != OpLOONG64ADDV {
  3398  			break
  3399  		}
  3400  		idx := v_0.Args[1]
  3401  		ptr := v_0.Args[0]
  3402  		val := v_1
  3403  		mem := v_2
  3404  		if !(off == 0 && sym == nil) {
  3405  			break
  3406  		}
  3407  		v.reset(OpLOONG64MOVDstoreidx)
  3408  		v.AddArg4(ptr, idx, val, mem)
  3409  		return true
  3410  	}
  3411  	// match: (MOVDstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3412  	// cond: off == 0 && sym == nil
  3413  	// result: (MOVDstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3414  	for {
  3415  		off := auxIntToInt32(v.AuxInt)
  3416  		sym := auxToSym(v.Aux)
  3417  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3418  			break
  3419  		}
  3420  		shift := auxIntToInt64(v_0.AuxInt)
  3421  		idx := v_0.Args[1]
  3422  		ptr := v_0.Args[0]
  3423  		val := v_1
  3424  		mem := v_2
  3425  		if !(off == 0 && sym == nil) {
  3426  			break
  3427  		}
  3428  		v.reset(OpLOONG64MOVDstoreidx)
  3429  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3430  		v0.AuxInt = int64ToAuxInt(shift)
  3431  		v0.AddArg(idx)
  3432  		v.AddArg4(ptr, v0, val, mem)
  3433  		return true
  3434  	}
  3435  	return false
  3436  }
  3437  func rewriteValueLOONG64_OpLOONG64MOVDstoreidx(v *Value) bool {
  3438  	v_3 := v.Args[3]
  3439  	v_2 := v.Args[2]
  3440  	v_1 := v.Args[1]
  3441  	v_0 := v.Args[0]
  3442  	// match: (MOVDstoreidx ptr (MOVVconst [c]) val mem)
  3443  	// cond: is32Bit(c)
  3444  	// result: (MOVDstore [int32(c)] ptr val mem)
  3445  	for {
  3446  		ptr := v_0
  3447  		if v_1.Op != OpLOONG64MOVVconst {
  3448  			break
  3449  		}
  3450  		c := auxIntToInt64(v_1.AuxInt)
  3451  		val := v_2
  3452  		mem := v_3
  3453  		if !(is32Bit(c)) {
  3454  			break
  3455  		}
  3456  		v.reset(OpLOONG64MOVDstore)
  3457  		v.AuxInt = int32ToAuxInt(int32(c))
  3458  		v.AddArg3(ptr, val, mem)
  3459  		return true
  3460  	}
  3461  	// match: (MOVDstoreidx (MOVVconst [c]) idx val mem)
  3462  	// cond: is32Bit(c)
  3463  	// result: (MOVDstore [int32(c)] idx val mem)
  3464  	for {
  3465  		if v_0.Op != OpLOONG64MOVVconst {
  3466  			break
  3467  		}
  3468  		c := auxIntToInt64(v_0.AuxInt)
  3469  		idx := v_1
  3470  		val := v_2
  3471  		mem := v_3
  3472  		if !(is32Bit(c)) {
  3473  			break
  3474  		}
  3475  		v.reset(OpLOONG64MOVDstore)
  3476  		v.AuxInt = int32ToAuxInt(int32(c))
  3477  		v.AddArg3(idx, val, mem)
  3478  		return true
  3479  	}
  3480  	return false
  3481  }
  3482  func rewriteValueLOONG64_OpLOONG64MOVFload(v *Value) bool {
  3483  	v_1 := v.Args[1]
  3484  	v_0 := v.Args[0]
  3485  	b := v.Block
  3486  	config := b.Func.Config
  3487  	typ := &b.Func.Config.Types
  3488  	// match: (MOVFload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  3489  	// result: (MOVWgpfp val)
  3490  	for {
  3491  		off := auxIntToInt32(v.AuxInt)
  3492  		sym := auxToSym(v.Aux)
  3493  		ptr := v_0
  3494  		if v_1.Op != OpLOONG64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  3495  			break
  3496  		}
  3497  		val := v_1.Args[1]
  3498  		if ptr != v_1.Args[0] {
  3499  			break
  3500  		}
  3501  		v.reset(OpLOONG64MOVWgpfp)
  3502  		v.AddArg(val)
  3503  		return true
  3504  	}
  3505  	// match: (MOVFload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3506  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3507  	// result: (MOVFload [off1+int32(off2)] {sym} ptr mem)
  3508  	for {
  3509  		off1 := auxIntToInt32(v.AuxInt)
  3510  		sym := auxToSym(v.Aux)
  3511  		if v_0.Op != OpLOONG64ADDVconst {
  3512  			break
  3513  		}
  3514  		off2 := auxIntToInt64(v_0.AuxInt)
  3515  		ptr := v_0.Args[0]
  3516  		mem := v_1
  3517  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3518  			break
  3519  		}
  3520  		v.reset(OpLOONG64MOVFload)
  3521  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3522  		v.Aux = symToAux(sym)
  3523  		v.AddArg2(ptr, mem)
  3524  		return true
  3525  	}
  3526  	// match: (MOVFload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3527  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3528  	// result: (MOVFload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  3529  	for {
  3530  		off1 := auxIntToInt32(v.AuxInt)
  3531  		sym1 := auxToSym(v.Aux)
  3532  		if v_0.Op != OpLOONG64MOVVaddr {
  3533  			break
  3534  		}
  3535  		off2 := auxIntToInt32(v_0.AuxInt)
  3536  		sym2 := auxToSym(v_0.Aux)
  3537  		ptr := v_0.Args[0]
  3538  		mem := v_1
  3539  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3540  			break
  3541  		}
  3542  		v.reset(OpLOONG64MOVFload)
  3543  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3544  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3545  		v.AddArg2(ptr, mem)
  3546  		return true
  3547  	}
  3548  	// match: (MOVFload [off] {sym} (ADDV ptr idx) mem)
  3549  	// cond: off == 0 && sym == nil
  3550  	// result: (MOVFloadidx ptr idx mem)
  3551  	for {
  3552  		off := auxIntToInt32(v.AuxInt)
  3553  		sym := auxToSym(v.Aux)
  3554  		if v_0.Op != OpLOONG64ADDV {
  3555  			break
  3556  		}
  3557  		idx := v_0.Args[1]
  3558  		ptr := v_0.Args[0]
  3559  		mem := v_1
  3560  		if !(off == 0 && sym == nil) {
  3561  			break
  3562  		}
  3563  		v.reset(OpLOONG64MOVFloadidx)
  3564  		v.AddArg3(ptr, idx, mem)
  3565  		return true
  3566  	}
  3567  	// match: (MOVFload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3568  	// cond: off == 0 && sym == nil
  3569  	// result: (MOVFloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3570  	for {
  3571  		off := auxIntToInt32(v.AuxInt)
  3572  		sym := auxToSym(v.Aux)
  3573  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3574  			break
  3575  		}
  3576  		shift := auxIntToInt64(v_0.AuxInt)
  3577  		idx := v_0.Args[1]
  3578  		ptr := v_0.Args[0]
  3579  		mem := v_1
  3580  		if !(off == 0 && sym == nil) {
  3581  			break
  3582  		}
  3583  		v.reset(OpLOONG64MOVFloadidx)
  3584  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3585  		v0.AuxInt = int64ToAuxInt(shift)
  3586  		v0.AddArg(idx)
  3587  		v.AddArg3(ptr, v0, mem)
  3588  		return true
  3589  	}
  3590  	return false
  3591  }
  3592  func rewriteValueLOONG64_OpLOONG64MOVFloadidx(v *Value) bool {
  3593  	v_2 := v.Args[2]
  3594  	v_1 := v.Args[1]
  3595  	v_0 := v.Args[0]
  3596  	// match: (MOVFloadidx ptr (MOVVconst [c]) mem)
  3597  	// cond: is32Bit(c)
  3598  	// result: (MOVFload [int32(c)] ptr mem)
  3599  	for {
  3600  		ptr := v_0
  3601  		if v_1.Op != OpLOONG64MOVVconst {
  3602  			break
  3603  		}
  3604  		c := auxIntToInt64(v_1.AuxInt)
  3605  		mem := v_2
  3606  		if !(is32Bit(c)) {
  3607  			break
  3608  		}
  3609  		v.reset(OpLOONG64MOVFload)
  3610  		v.AuxInt = int32ToAuxInt(int32(c))
  3611  		v.AddArg2(ptr, mem)
  3612  		return true
  3613  	}
  3614  	// match: (MOVFloadidx (MOVVconst [c]) ptr mem)
  3615  	// cond: is32Bit(c)
  3616  	// result: (MOVFload [int32(c)] ptr mem)
  3617  	for {
  3618  		if v_0.Op != OpLOONG64MOVVconst {
  3619  			break
  3620  		}
  3621  		c := auxIntToInt64(v_0.AuxInt)
  3622  		ptr := v_1
  3623  		mem := v_2
  3624  		if !(is32Bit(c)) {
  3625  			break
  3626  		}
  3627  		v.reset(OpLOONG64MOVFload)
  3628  		v.AuxInt = int32ToAuxInt(int32(c))
  3629  		v.AddArg2(ptr, mem)
  3630  		return true
  3631  	}
  3632  	return false
  3633  }
  3634  func rewriteValueLOONG64_OpLOONG64MOVFstore(v *Value) bool {
  3635  	v_2 := v.Args[2]
  3636  	v_1 := v.Args[1]
  3637  	v_0 := v.Args[0]
  3638  	b := v.Block
  3639  	config := b.Func.Config
  3640  	typ := &b.Func.Config.Types
  3641  	// match: (MOVFstore [off] {sym} ptr (MOVWgpfp val) mem)
  3642  	// result: (MOVWstore [off] {sym} ptr val mem)
  3643  	for {
  3644  		off := auxIntToInt32(v.AuxInt)
  3645  		sym := auxToSym(v.Aux)
  3646  		ptr := v_0
  3647  		if v_1.Op != OpLOONG64MOVWgpfp {
  3648  			break
  3649  		}
  3650  		val := v_1.Args[0]
  3651  		mem := v_2
  3652  		v.reset(OpLOONG64MOVWstore)
  3653  		v.AuxInt = int32ToAuxInt(off)
  3654  		v.Aux = symToAux(sym)
  3655  		v.AddArg3(ptr, val, mem)
  3656  		return true
  3657  	}
  3658  	// match: (MOVFstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  3659  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3660  	// result: (MOVFstore [off1+int32(off2)] {sym} ptr val mem)
  3661  	for {
  3662  		off1 := auxIntToInt32(v.AuxInt)
  3663  		sym := auxToSym(v.Aux)
  3664  		if v_0.Op != OpLOONG64ADDVconst {
  3665  			break
  3666  		}
  3667  		off2 := auxIntToInt64(v_0.AuxInt)
  3668  		ptr := v_0.Args[0]
  3669  		val := v_1
  3670  		mem := v_2
  3671  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3672  			break
  3673  		}
  3674  		v.reset(OpLOONG64MOVFstore)
  3675  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3676  		v.Aux = symToAux(sym)
  3677  		v.AddArg3(ptr, val, mem)
  3678  		return true
  3679  	}
  3680  	// match: (MOVFstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  3681  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3682  	// result: (MOVFstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  3683  	for {
  3684  		off1 := auxIntToInt32(v.AuxInt)
  3685  		sym1 := auxToSym(v.Aux)
  3686  		if v_0.Op != OpLOONG64MOVVaddr {
  3687  			break
  3688  		}
  3689  		off2 := auxIntToInt32(v_0.AuxInt)
  3690  		sym2 := auxToSym(v_0.Aux)
  3691  		ptr := v_0.Args[0]
  3692  		val := v_1
  3693  		mem := v_2
  3694  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3695  			break
  3696  		}
  3697  		v.reset(OpLOONG64MOVFstore)
  3698  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3699  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3700  		v.AddArg3(ptr, val, mem)
  3701  		return true
  3702  	}
  3703  	// match: (MOVFstore [off] {sym} (ADDV ptr idx) val mem)
  3704  	// cond: off == 0 && sym == nil
  3705  	// result: (MOVFstoreidx ptr idx val mem)
  3706  	for {
  3707  		off := auxIntToInt32(v.AuxInt)
  3708  		sym := auxToSym(v.Aux)
  3709  		if v_0.Op != OpLOONG64ADDV {
  3710  			break
  3711  		}
  3712  		idx := v_0.Args[1]
  3713  		ptr := v_0.Args[0]
  3714  		val := v_1
  3715  		mem := v_2
  3716  		if !(off == 0 && sym == nil) {
  3717  			break
  3718  		}
  3719  		v.reset(OpLOONG64MOVFstoreidx)
  3720  		v.AddArg4(ptr, idx, val, mem)
  3721  		return true
  3722  	}
  3723  	// match: (MOVFstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3724  	// cond: off == 0 && sym == nil
  3725  	// result: (MOVFstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3726  	for {
  3727  		off := auxIntToInt32(v.AuxInt)
  3728  		sym := auxToSym(v.Aux)
  3729  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3730  			break
  3731  		}
  3732  		shift := auxIntToInt64(v_0.AuxInt)
  3733  		idx := v_0.Args[1]
  3734  		ptr := v_0.Args[0]
  3735  		val := v_1
  3736  		mem := v_2
  3737  		if !(off == 0 && sym == nil) {
  3738  			break
  3739  		}
  3740  		v.reset(OpLOONG64MOVFstoreidx)
  3741  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3742  		v0.AuxInt = int64ToAuxInt(shift)
  3743  		v0.AddArg(idx)
  3744  		v.AddArg4(ptr, v0, val, mem)
  3745  		return true
  3746  	}
  3747  	return false
  3748  }
  3749  func rewriteValueLOONG64_OpLOONG64MOVFstoreidx(v *Value) bool {
  3750  	v_3 := v.Args[3]
  3751  	v_2 := v.Args[2]
  3752  	v_1 := v.Args[1]
  3753  	v_0 := v.Args[0]
  3754  	// match: (MOVFstoreidx ptr (MOVVconst [c]) val mem)
  3755  	// cond: is32Bit(c)
  3756  	// result: (MOVFstore [int32(c)] ptr val mem)
  3757  	for {
  3758  		ptr := v_0
  3759  		if v_1.Op != OpLOONG64MOVVconst {
  3760  			break
  3761  		}
  3762  		c := auxIntToInt64(v_1.AuxInt)
  3763  		val := v_2
  3764  		mem := v_3
  3765  		if !(is32Bit(c)) {
  3766  			break
  3767  		}
  3768  		v.reset(OpLOONG64MOVFstore)
  3769  		v.AuxInt = int32ToAuxInt(int32(c))
  3770  		v.AddArg3(ptr, val, mem)
  3771  		return true
  3772  	}
  3773  	// match: (MOVFstoreidx (MOVVconst [c]) idx val mem)
  3774  	// cond: is32Bit(c)
  3775  	// result: (MOVFstore [int32(c)] idx val mem)
  3776  	for {
  3777  		if v_0.Op != OpLOONG64MOVVconst {
  3778  			break
  3779  		}
  3780  		c := auxIntToInt64(v_0.AuxInt)
  3781  		idx := v_1
  3782  		val := v_2
  3783  		mem := v_3
  3784  		if !(is32Bit(c)) {
  3785  			break
  3786  		}
  3787  		v.reset(OpLOONG64MOVFstore)
  3788  		v.AuxInt = int32ToAuxInt(int32(c))
  3789  		v.AddArg3(idx, val, mem)
  3790  		return true
  3791  	}
  3792  	return false
  3793  }
  3794  func rewriteValueLOONG64_OpLOONG64MOVHUload(v *Value) bool {
  3795  	v_1 := v.Args[1]
  3796  	v_0 := v.Args[0]
  3797  	b := v.Block
  3798  	config := b.Func.Config
  3799  	typ := &b.Func.Config.Types
  3800  	// match: (MOVHUload [off] {sym} ptr (MOVHstore [off] {sym} ptr x _))
  3801  	// result: (MOVHUreg x)
  3802  	for {
  3803  		off := auxIntToInt32(v.AuxInt)
  3804  		sym := auxToSym(v.Aux)
  3805  		ptr := v_0
  3806  		if v_1.Op != OpLOONG64MOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  3807  			break
  3808  		}
  3809  		x := v_1.Args[1]
  3810  		if ptr != v_1.Args[0] {
  3811  			break
  3812  		}
  3813  		v.reset(OpLOONG64MOVHUreg)
  3814  		v.AddArg(x)
  3815  		return true
  3816  	}
  3817  	// match: (MOVHUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3818  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3819  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
  3820  	for {
  3821  		off1 := auxIntToInt32(v.AuxInt)
  3822  		sym := auxToSym(v.Aux)
  3823  		if v_0.Op != OpLOONG64ADDVconst {
  3824  			break
  3825  		}
  3826  		off2 := auxIntToInt64(v_0.AuxInt)
  3827  		ptr := v_0.Args[0]
  3828  		mem := v_1
  3829  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3830  			break
  3831  		}
  3832  		v.reset(OpLOONG64MOVHUload)
  3833  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3834  		v.Aux = symToAux(sym)
  3835  		v.AddArg2(ptr, mem)
  3836  		return true
  3837  	}
  3838  	// match: (MOVHUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3839  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3840  	// result: (MOVHUload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  3841  	for {
  3842  		off1 := auxIntToInt32(v.AuxInt)
  3843  		sym1 := auxToSym(v.Aux)
  3844  		if v_0.Op != OpLOONG64MOVVaddr {
  3845  			break
  3846  		}
  3847  		off2 := auxIntToInt32(v_0.AuxInt)
  3848  		sym2 := auxToSym(v_0.Aux)
  3849  		ptr := v_0.Args[0]
  3850  		mem := v_1
  3851  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3852  			break
  3853  		}
  3854  		v.reset(OpLOONG64MOVHUload)
  3855  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3856  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3857  		v.AddArg2(ptr, mem)
  3858  		return true
  3859  	}
  3860  	// match: (MOVHUload [off] {sym} (ADDV ptr idx) mem)
  3861  	// cond: off == 0 && sym == nil
  3862  	// result: (MOVHUloadidx ptr idx mem)
  3863  	for {
  3864  		off := auxIntToInt32(v.AuxInt)
  3865  		sym := auxToSym(v.Aux)
  3866  		if v_0.Op != OpLOONG64ADDV {
  3867  			break
  3868  		}
  3869  		idx := v_0.Args[1]
  3870  		ptr := v_0.Args[0]
  3871  		mem := v_1
  3872  		if !(off == 0 && sym == nil) {
  3873  			break
  3874  		}
  3875  		v.reset(OpLOONG64MOVHUloadidx)
  3876  		v.AddArg3(ptr, idx, mem)
  3877  		return true
  3878  	}
  3879  	// match: (MOVHUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3880  	// cond: off == 0 && sym == nil
  3881  	// result: (MOVHUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3882  	for {
  3883  		off := auxIntToInt32(v.AuxInt)
  3884  		sym := auxToSym(v.Aux)
  3885  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3886  			break
  3887  		}
  3888  		shift := auxIntToInt64(v_0.AuxInt)
  3889  		idx := v_0.Args[1]
  3890  		ptr := v_0.Args[0]
  3891  		mem := v_1
  3892  		if !(off == 0 && sym == nil) {
  3893  			break
  3894  		}
  3895  		v.reset(OpLOONG64MOVHUloadidx)
  3896  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3897  		v0.AuxInt = int64ToAuxInt(shift)
  3898  		v0.AddArg(idx)
  3899  		v.AddArg3(ptr, v0, mem)
  3900  		return true
  3901  	}
  3902  	// match: (MOVHUload [off] {sym} (SB) _)
  3903  	// cond: symIsRO(sym)
  3904  	// result: (MOVVconst [int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  3905  	for {
  3906  		off := auxIntToInt32(v.AuxInt)
  3907  		sym := auxToSym(v.Aux)
  3908  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  3909  			break
  3910  		}
  3911  		v.reset(OpLOONG64MOVVconst)
  3912  		v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  3913  		return true
  3914  	}
  3915  	return false
  3916  }
  3917  func rewriteValueLOONG64_OpLOONG64MOVHUloadidx(v *Value) bool {
  3918  	v_2 := v.Args[2]
  3919  	v_1 := v.Args[1]
  3920  	v_0 := v.Args[0]
  3921  	// match: (MOVHUloadidx ptr (MOVVconst [c]) mem)
  3922  	// cond: is32Bit(c)
  3923  	// result: (MOVHUload [int32(c)] ptr mem)
  3924  	for {
  3925  		ptr := v_0
  3926  		if v_1.Op != OpLOONG64MOVVconst {
  3927  			break
  3928  		}
  3929  		c := auxIntToInt64(v_1.AuxInt)
  3930  		mem := v_2
  3931  		if !(is32Bit(c)) {
  3932  			break
  3933  		}
  3934  		v.reset(OpLOONG64MOVHUload)
  3935  		v.AuxInt = int32ToAuxInt(int32(c))
  3936  		v.AddArg2(ptr, mem)
  3937  		return true
  3938  	}
  3939  	// match: (MOVHUloadidx (MOVVconst [c]) ptr mem)
  3940  	// cond: is32Bit(c)
  3941  	// result: (MOVHUload [int32(c)] ptr mem)
  3942  	for {
  3943  		if v_0.Op != OpLOONG64MOVVconst {
  3944  			break
  3945  		}
  3946  		c := auxIntToInt64(v_0.AuxInt)
  3947  		ptr := v_1
  3948  		mem := v_2
  3949  		if !(is32Bit(c)) {
  3950  			break
  3951  		}
  3952  		v.reset(OpLOONG64MOVHUload)
  3953  		v.AuxInt = int32ToAuxInt(int32(c))
  3954  		v.AddArg2(ptr, mem)
  3955  		return true
  3956  	}
  3957  	return false
  3958  }
  3959  func rewriteValueLOONG64_OpLOONG64MOVHUreg(v *Value) bool {
  3960  	v_0 := v.Args[0]
  3961  	// match: (MOVHUreg (SRLVconst [rc] x))
  3962  	// cond: rc < 16
  3963  	// result: (BSTRPICKV [rc + (15+rc)<<6] x)
  3964  	for {
  3965  		if v_0.Op != OpLOONG64SRLVconst {
  3966  			break
  3967  		}
  3968  		rc := auxIntToInt64(v_0.AuxInt)
  3969  		x := v_0.Args[0]
  3970  		if !(rc < 16) {
  3971  			break
  3972  		}
  3973  		v.reset(OpLOONG64BSTRPICKV)
  3974  		v.AuxInt = int64ToAuxInt(rc + (15+rc)<<6)
  3975  		v.AddArg(x)
  3976  		return true
  3977  	}
  3978  	// match: (MOVHUreg x:(MOVBUload _ _))
  3979  	// result: (MOVVreg x)
  3980  	for {
  3981  		x := v_0
  3982  		if x.Op != OpLOONG64MOVBUload {
  3983  			break
  3984  		}
  3985  		v.reset(OpLOONG64MOVVreg)
  3986  		v.AddArg(x)
  3987  		return true
  3988  	}
  3989  	// match: (MOVHUreg x:(MOVHUload _ _))
  3990  	// result: (MOVVreg x)
  3991  	for {
  3992  		x := v_0
  3993  		if x.Op != OpLOONG64MOVHUload {
  3994  			break
  3995  		}
  3996  		v.reset(OpLOONG64MOVVreg)
  3997  		v.AddArg(x)
  3998  		return true
  3999  	}
  4000  	// match: (MOVHUreg x:(MOVBUloadidx _ _ _))
  4001  	// result: (MOVVreg x)
  4002  	for {
  4003  		x := v_0
  4004  		if x.Op != OpLOONG64MOVBUloadidx {
  4005  			break
  4006  		}
  4007  		v.reset(OpLOONG64MOVVreg)
  4008  		v.AddArg(x)
  4009  		return true
  4010  	}
  4011  	// match: (MOVHUreg x:(MOVHUloadidx _ _ _))
  4012  	// result: (MOVVreg x)
  4013  	for {
  4014  		x := v_0
  4015  		if x.Op != OpLOONG64MOVHUloadidx {
  4016  			break
  4017  		}
  4018  		v.reset(OpLOONG64MOVVreg)
  4019  		v.AddArg(x)
  4020  		return true
  4021  	}
  4022  	// match: (MOVHUreg x:(MOVBUreg _))
  4023  	// result: (MOVVreg x)
  4024  	for {
  4025  		x := v_0
  4026  		if x.Op != OpLOONG64MOVBUreg {
  4027  			break
  4028  		}
  4029  		v.reset(OpLOONG64MOVVreg)
  4030  		v.AddArg(x)
  4031  		return true
  4032  	}
  4033  	// match: (MOVHUreg x:(MOVHUreg _))
  4034  	// result: (MOVVreg x)
  4035  	for {
  4036  		x := v_0
  4037  		if x.Op != OpLOONG64MOVHUreg {
  4038  			break
  4039  		}
  4040  		v.reset(OpLOONG64MOVVreg)
  4041  		v.AddArg(x)
  4042  		return true
  4043  	}
  4044  	// match: (MOVHUreg (SLLVconst [lc] x))
  4045  	// cond: lc >= 16
  4046  	// result: (MOVVconst [0])
  4047  	for {
  4048  		if v_0.Op != OpLOONG64SLLVconst {
  4049  			break
  4050  		}
  4051  		lc := auxIntToInt64(v_0.AuxInt)
  4052  		if !(lc >= 16) {
  4053  			break
  4054  		}
  4055  		v.reset(OpLOONG64MOVVconst)
  4056  		v.AuxInt = int64ToAuxInt(0)
  4057  		return true
  4058  	}
  4059  	// match: (MOVHUreg (MOVVconst [c]))
  4060  	// result: (MOVVconst [int64(uint16(c))])
  4061  	for {
  4062  		if v_0.Op != OpLOONG64MOVVconst {
  4063  			break
  4064  		}
  4065  		c := auxIntToInt64(v_0.AuxInt)
  4066  		v.reset(OpLOONG64MOVVconst)
  4067  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
  4068  		return true
  4069  	}
  4070  	// match: (MOVHUreg x:(ANDconst [c] y))
  4071  	// cond: c >= 0 && int64(uint16(c)) == c
  4072  	// result: x
  4073  	for {
  4074  		x := v_0
  4075  		if x.Op != OpLOONG64ANDconst {
  4076  			break
  4077  		}
  4078  		c := auxIntToInt64(x.AuxInt)
  4079  		if !(c >= 0 && int64(uint16(c)) == c) {
  4080  			break
  4081  		}
  4082  		v.copyOf(x)
  4083  		return true
  4084  	}
  4085  	return false
  4086  }
  4087  func rewriteValueLOONG64_OpLOONG64MOVHload(v *Value) bool {
  4088  	v_1 := v.Args[1]
  4089  	v_0 := v.Args[0]
  4090  	b := v.Block
  4091  	config := b.Func.Config
  4092  	typ := &b.Func.Config.Types
  4093  	// match: (MOVHload [off] {sym} ptr (MOVHstore [off] {sym} ptr x _))
  4094  	// result: (MOVHreg x)
  4095  	for {
  4096  		off := auxIntToInt32(v.AuxInt)
  4097  		sym := auxToSym(v.Aux)
  4098  		ptr := v_0
  4099  		if v_1.Op != OpLOONG64MOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  4100  			break
  4101  		}
  4102  		x := v_1.Args[1]
  4103  		if ptr != v_1.Args[0] {
  4104  			break
  4105  		}
  4106  		v.reset(OpLOONG64MOVHreg)
  4107  		v.AddArg(x)
  4108  		return true
  4109  	}
  4110  	// match: (MOVHload [off1] {sym} (ADDVconst [off2] ptr) mem)
  4111  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4112  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
  4113  	for {
  4114  		off1 := auxIntToInt32(v.AuxInt)
  4115  		sym := auxToSym(v.Aux)
  4116  		if v_0.Op != OpLOONG64ADDVconst {
  4117  			break
  4118  		}
  4119  		off2 := auxIntToInt64(v_0.AuxInt)
  4120  		ptr := v_0.Args[0]
  4121  		mem := v_1
  4122  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4123  			break
  4124  		}
  4125  		v.reset(OpLOONG64MOVHload)
  4126  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4127  		v.Aux = symToAux(sym)
  4128  		v.AddArg2(ptr, mem)
  4129  		return true
  4130  	}
  4131  	// match: (MOVHload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  4132  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4133  	// result: (MOVHload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  4134  	for {
  4135  		off1 := auxIntToInt32(v.AuxInt)
  4136  		sym1 := auxToSym(v.Aux)
  4137  		if v_0.Op != OpLOONG64MOVVaddr {
  4138  			break
  4139  		}
  4140  		off2 := auxIntToInt32(v_0.AuxInt)
  4141  		sym2 := auxToSym(v_0.Aux)
  4142  		ptr := v_0.Args[0]
  4143  		mem := v_1
  4144  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4145  			break
  4146  		}
  4147  		v.reset(OpLOONG64MOVHload)
  4148  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4149  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4150  		v.AddArg2(ptr, mem)
  4151  		return true
  4152  	}
  4153  	// match: (MOVHload [off] {sym} (ADDV ptr idx) mem)
  4154  	// cond: off == 0 && sym == nil
  4155  	// result: (MOVHloadidx ptr idx mem)
  4156  	for {
  4157  		off := auxIntToInt32(v.AuxInt)
  4158  		sym := auxToSym(v.Aux)
  4159  		if v_0.Op != OpLOONG64ADDV {
  4160  			break
  4161  		}
  4162  		idx := v_0.Args[1]
  4163  		ptr := v_0.Args[0]
  4164  		mem := v_1
  4165  		if !(off == 0 && sym == nil) {
  4166  			break
  4167  		}
  4168  		v.reset(OpLOONG64MOVHloadidx)
  4169  		v.AddArg3(ptr, idx, mem)
  4170  		return true
  4171  	}
  4172  	// match: (MOVHload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4173  	// cond: off == 0 && sym == nil
  4174  	// result: (MOVHloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4175  	for {
  4176  		off := auxIntToInt32(v.AuxInt)
  4177  		sym := auxToSym(v.Aux)
  4178  		if v_0.Op != OpLOONG64ADDshiftLLV {
  4179  			break
  4180  		}
  4181  		shift := auxIntToInt64(v_0.AuxInt)
  4182  		idx := v_0.Args[1]
  4183  		ptr := v_0.Args[0]
  4184  		mem := v_1
  4185  		if !(off == 0 && sym == nil) {
  4186  			break
  4187  		}
  4188  		v.reset(OpLOONG64MOVHloadidx)
  4189  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  4190  		v0.AuxInt = int64ToAuxInt(shift)
  4191  		v0.AddArg(idx)
  4192  		v.AddArg3(ptr, v0, mem)
  4193  		return true
  4194  	}
  4195  	// match: (MOVHload [off] {sym} (SB) _)
  4196  	// cond: symIsRO(sym)
  4197  	// result: (MOVVconst [int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
  4198  	for {
  4199  		off := auxIntToInt32(v.AuxInt)
  4200  		sym := auxToSym(v.Aux)
  4201  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  4202  			break
  4203  		}
  4204  		v.reset(OpLOONG64MOVVconst)
  4205  		v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))))
  4206  		return true
  4207  	}
  4208  	return false
  4209  }
  4210  func rewriteValueLOONG64_OpLOONG64MOVHloadidx(v *Value) bool {
  4211  	v_2 := v.Args[2]
  4212  	v_1 := v.Args[1]
  4213  	v_0 := v.Args[0]
  4214  	// match: (MOVHloadidx ptr (MOVVconst [c]) mem)
  4215  	// cond: is32Bit(c)
  4216  	// result: (MOVHload [int32(c)] ptr mem)
  4217  	for {
  4218  		ptr := v_0
  4219  		if v_1.Op != OpLOONG64MOVVconst {
  4220  			break
  4221  		}
  4222  		c := auxIntToInt64(v_1.AuxInt)
  4223  		mem := v_2
  4224  		if !(is32Bit(c)) {
  4225  			break
  4226  		}
  4227  		v.reset(OpLOONG64MOVHload)
  4228  		v.AuxInt = int32ToAuxInt(int32(c))
  4229  		v.AddArg2(ptr, mem)
  4230  		return true
  4231  	}
  4232  	// match: (MOVHloadidx (MOVVconst [c]) ptr mem)
  4233  	// cond: is32Bit(c)
  4234  	// result: (MOVHload [int32(c)] ptr mem)
  4235  	for {
  4236  		if v_0.Op != OpLOONG64MOVVconst {
  4237  			break
  4238  		}
  4239  		c := auxIntToInt64(v_0.AuxInt)
  4240  		ptr := v_1
  4241  		mem := v_2
  4242  		if !(is32Bit(c)) {
  4243  			break
  4244  		}
  4245  		v.reset(OpLOONG64MOVHload)
  4246  		v.AuxInt = int32ToAuxInt(int32(c))
  4247  		v.AddArg2(ptr, mem)
  4248  		return true
  4249  	}
  4250  	return false
  4251  }
  4252  func rewriteValueLOONG64_OpLOONG64MOVHreg(v *Value) bool {
  4253  	v_0 := v.Args[0]
  4254  	// match: (MOVHreg x:(MOVBload _ _))
  4255  	// result: (MOVVreg x)
  4256  	for {
  4257  		x := v_0
  4258  		if x.Op != OpLOONG64MOVBload {
  4259  			break
  4260  		}
  4261  		v.reset(OpLOONG64MOVVreg)
  4262  		v.AddArg(x)
  4263  		return true
  4264  	}
  4265  	// match: (MOVHreg x:(MOVBUload _ _))
  4266  	// result: (MOVVreg x)
  4267  	for {
  4268  		x := v_0
  4269  		if x.Op != OpLOONG64MOVBUload {
  4270  			break
  4271  		}
  4272  		v.reset(OpLOONG64MOVVreg)
  4273  		v.AddArg(x)
  4274  		return true
  4275  	}
  4276  	// match: (MOVHreg x:(MOVHload _ _))
  4277  	// result: (MOVVreg x)
  4278  	for {
  4279  		x := v_0
  4280  		if x.Op != OpLOONG64MOVHload {
  4281  			break
  4282  		}
  4283  		v.reset(OpLOONG64MOVVreg)
  4284  		v.AddArg(x)
  4285  		return true
  4286  	}
  4287  	// match: (MOVHreg x:(MOVBloadidx _ _ _))
  4288  	// result: (MOVVreg x)
  4289  	for {
  4290  		x := v_0
  4291  		if x.Op != OpLOONG64MOVBloadidx {
  4292  			break
  4293  		}
  4294  		v.reset(OpLOONG64MOVVreg)
  4295  		v.AddArg(x)
  4296  		return true
  4297  	}
  4298  	// match: (MOVHreg x:(MOVBUloadidx _ _ _))
  4299  	// result: (MOVVreg x)
  4300  	for {
  4301  		x := v_0
  4302  		if x.Op != OpLOONG64MOVBUloadidx {
  4303  			break
  4304  		}
  4305  		v.reset(OpLOONG64MOVVreg)
  4306  		v.AddArg(x)
  4307  		return true
  4308  	}
  4309  	// match: (MOVHreg x:(MOVHloadidx _ _ _))
  4310  	// result: (MOVVreg x)
  4311  	for {
  4312  		x := v_0
  4313  		if x.Op != OpLOONG64MOVHloadidx {
  4314  			break
  4315  		}
  4316  		v.reset(OpLOONG64MOVVreg)
  4317  		v.AddArg(x)
  4318  		return true
  4319  	}
  4320  	// match: (MOVHreg x:(MOVBreg _))
  4321  	// result: (MOVVreg x)
  4322  	for {
  4323  		x := v_0
  4324  		if x.Op != OpLOONG64MOVBreg {
  4325  			break
  4326  		}
  4327  		v.reset(OpLOONG64MOVVreg)
  4328  		v.AddArg(x)
  4329  		return true
  4330  	}
  4331  	// match: (MOVHreg x:(MOVBUreg _))
  4332  	// result: (MOVVreg x)
  4333  	for {
  4334  		x := v_0
  4335  		if x.Op != OpLOONG64MOVBUreg {
  4336  			break
  4337  		}
  4338  		v.reset(OpLOONG64MOVVreg)
  4339  		v.AddArg(x)
  4340  		return true
  4341  	}
  4342  	// match: (MOVHreg x:(MOVHreg _))
  4343  	// result: (MOVVreg x)
  4344  	for {
  4345  		x := v_0
  4346  		if x.Op != OpLOONG64MOVHreg {
  4347  			break
  4348  		}
  4349  		v.reset(OpLOONG64MOVVreg)
  4350  		v.AddArg(x)
  4351  		return true
  4352  	}
  4353  	// match: (MOVHreg (MOVVconst [c]))
  4354  	// result: (MOVVconst [int64(int16(c))])
  4355  	for {
  4356  		if v_0.Op != OpLOONG64MOVVconst {
  4357  			break
  4358  		}
  4359  		c := auxIntToInt64(v_0.AuxInt)
  4360  		v.reset(OpLOONG64MOVVconst)
  4361  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
  4362  		return true
  4363  	}
  4364  	// match: (MOVHreg x:(ANDconst [c] y))
  4365  	// cond: c >= 0 && int64(int16(c)) == c
  4366  	// result: x
  4367  	for {
  4368  		x := v_0
  4369  		if x.Op != OpLOONG64ANDconst {
  4370  			break
  4371  		}
  4372  		c := auxIntToInt64(x.AuxInt)
  4373  		if !(c >= 0 && int64(int16(c)) == c) {
  4374  			break
  4375  		}
  4376  		v.copyOf(x)
  4377  		return true
  4378  	}
  4379  	return false
  4380  }
  4381  func rewriteValueLOONG64_OpLOONG64MOVHstore(v *Value) bool {
  4382  	v_2 := v.Args[2]
  4383  	v_1 := v.Args[1]
  4384  	v_0 := v.Args[0]
  4385  	b := v.Block
  4386  	config := b.Func.Config
  4387  	typ := &b.Func.Config.Types
  4388  	// match: (MOVHstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  4389  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4390  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
  4391  	for {
  4392  		off1 := auxIntToInt32(v.AuxInt)
  4393  		sym := auxToSym(v.Aux)
  4394  		if v_0.Op != OpLOONG64ADDVconst {
  4395  			break
  4396  		}
  4397  		off2 := auxIntToInt64(v_0.AuxInt)
  4398  		ptr := v_0.Args[0]
  4399  		val := v_1
  4400  		mem := v_2
  4401  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4402  			break
  4403  		}
  4404  		v.reset(OpLOONG64MOVHstore)
  4405  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4406  		v.Aux = symToAux(sym)
  4407  		v.AddArg3(ptr, val, mem)
  4408  		return true
  4409  	}
  4410  	// match: (MOVHstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  4411  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4412  	// result: (MOVHstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  4413  	for {
  4414  		off1 := auxIntToInt32(v.AuxInt)
  4415  		sym1 := auxToSym(v.Aux)
  4416  		if v_0.Op != OpLOONG64MOVVaddr {
  4417  			break
  4418  		}
  4419  		off2 := auxIntToInt32(v_0.AuxInt)
  4420  		sym2 := auxToSym(v_0.Aux)
  4421  		ptr := v_0.Args[0]
  4422  		val := v_1
  4423  		mem := v_2
  4424  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4425  			break
  4426  		}
  4427  		v.reset(OpLOONG64MOVHstore)
  4428  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4429  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4430  		v.AddArg3(ptr, val, mem)
  4431  		return true
  4432  	}
  4433  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  4434  	// result: (MOVHstore [off] {sym} ptr x mem)
  4435  	for {
  4436  		off := auxIntToInt32(v.AuxInt)
  4437  		sym := auxToSym(v.Aux)
  4438  		ptr := v_0
  4439  		if v_1.Op != OpLOONG64MOVHreg {
  4440  			break
  4441  		}
  4442  		x := v_1.Args[0]
  4443  		mem := v_2
  4444  		v.reset(OpLOONG64MOVHstore)
  4445  		v.AuxInt = int32ToAuxInt(off)
  4446  		v.Aux = symToAux(sym)
  4447  		v.AddArg3(ptr, x, mem)
  4448  		return true
  4449  	}
  4450  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
  4451  	// result: (MOVHstore [off] {sym} ptr x mem)
  4452  	for {
  4453  		off := auxIntToInt32(v.AuxInt)
  4454  		sym := auxToSym(v.Aux)
  4455  		ptr := v_0
  4456  		if v_1.Op != OpLOONG64MOVHUreg {
  4457  			break
  4458  		}
  4459  		x := v_1.Args[0]
  4460  		mem := v_2
  4461  		v.reset(OpLOONG64MOVHstore)
  4462  		v.AuxInt = int32ToAuxInt(off)
  4463  		v.Aux = symToAux(sym)
  4464  		v.AddArg3(ptr, x, mem)
  4465  		return true
  4466  	}
  4467  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
  4468  	// result: (MOVHstore [off] {sym} ptr x mem)
  4469  	for {
  4470  		off := auxIntToInt32(v.AuxInt)
  4471  		sym := auxToSym(v.Aux)
  4472  		ptr := v_0
  4473  		if v_1.Op != OpLOONG64MOVWreg {
  4474  			break
  4475  		}
  4476  		x := v_1.Args[0]
  4477  		mem := v_2
  4478  		v.reset(OpLOONG64MOVHstore)
  4479  		v.AuxInt = int32ToAuxInt(off)
  4480  		v.Aux = symToAux(sym)
  4481  		v.AddArg3(ptr, x, mem)
  4482  		return true
  4483  	}
  4484  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
  4485  	// result: (MOVHstore [off] {sym} ptr x mem)
  4486  	for {
  4487  		off := auxIntToInt32(v.AuxInt)
  4488  		sym := auxToSym(v.Aux)
  4489  		ptr := v_0
  4490  		if v_1.Op != OpLOONG64MOVWUreg {
  4491  			break
  4492  		}
  4493  		x := v_1.Args[0]
  4494  		mem := v_2
  4495  		v.reset(OpLOONG64MOVHstore)
  4496  		v.AuxInt = int32ToAuxInt(off)
  4497  		v.Aux = symToAux(sym)
  4498  		v.AddArg3(ptr, x, mem)
  4499  		return true
  4500  	}
  4501  	// match: (MOVHstore [off] {sym} (ADDV ptr idx) val mem)
  4502  	// cond: off == 0 && sym == nil
  4503  	// result: (MOVHstoreidx ptr idx val mem)
  4504  	for {
  4505  		off := auxIntToInt32(v.AuxInt)
  4506  		sym := auxToSym(v.Aux)
  4507  		if v_0.Op != OpLOONG64ADDV {
  4508  			break
  4509  		}
  4510  		idx := v_0.Args[1]
  4511  		ptr := v_0.Args[0]
  4512  		val := v_1
  4513  		mem := v_2
  4514  		if !(off == 0 && sym == nil) {
  4515  			break
  4516  		}
  4517  		v.reset(OpLOONG64MOVHstoreidx)
  4518  		v.AddArg4(ptr, idx, val, mem)
  4519  		return true
  4520  	}
  4521  	// match: (MOVHstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  4522  	// cond: off == 0 && sym == nil
  4523  	// result: (MOVHstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  4524  	for {
  4525  		off := auxIntToInt32(v.AuxInt)
  4526  		sym := auxToSym(v.Aux)
  4527  		if v_0.Op != OpLOONG64ADDshiftLLV {
  4528  			break
  4529  		}
  4530  		shift := auxIntToInt64(v_0.AuxInt)
  4531  		idx := v_0.Args[1]
  4532  		ptr := v_0.Args[0]
  4533  		val := v_1
  4534  		mem := v_2
  4535  		if !(off == 0 && sym == nil) {
  4536  			break
  4537  		}
  4538  		v.reset(OpLOONG64MOVHstoreidx)
  4539  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  4540  		v0.AuxInt = int64ToAuxInt(shift)
  4541  		v0.AddArg(idx)
  4542  		v.AddArg4(ptr, v0, val, mem)
  4543  		return true
  4544  	}
  4545  	return false
  4546  }
  4547  func rewriteValueLOONG64_OpLOONG64MOVHstoreidx(v *Value) bool {
  4548  	v_3 := v.Args[3]
  4549  	v_2 := v.Args[2]
  4550  	v_1 := v.Args[1]
  4551  	v_0 := v.Args[0]
  4552  	// match: (MOVHstoreidx ptr (MOVVconst [c]) val mem)
  4553  	// cond: is32Bit(c)
  4554  	// result: (MOVHstore [int32(c)] ptr val mem)
  4555  	for {
  4556  		ptr := v_0
  4557  		if v_1.Op != OpLOONG64MOVVconst {
  4558  			break
  4559  		}
  4560  		c := auxIntToInt64(v_1.AuxInt)
  4561  		val := v_2
  4562  		mem := v_3
  4563  		if !(is32Bit(c)) {
  4564  			break
  4565  		}
  4566  		v.reset(OpLOONG64MOVHstore)
  4567  		v.AuxInt = int32ToAuxInt(int32(c))
  4568  		v.AddArg3(ptr, val, mem)
  4569  		return true
  4570  	}
  4571  	// match: (MOVHstoreidx (MOVVconst [c]) idx val mem)
  4572  	// cond: is32Bit(c)
  4573  	// result: (MOVHstore [int32(c)] idx val mem)
  4574  	for {
  4575  		if v_0.Op != OpLOONG64MOVVconst {
  4576  			break
  4577  		}
  4578  		c := auxIntToInt64(v_0.AuxInt)
  4579  		idx := v_1
  4580  		val := v_2
  4581  		mem := v_3
  4582  		if !(is32Bit(c)) {
  4583  			break
  4584  		}
  4585  		v.reset(OpLOONG64MOVHstore)
  4586  		v.AuxInt = int32ToAuxInt(int32(c))
  4587  		v.AddArg3(idx, val, mem)
  4588  		return true
  4589  	}
  4590  	return false
  4591  }
  4592  func rewriteValueLOONG64_OpLOONG64MOVVload(v *Value) bool {
  4593  	v_1 := v.Args[1]
  4594  	v_0 := v.Args[0]
  4595  	b := v.Block
  4596  	config := b.Func.Config
  4597  	typ := &b.Func.Config.Types
  4598  	// match: (MOVVload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  4599  	// result: (MOVVfpgp val)
  4600  	for {
  4601  		off := auxIntToInt32(v.AuxInt)
  4602  		sym := auxToSym(v.Aux)
  4603  		ptr := v_0
  4604  		if v_1.Op != OpLOONG64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  4605  			break
  4606  		}
  4607  		val := v_1.Args[1]
  4608  		if ptr != v_1.Args[0] {
  4609  			break
  4610  		}
  4611  		v.reset(OpLOONG64MOVVfpgp)
  4612  		v.AddArg(val)
  4613  		return true
  4614  	}
  4615  	// match: (MOVVload [off] {sym} ptr (MOVVstore [off] {sym} ptr x _))
  4616  	// result: (MOVVreg x)
  4617  	for {
  4618  		off := auxIntToInt32(v.AuxInt)
  4619  		sym := auxToSym(v.Aux)
  4620  		ptr := v_0
  4621  		if v_1.Op != OpLOONG64MOVVstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  4622  			break
  4623  		}
  4624  		x := v_1.Args[1]
  4625  		if ptr != v_1.Args[0] {
  4626  			break
  4627  		}
  4628  		v.reset(OpLOONG64MOVVreg)
  4629  		v.AddArg(x)
  4630  		return true
  4631  	}
  4632  	// match: (MOVVload [off1] {sym} (ADDVconst [off2] ptr) mem)
  4633  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4634  	// result: (MOVVload [off1+int32(off2)] {sym} ptr mem)
  4635  	for {
  4636  		off1 := auxIntToInt32(v.AuxInt)
  4637  		sym := auxToSym(v.Aux)
  4638  		if v_0.Op != OpLOONG64ADDVconst {
  4639  			break
  4640  		}
  4641  		off2 := auxIntToInt64(v_0.AuxInt)
  4642  		ptr := v_0.Args[0]
  4643  		mem := v_1
  4644  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4645  			break
  4646  		}
  4647  		v.reset(OpLOONG64MOVVload)
  4648  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4649  		v.Aux = symToAux(sym)
  4650  		v.AddArg2(ptr, mem)
  4651  		return true
  4652  	}
  4653  	// match: (MOVVload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  4654  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4655  	// result: (MOVVload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  4656  	for {
  4657  		off1 := auxIntToInt32(v.AuxInt)
  4658  		sym1 := auxToSym(v.Aux)
  4659  		if v_0.Op != OpLOONG64MOVVaddr {
  4660  			break
  4661  		}
  4662  		off2 := auxIntToInt32(v_0.AuxInt)
  4663  		sym2 := auxToSym(v_0.Aux)
  4664  		ptr := v_0.Args[0]
  4665  		mem := v_1
  4666  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4667  			break
  4668  		}
  4669  		v.reset(OpLOONG64MOVVload)
  4670  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4671  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4672  		v.AddArg2(ptr, mem)
  4673  		return true
  4674  	}
  4675  	// match: (MOVVload [off] {sym} (ADDV ptr idx) mem)
  4676  	// cond: off == 0 && sym == nil
  4677  	// result: (MOVVloadidx ptr idx mem)
  4678  	for {
  4679  		off := auxIntToInt32(v.AuxInt)
  4680  		sym := auxToSym(v.Aux)
  4681  		if v_0.Op != OpLOONG64ADDV {
  4682  			break
  4683  		}
  4684  		idx := v_0.Args[1]
  4685  		ptr := v_0.Args[0]
  4686  		mem := v_1
  4687  		if !(off == 0 && sym == nil) {
  4688  			break
  4689  		}
  4690  		v.reset(OpLOONG64MOVVloadidx)
  4691  		v.AddArg3(ptr, idx, mem)
  4692  		return true
  4693  	}
  4694  	// match: (MOVVload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4695  	// cond: off == 0 && sym == nil
  4696  	// result: (MOVVloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4697  	for {
  4698  		off := auxIntToInt32(v.AuxInt)
  4699  		sym := auxToSym(v.Aux)
  4700  		if v_0.Op != OpLOONG64ADDshiftLLV {
  4701  			break
  4702  		}
  4703  		shift := auxIntToInt64(v_0.AuxInt)
  4704  		idx := v_0.Args[1]
  4705  		ptr := v_0.Args[0]
  4706  		mem := v_1
  4707  		if !(off == 0 && sym == nil) {
  4708  			break
  4709  		}
  4710  		v.reset(OpLOONG64MOVVloadidx)
  4711  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  4712  		v0.AuxInt = int64ToAuxInt(shift)
  4713  		v0.AddArg(idx)
  4714  		v.AddArg3(ptr, v0, mem)
  4715  		return true
  4716  	}
  4717  	// match: (MOVVload [off] {sym} (SB) _)
  4718  	// cond: symIsRO(sym)
  4719  	// result: (MOVVconst [int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  4720  	for {
  4721  		off := auxIntToInt32(v.AuxInt)
  4722  		sym := auxToSym(v.Aux)
  4723  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  4724  			break
  4725  		}
  4726  		v.reset(OpLOONG64MOVVconst)
  4727  		v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  4728  		return true
  4729  	}
  4730  	return false
  4731  }
  4732  func rewriteValueLOONG64_OpLOONG64MOVVloadidx(v *Value) bool {
  4733  	v_2 := v.Args[2]
  4734  	v_1 := v.Args[1]
  4735  	v_0 := v.Args[0]
  4736  	// match: (MOVVloadidx ptr (MOVVconst [c]) mem)
  4737  	// cond: is32Bit(c)
  4738  	// result: (MOVVload [int32(c)] ptr mem)
  4739  	for {
  4740  		ptr := v_0
  4741  		if v_1.Op != OpLOONG64MOVVconst {
  4742  			break
  4743  		}
  4744  		c := auxIntToInt64(v_1.AuxInt)
  4745  		mem := v_2
  4746  		if !(is32Bit(c)) {
  4747  			break
  4748  		}
  4749  		v.reset(OpLOONG64MOVVload)
  4750  		v.AuxInt = int32ToAuxInt(int32(c))
  4751  		v.AddArg2(ptr, mem)
  4752  		return true
  4753  	}
  4754  	// match: (MOVVloadidx (MOVVconst [c]) ptr mem)
  4755  	// cond: is32Bit(c)
  4756  	// result: (MOVVload [int32(c)] ptr mem)
  4757  	for {
  4758  		if v_0.Op != OpLOONG64MOVVconst {
  4759  			break
  4760  		}
  4761  		c := auxIntToInt64(v_0.AuxInt)
  4762  		ptr := v_1
  4763  		mem := v_2
  4764  		if !(is32Bit(c)) {
  4765  			break
  4766  		}
  4767  		v.reset(OpLOONG64MOVVload)
  4768  		v.AuxInt = int32ToAuxInt(int32(c))
  4769  		v.AddArg2(ptr, mem)
  4770  		return true
  4771  	}
  4772  	return false
  4773  }
  4774  func rewriteValueLOONG64_OpLOONG64MOVVnop(v *Value) bool {
  4775  	v_0 := v.Args[0]
  4776  	// match: (MOVVnop (MOVVconst [c]))
  4777  	// result: (MOVVconst [c])
  4778  	for {
  4779  		if v_0.Op != OpLOONG64MOVVconst {
  4780  			break
  4781  		}
  4782  		c := auxIntToInt64(v_0.AuxInt)
  4783  		v.reset(OpLOONG64MOVVconst)
  4784  		v.AuxInt = int64ToAuxInt(c)
  4785  		return true
  4786  	}
  4787  	return false
  4788  }
  4789  func rewriteValueLOONG64_OpLOONG64MOVVreg(v *Value) bool {
  4790  	v_0 := v.Args[0]
  4791  	// match: (MOVVreg x)
  4792  	// cond: x.Uses == 1
  4793  	// result: (MOVVnop x)
  4794  	for {
  4795  		x := v_0
  4796  		if !(x.Uses == 1) {
  4797  			break
  4798  		}
  4799  		v.reset(OpLOONG64MOVVnop)
  4800  		v.AddArg(x)
  4801  		return true
  4802  	}
  4803  	// match: (MOVVreg (MOVVconst [c]))
  4804  	// result: (MOVVconst [c])
  4805  	for {
  4806  		if v_0.Op != OpLOONG64MOVVconst {
  4807  			break
  4808  		}
  4809  		c := auxIntToInt64(v_0.AuxInt)
  4810  		v.reset(OpLOONG64MOVVconst)
  4811  		v.AuxInt = int64ToAuxInt(c)
  4812  		return true
  4813  	}
  4814  	return false
  4815  }
  4816  func rewriteValueLOONG64_OpLOONG64MOVVstore(v *Value) bool {
  4817  	v_2 := v.Args[2]
  4818  	v_1 := v.Args[1]
  4819  	v_0 := v.Args[0]
  4820  	b := v.Block
  4821  	config := b.Func.Config
  4822  	typ := &b.Func.Config.Types
  4823  	// match: (MOVVstore [off] {sym} ptr (MOVVfpgp val) mem)
  4824  	// result: (MOVDstore [off] {sym} ptr val mem)
  4825  	for {
  4826  		off := auxIntToInt32(v.AuxInt)
  4827  		sym := auxToSym(v.Aux)
  4828  		ptr := v_0
  4829  		if v_1.Op != OpLOONG64MOVVfpgp {
  4830  			break
  4831  		}
  4832  		val := v_1.Args[0]
  4833  		mem := v_2
  4834  		v.reset(OpLOONG64MOVDstore)
  4835  		v.AuxInt = int32ToAuxInt(off)
  4836  		v.Aux = symToAux(sym)
  4837  		v.AddArg3(ptr, val, mem)
  4838  		return true
  4839  	}
  4840  	// match: (MOVVstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  4841  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4842  	// result: (MOVVstore [off1+int32(off2)] {sym} ptr val mem)
  4843  	for {
  4844  		off1 := auxIntToInt32(v.AuxInt)
  4845  		sym := auxToSym(v.Aux)
  4846  		if v_0.Op != OpLOONG64ADDVconst {
  4847  			break
  4848  		}
  4849  		off2 := auxIntToInt64(v_0.AuxInt)
  4850  		ptr := v_0.Args[0]
  4851  		val := v_1
  4852  		mem := v_2
  4853  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4854  			break
  4855  		}
  4856  		v.reset(OpLOONG64MOVVstore)
  4857  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4858  		v.Aux = symToAux(sym)
  4859  		v.AddArg3(ptr, val, mem)
  4860  		return true
  4861  	}
  4862  	// match: (MOVVstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  4863  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4864  	// result: (MOVVstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  4865  	for {
  4866  		off1 := auxIntToInt32(v.AuxInt)
  4867  		sym1 := auxToSym(v.Aux)
  4868  		if v_0.Op != OpLOONG64MOVVaddr {
  4869  			break
  4870  		}
  4871  		off2 := auxIntToInt32(v_0.AuxInt)
  4872  		sym2 := auxToSym(v_0.Aux)
  4873  		ptr := v_0.Args[0]
  4874  		val := v_1
  4875  		mem := v_2
  4876  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4877  			break
  4878  		}
  4879  		v.reset(OpLOONG64MOVVstore)
  4880  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4881  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4882  		v.AddArg3(ptr, val, mem)
  4883  		return true
  4884  	}
  4885  	// match: (MOVVstore [off] {sym} (ADDV ptr idx) val mem)
  4886  	// cond: off == 0 && sym == nil
  4887  	// result: (MOVVstoreidx ptr idx val mem)
  4888  	for {
  4889  		off := auxIntToInt32(v.AuxInt)
  4890  		sym := auxToSym(v.Aux)
  4891  		if v_0.Op != OpLOONG64ADDV {
  4892  			break
  4893  		}
  4894  		idx := v_0.Args[1]
  4895  		ptr := v_0.Args[0]
  4896  		val := v_1
  4897  		mem := v_2
  4898  		if !(off == 0 && sym == nil) {
  4899  			break
  4900  		}
  4901  		v.reset(OpLOONG64MOVVstoreidx)
  4902  		v.AddArg4(ptr, idx, val, mem)
  4903  		return true
  4904  	}
  4905  	// match: (MOVVstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  4906  	// cond: off == 0 && sym == nil
  4907  	// result: (MOVVstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  4908  	for {
  4909  		off := auxIntToInt32(v.AuxInt)
  4910  		sym := auxToSym(v.Aux)
  4911  		if v_0.Op != OpLOONG64ADDshiftLLV {
  4912  			break
  4913  		}
  4914  		shift := auxIntToInt64(v_0.AuxInt)
  4915  		idx := v_0.Args[1]
  4916  		ptr := v_0.Args[0]
  4917  		val := v_1
  4918  		mem := v_2
  4919  		if !(off == 0 && sym == nil) {
  4920  			break
  4921  		}
  4922  		v.reset(OpLOONG64MOVVstoreidx)
  4923  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  4924  		v0.AuxInt = int64ToAuxInt(shift)
  4925  		v0.AddArg(idx)
  4926  		v.AddArg4(ptr, v0, val, mem)
  4927  		return true
  4928  	}
  4929  	return false
  4930  }
  4931  func rewriteValueLOONG64_OpLOONG64MOVVstoreidx(v *Value) bool {
  4932  	v_3 := v.Args[3]
  4933  	v_2 := v.Args[2]
  4934  	v_1 := v.Args[1]
  4935  	v_0 := v.Args[0]
  4936  	// match: (MOVVstoreidx ptr (MOVVconst [c]) val mem)
  4937  	// cond: is32Bit(c)
  4938  	// result: (MOVVstore [int32(c)] ptr val mem)
  4939  	for {
  4940  		ptr := v_0
  4941  		if v_1.Op != OpLOONG64MOVVconst {
  4942  			break
  4943  		}
  4944  		c := auxIntToInt64(v_1.AuxInt)
  4945  		val := v_2
  4946  		mem := v_3
  4947  		if !(is32Bit(c)) {
  4948  			break
  4949  		}
  4950  		v.reset(OpLOONG64MOVVstore)
  4951  		v.AuxInt = int32ToAuxInt(int32(c))
  4952  		v.AddArg3(ptr, val, mem)
  4953  		return true
  4954  	}
  4955  	// match: (MOVVstoreidx (MOVVconst [c]) idx val mem)
  4956  	// cond: is32Bit(c)
  4957  	// result: (MOVVstore [int32(c)] idx val mem)
  4958  	for {
  4959  		if v_0.Op != OpLOONG64MOVVconst {
  4960  			break
  4961  		}
  4962  		c := auxIntToInt64(v_0.AuxInt)
  4963  		idx := v_1
  4964  		val := v_2
  4965  		mem := v_3
  4966  		if !(is32Bit(c)) {
  4967  			break
  4968  		}
  4969  		v.reset(OpLOONG64MOVVstore)
  4970  		v.AuxInt = int32ToAuxInt(int32(c))
  4971  		v.AddArg3(idx, val, mem)
  4972  		return true
  4973  	}
  4974  	return false
  4975  }
  4976  func rewriteValueLOONG64_OpLOONG64MOVWUload(v *Value) bool {
  4977  	v_1 := v.Args[1]
  4978  	v_0 := v.Args[0]
  4979  	b := v.Block
  4980  	config := b.Func.Config
  4981  	typ := &b.Func.Config.Types
  4982  	// match: (MOVWUload [off] {sym} ptr (MOVFstore [off] {sym} ptr val _))
  4983  	// result: (ZeroExt32to64 (MOVWfpgp <typ.Float32> val))
  4984  	for {
  4985  		off := auxIntToInt32(v.AuxInt)
  4986  		sym := auxToSym(v.Aux)
  4987  		ptr := v_0
  4988  		if v_1.Op != OpLOONG64MOVFstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  4989  			break
  4990  		}
  4991  		val := v_1.Args[1]
  4992  		if ptr != v_1.Args[0] {
  4993  			break
  4994  		}
  4995  		v.reset(OpZeroExt32to64)
  4996  		v0 := b.NewValue0(v_1.Pos, OpLOONG64MOVWfpgp, typ.Float32)
  4997  		v0.AddArg(val)
  4998  		v.AddArg(v0)
  4999  		return true
  5000  	}
  5001  	// match: (MOVWUload [off] {sym} ptr (MOVWstore [off] {sym} ptr x _))
  5002  	// result: (MOVWUreg x)
  5003  	for {
  5004  		off := auxIntToInt32(v.AuxInt)
  5005  		sym := auxToSym(v.Aux)
  5006  		ptr := v_0
  5007  		if v_1.Op != OpLOONG64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5008  			break
  5009  		}
  5010  		x := v_1.Args[1]
  5011  		if ptr != v_1.Args[0] {
  5012  			break
  5013  		}
  5014  		v.reset(OpLOONG64MOVWUreg)
  5015  		v.AddArg(x)
  5016  		return true
  5017  	}
  5018  	// match: (MOVWUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  5019  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5020  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
  5021  	for {
  5022  		off1 := auxIntToInt32(v.AuxInt)
  5023  		sym := auxToSym(v.Aux)
  5024  		if v_0.Op != OpLOONG64ADDVconst {
  5025  			break
  5026  		}
  5027  		off2 := auxIntToInt64(v_0.AuxInt)
  5028  		ptr := v_0.Args[0]
  5029  		mem := v_1
  5030  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5031  			break
  5032  		}
  5033  		v.reset(OpLOONG64MOVWUload)
  5034  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5035  		v.Aux = symToAux(sym)
  5036  		v.AddArg2(ptr, mem)
  5037  		return true
  5038  	}
  5039  	// match: (MOVWUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  5040  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5041  	// result: (MOVWUload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  5042  	for {
  5043  		off1 := auxIntToInt32(v.AuxInt)
  5044  		sym1 := auxToSym(v.Aux)
  5045  		if v_0.Op != OpLOONG64MOVVaddr {
  5046  			break
  5047  		}
  5048  		off2 := auxIntToInt32(v_0.AuxInt)
  5049  		sym2 := auxToSym(v_0.Aux)
  5050  		ptr := v_0.Args[0]
  5051  		mem := v_1
  5052  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5053  			break
  5054  		}
  5055  		v.reset(OpLOONG64MOVWUload)
  5056  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5057  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5058  		v.AddArg2(ptr, mem)
  5059  		return true
  5060  	}
  5061  	// match: (MOVWUload [off] {sym} (ADDV ptr idx) mem)
  5062  	// cond: off == 0 && sym == nil
  5063  	// result: (MOVWUloadidx ptr idx mem)
  5064  	for {
  5065  		off := auxIntToInt32(v.AuxInt)
  5066  		sym := auxToSym(v.Aux)
  5067  		if v_0.Op != OpLOONG64ADDV {
  5068  			break
  5069  		}
  5070  		idx := v_0.Args[1]
  5071  		ptr := v_0.Args[0]
  5072  		mem := v_1
  5073  		if !(off == 0 && sym == nil) {
  5074  			break
  5075  		}
  5076  		v.reset(OpLOONG64MOVWUloadidx)
  5077  		v.AddArg3(ptr, idx, mem)
  5078  		return true
  5079  	}
  5080  	// match: (MOVWUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  5081  	// cond: off == 0 && sym == nil
  5082  	// result: (MOVWUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  5083  	for {
  5084  		off := auxIntToInt32(v.AuxInt)
  5085  		sym := auxToSym(v.Aux)
  5086  		if v_0.Op != OpLOONG64ADDshiftLLV {
  5087  			break
  5088  		}
  5089  		shift := auxIntToInt64(v_0.AuxInt)
  5090  		idx := v_0.Args[1]
  5091  		ptr := v_0.Args[0]
  5092  		mem := v_1
  5093  		if !(off == 0 && sym == nil) {
  5094  			break
  5095  		}
  5096  		v.reset(OpLOONG64MOVWUloadidx)
  5097  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  5098  		v0.AuxInt = int64ToAuxInt(shift)
  5099  		v0.AddArg(idx)
  5100  		v.AddArg3(ptr, v0, mem)
  5101  		return true
  5102  	}
  5103  	// match: (MOVWUload [off] {sym} (SB) _)
  5104  	// cond: symIsRO(sym)
  5105  	// result: (MOVVconst [int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  5106  	for {
  5107  		off := auxIntToInt32(v.AuxInt)
  5108  		sym := auxToSym(v.Aux)
  5109  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  5110  			break
  5111  		}
  5112  		v.reset(OpLOONG64MOVVconst)
  5113  		v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  5114  		return true
  5115  	}
  5116  	return false
  5117  }
  5118  func rewriteValueLOONG64_OpLOONG64MOVWUloadidx(v *Value) bool {
  5119  	v_2 := v.Args[2]
  5120  	v_1 := v.Args[1]
  5121  	v_0 := v.Args[0]
  5122  	// match: (MOVWUloadidx ptr (MOVVconst [c]) mem)
  5123  	// cond: is32Bit(c)
  5124  	// result: (MOVWUload [int32(c)] ptr mem)
  5125  	for {
  5126  		ptr := v_0
  5127  		if v_1.Op != OpLOONG64MOVVconst {
  5128  			break
  5129  		}
  5130  		c := auxIntToInt64(v_1.AuxInt)
  5131  		mem := v_2
  5132  		if !(is32Bit(c)) {
  5133  			break
  5134  		}
  5135  		v.reset(OpLOONG64MOVWUload)
  5136  		v.AuxInt = int32ToAuxInt(int32(c))
  5137  		v.AddArg2(ptr, mem)
  5138  		return true
  5139  	}
  5140  	// match: (MOVWUloadidx (MOVVconst [c]) ptr mem)
  5141  	// cond: is32Bit(c)
  5142  	// result: (MOVWUload [int32(c)] ptr mem)
  5143  	for {
  5144  		if v_0.Op != OpLOONG64MOVVconst {
  5145  			break
  5146  		}
  5147  		c := auxIntToInt64(v_0.AuxInt)
  5148  		ptr := v_1
  5149  		mem := v_2
  5150  		if !(is32Bit(c)) {
  5151  			break
  5152  		}
  5153  		v.reset(OpLOONG64MOVWUload)
  5154  		v.AuxInt = int32ToAuxInt(int32(c))
  5155  		v.AddArg2(ptr, mem)
  5156  		return true
  5157  	}
  5158  	return false
  5159  }
  5160  func rewriteValueLOONG64_OpLOONG64MOVWUreg(v *Value) bool {
  5161  	v_0 := v.Args[0]
  5162  	// match: (MOVWUreg (SRLVconst [rc] x))
  5163  	// cond: rc < 32
  5164  	// result: (BSTRPICKV [rc + (31+rc)<<6] x)
  5165  	for {
  5166  		if v_0.Op != OpLOONG64SRLVconst {
  5167  			break
  5168  		}
  5169  		rc := auxIntToInt64(v_0.AuxInt)
  5170  		x := v_0.Args[0]
  5171  		if !(rc < 32) {
  5172  			break
  5173  		}
  5174  		v.reset(OpLOONG64BSTRPICKV)
  5175  		v.AuxInt = int64ToAuxInt(rc + (31+rc)<<6)
  5176  		v.AddArg(x)
  5177  		return true
  5178  	}
  5179  	// match: (MOVWUreg x:(MOVBUload _ _))
  5180  	// result: (MOVVreg x)
  5181  	for {
  5182  		x := v_0
  5183  		if x.Op != OpLOONG64MOVBUload {
  5184  			break
  5185  		}
  5186  		v.reset(OpLOONG64MOVVreg)
  5187  		v.AddArg(x)
  5188  		return true
  5189  	}
  5190  	// match: (MOVWUreg x:(MOVHUload _ _))
  5191  	// result: (MOVVreg x)
  5192  	for {
  5193  		x := v_0
  5194  		if x.Op != OpLOONG64MOVHUload {
  5195  			break
  5196  		}
  5197  		v.reset(OpLOONG64MOVVreg)
  5198  		v.AddArg(x)
  5199  		return true
  5200  	}
  5201  	// match: (MOVWUreg x:(MOVWUload _ _))
  5202  	// result: (MOVVreg x)
  5203  	for {
  5204  		x := v_0
  5205  		if x.Op != OpLOONG64MOVWUload {
  5206  			break
  5207  		}
  5208  		v.reset(OpLOONG64MOVVreg)
  5209  		v.AddArg(x)
  5210  		return true
  5211  	}
  5212  	// match: (MOVWUreg x:(MOVBUloadidx _ _ _))
  5213  	// result: (MOVVreg x)
  5214  	for {
  5215  		x := v_0
  5216  		if x.Op != OpLOONG64MOVBUloadidx {
  5217  			break
  5218  		}
  5219  		v.reset(OpLOONG64MOVVreg)
  5220  		v.AddArg(x)
  5221  		return true
  5222  	}
  5223  	// match: (MOVWUreg x:(MOVHUloadidx _ _ _))
  5224  	// result: (MOVVreg x)
  5225  	for {
  5226  		x := v_0
  5227  		if x.Op != OpLOONG64MOVHUloadidx {
  5228  			break
  5229  		}
  5230  		v.reset(OpLOONG64MOVVreg)
  5231  		v.AddArg(x)
  5232  		return true
  5233  	}
  5234  	// match: (MOVWUreg x:(MOVWUloadidx _ _ _))
  5235  	// result: (MOVVreg x)
  5236  	for {
  5237  		x := v_0
  5238  		if x.Op != OpLOONG64MOVWUloadidx {
  5239  			break
  5240  		}
  5241  		v.reset(OpLOONG64MOVVreg)
  5242  		v.AddArg(x)
  5243  		return true
  5244  	}
  5245  	// match: (MOVWUreg x:(MOVBUreg _))
  5246  	// result: (MOVVreg x)
  5247  	for {
  5248  		x := v_0
  5249  		if x.Op != OpLOONG64MOVBUreg {
  5250  			break
  5251  		}
  5252  		v.reset(OpLOONG64MOVVreg)
  5253  		v.AddArg(x)
  5254  		return true
  5255  	}
  5256  	// match: (MOVWUreg x:(MOVHUreg _))
  5257  	// result: (MOVVreg x)
  5258  	for {
  5259  		x := v_0
  5260  		if x.Op != OpLOONG64MOVHUreg {
  5261  			break
  5262  		}
  5263  		v.reset(OpLOONG64MOVVreg)
  5264  		v.AddArg(x)
  5265  		return true
  5266  	}
  5267  	// match: (MOVWUreg x:(MOVWUreg _))
  5268  	// result: (MOVVreg x)
  5269  	for {
  5270  		x := v_0
  5271  		if x.Op != OpLOONG64MOVWUreg {
  5272  			break
  5273  		}
  5274  		v.reset(OpLOONG64MOVVreg)
  5275  		v.AddArg(x)
  5276  		return true
  5277  	}
  5278  	// match: (MOVWUreg (SLLVconst [lc] x))
  5279  	// cond: lc >= 32
  5280  	// result: (MOVVconst [0])
  5281  	for {
  5282  		if v_0.Op != OpLOONG64SLLVconst {
  5283  			break
  5284  		}
  5285  		lc := auxIntToInt64(v_0.AuxInt)
  5286  		if !(lc >= 32) {
  5287  			break
  5288  		}
  5289  		v.reset(OpLOONG64MOVVconst)
  5290  		v.AuxInt = int64ToAuxInt(0)
  5291  		return true
  5292  	}
  5293  	// match: (MOVWUreg (MOVVconst [c]))
  5294  	// result: (MOVVconst [int64(uint32(c))])
  5295  	for {
  5296  		if v_0.Op != OpLOONG64MOVVconst {
  5297  			break
  5298  		}
  5299  		c := auxIntToInt64(v_0.AuxInt)
  5300  		v.reset(OpLOONG64MOVVconst)
  5301  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
  5302  		return true
  5303  	}
  5304  	// match: (MOVWUreg x:(ANDconst [c] y))
  5305  	// cond: c >= 0 && int64(uint32(c)) == c
  5306  	// result: x
  5307  	for {
  5308  		x := v_0
  5309  		if x.Op != OpLOONG64ANDconst {
  5310  			break
  5311  		}
  5312  		c := auxIntToInt64(x.AuxInt)
  5313  		if !(c >= 0 && int64(uint32(c)) == c) {
  5314  			break
  5315  		}
  5316  		v.copyOf(x)
  5317  		return true
  5318  	}
  5319  	return false
  5320  }
  5321  func rewriteValueLOONG64_OpLOONG64MOVWload(v *Value) bool {
  5322  	v_1 := v.Args[1]
  5323  	v_0 := v.Args[0]
  5324  	b := v.Block
  5325  	config := b.Func.Config
  5326  	typ := &b.Func.Config.Types
  5327  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off] {sym} ptr x _))
  5328  	// result: (MOVWreg x)
  5329  	for {
  5330  		off := auxIntToInt32(v.AuxInt)
  5331  		sym := auxToSym(v.Aux)
  5332  		ptr := v_0
  5333  		if v_1.Op != OpLOONG64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5334  			break
  5335  		}
  5336  		x := v_1.Args[1]
  5337  		if ptr != v_1.Args[0] {
  5338  			break
  5339  		}
  5340  		v.reset(OpLOONG64MOVWreg)
  5341  		v.AddArg(x)
  5342  		return true
  5343  	}
  5344  	// match: (MOVWload [off1] {sym} (ADDVconst [off2] ptr) mem)
  5345  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5346  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
  5347  	for {
  5348  		off1 := auxIntToInt32(v.AuxInt)
  5349  		sym := auxToSym(v.Aux)
  5350  		if v_0.Op != OpLOONG64ADDVconst {
  5351  			break
  5352  		}
  5353  		off2 := auxIntToInt64(v_0.AuxInt)
  5354  		ptr := v_0.Args[0]
  5355  		mem := v_1
  5356  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5357  			break
  5358  		}
  5359  		v.reset(OpLOONG64MOVWload)
  5360  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5361  		v.Aux = symToAux(sym)
  5362  		v.AddArg2(ptr, mem)
  5363  		return true
  5364  	}
  5365  	// match: (MOVWload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  5366  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5367  	// result: (MOVWload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  5368  	for {
  5369  		off1 := auxIntToInt32(v.AuxInt)
  5370  		sym1 := auxToSym(v.Aux)
  5371  		if v_0.Op != OpLOONG64MOVVaddr {
  5372  			break
  5373  		}
  5374  		off2 := auxIntToInt32(v_0.AuxInt)
  5375  		sym2 := auxToSym(v_0.Aux)
  5376  		ptr := v_0.Args[0]
  5377  		mem := v_1
  5378  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5379  			break
  5380  		}
  5381  		v.reset(OpLOONG64MOVWload)
  5382  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5383  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5384  		v.AddArg2(ptr, mem)
  5385  		return true
  5386  	}
  5387  	// match: (MOVWload [off] {sym} (ADDV ptr idx) mem)
  5388  	// cond: off == 0 && sym == nil
  5389  	// result: (MOVWloadidx ptr idx mem)
  5390  	for {
  5391  		off := auxIntToInt32(v.AuxInt)
  5392  		sym := auxToSym(v.Aux)
  5393  		if v_0.Op != OpLOONG64ADDV {
  5394  			break
  5395  		}
  5396  		idx := v_0.Args[1]
  5397  		ptr := v_0.Args[0]
  5398  		mem := v_1
  5399  		if !(off == 0 && sym == nil) {
  5400  			break
  5401  		}
  5402  		v.reset(OpLOONG64MOVWloadidx)
  5403  		v.AddArg3(ptr, idx, mem)
  5404  		return true
  5405  	}
  5406  	// match: (MOVWload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  5407  	// cond: off == 0 && sym == nil
  5408  	// result: (MOVWloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  5409  	for {
  5410  		off := auxIntToInt32(v.AuxInt)
  5411  		sym := auxToSym(v.Aux)
  5412  		if v_0.Op != OpLOONG64ADDshiftLLV {
  5413  			break
  5414  		}
  5415  		shift := auxIntToInt64(v_0.AuxInt)
  5416  		idx := v_0.Args[1]
  5417  		ptr := v_0.Args[0]
  5418  		mem := v_1
  5419  		if !(off == 0 && sym == nil) {
  5420  			break
  5421  		}
  5422  		v.reset(OpLOONG64MOVWloadidx)
  5423  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  5424  		v0.AuxInt = int64ToAuxInt(shift)
  5425  		v0.AddArg(idx)
  5426  		v.AddArg3(ptr, v0, mem)
  5427  		return true
  5428  	}
  5429  	// match: (MOVWload [off] {sym} (SB) _)
  5430  	// cond: symIsRO(sym)
  5431  	// result: (MOVVconst [int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
  5432  	for {
  5433  		off := auxIntToInt32(v.AuxInt)
  5434  		sym := auxToSym(v.Aux)
  5435  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  5436  			break
  5437  		}
  5438  		v.reset(OpLOONG64MOVVconst)
  5439  		v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))))
  5440  		return true
  5441  	}
  5442  	return false
  5443  }
  5444  func rewriteValueLOONG64_OpLOONG64MOVWloadidx(v *Value) bool {
  5445  	v_2 := v.Args[2]
  5446  	v_1 := v.Args[1]
  5447  	v_0 := v.Args[0]
  5448  	// match: (MOVWloadidx ptr (MOVVconst [c]) mem)
  5449  	// cond: is32Bit(c)
  5450  	// result: (MOVWload [int32(c)] ptr mem)
  5451  	for {
  5452  		ptr := v_0
  5453  		if v_1.Op != OpLOONG64MOVVconst {
  5454  			break
  5455  		}
  5456  		c := auxIntToInt64(v_1.AuxInt)
  5457  		mem := v_2
  5458  		if !(is32Bit(c)) {
  5459  			break
  5460  		}
  5461  		v.reset(OpLOONG64MOVWload)
  5462  		v.AuxInt = int32ToAuxInt(int32(c))
  5463  		v.AddArg2(ptr, mem)
  5464  		return true
  5465  	}
  5466  	// match: (MOVWloadidx (MOVVconst [c]) ptr mem)
  5467  	// cond: is32Bit(c)
  5468  	// result: (MOVWload [int32(c)] ptr mem)
  5469  	for {
  5470  		if v_0.Op != OpLOONG64MOVVconst {
  5471  			break
  5472  		}
  5473  		c := auxIntToInt64(v_0.AuxInt)
  5474  		ptr := v_1
  5475  		mem := v_2
  5476  		if !(is32Bit(c)) {
  5477  			break
  5478  		}
  5479  		v.reset(OpLOONG64MOVWload)
  5480  		v.AuxInt = int32ToAuxInt(int32(c))
  5481  		v.AddArg2(ptr, mem)
  5482  		return true
  5483  	}
  5484  	return false
  5485  }
  5486  func rewriteValueLOONG64_OpLOONG64MOVWreg(v *Value) bool {
  5487  	v_0 := v.Args[0]
  5488  	// match: (MOVWreg x:(MOVBload _ _))
  5489  	// result: (MOVVreg x)
  5490  	for {
  5491  		x := v_0
  5492  		if x.Op != OpLOONG64MOVBload {
  5493  			break
  5494  		}
  5495  		v.reset(OpLOONG64MOVVreg)
  5496  		v.AddArg(x)
  5497  		return true
  5498  	}
  5499  	// match: (MOVWreg x:(MOVBUload _ _))
  5500  	// result: (MOVVreg x)
  5501  	for {
  5502  		x := v_0
  5503  		if x.Op != OpLOONG64MOVBUload {
  5504  			break
  5505  		}
  5506  		v.reset(OpLOONG64MOVVreg)
  5507  		v.AddArg(x)
  5508  		return true
  5509  	}
  5510  	// match: (MOVWreg x:(MOVHload _ _))
  5511  	// result: (MOVVreg x)
  5512  	for {
  5513  		x := v_0
  5514  		if x.Op != OpLOONG64MOVHload {
  5515  			break
  5516  		}
  5517  		v.reset(OpLOONG64MOVVreg)
  5518  		v.AddArg(x)
  5519  		return true
  5520  	}
  5521  	// match: (MOVWreg x:(MOVHUload _ _))
  5522  	// result: (MOVVreg x)
  5523  	for {
  5524  		x := v_0
  5525  		if x.Op != OpLOONG64MOVHUload {
  5526  			break
  5527  		}
  5528  		v.reset(OpLOONG64MOVVreg)
  5529  		v.AddArg(x)
  5530  		return true
  5531  	}
  5532  	// match: (MOVWreg x:(MOVWload _ _))
  5533  	// result: (MOVVreg x)
  5534  	for {
  5535  		x := v_0
  5536  		if x.Op != OpLOONG64MOVWload {
  5537  			break
  5538  		}
  5539  		v.reset(OpLOONG64MOVVreg)
  5540  		v.AddArg(x)
  5541  		return true
  5542  	}
  5543  	// match: (MOVWreg x:(MOVBloadidx _ _ _))
  5544  	// result: (MOVVreg x)
  5545  	for {
  5546  		x := v_0
  5547  		if x.Op != OpLOONG64MOVBloadidx {
  5548  			break
  5549  		}
  5550  		v.reset(OpLOONG64MOVVreg)
  5551  		v.AddArg(x)
  5552  		return true
  5553  	}
  5554  	// match: (MOVWreg x:(MOVBUloadidx _ _ _))
  5555  	// result: (MOVVreg x)
  5556  	for {
  5557  		x := v_0
  5558  		if x.Op != OpLOONG64MOVBUloadidx {
  5559  			break
  5560  		}
  5561  		v.reset(OpLOONG64MOVVreg)
  5562  		v.AddArg(x)
  5563  		return true
  5564  	}
  5565  	// match: (MOVWreg x:(MOVHloadidx _ _ _))
  5566  	// result: (MOVVreg x)
  5567  	for {
  5568  		x := v_0
  5569  		if x.Op != OpLOONG64MOVHloadidx {
  5570  			break
  5571  		}
  5572  		v.reset(OpLOONG64MOVVreg)
  5573  		v.AddArg(x)
  5574  		return true
  5575  	}
  5576  	// match: (MOVWreg x:(MOVHUloadidx _ _ _))
  5577  	// result: (MOVVreg x)
  5578  	for {
  5579  		x := v_0
  5580  		if x.Op != OpLOONG64MOVHUloadidx {
  5581  			break
  5582  		}
  5583  		v.reset(OpLOONG64MOVVreg)
  5584  		v.AddArg(x)
  5585  		return true
  5586  	}
  5587  	// match: (MOVWreg x:(MOVWloadidx _ _ _))
  5588  	// result: (MOVVreg x)
  5589  	for {
  5590  		x := v_0
  5591  		if x.Op != OpLOONG64MOVWloadidx {
  5592  			break
  5593  		}
  5594  		v.reset(OpLOONG64MOVVreg)
  5595  		v.AddArg(x)
  5596  		return true
  5597  	}
  5598  	// match: (MOVWreg x:(MOVBreg _))
  5599  	// result: (MOVVreg x)
  5600  	for {
  5601  		x := v_0
  5602  		if x.Op != OpLOONG64MOVBreg {
  5603  			break
  5604  		}
  5605  		v.reset(OpLOONG64MOVVreg)
  5606  		v.AddArg(x)
  5607  		return true
  5608  	}
  5609  	// match: (MOVWreg x:(MOVBUreg _))
  5610  	// result: (MOVVreg x)
  5611  	for {
  5612  		x := v_0
  5613  		if x.Op != OpLOONG64MOVBUreg {
  5614  			break
  5615  		}
  5616  		v.reset(OpLOONG64MOVVreg)
  5617  		v.AddArg(x)
  5618  		return true
  5619  	}
  5620  	// match: (MOVWreg x:(MOVHreg _))
  5621  	// result: (MOVVreg x)
  5622  	for {
  5623  		x := v_0
  5624  		if x.Op != OpLOONG64MOVHreg {
  5625  			break
  5626  		}
  5627  		v.reset(OpLOONG64MOVVreg)
  5628  		v.AddArg(x)
  5629  		return true
  5630  	}
  5631  	// match: (MOVWreg x:(MOVWreg _))
  5632  	// result: (MOVVreg x)
  5633  	for {
  5634  		x := v_0
  5635  		if x.Op != OpLOONG64MOVWreg {
  5636  			break
  5637  		}
  5638  		v.reset(OpLOONG64MOVVreg)
  5639  		v.AddArg(x)
  5640  		return true
  5641  	}
  5642  	// match: (MOVWreg (MOVVconst [c]))
  5643  	// result: (MOVVconst [int64(int32(c))])
  5644  	for {
  5645  		if v_0.Op != OpLOONG64MOVVconst {
  5646  			break
  5647  		}
  5648  		c := auxIntToInt64(v_0.AuxInt)
  5649  		v.reset(OpLOONG64MOVVconst)
  5650  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
  5651  		return true
  5652  	}
  5653  	// match: (MOVWreg x:(ANDconst [c] y))
  5654  	// cond: c >= 0 && int64(int32(c)) == c
  5655  	// result: x
  5656  	for {
  5657  		x := v_0
  5658  		if x.Op != OpLOONG64ANDconst {
  5659  			break
  5660  		}
  5661  		c := auxIntToInt64(x.AuxInt)
  5662  		if !(c >= 0 && int64(int32(c)) == c) {
  5663  			break
  5664  		}
  5665  		v.copyOf(x)
  5666  		return true
  5667  	}
  5668  	return false
  5669  }
  5670  func rewriteValueLOONG64_OpLOONG64MOVWstore(v *Value) bool {
  5671  	v_2 := v.Args[2]
  5672  	v_1 := v.Args[1]
  5673  	v_0 := v.Args[0]
  5674  	b := v.Block
  5675  	config := b.Func.Config
  5676  	typ := &b.Func.Config.Types
  5677  	// match: (MOVWstore [off] {sym} ptr (MOVWfpgp val) mem)
  5678  	// result: (MOVFstore [off] {sym} ptr val mem)
  5679  	for {
  5680  		off := auxIntToInt32(v.AuxInt)
  5681  		sym := auxToSym(v.Aux)
  5682  		ptr := v_0
  5683  		if v_1.Op != OpLOONG64MOVWfpgp {
  5684  			break
  5685  		}
  5686  		val := v_1.Args[0]
  5687  		mem := v_2
  5688  		v.reset(OpLOONG64MOVFstore)
  5689  		v.AuxInt = int32ToAuxInt(off)
  5690  		v.Aux = symToAux(sym)
  5691  		v.AddArg3(ptr, val, mem)
  5692  		return true
  5693  	}
  5694  	// match: (MOVWstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  5695  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5696  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
  5697  	for {
  5698  		off1 := auxIntToInt32(v.AuxInt)
  5699  		sym := auxToSym(v.Aux)
  5700  		if v_0.Op != OpLOONG64ADDVconst {
  5701  			break
  5702  		}
  5703  		off2 := auxIntToInt64(v_0.AuxInt)
  5704  		ptr := v_0.Args[0]
  5705  		val := v_1
  5706  		mem := v_2
  5707  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5708  			break
  5709  		}
  5710  		v.reset(OpLOONG64MOVWstore)
  5711  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5712  		v.Aux = symToAux(sym)
  5713  		v.AddArg3(ptr, val, mem)
  5714  		return true
  5715  	}
  5716  	// match: (MOVWstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  5717  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5718  	// result: (MOVWstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  5719  	for {
  5720  		off1 := auxIntToInt32(v.AuxInt)
  5721  		sym1 := auxToSym(v.Aux)
  5722  		if v_0.Op != OpLOONG64MOVVaddr {
  5723  			break
  5724  		}
  5725  		off2 := auxIntToInt32(v_0.AuxInt)
  5726  		sym2 := auxToSym(v_0.Aux)
  5727  		ptr := v_0.Args[0]
  5728  		val := v_1
  5729  		mem := v_2
  5730  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5731  			break
  5732  		}
  5733  		v.reset(OpLOONG64MOVWstore)
  5734  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5735  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5736  		v.AddArg3(ptr, val, mem)
  5737  		return true
  5738  	}
  5739  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
  5740  	// result: (MOVWstore [off] {sym} ptr x mem)
  5741  	for {
  5742  		off := auxIntToInt32(v.AuxInt)
  5743  		sym := auxToSym(v.Aux)
  5744  		ptr := v_0
  5745  		if v_1.Op != OpLOONG64MOVWreg {
  5746  			break
  5747  		}
  5748  		x := v_1.Args[0]
  5749  		mem := v_2
  5750  		v.reset(OpLOONG64MOVWstore)
  5751  		v.AuxInt = int32ToAuxInt(off)
  5752  		v.Aux = symToAux(sym)
  5753  		v.AddArg3(ptr, x, mem)
  5754  		return true
  5755  	}
  5756  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
  5757  	// result: (MOVWstore [off] {sym} ptr x mem)
  5758  	for {
  5759  		off := auxIntToInt32(v.AuxInt)
  5760  		sym := auxToSym(v.Aux)
  5761  		ptr := v_0
  5762  		if v_1.Op != OpLOONG64MOVWUreg {
  5763  			break
  5764  		}
  5765  		x := v_1.Args[0]
  5766  		mem := v_2
  5767  		v.reset(OpLOONG64MOVWstore)
  5768  		v.AuxInt = int32ToAuxInt(off)
  5769  		v.Aux = symToAux(sym)
  5770  		v.AddArg3(ptr, x, mem)
  5771  		return true
  5772  	}
  5773  	// match: (MOVWstore [off] {sym} (ADDV ptr idx) val mem)
  5774  	// cond: off == 0 && sym == nil
  5775  	// result: (MOVWstoreidx ptr idx val mem)
  5776  	for {
  5777  		off := auxIntToInt32(v.AuxInt)
  5778  		sym := auxToSym(v.Aux)
  5779  		if v_0.Op != OpLOONG64ADDV {
  5780  			break
  5781  		}
  5782  		idx := v_0.Args[1]
  5783  		ptr := v_0.Args[0]
  5784  		val := v_1
  5785  		mem := v_2
  5786  		if !(off == 0 && sym == nil) {
  5787  			break
  5788  		}
  5789  		v.reset(OpLOONG64MOVWstoreidx)
  5790  		v.AddArg4(ptr, idx, val, mem)
  5791  		return true
  5792  	}
  5793  	// match: (MOVWstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  5794  	// cond: off == 0 && sym == nil
  5795  	// result: (MOVWstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  5796  	for {
  5797  		off := auxIntToInt32(v.AuxInt)
  5798  		sym := auxToSym(v.Aux)
  5799  		if v_0.Op != OpLOONG64ADDshiftLLV {
  5800  			break
  5801  		}
  5802  		shift := auxIntToInt64(v_0.AuxInt)
  5803  		idx := v_0.Args[1]
  5804  		ptr := v_0.Args[0]
  5805  		val := v_1
  5806  		mem := v_2
  5807  		if !(off == 0 && sym == nil) {
  5808  			break
  5809  		}
  5810  		v.reset(OpLOONG64MOVWstoreidx)
  5811  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  5812  		v0.AuxInt = int64ToAuxInt(shift)
  5813  		v0.AddArg(idx)
  5814  		v.AddArg4(ptr, v0, val, mem)
  5815  		return true
  5816  	}
  5817  	return false
  5818  }
  5819  func rewriteValueLOONG64_OpLOONG64MOVWstoreidx(v *Value) bool {
  5820  	v_3 := v.Args[3]
  5821  	v_2 := v.Args[2]
  5822  	v_1 := v.Args[1]
  5823  	v_0 := v.Args[0]
  5824  	// match: (MOVWstoreidx ptr (MOVVconst [c]) val mem)
  5825  	// cond: is32Bit(c)
  5826  	// result: (MOVWstore [int32(c)] ptr val mem)
  5827  	for {
  5828  		ptr := v_0
  5829  		if v_1.Op != OpLOONG64MOVVconst {
  5830  			break
  5831  		}
  5832  		c := auxIntToInt64(v_1.AuxInt)
  5833  		val := v_2
  5834  		mem := v_3
  5835  		if !(is32Bit(c)) {
  5836  			break
  5837  		}
  5838  		v.reset(OpLOONG64MOVWstore)
  5839  		v.AuxInt = int32ToAuxInt(int32(c))
  5840  		v.AddArg3(ptr, val, mem)
  5841  		return true
  5842  	}
  5843  	// match: (MOVWstoreidx (MOVVconst [c]) idx val mem)
  5844  	// cond: is32Bit(c)
  5845  	// result: (MOVWstore [int32(c)] idx val mem)
  5846  	for {
  5847  		if v_0.Op != OpLOONG64MOVVconst {
  5848  			break
  5849  		}
  5850  		c := auxIntToInt64(v_0.AuxInt)
  5851  		idx := v_1
  5852  		val := v_2
  5853  		mem := v_3
  5854  		if !(is32Bit(c)) {
  5855  			break
  5856  		}
  5857  		v.reset(OpLOONG64MOVWstore)
  5858  		v.AuxInt = int32ToAuxInt(int32(c))
  5859  		v.AddArg3(idx, val, mem)
  5860  		return true
  5861  	}
  5862  	return false
  5863  }
  5864  func rewriteValueLOONG64_OpLOONG64MULV(v *Value) bool {
  5865  	v_1 := v.Args[1]
  5866  	v_0 := v.Args[0]
  5867  	b := v.Block
  5868  	config := b.Func.Config
  5869  	typ := &b.Func.Config.Types
  5870  	// match: (MULV _ (MOVVconst [0]))
  5871  	// result: (MOVVconst [0])
  5872  	for {
  5873  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5874  			if v_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_1.AuxInt) != 0 {
  5875  				continue
  5876  			}
  5877  			v.reset(OpLOONG64MOVVconst)
  5878  			v.AuxInt = int64ToAuxInt(0)
  5879  			return true
  5880  		}
  5881  		break
  5882  	}
  5883  	// match: (MULV x (MOVVconst [1]))
  5884  	// result: x
  5885  	for {
  5886  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5887  			x := v_0
  5888  			if v_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_1.AuxInt) != 1 {
  5889  				continue
  5890  			}
  5891  			v.copyOf(x)
  5892  			return true
  5893  		}
  5894  		break
  5895  	}
  5896  	// match: (MULV x (MOVVconst [c]))
  5897  	// cond: canMulStrengthReduce(config, c)
  5898  	// result: {mulStrengthReduce(v, x, c)}
  5899  	for {
  5900  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5901  			x := v_0
  5902  			if v_1.Op != OpLOONG64MOVVconst {
  5903  				continue
  5904  			}
  5905  			c := auxIntToInt64(v_1.AuxInt)
  5906  			if !(canMulStrengthReduce(config, c)) {
  5907  				continue
  5908  			}
  5909  			v.copyOf(mulStrengthReduce(v, x, c))
  5910  			return true
  5911  		}
  5912  		break
  5913  	}
  5914  	// match: (MULV (NEGV x) (MOVVconst [c]))
  5915  	// result: (MULV x (MOVVconst [-c]))
  5916  	for {
  5917  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5918  			if v_0.Op != OpLOONG64NEGV {
  5919  				continue
  5920  			}
  5921  			x := v_0.Args[0]
  5922  			if v_1.Op != OpLOONG64MOVVconst {
  5923  				continue
  5924  			}
  5925  			c := auxIntToInt64(v_1.AuxInt)
  5926  			v.reset(OpLOONG64MULV)
  5927  			v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  5928  			v0.AuxInt = int64ToAuxInt(-c)
  5929  			v.AddArg2(x, v0)
  5930  			return true
  5931  		}
  5932  		break
  5933  	}
  5934  	// match: (MULV (NEGV x) (NEGV y))
  5935  	// result: (MULV x y)
  5936  	for {
  5937  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5938  			if v_0.Op != OpLOONG64NEGV {
  5939  				continue
  5940  			}
  5941  			x := v_0.Args[0]
  5942  			if v_1.Op != OpLOONG64NEGV {
  5943  				continue
  5944  			}
  5945  			y := v_1.Args[0]
  5946  			v.reset(OpLOONG64MULV)
  5947  			v.AddArg2(x, y)
  5948  			return true
  5949  		}
  5950  		break
  5951  	}
  5952  	// match: (MULV (MOVVconst [c]) (MOVVconst [d]))
  5953  	// result: (MOVVconst [c*d])
  5954  	for {
  5955  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5956  			if v_0.Op != OpLOONG64MOVVconst {
  5957  				continue
  5958  			}
  5959  			c := auxIntToInt64(v_0.AuxInt)
  5960  			if v_1.Op != OpLOONG64MOVVconst {
  5961  				continue
  5962  			}
  5963  			d := auxIntToInt64(v_1.AuxInt)
  5964  			v.reset(OpLOONG64MOVVconst)
  5965  			v.AuxInt = int64ToAuxInt(c * d)
  5966  			return true
  5967  		}
  5968  		break
  5969  	}
  5970  	return false
  5971  }
  5972  func rewriteValueLOONG64_OpLOONG64NEGV(v *Value) bool {
  5973  	v_0 := v.Args[0]
  5974  	b := v.Block
  5975  	// match: (NEGV (SUBV x y))
  5976  	// result: (SUBV y x)
  5977  	for {
  5978  		if v_0.Op != OpLOONG64SUBV {
  5979  			break
  5980  		}
  5981  		y := v_0.Args[1]
  5982  		x := v_0.Args[0]
  5983  		v.reset(OpLOONG64SUBV)
  5984  		v.AddArg2(y, x)
  5985  		return true
  5986  	}
  5987  	// match: (NEGV <t> s:(ADDVconst [c] (SUBV x y)))
  5988  	// cond: s.Uses == 1 && is12Bit(-c)
  5989  	// result: (ADDVconst [-c] (SUBV <t> y x))
  5990  	for {
  5991  		t := v.Type
  5992  		s := v_0
  5993  		if s.Op != OpLOONG64ADDVconst {
  5994  			break
  5995  		}
  5996  		c := auxIntToInt64(s.AuxInt)
  5997  		s_0 := s.Args[0]
  5998  		if s_0.Op != OpLOONG64SUBV {
  5999  			break
  6000  		}
  6001  		y := s_0.Args[1]
  6002  		x := s_0.Args[0]
  6003  		if !(s.Uses == 1 && is12Bit(-c)) {
  6004  			break
  6005  		}
  6006  		v.reset(OpLOONG64ADDVconst)
  6007  		v.AuxInt = int64ToAuxInt(-c)
  6008  		v0 := b.NewValue0(v.Pos, OpLOONG64SUBV, t)
  6009  		v0.AddArg2(y, x)
  6010  		v.AddArg(v0)
  6011  		return true
  6012  	}
  6013  	// match: (NEGV (NEGV x))
  6014  	// result: x
  6015  	for {
  6016  		if v_0.Op != OpLOONG64NEGV {
  6017  			break
  6018  		}
  6019  		x := v_0.Args[0]
  6020  		v.copyOf(x)
  6021  		return true
  6022  	}
  6023  	// match: (NEGV <t> s:(ADDVconst [c] (NEGV x)))
  6024  	// cond: s.Uses == 1 && is12Bit(-c)
  6025  	// result: (ADDVconst [-c] x)
  6026  	for {
  6027  		s := v_0
  6028  		if s.Op != OpLOONG64ADDVconst {
  6029  			break
  6030  		}
  6031  		c := auxIntToInt64(s.AuxInt)
  6032  		s_0 := s.Args[0]
  6033  		if s_0.Op != OpLOONG64NEGV {
  6034  			break
  6035  		}
  6036  		x := s_0.Args[0]
  6037  		if !(s.Uses == 1 && is12Bit(-c)) {
  6038  			break
  6039  		}
  6040  		v.reset(OpLOONG64ADDVconst)
  6041  		v.AuxInt = int64ToAuxInt(-c)
  6042  		v.AddArg(x)
  6043  		return true
  6044  	}
  6045  	// match: (NEGV (MOVVconst [c]))
  6046  	// result: (MOVVconst [-c])
  6047  	for {
  6048  		if v_0.Op != OpLOONG64MOVVconst {
  6049  			break
  6050  		}
  6051  		c := auxIntToInt64(v_0.AuxInt)
  6052  		v.reset(OpLOONG64MOVVconst)
  6053  		v.AuxInt = int64ToAuxInt(-c)
  6054  		return true
  6055  	}
  6056  	return false
  6057  }
  6058  func rewriteValueLOONG64_OpLOONG64NOR(v *Value) bool {
  6059  	v_1 := v.Args[1]
  6060  	v_0 := v.Args[0]
  6061  	// match: (NOR x (MOVVconst [c]))
  6062  	// cond: is32Bit(c)
  6063  	// result: (NORconst [c] x)
  6064  	for {
  6065  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6066  			x := v_0
  6067  			if v_1.Op != OpLOONG64MOVVconst {
  6068  				continue
  6069  			}
  6070  			c := auxIntToInt64(v_1.AuxInt)
  6071  			if !(is32Bit(c)) {
  6072  				continue
  6073  			}
  6074  			v.reset(OpLOONG64NORconst)
  6075  			v.AuxInt = int64ToAuxInt(c)
  6076  			v.AddArg(x)
  6077  			return true
  6078  		}
  6079  		break
  6080  	}
  6081  	return false
  6082  }
  6083  func rewriteValueLOONG64_OpLOONG64NORconst(v *Value) bool {
  6084  	v_0 := v.Args[0]
  6085  	// match: (NORconst [c] (MOVVconst [d]))
  6086  	// result: (MOVVconst [^(c|d)])
  6087  	for {
  6088  		c := auxIntToInt64(v.AuxInt)
  6089  		if v_0.Op != OpLOONG64MOVVconst {
  6090  			break
  6091  		}
  6092  		d := auxIntToInt64(v_0.AuxInt)
  6093  		v.reset(OpLOONG64MOVVconst)
  6094  		v.AuxInt = int64ToAuxInt(^(c | d))
  6095  		return true
  6096  	}
  6097  	return false
  6098  }
  6099  func rewriteValueLOONG64_OpLOONG64OR(v *Value) bool {
  6100  	v_1 := v.Args[1]
  6101  	v_0 := v.Args[0]
  6102  	b := v.Block
  6103  	typ := &b.Func.Config.Types
  6104  	// match: (OR <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  6105  	// result: (REVB2H x)
  6106  	for {
  6107  		if v.Type != typ.UInt16 {
  6108  			break
  6109  		}
  6110  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6111  			if v_0.Op != OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || auxIntToInt64(v_0.AuxInt) != 8 {
  6112  				continue
  6113  			}
  6114  			x := v_0.Args[0]
  6115  			if v_1.Op != OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || auxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  6116  				continue
  6117  			}
  6118  			v.reset(OpLOONG64REVB2H)
  6119  			v.AddArg(x)
  6120  			return true
  6121  		}
  6122  		break
  6123  	}
  6124  	// match: (OR (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  6125  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  6126  	// result: (REVB2H x)
  6127  	for {
  6128  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6129  			if v_0.Op != OpLOONG64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  6130  				continue
  6131  			}
  6132  			v_0_0 := v_0.Args[0]
  6133  			if v_0_0.Op != OpLOONG64ANDconst {
  6134  				continue
  6135  			}
  6136  			c1 := auxIntToInt64(v_0_0.AuxInt)
  6137  			x := v_0_0.Args[0]
  6138  			if v_1.Op != OpLOONG64SLLconst || auxIntToInt64(v_1.AuxInt) != 8 {
  6139  				continue
  6140  			}
  6141  			v_1_0 := v_1.Args[0]
  6142  			if v_1_0.Op != OpLOONG64ANDconst {
  6143  				continue
  6144  			}
  6145  			c2 := auxIntToInt64(v_1_0.AuxInt)
  6146  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  6147  				continue
  6148  			}
  6149  			v.reset(OpLOONG64REVB2H)
  6150  			v.AddArg(x)
  6151  			return true
  6152  		}
  6153  		break
  6154  	}
  6155  	// match: (OR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  6156  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  6157  	// result: (REVB4H x)
  6158  	for {
  6159  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6160  			if v_0.Op != OpLOONG64SRLVconst || auxIntToInt64(v_0.AuxInt) != 8 {
  6161  				continue
  6162  			}
  6163  			v_0_0 := v_0.Args[0]
  6164  			if v_0_0.Op != OpLOONG64AND {
  6165  				continue
  6166  			}
  6167  			_ = v_0_0.Args[1]
  6168  			v_0_0_0 := v_0_0.Args[0]
  6169  			v_0_0_1 := v_0_0.Args[1]
  6170  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  6171  				if v_0_0_0.Op != OpLOONG64MOVVconst {
  6172  					continue
  6173  				}
  6174  				c1 := auxIntToInt64(v_0_0_0.AuxInt)
  6175  				x := v_0_0_1
  6176  				if v_1.Op != OpLOONG64SLLVconst || auxIntToInt64(v_1.AuxInt) != 8 {
  6177  					continue
  6178  				}
  6179  				v_1_0 := v_1.Args[0]
  6180  				if v_1_0.Op != OpLOONG64AND {
  6181  					continue
  6182  				}
  6183  				_ = v_1_0.Args[1]
  6184  				v_1_0_0 := v_1_0.Args[0]
  6185  				v_1_0_1 := v_1_0.Args[1]
  6186  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  6187  					if v_1_0_0.Op != OpLOONG64MOVVconst {
  6188  						continue
  6189  					}
  6190  					c2 := auxIntToInt64(v_1_0_0.AuxInt)
  6191  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  6192  						continue
  6193  					}
  6194  					v.reset(OpLOONG64REVB4H)
  6195  					v.AddArg(x)
  6196  					return true
  6197  				}
  6198  			}
  6199  		}
  6200  		break
  6201  	}
  6202  	// match: (OR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  6203  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  6204  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  6205  	for {
  6206  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6207  			if v_0.Op != OpLOONG64SRLVconst || auxIntToInt64(v_0.AuxInt) != 8 {
  6208  				continue
  6209  			}
  6210  			v_0_0 := v_0.Args[0]
  6211  			if v_0_0.Op != OpLOONG64AND {
  6212  				continue
  6213  			}
  6214  			_ = v_0_0.Args[1]
  6215  			v_0_0_0 := v_0_0.Args[0]
  6216  			v_0_0_1 := v_0_0.Args[1]
  6217  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  6218  				if v_0_0_0.Op != OpLOONG64MOVVconst {
  6219  					continue
  6220  				}
  6221  				c1 := auxIntToInt64(v_0_0_0.AuxInt)
  6222  				x := v_0_0_1
  6223  				if v_1.Op != OpLOONG64SLLVconst || auxIntToInt64(v_1.AuxInt) != 8 {
  6224  					continue
  6225  				}
  6226  				v_1_0 := v_1.Args[0]
  6227  				if v_1_0.Op != OpLOONG64ANDconst {
  6228  					continue
  6229  				}
  6230  				c2 := auxIntToInt64(v_1_0.AuxInt)
  6231  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  6232  					continue
  6233  				}
  6234  				v.reset(OpLOONG64REVB4H)
  6235  				v0 := b.NewValue0(v.Pos, OpLOONG64ANDconst, x.Type)
  6236  				v0.AuxInt = int64ToAuxInt(0xffffffff)
  6237  				v0.AddArg(x)
  6238  				v.AddArg(v0)
  6239  				return true
  6240  			}
  6241  		}
  6242  		break
  6243  	}
  6244  	// match: (OR x (MOVVconst [c]))
  6245  	// cond: is32Bit(c)
  6246  	// result: (ORconst [c] x)
  6247  	for {
  6248  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6249  			x := v_0
  6250  			if v_1.Op != OpLOONG64MOVVconst {
  6251  				continue
  6252  			}
  6253  			c := auxIntToInt64(v_1.AuxInt)
  6254  			if !(is32Bit(c)) {
  6255  				continue
  6256  			}
  6257  			v.reset(OpLOONG64ORconst)
  6258  			v.AuxInt = int64ToAuxInt(c)
  6259  			v.AddArg(x)
  6260  			return true
  6261  		}
  6262  		break
  6263  	}
  6264  	// match: (OR x x)
  6265  	// result: x
  6266  	for {
  6267  		x := v_0
  6268  		if x != v_1 {
  6269  			break
  6270  		}
  6271  		v.copyOf(x)
  6272  		return true
  6273  	}
  6274  	// match: (OR x (NORconst [0] y))
  6275  	// result: (ORN x y)
  6276  	for {
  6277  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6278  			x := v_0
  6279  			if v_1.Op != OpLOONG64NORconst || auxIntToInt64(v_1.AuxInt) != 0 {
  6280  				continue
  6281  			}
  6282  			y := v_1.Args[0]
  6283  			v.reset(OpLOONG64ORN)
  6284  			v.AddArg2(x, y)
  6285  			return true
  6286  		}
  6287  		break
  6288  	}
  6289  	return false
  6290  }
  6291  func rewriteValueLOONG64_OpLOONG64ORN(v *Value) bool {
  6292  	v_1 := v.Args[1]
  6293  	v_0 := v.Args[0]
  6294  	// match: (ORN x (MOVVconst [-1]))
  6295  	// result: x
  6296  	for {
  6297  		x := v_0
  6298  		if v_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_1.AuxInt) != -1 {
  6299  			break
  6300  		}
  6301  		v.copyOf(x)
  6302  		return true
  6303  	}
  6304  	return false
  6305  }
  6306  func rewriteValueLOONG64_OpLOONG64ORconst(v *Value) bool {
  6307  	v_0 := v.Args[0]
  6308  	// match: (ORconst [0] x)
  6309  	// result: x
  6310  	for {
  6311  		if auxIntToInt64(v.AuxInt) != 0 {
  6312  			break
  6313  		}
  6314  		x := v_0
  6315  		v.copyOf(x)
  6316  		return true
  6317  	}
  6318  	// match: (ORconst [-1] _)
  6319  	// result: (MOVVconst [-1])
  6320  	for {
  6321  		if auxIntToInt64(v.AuxInt) != -1 {
  6322  			break
  6323  		}
  6324  		v.reset(OpLOONG64MOVVconst)
  6325  		v.AuxInt = int64ToAuxInt(-1)
  6326  		return true
  6327  	}
  6328  	// match: (ORconst [c] (MOVVconst [d]))
  6329  	// result: (MOVVconst [c|d])
  6330  	for {
  6331  		c := auxIntToInt64(v.AuxInt)
  6332  		if v_0.Op != OpLOONG64MOVVconst {
  6333  			break
  6334  		}
  6335  		d := auxIntToInt64(v_0.AuxInt)
  6336  		v.reset(OpLOONG64MOVVconst)
  6337  		v.AuxInt = int64ToAuxInt(c | d)
  6338  		return true
  6339  	}
  6340  	// match: (ORconst [c] (ORconst [d] x))
  6341  	// cond: is32Bit(c|d)
  6342  	// result: (ORconst [c|d] x)
  6343  	for {
  6344  		c := auxIntToInt64(v.AuxInt)
  6345  		if v_0.Op != OpLOONG64ORconst {
  6346  			break
  6347  		}
  6348  		d := auxIntToInt64(v_0.AuxInt)
  6349  		x := v_0.Args[0]
  6350  		if !(is32Bit(c | d)) {
  6351  			break
  6352  		}
  6353  		v.reset(OpLOONG64ORconst)
  6354  		v.AuxInt = int64ToAuxInt(c | d)
  6355  		v.AddArg(x)
  6356  		return true
  6357  	}
  6358  	return false
  6359  }
  6360  func rewriteValueLOONG64_OpLOONG64REMV(v *Value) bool {
  6361  	v_1 := v.Args[1]
  6362  	v_0 := v.Args[0]
  6363  	// match: (REMV (MOVVconst [c]) (MOVVconst [d]))
  6364  	// cond: d != 0
  6365  	// result: (MOVVconst [c%d])
  6366  	for {
  6367  		if v_0.Op != OpLOONG64MOVVconst {
  6368  			break
  6369  		}
  6370  		c := auxIntToInt64(v_0.AuxInt)
  6371  		if v_1.Op != OpLOONG64MOVVconst {
  6372  			break
  6373  		}
  6374  		d := auxIntToInt64(v_1.AuxInt)
  6375  		if !(d != 0) {
  6376  			break
  6377  		}
  6378  		v.reset(OpLOONG64MOVVconst)
  6379  		v.AuxInt = int64ToAuxInt(c % d)
  6380  		return true
  6381  	}
  6382  	return false
  6383  }
  6384  func rewriteValueLOONG64_OpLOONG64REMVU(v *Value) bool {
  6385  	v_1 := v.Args[1]
  6386  	v_0 := v.Args[0]
  6387  	// match: (REMVU _ (MOVVconst [1]))
  6388  	// result: (MOVVconst [0])
  6389  	for {
  6390  		if v_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_1.AuxInt) != 1 {
  6391  			break
  6392  		}
  6393  		v.reset(OpLOONG64MOVVconst)
  6394  		v.AuxInt = int64ToAuxInt(0)
  6395  		return true
  6396  	}
  6397  	// match: (REMVU x (MOVVconst [c]))
  6398  	// cond: isPowerOfTwo(c)
  6399  	// result: (ANDconst [c-1] x)
  6400  	for {
  6401  		x := v_0
  6402  		if v_1.Op != OpLOONG64MOVVconst {
  6403  			break
  6404  		}
  6405  		c := auxIntToInt64(v_1.AuxInt)
  6406  		if !(isPowerOfTwo(c)) {
  6407  			break
  6408  		}
  6409  		v.reset(OpLOONG64ANDconst)
  6410  		v.AuxInt = int64ToAuxInt(c - 1)
  6411  		v.AddArg(x)
  6412  		return true
  6413  	}
  6414  	// match: (REMVU (MOVVconst [c]) (MOVVconst [d]))
  6415  	// cond: d != 0
  6416  	// result: (MOVVconst [int64(uint64(c)%uint64(d))])
  6417  	for {
  6418  		if v_0.Op != OpLOONG64MOVVconst {
  6419  			break
  6420  		}
  6421  		c := auxIntToInt64(v_0.AuxInt)
  6422  		if v_1.Op != OpLOONG64MOVVconst {
  6423  			break
  6424  		}
  6425  		d := auxIntToInt64(v_1.AuxInt)
  6426  		if !(d != 0) {
  6427  			break
  6428  		}
  6429  		v.reset(OpLOONG64MOVVconst)
  6430  		v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
  6431  		return true
  6432  	}
  6433  	return false
  6434  }
  6435  func rewriteValueLOONG64_OpLOONG64ROTR(v *Value) bool {
  6436  	v_1 := v.Args[1]
  6437  	v_0 := v.Args[0]
  6438  	// match: (ROTR x (MOVVconst [c]))
  6439  	// result: (ROTRconst x [c&31])
  6440  	for {
  6441  		x := v_0
  6442  		if v_1.Op != OpLOONG64MOVVconst {
  6443  			break
  6444  		}
  6445  		c := auxIntToInt64(v_1.AuxInt)
  6446  		v.reset(OpLOONG64ROTRconst)
  6447  		v.AuxInt = int64ToAuxInt(c & 31)
  6448  		v.AddArg(x)
  6449  		return true
  6450  	}
  6451  	return false
  6452  }
  6453  func rewriteValueLOONG64_OpLOONG64ROTRV(v *Value) bool {
  6454  	v_1 := v.Args[1]
  6455  	v_0 := v.Args[0]
  6456  	// match: (ROTRV x (MOVVconst [c]))
  6457  	// result: (ROTRVconst x [c&63])
  6458  	for {
  6459  		x := v_0
  6460  		if v_1.Op != OpLOONG64MOVVconst {
  6461  			break
  6462  		}
  6463  		c := auxIntToInt64(v_1.AuxInt)
  6464  		v.reset(OpLOONG64ROTRVconst)
  6465  		v.AuxInt = int64ToAuxInt(c & 63)
  6466  		v.AddArg(x)
  6467  		return true
  6468  	}
  6469  	return false
  6470  }
  6471  func rewriteValueLOONG64_OpLOONG64SGT(v *Value) bool {
  6472  	v_1 := v.Args[1]
  6473  	v_0 := v.Args[0]
  6474  	b := v.Block
  6475  	typ := &b.Func.Config.Types
  6476  	// match: (SGT (MOVVconst [c]) (NEGV (SUBVconst [d] x)))
  6477  	// cond: is32Bit(d-c)
  6478  	// result: (SGT x (MOVVconst [d-c]))
  6479  	for {
  6480  		if v_0.Op != OpLOONG64MOVVconst {
  6481  			break
  6482  		}
  6483  		c := auxIntToInt64(v_0.AuxInt)
  6484  		if v_1.Op != OpLOONG64NEGV {
  6485  			break
  6486  		}
  6487  		v_1_0 := v_1.Args[0]
  6488  		if v_1_0.Op != OpLOONG64SUBVconst {
  6489  			break
  6490  		}
  6491  		d := auxIntToInt64(v_1_0.AuxInt)
  6492  		x := v_1_0.Args[0]
  6493  		if !(is32Bit(d - c)) {
  6494  			break
  6495  		}
  6496  		v.reset(OpLOONG64SGT)
  6497  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  6498  		v0.AuxInt = int64ToAuxInt(d - c)
  6499  		v.AddArg2(x, v0)
  6500  		return true
  6501  	}
  6502  	// match: (SGT (MOVVconst [c]) x)
  6503  	// cond: is32Bit(c)
  6504  	// result: (SGTconst [c] x)
  6505  	for {
  6506  		if v_0.Op != OpLOONG64MOVVconst {
  6507  			break
  6508  		}
  6509  		c := auxIntToInt64(v_0.AuxInt)
  6510  		x := v_1
  6511  		if !(is32Bit(c)) {
  6512  			break
  6513  		}
  6514  		v.reset(OpLOONG64SGTconst)
  6515  		v.AuxInt = int64ToAuxInt(c)
  6516  		v.AddArg(x)
  6517  		return true
  6518  	}
  6519  	// match: (SGT x x)
  6520  	// result: (MOVVconst [0])
  6521  	for {
  6522  		x := v_0
  6523  		if x != v_1 {
  6524  			break
  6525  		}
  6526  		v.reset(OpLOONG64MOVVconst)
  6527  		v.AuxInt = int64ToAuxInt(0)
  6528  		return true
  6529  	}
  6530  	return false
  6531  }
  6532  func rewriteValueLOONG64_OpLOONG64SGTU(v *Value) bool {
  6533  	v_1 := v.Args[1]
  6534  	v_0 := v.Args[0]
  6535  	// match: (SGTU (MOVVconst [c]) x)
  6536  	// cond: is32Bit(c)
  6537  	// result: (SGTUconst [c] x)
  6538  	for {
  6539  		if v_0.Op != OpLOONG64MOVVconst {
  6540  			break
  6541  		}
  6542  		c := auxIntToInt64(v_0.AuxInt)
  6543  		x := v_1
  6544  		if !(is32Bit(c)) {
  6545  			break
  6546  		}
  6547  		v.reset(OpLOONG64SGTUconst)
  6548  		v.AuxInt = int64ToAuxInt(c)
  6549  		v.AddArg(x)
  6550  		return true
  6551  	}
  6552  	// match: (SGTU x x)
  6553  	// result: (MOVVconst [0])
  6554  	for {
  6555  		x := v_0
  6556  		if x != v_1 {
  6557  			break
  6558  		}
  6559  		v.reset(OpLOONG64MOVVconst)
  6560  		v.AuxInt = int64ToAuxInt(0)
  6561  		return true
  6562  	}
  6563  	return false
  6564  }
  6565  func rewriteValueLOONG64_OpLOONG64SGTUconst(v *Value) bool {
  6566  	v_0 := v.Args[0]
  6567  	// match: (SGTUconst [c] (MOVVconst [d]))
  6568  	// cond: uint64(c)>uint64(d)
  6569  	// result: (MOVVconst [1])
  6570  	for {
  6571  		c := auxIntToInt64(v.AuxInt)
  6572  		if v_0.Op != OpLOONG64MOVVconst {
  6573  			break
  6574  		}
  6575  		d := auxIntToInt64(v_0.AuxInt)
  6576  		if !(uint64(c) > uint64(d)) {
  6577  			break
  6578  		}
  6579  		v.reset(OpLOONG64MOVVconst)
  6580  		v.AuxInt = int64ToAuxInt(1)
  6581  		return true
  6582  	}
  6583  	// match: (SGTUconst [c] (MOVVconst [d]))
  6584  	// cond: uint64(c)<=uint64(d)
  6585  	// result: (MOVVconst [0])
  6586  	for {
  6587  		c := auxIntToInt64(v.AuxInt)
  6588  		if v_0.Op != OpLOONG64MOVVconst {
  6589  			break
  6590  		}
  6591  		d := auxIntToInt64(v_0.AuxInt)
  6592  		if !(uint64(c) <= uint64(d)) {
  6593  			break
  6594  		}
  6595  		v.reset(OpLOONG64MOVVconst)
  6596  		v.AuxInt = int64ToAuxInt(0)
  6597  		return true
  6598  	}
  6599  	// match: (SGTUconst [c] (MOVBUreg _))
  6600  	// cond: 0xff < uint64(c)
  6601  	// result: (MOVVconst [1])
  6602  	for {
  6603  		c := auxIntToInt64(v.AuxInt)
  6604  		if v_0.Op != OpLOONG64MOVBUreg || !(0xff < uint64(c)) {
  6605  			break
  6606  		}
  6607  		v.reset(OpLOONG64MOVVconst)
  6608  		v.AuxInt = int64ToAuxInt(1)
  6609  		return true
  6610  	}
  6611  	// match: (SGTUconst [c] (MOVHUreg _))
  6612  	// cond: 0xffff < uint64(c)
  6613  	// result: (MOVVconst [1])
  6614  	for {
  6615  		c := auxIntToInt64(v.AuxInt)
  6616  		if v_0.Op != OpLOONG64MOVHUreg || !(0xffff < uint64(c)) {
  6617  			break
  6618  		}
  6619  		v.reset(OpLOONG64MOVVconst)
  6620  		v.AuxInt = int64ToAuxInt(1)
  6621  		return true
  6622  	}
  6623  	// match: (SGTUconst [c] (ANDconst [m] _))
  6624  	// cond: uint64(m) < uint64(c)
  6625  	// result: (MOVVconst [1])
  6626  	for {
  6627  		c := auxIntToInt64(v.AuxInt)
  6628  		if v_0.Op != OpLOONG64ANDconst {
  6629  			break
  6630  		}
  6631  		m := auxIntToInt64(v_0.AuxInt)
  6632  		if !(uint64(m) < uint64(c)) {
  6633  			break
  6634  		}
  6635  		v.reset(OpLOONG64MOVVconst)
  6636  		v.AuxInt = int64ToAuxInt(1)
  6637  		return true
  6638  	}
  6639  	// match: (SGTUconst [c] (SRLVconst _ [d]))
  6640  	// cond: 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)
  6641  	// result: (MOVVconst [1])
  6642  	for {
  6643  		c := auxIntToInt64(v.AuxInt)
  6644  		if v_0.Op != OpLOONG64SRLVconst {
  6645  			break
  6646  		}
  6647  		d := auxIntToInt64(v_0.AuxInt)
  6648  		if !(0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
  6649  			break
  6650  		}
  6651  		v.reset(OpLOONG64MOVVconst)
  6652  		v.AuxInt = int64ToAuxInt(1)
  6653  		return true
  6654  	}
  6655  	return false
  6656  }
  6657  func rewriteValueLOONG64_OpLOONG64SGTconst(v *Value) bool {
  6658  	v_0 := v.Args[0]
  6659  	// match: (SGTconst [c] (MOVVconst [d]))
  6660  	// cond: c>d
  6661  	// result: (MOVVconst [1])
  6662  	for {
  6663  		c := auxIntToInt64(v.AuxInt)
  6664  		if v_0.Op != OpLOONG64MOVVconst {
  6665  			break
  6666  		}
  6667  		d := auxIntToInt64(v_0.AuxInt)
  6668  		if !(c > d) {
  6669  			break
  6670  		}
  6671  		v.reset(OpLOONG64MOVVconst)
  6672  		v.AuxInt = int64ToAuxInt(1)
  6673  		return true
  6674  	}
  6675  	// match: (SGTconst [c] (MOVVconst [d]))
  6676  	// cond: c<=d
  6677  	// result: (MOVVconst [0])
  6678  	for {
  6679  		c := auxIntToInt64(v.AuxInt)
  6680  		if v_0.Op != OpLOONG64MOVVconst {
  6681  			break
  6682  		}
  6683  		d := auxIntToInt64(v_0.AuxInt)
  6684  		if !(c <= d) {
  6685  			break
  6686  		}
  6687  		v.reset(OpLOONG64MOVVconst)
  6688  		v.AuxInt = int64ToAuxInt(0)
  6689  		return true
  6690  	}
  6691  	// match: (SGTconst [c] (MOVBreg _))
  6692  	// cond: 0x7f < c
  6693  	// result: (MOVVconst [1])
  6694  	for {
  6695  		c := auxIntToInt64(v.AuxInt)
  6696  		if v_0.Op != OpLOONG64MOVBreg || !(0x7f < c) {
  6697  			break
  6698  		}
  6699  		v.reset(OpLOONG64MOVVconst)
  6700  		v.AuxInt = int64ToAuxInt(1)
  6701  		return true
  6702  	}
  6703  	// match: (SGTconst [c] (MOVBreg _))
  6704  	// cond: c <= -0x80
  6705  	// result: (MOVVconst [0])
  6706  	for {
  6707  		c := auxIntToInt64(v.AuxInt)
  6708  		if v_0.Op != OpLOONG64MOVBreg || !(c <= -0x80) {
  6709  			break
  6710  		}
  6711  		v.reset(OpLOONG64MOVVconst)
  6712  		v.AuxInt = int64ToAuxInt(0)
  6713  		return true
  6714  	}
  6715  	// match: (SGTconst [c] (MOVBUreg _))
  6716  	// cond: 0xff < c
  6717  	// result: (MOVVconst [1])
  6718  	for {
  6719  		c := auxIntToInt64(v.AuxInt)
  6720  		if v_0.Op != OpLOONG64MOVBUreg || !(0xff < c) {
  6721  			break
  6722  		}
  6723  		v.reset(OpLOONG64MOVVconst)
  6724  		v.AuxInt = int64ToAuxInt(1)
  6725  		return true
  6726  	}
  6727  	// match: (SGTconst [c] (MOVBUreg _))
  6728  	// cond: c < 0
  6729  	// result: (MOVVconst [0])
  6730  	for {
  6731  		c := auxIntToInt64(v.AuxInt)
  6732  		if v_0.Op != OpLOONG64MOVBUreg || !(c < 0) {
  6733  			break
  6734  		}
  6735  		v.reset(OpLOONG64MOVVconst)
  6736  		v.AuxInt = int64ToAuxInt(0)
  6737  		return true
  6738  	}
  6739  	// match: (SGTconst [c] (MOVHreg _))
  6740  	// cond: 0x7fff < c
  6741  	// result: (MOVVconst [1])
  6742  	for {
  6743  		c := auxIntToInt64(v.AuxInt)
  6744  		if v_0.Op != OpLOONG64MOVHreg || !(0x7fff < c) {
  6745  			break
  6746  		}
  6747  		v.reset(OpLOONG64MOVVconst)
  6748  		v.AuxInt = int64ToAuxInt(1)
  6749  		return true
  6750  	}
  6751  	// match: (SGTconst [c] (MOVHreg _))
  6752  	// cond: c <= -0x8000
  6753  	// result: (MOVVconst [0])
  6754  	for {
  6755  		c := auxIntToInt64(v.AuxInt)
  6756  		if v_0.Op != OpLOONG64MOVHreg || !(c <= -0x8000) {
  6757  			break
  6758  		}
  6759  		v.reset(OpLOONG64MOVVconst)
  6760  		v.AuxInt = int64ToAuxInt(0)
  6761  		return true
  6762  	}
  6763  	// match: (SGTconst [c] (MOVHUreg _))
  6764  	// cond: 0xffff < c
  6765  	// result: (MOVVconst [1])
  6766  	for {
  6767  		c := auxIntToInt64(v.AuxInt)
  6768  		if v_0.Op != OpLOONG64MOVHUreg || !(0xffff < c) {
  6769  			break
  6770  		}
  6771  		v.reset(OpLOONG64MOVVconst)
  6772  		v.AuxInt = int64ToAuxInt(1)
  6773  		return true
  6774  	}
  6775  	// match: (SGTconst [c] (MOVHUreg _))
  6776  	// cond: c < 0
  6777  	// result: (MOVVconst [0])
  6778  	for {
  6779  		c := auxIntToInt64(v.AuxInt)
  6780  		if v_0.Op != OpLOONG64MOVHUreg || !(c < 0) {
  6781  			break
  6782  		}
  6783  		v.reset(OpLOONG64MOVVconst)
  6784  		v.AuxInt = int64ToAuxInt(0)
  6785  		return true
  6786  	}
  6787  	// match: (SGTconst [c] (MOVWUreg _))
  6788  	// cond: c < 0
  6789  	// result: (MOVVconst [0])
  6790  	for {
  6791  		c := auxIntToInt64(v.AuxInt)
  6792  		if v_0.Op != OpLOONG64MOVWUreg || !(c < 0) {
  6793  			break
  6794  		}
  6795  		v.reset(OpLOONG64MOVVconst)
  6796  		v.AuxInt = int64ToAuxInt(0)
  6797  		return true
  6798  	}
  6799  	// match: (SGTconst [c] (ANDconst [m] _))
  6800  	// cond: 0 <= m && m < c
  6801  	// result: (MOVVconst [1])
  6802  	for {
  6803  		c := auxIntToInt64(v.AuxInt)
  6804  		if v_0.Op != OpLOONG64ANDconst {
  6805  			break
  6806  		}
  6807  		m := auxIntToInt64(v_0.AuxInt)
  6808  		if !(0 <= m && m < c) {
  6809  			break
  6810  		}
  6811  		v.reset(OpLOONG64MOVVconst)
  6812  		v.AuxInt = int64ToAuxInt(1)
  6813  		return true
  6814  	}
  6815  	// match: (SGTconst [c] (SRLVconst _ [d]))
  6816  	// cond: 0 <= c && 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)
  6817  	// result: (MOVVconst [1])
  6818  	for {
  6819  		c := auxIntToInt64(v.AuxInt)
  6820  		if v_0.Op != OpLOONG64SRLVconst {
  6821  			break
  6822  		}
  6823  		d := auxIntToInt64(v_0.AuxInt)
  6824  		if !(0 <= c && 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
  6825  			break
  6826  		}
  6827  		v.reset(OpLOONG64MOVVconst)
  6828  		v.AuxInt = int64ToAuxInt(1)
  6829  		return true
  6830  	}
  6831  	return false
  6832  }
  6833  func rewriteValueLOONG64_OpLOONG64SLL(v *Value) bool {
  6834  	v_1 := v.Args[1]
  6835  	v_0 := v.Args[0]
  6836  	// match: (SLL _ (MOVVconst [c]))
  6837  	// cond: uint64(c)>=32
  6838  	// result: (MOVVconst [0])
  6839  	for {
  6840  		if v_1.Op != OpLOONG64MOVVconst {
  6841  			break
  6842  		}
  6843  		c := auxIntToInt64(v_1.AuxInt)
  6844  		if !(uint64(c) >= 32) {
  6845  			break
  6846  		}
  6847  		v.reset(OpLOONG64MOVVconst)
  6848  		v.AuxInt = int64ToAuxInt(0)
  6849  		return true
  6850  	}
  6851  	// match: (SLL x (MOVVconst [c]))
  6852  	// cond: uint64(c) >=0 && uint64(c) <=31
  6853  	// result: (SLLconst x [c])
  6854  	for {
  6855  		x := v_0
  6856  		if v_1.Op != OpLOONG64MOVVconst {
  6857  			break
  6858  		}
  6859  		c := auxIntToInt64(v_1.AuxInt)
  6860  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  6861  			break
  6862  		}
  6863  		v.reset(OpLOONG64SLLconst)
  6864  		v.AuxInt = int64ToAuxInt(c)
  6865  		v.AddArg(x)
  6866  		return true
  6867  	}
  6868  	// match: (SLL x (ANDconst [31] y))
  6869  	// result: (SLL x y)
  6870  	for {
  6871  		x := v_0
  6872  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 31 {
  6873  			break
  6874  		}
  6875  		y := v_1.Args[0]
  6876  		v.reset(OpLOONG64SLL)
  6877  		v.AddArg2(x, y)
  6878  		return true
  6879  	}
  6880  	return false
  6881  }
  6882  func rewriteValueLOONG64_OpLOONG64SLLV(v *Value) bool {
  6883  	v_1 := v.Args[1]
  6884  	v_0 := v.Args[0]
  6885  	// match: (SLLV _ (MOVVconst [c]))
  6886  	// cond: uint64(c)>=64
  6887  	// result: (MOVVconst [0])
  6888  	for {
  6889  		if v_1.Op != OpLOONG64MOVVconst {
  6890  			break
  6891  		}
  6892  		c := auxIntToInt64(v_1.AuxInt)
  6893  		if !(uint64(c) >= 64) {
  6894  			break
  6895  		}
  6896  		v.reset(OpLOONG64MOVVconst)
  6897  		v.AuxInt = int64ToAuxInt(0)
  6898  		return true
  6899  	}
  6900  	// match: (SLLV x (MOVVconst [c]))
  6901  	// result: (SLLVconst x [c])
  6902  	for {
  6903  		x := v_0
  6904  		if v_1.Op != OpLOONG64MOVVconst {
  6905  			break
  6906  		}
  6907  		c := auxIntToInt64(v_1.AuxInt)
  6908  		v.reset(OpLOONG64SLLVconst)
  6909  		v.AuxInt = int64ToAuxInt(c)
  6910  		v.AddArg(x)
  6911  		return true
  6912  	}
  6913  	// match: (SLLV x (ANDconst [63] y))
  6914  	// result: (SLLV x y)
  6915  	for {
  6916  		x := v_0
  6917  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
  6918  			break
  6919  		}
  6920  		y := v_1.Args[0]
  6921  		v.reset(OpLOONG64SLLV)
  6922  		v.AddArg2(x, y)
  6923  		return true
  6924  	}
  6925  	return false
  6926  }
  6927  func rewriteValueLOONG64_OpLOONG64SLLVconst(v *Value) bool {
  6928  	v_0 := v.Args[0]
  6929  	// match: (SLLVconst <t> [c] (ADDV x x))
  6930  	// cond: c < t.Size() * 8 - 1
  6931  	// result: (SLLVconst [c+1] x)
  6932  	for {
  6933  		t := v.Type
  6934  		c := auxIntToInt64(v.AuxInt)
  6935  		if v_0.Op != OpLOONG64ADDV {
  6936  			break
  6937  		}
  6938  		x := v_0.Args[1]
  6939  		if x != v_0.Args[0] || !(c < t.Size()*8-1) {
  6940  			break
  6941  		}
  6942  		v.reset(OpLOONG64SLLVconst)
  6943  		v.AuxInt = int64ToAuxInt(c + 1)
  6944  		v.AddArg(x)
  6945  		return true
  6946  	}
  6947  	// match: (SLLVconst <t> [c] (ADDV x x))
  6948  	// cond: c >= t.Size() * 8 - 1
  6949  	// result: (MOVVconst [0])
  6950  	for {
  6951  		t := v.Type
  6952  		c := auxIntToInt64(v.AuxInt)
  6953  		if v_0.Op != OpLOONG64ADDV {
  6954  			break
  6955  		}
  6956  		x := v_0.Args[1]
  6957  		if x != v_0.Args[0] || !(c >= t.Size()*8-1) {
  6958  			break
  6959  		}
  6960  		v.reset(OpLOONG64MOVVconst)
  6961  		v.AuxInt = int64ToAuxInt(0)
  6962  		return true
  6963  	}
  6964  	// match: (SLLVconst [c] (MOVVconst [d]))
  6965  	// result: (MOVVconst [d<<uint64(c)])
  6966  	for {
  6967  		c := auxIntToInt64(v.AuxInt)
  6968  		if v_0.Op != OpLOONG64MOVVconst {
  6969  			break
  6970  		}
  6971  		d := auxIntToInt64(v_0.AuxInt)
  6972  		v.reset(OpLOONG64MOVVconst)
  6973  		v.AuxInt = int64ToAuxInt(d << uint64(c))
  6974  		return true
  6975  	}
  6976  	return false
  6977  }
  6978  func rewriteValueLOONG64_OpLOONG64SLLconst(v *Value) bool {
  6979  	v_0 := v.Args[0]
  6980  	// match: (SLLconst <t> [c] (ADDV x x))
  6981  	// cond: c < t.Size() * 8 - 1
  6982  	// result: (SLLconst [c+1] x)
  6983  	for {
  6984  		t := v.Type
  6985  		c := auxIntToInt64(v.AuxInt)
  6986  		if v_0.Op != OpLOONG64ADDV {
  6987  			break
  6988  		}
  6989  		x := v_0.Args[1]
  6990  		if x != v_0.Args[0] || !(c < t.Size()*8-1) {
  6991  			break
  6992  		}
  6993  		v.reset(OpLOONG64SLLconst)
  6994  		v.AuxInt = int64ToAuxInt(c + 1)
  6995  		v.AddArg(x)
  6996  		return true
  6997  	}
  6998  	// match: (SLLconst <t> [c] (ADDV x x))
  6999  	// cond: c >= t.Size() * 8 - 1
  7000  	// result: (MOVVconst [0])
  7001  	for {
  7002  		t := v.Type
  7003  		c := auxIntToInt64(v.AuxInt)
  7004  		if v_0.Op != OpLOONG64ADDV {
  7005  			break
  7006  		}
  7007  		x := v_0.Args[1]
  7008  		if x != v_0.Args[0] || !(c >= t.Size()*8-1) {
  7009  			break
  7010  		}
  7011  		v.reset(OpLOONG64MOVVconst)
  7012  		v.AuxInt = int64ToAuxInt(0)
  7013  		return true
  7014  	}
  7015  	return false
  7016  }
  7017  func rewriteValueLOONG64_OpLOONG64SRA(v *Value) bool {
  7018  	v_1 := v.Args[1]
  7019  	v_0 := v.Args[0]
  7020  	// match: (SRA x (MOVVconst [c]))
  7021  	// cond: uint64(c)>=32
  7022  	// result: (SRAconst x [31])
  7023  	for {
  7024  		x := v_0
  7025  		if v_1.Op != OpLOONG64MOVVconst {
  7026  			break
  7027  		}
  7028  		c := auxIntToInt64(v_1.AuxInt)
  7029  		if !(uint64(c) >= 32) {
  7030  			break
  7031  		}
  7032  		v.reset(OpLOONG64SRAconst)
  7033  		v.AuxInt = int64ToAuxInt(31)
  7034  		v.AddArg(x)
  7035  		return true
  7036  	}
  7037  	// match: (SRA x (MOVVconst [c]))
  7038  	// cond: uint64(c) >=0 && uint64(c) <=31
  7039  	// result: (SRAconst x [c])
  7040  	for {
  7041  		x := v_0
  7042  		if v_1.Op != OpLOONG64MOVVconst {
  7043  			break
  7044  		}
  7045  		c := auxIntToInt64(v_1.AuxInt)
  7046  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  7047  			break
  7048  		}
  7049  		v.reset(OpLOONG64SRAconst)
  7050  		v.AuxInt = int64ToAuxInt(c)
  7051  		v.AddArg(x)
  7052  		return true
  7053  	}
  7054  	// match: (SRA x (ANDconst [31] y))
  7055  	// result: (SRA x y)
  7056  	for {
  7057  		x := v_0
  7058  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 31 {
  7059  			break
  7060  		}
  7061  		y := v_1.Args[0]
  7062  		v.reset(OpLOONG64SRA)
  7063  		v.AddArg2(x, y)
  7064  		return true
  7065  	}
  7066  	return false
  7067  }
  7068  func rewriteValueLOONG64_OpLOONG64SRAV(v *Value) bool {
  7069  	v_1 := v.Args[1]
  7070  	v_0 := v.Args[0]
  7071  	// match: (SRAV x (MOVVconst [c]))
  7072  	// cond: uint64(c)>=64
  7073  	// result: (SRAVconst x [63])
  7074  	for {
  7075  		x := v_0
  7076  		if v_1.Op != OpLOONG64MOVVconst {
  7077  			break
  7078  		}
  7079  		c := auxIntToInt64(v_1.AuxInt)
  7080  		if !(uint64(c) >= 64) {
  7081  			break
  7082  		}
  7083  		v.reset(OpLOONG64SRAVconst)
  7084  		v.AuxInt = int64ToAuxInt(63)
  7085  		v.AddArg(x)
  7086  		return true
  7087  	}
  7088  	// match: (SRAV x (MOVVconst [c]))
  7089  	// result: (SRAVconst x [c])
  7090  	for {
  7091  		x := v_0
  7092  		if v_1.Op != OpLOONG64MOVVconst {
  7093  			break
  7094  		}
  7095  		c := auxIntToInt64(v_1.AuxInt)
  7096  		v.reset(OpLOONG64SRAVconst)
  7097  		v.AuxInt = int64ToAuxInt(c)
  7098  		v.AddArg(x)
  7099  		return true
  7100  	}
  7101  	// match: (SRAV x (ANDconst [63] y))
  7102  	// result: (SRAV x y)
  7103  	for {
  7104  		x := v_0
  7105  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
  7106  			break
  7107  		}
  7108  		y := v_1.Args[0]
  7109  		v.reset(OpLOONG64SRAV)
  7110  		v.AddArg2(x, y)
  7111  		return true
  7112  	}
  7113  	return false
  7114  }
  7115  func rewriteValueLOONG64_OpLOONG64SRAVconst(v *Value) bool {
  7116  	v_0 := v.Args[0]
  7117  	b := v.Block
  7118  	// match: (SRAVconst [rc] (MOVWreg y))
  7119  	// cond: rc >= 0 && rc <= 31
  7120  	// result: (SRAconst [int64(rc)] y)
  7121  	for {
  7122  		rc := auxIntToInt64(v.AuxInt)
  7123  		if v_0.Op != OpLOONG64MOVWreg {
  7124  			break
  7125  		}
  7126  		y := v_0.Args[0]
  7127  		if !(rc >= 0 && rc <= 31) {
  7128  			break
  7129  		}
  7130  		v.reset(OpLOONG64SRAconst)
  7131  		v.AuxInt = int64ToAuxInt(int64(rc))
  7132  		v.AddArg(y)
  7133  		return true
  7134  	}
  7135  	// match: (SRAVconst <t> [rc] (MOVBreg y))
  7136  	// cond: rc >= 8
  7137  	// result: (SRAVconst [63] (SLLVconst <t> [56] y))
  7138  	for {
  7139  		t := v.Type
  7140  		rc := auxIntToInt64(v.AuxInt)
  7141  		if v_0.Op != OpLOONG64MOVBreg {
  7142  			break
  7143  		}
  7144  		y := v_0.Args[0]
  7145  		if !(rc >= 8) {
  7146  			break
  7147  		}
  7148  		v.reset(OpLOONG64SRAVconst)
  7149  		v.AuxInt = int64ToAuxInt(63)
  7150  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, t)
  7151  		v0.AuxInt = int64ToAuxInt(56)
  7152  		v0.AddArg(y)
  7153  		v.AddArg(v0)
  7154  		return true
  7155  	}
  7156  	// match: (SRAVconst <t> [rc] (MOVHreg y))
  7157  	// cond: rc >= 16
  7158  	// result: (SRAVconst [63] (SLLVconst <t> [48] y))
  7159  	for {
  7160  		t := v.Type
  7161  		rc := auxIntToInt64(v.AuxInt)
  7162  		if v_0.Op != OpLOONG64MOVHreg {
  7163  			break
  7164  		}
  7165  		y := v_0.Args[0]
  7166  		if !(rc >= 16) {
  7167  			break
  7168  		}
  7169  		v.reset(OpLOONG64SRAVconst)
  7170  		v.AuxInt = int64ToAuxInt(63)
  7171  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, t)
  7172  		v0.AuxInt = int64ToAuxInt(48)
  7173  		v0.AddArg(y)
  7174  		v.AddArg(v0)
  7175  		return true
  7176  	}
  7177  	// match: (SRAVconst <t> [rc] (MOVWreg y))
  7178  	// cond: rc >= 32
  7179  	// result: (SRAconst [31] y)
  7180  	for {
  7181  		rc := auxIntToInt64(v.AuxInt)
  7182  		if v_0.Op != OpLOONG64MOVWreg {
  7183  			break
  7184  		}
  7185  		y := v_0.Args[0]
  7186  		if !(rc >= 32) {
  7187  			break
  7188  		}
  7189  		v.reset(OpLOONG64SRAconst)
  7190  		v.AuxInt = int64ToAuxInt(31)
  7191  		v.AddArg(y)
  7192  		return true
  7193  	}
  7194  	// match: (SRAVconst [c] (MOVVconst [d]))
  7195  	// result: (MOVVconst [d>>uint64(c)])
  7196  	for {
  7197  		c := auxIntToInt64(v.AuxInt)
  7198  		if v_0.Op != OpLOONG64MOVVconst {
  7199  			break
  7200  		}
  7201  		d := auxIntToInt64(v_0.AuxInt)
  7202  		v.reset(OpLOONG64MOVVconst)
  7203  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
  7204  		return true
  7205  	}
  7206  	return false
  7207  }
  7208  func rewriteValueLOONG64_OpLOONG64SRL(v *Value) bool {
  7209  	v_1 := v.Args[1]
  7210  	v_0 := v.Args[0]
  7211  	// match: (SRL _ (MOVVconst [c]))
  7212  	// cond: uint64(c)>=32
  7213  	// result: (MOVVconst [0])
  7214  	for {
  7215  		if v_1.Op != OpLOONG64MOVVconst {
  7216  			break
  7217  		}
  7218  		c := auxIntToInt64(v_1.AuxInt)
  7219  		if !(uint64(c) >= 32) {
  7220  			break
  7221  		}
  7222  		v.reset(OpLOONG64MOVVconst)
  7223  		v.AuxInt = int64ToAuxInt(0)
  7224  		return true
  7225  	}
  7226  	// match: (SRL x (MOVVconst [c]))
  7227  	// cond: uint64(c) >=0 && uint64(c) <=31
  7228  	// result: (SRLconst x [c])
  7229  	for {
  7230  		x := v_0
  7231  		if v_1.Op != OpLOONG64MOVVconst {
  7232  			break
  7233  		}
  7234  		c := auxIntToInt64(v_1.AuxInt)
  7235  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  7236  			break
  7237  		}
  7238  		v.reset(OpLOONG64SRLconst)
  7239  		v.AuxInt = int64ToAuxInt(c)
  7240  		v.AddArg(x)
  7241  		return true
  7242  	}
  7243  	// match: (SRL x (ANDconst [31] y))
  7244  	// result: (SRL x y)
  7245  	for {
  7246  		x := v_0
  7247  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 31 {
  7248  			break
  7249  		}
  7250  		y := v_1.Args[0]
  7251  		v.reset(OpLOONG64SRL)
  7252  		v.AddArg2(x, y)
  7253  		return true
  7254  	}
  7255  	return false
  7256  }
  7257  func rewriteValueLOONG64_OpLOONG64SRLV(v *Value) bool {
  7258  	v_1 := v.Args[1]
  7259  	v_0 := v.Args[0]
  7260  	// match: (SRLV _ (MOVVconst [c]))
  7261  	// cond: uint64(c)>=64
  7262  	// result: (MOVVconst [0])
  7263  	for {
  7264  		if v_1.Op != OpLOONG64MOVVconst {
  7265  			break
  7266  		}
  7267  		c := auxIntToInt64(v_1.AuxInt)
  7268  		if !(uint64(c) >= 64) {
  7269  			break
  7270  		}
  7271  		v.reset(OpLOONG64MOVVconst)
  7272  		v.AuxInt = int64ToAuxInt(0)
  7273  		return true
  7274  	}
  7275  	// match: (SRLV x (MOVVconst [c]))
  7276  	// result: (SRLVconst x [c])
  7277  	for {
  7278  		x := v_0
  7279  		if v_1.Op != OpLOONG64MOVVconst {
  7280  			break
  7281  		}
  7282  		c := auxIntToInt64(v_1.AuxInt)
  7283  		v.reset(OpLOONG64SRLVconst)
  7284  		v.AuxInt = int64ToAuxInt(c)
  7285  		v.AddArg(x)
  7286  		return true
  7287  	}
  7288  	// match: (SRLV x (ANDconst [63] y))
  7289  	// result: (SRLV x y)
  7290  	for {
  7291  		x := v_0
  7292  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
  7293  			break
  7294  		}
  7295  		y := v_1.Args[0]
  7296  		v.reset(OpLOONG64SRLV)
  7297  		v.AddArg2(x, y)
  7298  		return true
  7299  	}
  7300  	return false
  7301  }
  7302  func rewriteValueLOONG64_OpLOONG64SRLVconst(v *Value) bool {
  7303  	v_0 := v.Args[0]
  7304  	// match: (SRLVconst [rc] (SLLVconst [lc] x))
  7305  	// cond: lc <= rc
  7306  	// result: (BSTRPICKV [rc-lc + ((64-lc)-1)<<6] x)
  7307  	for {
  7308  		rc := auxIntToInt64(v.AuxInt)
  7309  		if v_0.Op != OpLOONG64SLLVconst {
  7310  			break
  7311  		}
  7312  		lc := auxIntToInt64(v_0.AuxInt)
  7313  		x := v_0.Args[0]
  7314  		if !(lc <= rc) {
  7315  			break
  7316  		}
  7317  		v.reset(OpLOONG64BSTRPICKV)
  7318  		v.AuxInt = int64ToAuxInt(rc - lc + ((64-lc)-1)<<6)
  7319  		v.AddArg(x)
  7320  		return true
  7321  	}
  7322  	// match: (SRLVconst [rc] (MOVWUreg x))
  7323  	// cond: rc < 32
  7324  	// result: (BSTRPICKV [rc + 31<<6] x)
  7325  	for {
  7326  		rc := auxIntToInt64(v.AuxInt)
  7327  		if v_0.Op != OpLOONG64MOVWUreg {
  7328  			break
  7329  		}
  7330  		x := v_0.Args[0]
  7331  		if !(rc < 32) {
  7332  			break
  7333  		}
  7334  		v.reset(OpLOONG64BSTRPICKV)
  7335  		v.AuxInt = int64ToAuxInt(rc + 31<<6)
  7336  		v.AddArg(x)
  7337  		return true
  7338  	}
  7339  	// match: (SRLVconst [rc] (MOVHUreg x))
  7340  	// cond: rc < 16
  7341  	// result: (BSTRPICKV [rc + 15<<6] x)
  7342  	for {
  7343  		rc := auxIntToInt64(v.AuxInt)
  7344  		if v_0.Op != OpLOONG64MOVHUreg {
  7345  			break
  7346  		}
  7347  		x := v_0.Args[0]
  7348  		if !(rc < 16) {
  7349  			break
  7350  		}
  7351  		v.reset(OpLOONG64BSTRPICKV)
  7352  		v.AuxInt = int64ToAuxInt(rc + 15<<6)
  7353  		v.AddArg(x)
  7354  		return true
  7355  	}
  7356  	// match: (SRLVconst [rc] (MOVBUreg x))
  7357  	// cond: rc < 8
  7358  	// result: (BSTRPICKV [rc + 7<<6] x)
  7359  	for {
  7360  		rc := auxIntToInt64(v.AuxInt)
  7361  		if v_0.Op != OpLOONG64MOVBUreg {
  7362  			break
  7363  		}
  7364  		x := v_0.Args[0]
  7365  		if !(rc < 8) {
  7366  			break
  7367  		}
  7368  		v.reset(OpLOONG64BSTRPICKV)
  7369  		v.AuxInt = int64ToAuxInt(rc + 7<<6)
  7370  		v.AddArg(x)
  7371  		return true
  7372  	}
  7373  	// match: (SRLVconst [rc] (MOVWUreg y))
  7374  	// cond: rc >= 0 && rc <= 31
  7375  	// result: (SRLconst [int64(rc)] y)
  7376  	for {
  7377  		rc := auxIntToInt64(v.AuxInt)
  7378  		if v_0.Op != OpLOONG64MOVWUreg {
  7379  			break
  7380  		}
  7381  		y := v_0.Args[0]
  7382  		if !(rc >= 0 && rc <= 31) {
  7383  			break
  7384  		}
  7385  		v.reset(OpLOONG64SRLconst)
  7386  		v.AuxInt = int64ToAuxInt(int64(rc))
  7387  		v.AddArg(y)
  7388  		return true
  7389  	}
  7390  	// match: (SRLVconst [rc] (MOVWUreg x))
  7391  	// cond: rc >= 32
  7392  	// result: (MOVVconst [0])
  7393  	for {
  7394  		rc := auxIntToInt64(v.AuxInt)
  7395  		if v_0.Op != OpLOONG64MOVWUreg {
  7396  			break
  7397  		}
  7398  		if !(rc >= 32) {
  7399  			break
  7400  		}
  7401  		v.reset(OpLOONG64MOVVconst)
  7402  		v.AuxInt = int64ToAuxInt(0)
  7403  		return true
  7404  	}
  7405  	// match: (SRLVconst [rc] (MOVHUreg x))
  7406  	// cond: rc >= 16
  7407  	// result: (MOVVconst [0])
  7408  	for {
  7409  		rc := auxIntToInt64(v.AuxInt)
  7410  		if v_0.Op != OpLOONG64MOVHUreg {
  7411  			break
  7412  		}
  7413  		if !(rc >= 16) {
  7414  			break
  7415  		}
  7416  		v.reset(OpLOONG64MOVVconst)
  7417  		v.AuxInt = int64ToAuxInt(0)
  7418  		return true
  7419  	}
  7420  	// match: (SRLVconst [rc] (MOVBUreg x))
  7421  	// cond: rc >= 8
  7422  	// result: (MOVVconst [0])
  7423  	for {
  7424  		rc := auxIntToInt64(v.AuxInt)
  7425  		if v_0.Op != OpLOONG64MOVBUreg {
  7426  			break
  7427  		}
  7428  		if !(rc >= 8) {
  7429  			break
  7430  		}
  7431  		v.reset(OpLOONG64MOVVconst)
  7432  		v.AuxInt = int64ToAuxInt(0)
  7433  		return true
  7434  	}
  7435  	// match: (SRLVconst [c] (MOVVconst [d]))
  7436  	// result: (MOVVconst [int64(uint64(d)>>uint64(c))])
  7437  	for {
  7438  		c := auxIntToInt64(v.AuxInt)
  7439  		if v_0.Op != OpLOONG64MOVVconst {
  7440  			break
  7441  		}
  7442  		d := auxIntToInt64(v_0.AuxInt)
  7443  		v.reset(OpLOONG64MOVVconst)
  7444  		v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
  7445  		return true
  7446  	}
  7447  	return false
  7448  }
  7449  func rewriteValueLOONG64_OpLOONG64SUBD(v *Value) bool {
  7450  	v_1 := v.Args[1]
  7451  	v_0 := v.Args[0]
  7452  	// match: (SUBD (MULD x y) z)
  7453  	// cond: z.Block.Func.useFMA(v)
  7454  	// result: (FMSUBD x y z)
  7455  	for {
  7456  		if v_0.Op != OpLOONG64MULD {
  7457  			break
  7458  		}
  7459  		y := v_0.Args[1]
  7460  		x := v_0.Args[0]
  7461  		z := v_1
  7462  		if !(z.Block.Func.useFMA(v)) {
  7463  			break
  7464  		}
  7465  		v.reset(OpLOONG64FMSUBD)
  7466  		v.AddArg3(x, y, z)
  7467  		return true
  7468  	}
  7469  	// match: (SUBD z (MULD x y))
  7470  	// cond: z.Block.Func.useFMA(v)
  7471  	// result: (FNMSUBD x y z)
  7472  	for {
  7473  		z := v_0
  7474  		if v_1.Op != OpLOONG64MULD {
  7475  			break
  7476  		}
  7477  		y := v_1.Args[1]
  7478  		x := v_1.Args[0]
  7479  		if !(z.Block.Func.useFMA(v)) {
  7480  			break
  7481  		}
  7482  		v.reset(OpLOONG64FNMSUBD)
  7483  		v.AddArg3(x, y, z)
  7484  		return true
  7485  	}
  7486  	// match: (SUBD z (NEGD (MULD x y)))
  7487  	// cond: z.Block.Func.useFMA(v)
  7488  	// result: (FMADDD x y z)
  7489  	for {
  7490  		z := v_0
  7491  		if v_1.Op != OpLOONG64NEGD {
  7492  			break
  7493  		}
  7494  		v_1_0 := v_1.Args[0]
  7495  		if v_1_0.Op != OpLOONG64MULD {
  7496  			break
  7497  		}
  7498  		y := v_1_0.Args[1]
  7499  		x := v_1_0.Args[0]
  7500  		if !(z.Block.Func.useFMA(v)) {
  7501  			break
  7502  		}
  7503  		v.reset(OpLOONG64FMADDD)
  7504  		v.AddArg3(x, y, z)
  7505  		return true
  7506  	}
  7507  	// match: (SUBD (NEGD (MULD x y)) z)
  7508  	// cond: z.Block.Func.useFMA(v)
  7509  	// result: (FNMADDD x y z)
  7510  	for {
  7511  		if v_0.Op != OpLOONG64NEGD {
  7512  			break
  7513  		}
  7514  		v_0_0 := v_0.Args[0]
  7515  		if v_0_0.Op != OpLOONG64MULD {
  7516  			break
  7517  		}
  7518  		y := v_0_0.Args[1]
  7519  		x := v_0_0.Args[0]
  7520  		z := v_1
  7521  		if !(z.Block.Func.useFMA(v)) {
  7522  			break
  7523  		}
  7524  		v.reset(OpLOONG64FNMADDD)
  7525  		v.AddArg3(x, y, z)
  7526  		return true
  7527  	}
  7528  	return false
  7529  }
  7530  func rewriteValueLOONG64_OpLOONG64SUBF(v *Value) bool {
  7531  	v_1 := v.Args[1]
  7532  	v_0 := v.Args[0]
  7533  	// match: (SUBF (MULF x y) z)
  7534  	// cond: z.Block.Func.useFMA(v)
  7535  	// result: (FMSUBF x y z)
  7536  	for {
  7537  		if v_0.Op != OpLOONG64MULF {
  7538  			break
  7539  		}
  7540  		y := v_0.Args[1]
  7541  		x := v_0.Args[0]
  7542  		z := v_1
  7543  		if !(z.Block.Func.useFMA(v)) {
  7544  			break
  7545  		}
  7546  		v.reset(OpLOONG64FMSUBF)
  7547  		v.AddArg3(x, y, z)
  7548  		return true
  7549  	}
  7550  	// match: (SUBF z (MULF x y))
  7551  	// cond: z.Block.Func.useFMA(v)
  7552  	// result: (FNMSUBF x y z)
  7553  	for {
  7554  		z := v_0
  7555  		if v_1.Op != OpLOONG64MULF {
  7556  			break
  7557  		}
  7558  		y := v_1.Args[1]
  7559  		x := v_1.Args[0]
  7560  		if !(z.Block.Func.useFMA(v)) {
  7561  			break
  7562  		}
  7563  		v.reset(OpLOONG64FNMSUBF)
  7564  		v.AddArg3(x, y, z)
  7565  		return true
  7566  	}
  7567  	// match: (SUBF z (NEGF (MULF x y)))
  7568  	// cond: z.Block.Func.useFMA(v)
  7569  	// result: (FMADDF x y z)
  7570  	for {
  7571  		z := v_0
  7572  		if v_1.Op != OpLOONG64NEGF {
  7573  			break
  7574  		}
  7575  		v_1_0 := v_1.Args[0]
  7576  		if v_1_0.Op != OpLOONG64MULF {
  7577  			break
  7578  		}
  7579  		y := v_1_0.Args[1]
  7580  		x := v_1_0.Args[0]
  7581  		if !(z.Block.Func.useFMA(v)) {
  7582  			break
  7583  		}
  7584  		v.reset(OpLOONG64FMADDF)
  7585  		v.AddArg3(x, y, z)
  7586  		return true
  7587  	}
  7588  	// match: (SUBF (NEGF (MULF x y)) z)
  7589  	// cond: z.Block.Func.useFMA(v)
  7590  	// result: (FNMADDF x y z)
  7591  	for {
  7592  		if v_0.Op != OpLOONG64NEGF {
  7593  			break
  7594  		}
  7595  		v_0_0 := v_0.Args[0]
  7596  		if v_0_0.Op != OpLOONG64MULF {
  7597  			break
  7598  		}
  7599  		y := v_0_0.Args[1]
  7600  		x := v_0_0.Args[0]
  7601  		z := v_1
  7602  		if !(z.Block.Func.useFMA(v)) {
  7603  			break
  7604  		}
  7605  		v.reset(OpLOONG64FNMADDF)
  7606  		v.AddArg3(x, y, z)
  7607  		return true
  7608  	}
  7609  	return false
  7610  }
  7611  func rewriteValueLOONG64_OpLOONG64SUBV(v *Value) bool {
  7612  	v_1 := v.Args[1]
  7613  	v_0 := v.Args[0]
  7614  	// match: (SUBV x (MOVVconst [c]))
  7615  	// cond: is32Bit(c)
  7616  	// result: (SUBVconst [c] x)
  7617  	for {
  7618  		x := v_0
  7619  		if v_1.Op != OpLOONG64MOVVconst {
  7620  			break
  7621  		}
  7622  		c := auxIntToInt64(v_1.AuxInt)
  7623  		if !(is32Bit(c)) {
  7624  			break
  7625  		}
  7626  		v.reset(OpLOONG64SUBVconst)
  7627  		v.AuxInt = int64ToAuxInt(c)
  7628  		v.AddArg(x)
  7629  		return true
  7630  	}
  7631  	// match: (SUBV x (NEGV y))
  7632  	// result: (ADDV x y)
  7633  	for {
  7634  		x := v_0
  7635  		if v_1.Op != OpLOONG64NEGV {
  7636  			break
  7637  		}
  7638  		y := v_1.Args[0]
  7639  		v.reset(OpLOONG64ADDV)
  7640  		v.AddArg2(x, y)
  7641  		return true
  7642  	}
  7643  	// match: (SUBV x x)
  7644  	// result: (MOVVconst [0])
  7645  	for {
  7646  		x := v_0
  7647  		if x != v_1 {
  7648  			break
  7649  		}
  7650  		v.reset(OpLOONG64MOVVconst)
  7651  		v.AuxInt = int64ToAuxInt(0)
  7652  		return true
  7653  	}
  7654  	// match: (SUBV (MOVVconst [0]) x)
  7655  	// result: (NEGV x)
  7656  	for {
  7657  		if v_0.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7658  			break
  7659  		}
  7660  		x := v_1
  7661  		v.reset(OpLOONG64NEGV)
  7662  		v.AddArg(x)
  7663  		return true
  7664  	}
  7665  	// match: (SUBV (MOVVconst [c]) (NEGV (SUBVconst [d] x)))
  7666  	// result: (ADDVconst [c-d] x)
  7667  	for {
  7668  		if v_0.Op != OpLOONG64MOVVconst {
  7669  			break
  7670  		}
  7671  		c := auxIntToInt64(v_0.AuxInt)
  7672  		if v_1.Op != OpLOONG64NEGV {
  7673  			break
  7674  		}
  7675  		v_1_0 := v_1.Args[0]
  7676  		if v_1_0.Op != OpLOONG64SUBVconst {
  7677  			break
  7678  		}
  7679  		d := auxIntToInt64(v_1_0.AuxInt)
  7680  		x := v_1_0.Args[0]
  7681  		v.reset(OpLOONG64ADDVconst)
  7682  		v.AuxInt = int64ToAuxInt(c - d)
  7683  		v.AddArg(x)
  7684  		return true
  7685  	}
  7686  	return false
  7687  }
  7688  func rewriteValueLOONG64_OpLOONG64SUBVconst(v *Value) bool {
  7689  	v_0 := v.Args[0]
  7690  	// match: (SUBVconst [0] x)
  7691  	// result: x
  7692  	for {
  7693  		if auxIntToInt64(v.AuxInt) != 0 {
  7694  			break
  7695  		}
  7696  		x := v_0
  7697  		v.copyOf(x)
  7698  		return true
  7699  	}
  7700  	// match: (SUBVconst [c] (MOVVconst [d]))
  7701  	// result: (MOVVconst [d-c])
  7702  	for {
  7703  		c := auxIntToInt64(v.AuxInt)
  7704  		if v_0.Op != OpLOONG64MOVVconst {
  7705  			break
  7706  		}
  7707  		d := auxIntToInt64(v_0.AuxInt)
  7708  		v.reset(OpLOONG64MOVVconst)
  7709  		v.AuxInt = int64ToAuxInt(d - c)
  7710  		return true
  7711  	}
  7712  	// match: (SUBVconst [c] (SUBVconst [d] x))
  7713  	// cond: is32Bit(-c-d)
  7714  	// result: (ADDVconst [-c-d] x)
  7715  	for {
  7716  		c := auxIntToInt64(v.AuxInt)
  7717  		if v_0.Op != OpLOONG64SUBVconst {
  7718  			break
  7719  		}
  7720  		d := auxIntToInt64(v_0.AuxInt)
  7721  		x := v_0.Args[0]
  7722  		if !(is32Bit(-c - d)) {
  7723  			break
  7724  		}
  7725  		v.reset(OpLOONG64ADDVconst)
  7726  		v.AuxInt = int64ToAuxInt(-c - d)
  7727  		v.AddArg(x)
  7728  		return true
  7729  	}
  7730  	// match: (SUBVconst [c] (ADDVconst [d] x))
  7731  	// cond: is32Bit(-c+d)
  7732  	// result: (ADDVconst [-c+d] x)
  7733  	for {
  7734  		c := auxIntToInt64(v.AuxInt)
  7735  		if v_0.Op != OpLOONG64ADDVconst {
  7736  			break
  7737  		}
  7738  		d := auxIntToInt64(v_0.AuxInt)
  7739  		x := v_0.Args[0]
  7740  		if !(is32Bit(-c + d)) {
  7741  			break
  7742  		}
  7743  		v.reset(OpLOONG64ADDVconst)
  7744  		v.AuxInt = int64ToAuxInt(-c + d)
  7745  		v.AddArg(x)
  7746  		return true
  7747  	}
  7748  	return false
  7749  }
  7750  func rewriteValueLOONG64_OpLOONG64XOR(v *Value) bool {
  7751  	v_1 := v.Args[1]
  7752  	v_0 := v.Args[0]
  7753  	b := v.Block
  7754  	typ := &b.Func.Config.Types
  7755  	// match: (XOR <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  7756  	// result: (REVB2H x)
  7757  	for {
  7758  		if v.Type != typ.UInt16 {
  7759  			break
  7760  		}
  7761  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7762  			if v_0.Op != OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || auxIntToInt64(v_0.AuxInt) != 8 {
  7763  				continue
  7764  			}
  7765  			x := v_0.Args[0]
  7766  			if v_1.Op != OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || auxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  7767  				continue
  7768  			}
  7769  			v.reset(OpLOONG64REVB2H)
  7770  			v.AddArg(x)
  7771  			return true
  7772  		}
  7773  		break
  7774  	}
  7775  	// match: (XOR (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  7776  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  7777  	// result: (REVB2H x)
  7778  	for {
  7779  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7780  			if v_0.Op != OpLOONG64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  7781  				continue
  7782  			}
  7783  			v_0_0 := v_0.Args[0]
  7784  			if v_0_0.Op != OpLOONG64ANDconst {
  7785  				continue
  7786  			}
  7787  			c1 := auxIntToInt64(v_0_0.AuxInt)
  7788  			x := v_0_0.Args[0]
  7789  			if v_1.Op != OpLOONG64SLLconst || auxIntToInt64(v_1.AuxInt) != 8 {
  7790  				continue
  7791  			}
  7792  			v_1_0 := v_1.Args[0]
  7793  			if v_1_0.Op != OpLOONG64ANDconst {
  7794  				continue
  7795  			}
  7796  			c2 := auxIntToInt64(v_1_0.AuxInt)
  7797  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  7798  				continue
  7799  			}
  7800  			v.reset(OpLOONG64REVB2H)
  7801  			v.AddArg(x)
  7802  			return true
  7803  		}
  7804  		break
  7805  	}
  7806  	// match: (XOR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  7807  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  7808  	// result: (REVB4H x)
  7809  	for {
  7810  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7811  			if v_0.Op != OpLOONG64SRLVconst || auxIntToInt64(v_0.AuxInt) != 8 {
  7812  				continue
  7813  			}
  7814  			v_0_0 := v_0.Args[0]
  7815  			if v_0_0.Op != OpLOONG64AND {
  7816  				continue
  7817  			}
  7818  			_ = v_0_0.Args[1]
  7819  			v_0_0_0 := v_0_0.Args[0]
  7820  			v_0_0_1 := v_0_0.Args[1]
  7821  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  7822  				if v_0_0_0.Op != OpLOONG64MOVVconst {
  7823  					continue
  7824  				}
  7825  				c1 := auxIntToInt64(v_0_0_0.AuxInt)
  7826  				x := v_0_0_1
  7827  				if v_1.Op != OpLOONG64SLLVconst || auxIntToInt64(v_1.AuxInt) != 8 {
  7828  					continue
  7829  				}
  7830  				v_1_0 := v_1.Args[0]
  7831  				if v_1_0.Op != OpLOONG64AND {
  7832  					continue
  7833  				}
  7834  				_ = v_1_0.Args[1]
  7835  				v_1_0_0 := v_1_0.Args[0]
  7836  				v_1_0_1 := v_1_0.Args[1]
  7837  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  7838  					if v_1_0_0.Op != OpLOONG64MOVVconst {
  7839  						continue
  7840  					}
  7841  					c2 := auxIntToInt64(v_1_0_0.AuxInt)
  7842  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  7843  						continue
  7844  					}
  7845  					v.reset(OpLOONG64REVB4H)
  7846  					v.AddArg(x)
  7847  					return true
  7848  				}
  7849  			}
  7850  		}
  7851  		break
  7852  	}
  7853  	// match: (XOR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  7854  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  7855  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  7856  	for {
  7857  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7858  			if v_0.Op != OpLOONG64SRLVconst || auxIntToInt64(v_0.AuxInt) != 8 {
  7859  				continue
  7860  			}
  7861  			v_0_0 := v_0.Args[0]
  7862  			if v_0_0.Op != OpLOONG64AND {
  7863  				continue
  7864  			}
  7865  			_ = v_0_0.Args[1]
  7866  			v_0_0_0 := v_0_0.Args[0]
  7867  			v_0_0_1 := v_0_0.Args[1]
  7868  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  7869  				if v_0_0_0.Op != OpLOONG64MOVVconst {
  7870  					continue
  7871  				}
  7872  				c1 := auxIntToInt64(v_0_0_0.AuxInt)
  7873  				x := v_0_0_1
  7874  				if v_1.Op != OpLOONG64SLLVconst || auxIntToInt64(v_1.AuxInt) != 8 {
  7875  					continue
  7876  				}
  7877  				v_1_0 := v_1.Args[0]
  7878  				if v_1_0.Op != OpLOONG64ANDconst {
  7879  					continue
  7880  				}
  7881  				c2 := auxIntToInt64(v_1_0.AuxInt)
  7882  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  7883  					continue
  7884  				}
  7885  				v.reset(OpLOONG64REVB4H)
  7886  				v0 := b.NewValue0(v.Pos, OpLOONG64ANDconst, x.Type)
  7887  				v0.AuxInt = int64ToAuxInt(0xffffffff)
  7888  				v0.AddArg(x)
  7889  				v.AddArg(v0)
  7890  				return true
  7891  			}
  7892  		}
  7893  		break
  7894  	}
  7895  	// match: (XOR x (MOVVconst [c]))
  7896  	// cond: is32Bit(c)
  7897  	// result: (XORconst [c] x)
  7898  	for {
  7899  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7900  			x := v_0
  7901  			if v_1.Op != OpLOONG64MOVVconst {
  7902  				continue
  7903  			}
  7904  			c := auxIntToInt64(v_1.AuxInt)
  7905  			if !(is32Bit(c)) {
  7906  				continue
  7907  			}
  7908  			v.reset(OpLOONG64XORconst)
  7909  			v.AuxInt = int64ToAuxInt(c)
  7910  			v.AddArg(x)
  7911  			return true
  7912  		}
  7913  		break
  7914  	}
  7915  	// match: (XOR x x)
  7916  	// result: (MOVVconst [0])
  7917  	for {
  7918  		x := v_0
  7919  		if x != v_1 {
  7920  			break
  7921  		}
  7922  		v.reset(OpLOONG64MOVVconst)
  7923  		v.AuxInt = int64ToAuxInt(0)
  7924  		return true
  7925  	}
  7926  	return false
  7927  }
  7928  func rewriteValueLOONG64_OpLOONG64XORconst(v *Value) bool {
  7929  	v_0 := v.Args[0]
  7930  	// match: (XORconst [0] x)
  7931  	// result: x
  7932  	for {
  7933  		if auxIntToInt64(v.AuxInt) != 0 {
  7934  			break
  7935  		}
  7936  		x := v_0
  7937  		v.copyOf(x)
  7938  		return true
  7939  	}
  7940  	// match: (XORconst [-1] x)
  7941  	// result: (NORconst [0] x)
  7942  	for {
  7943  		if auxIntToInt64(v.AuxInt) != -1 {
  7944  			break
  7945  		}
  7946  		x := v_0
  7947  		v.reset(OpLOONG64NORconst)
  7948  		v.AuxInt = int64ToAuxInt(0)
  7949  		v.AddArg(x)
  7950  		return true
  7951  	}
  7952  	// match: (XORconst [c] (MOVVconst [d]))
  7953  	// result: (MOVVconst [c^d])
  7954  	for {
  7955  		c := auxIntToInt64(v.AuxInt)
  7956  		if v_0.Op != OpLOONG64MOVVconst {
  7957  			break
  7958  		}
  7959  		d := auxIntToInt64(v_0.AuxInt)
  7960  		v.reset(OpLOONG64MOVVconst)
  7961  		v.AuxInt = int64ToAuxInt(c ^ d)
  7962  		return true
  7963  	}
  7964  	// match: (XORconst [c] (XORconst [d] x))
  7965  	// cond: is32Bit(c^d)
  7966  	// result: (XORconst [c^d] x)
  7967  	for {
  7968  		c := auxIntToInt64(v.AuxInt)
  7969  		if v_0.Op != OpLOONG64XORconst {
  7970  			break
  7971  		}
  7972  		d := auxIntToInt64(v_0.AuxInt)
  7973  		x := v_0.Args[0]
  7974  		if !(is32Bit(c ^ d)) {
  7975  			break
  7976  		}
  7977  		v.reset(OpLOONG64XORconst)
  7978  		v.AuxInt = int64ToAuxInt(c ^ d)
  7979  		v.AddArg(x)
  7980  		return true
  7981  	}
  7982  	return false
  7983  }
  7984  func rewriteValueLOONG64_OpLeq16(v *Value) bool {
  7985  	v_1 := v.Args[1]
  7986  	v_0 := v.Args[0]
  7987  	b := v.Block
  7988  	typ := &b.Func.Config.Types
  7989  	// match: (Leq16 x y)
  7990  	// result: (XOR (MOVVconst [1]) (SGT (SignExt16to64 x) (SignExt16to64 y)))
  7991  	for {
  7992  		x := v_0
  7993  		y := v_1
  7994  		v.reset(OpLOONG64XOR)
  7995  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  7996  		v0.AuxInt = int64ToAuxInt(1)
  7997  		v1 := b.NewValue0(v.Pos, OpLOONG64SGT, typ.Bool)
  7998  		v2 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  7999  		v2.AddArg(x)
  8000  		v3 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  8001  		v3.AddArg(y)
  8002  		v1.AddArg2(v2, v3)
  8003  		v.AddArg2(v0, v1)
  8004  		return true
  8005  	}
  8006  }
  8007  func rewriteValueLOONG64_OpLeq16U(v *Value) bool {
  8008  	v_1 := v.Args[1]
  8009  	v_0 := v.Args[0]
  8010  	b := v.Block
  8011  	typ := &b.Func.Config.Types
  8012  	// match: (Leq16U x y)
  8013  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt16to64 x) (ZeroExt16to64 y)))
  8014  	for {
  8015  		x := v_0
  8016  		y := v_1
  8017  		v.reset(OpLOONG64XOR)
  8018  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8019  		v0.AuxInt = int64ToAuxInt(1)
  8020  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8021  		v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8022  		v2.AddArg(x)
  8023  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8024  		v3.AddArg(y)
  8025  		v1.AddArg2(v2, v3)
  8026  		v.AddArg2(v0, v1)
  8027  		return true
  8028  	}
  8029  }
  8030  func rewriteValueLOONG64_OpLeq32(v *Value) bool {
  8031  	v_1 := v.Args[1]
  8032  	v_0 := v.Args[0]
  8033  	b := v.Block
  8034  	typ := &b.Func.Config.Types
  8035  	// match: (Leq32 x y)
  8036  	// result: (XOR (MOVVconst [1]) (SGT (SignExt32to64 x) (SignExt32to64 y)))
  8037  	for {
  8038  		x := v_0
  8039  		y := v_1
  8040  		v.reset(OpLOONG64XOR)
  8041  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8042  		v0.AuxInt = int64ToAuxInt(1)
  8043  		v1 := b.NewValue0(v.Pos, OpLOONG64SGT, typ.Bool)
  8044  		v2 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  8045  		v2.AddArg(x)
  8046  		v3 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  8047  		v3.AddArg(y)
  8048  		v1.AddArg2(v2, v3)
  8049  		v.AddArg2(v0, v1)
  8050  		return true
  8051  	}
  8052  }
  8053  func rewriteValueLOONG64_OpLeq32F(v *Value) bool {
  8054  	v_1 := v.Args[1]
  8055  	v_0 := v.Args[0]
  8056  	b := v.Block
  8057  	// match: (Leq32F x y)
  8058  	// result: (FPFlagTrue (CMPGEF y x))
  8059  	for {
  8060  		x := v_0
  8061  		y := v_1
  8062  		v.reset(OpLOONG64FPFlagTrue)
  8063  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPGEF, types.TypeFlags)
  8064  		v0.AddArg2(y, x)
  8065  		v.AddArg(v0)
  8066  		return true
  8067  	}
  8068  }
  8069  func rewriteValueLOONG64_OpLeq32U(v *Value) bool {
  8070  	v_1 := v.Args[1]
  8071  	v_0 := v.Args[0]
  8072  	b := v.Block
  8073  	typ := &b.Func.Config.Types
  8074  	// match: (Leq32U x y)
  8075  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt32to64 x) (ZeroExt32to64 y)))
  8076  	for {
  8077  		x := v_0
  8078  		y := v_1
  8079  		v.reset(OpLOONG64XOR)
  8080  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8081  		v0.AuxInt = int64ToAuxInt(1)
  8082  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8083  		v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8084  		v2.AddArg(x)
  8085  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8086  		v3.AddArg(y)
  8087  		v1.AddArg2(v2, v3)
  8088  		v.AddArg2(v0, v1)
  8089  		return true
  8090  	}
  8091  }
  8092  func rewriteValueLOONG64_OpLeq64(v *Value) bool {
  8093  	v_1 := v.Args[1]
  8094  	v_0 := v.Args[0]
  8095  	b := v.Block
  8096  	typ := &b.Func.Config.Types
  8097  	// match: (Leq64 x y)
  8098  	// result: (XOR (MOVVconst [1]) (SGT x y))
  8099  	for {
  8100  		x := v_0
  8101  		y := v_1
  8102  		v.reset(OpLOONG64XOR)
  8103  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8104  		v0.AuxInt = int64ToAuxInt(1)
  8105  		v1 := b.NewValue0(v.Pos, OpLOONG64SGT, typ.Bool)
  8106  		v1.AddArg2(x, y)
  8107  		v.AddArg2(v0, v1)
  8108  		return true
  8109  	}
  8110  }
  8111  func rewriteValueLOONG64_OpLeq64F(v *Value) bool {
  8112  	v_1 := v.Args[1]
  8113  	v_0 := v.Args[0]
  8114  	b := v.Block
  8115  	// match: (Leq64F x y)
  8116  	// result: (FPFlagTrue (CMPGED y x))
  8117  	for {
  8118  		x := v_0
  8119  		y := v_1
  8120  		v.reset(OpLOONG64FPFlagTrue)
  8121  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPGED, types.TypeFlags)
  8122  		v0.AddArg2(y, x)
  8123  		v.AddArg(v0)
  8124  		return true
  8125  	}
  8126  }
  8127  func rewriteValueLOONG64_OpLeq64U(v *Value) bool {
  8128  	v_1 := v.Args[1]
  8129  	v_0 := v.Args[0]
  8130  	b := v.Block
  8131  	typ := &b.Func.Config.Types
  8132  	// match: (Leq64U x y)
  8133  	// result: (XOR (MOVVconst [1]) (SGTU x y))
  8134  	for {
  8135  		x := v_0
  8136  		y := v_1
  8137  		v.reset(OpLOONG64XOR)
  8138  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8139  		v0.AuxInt = int64ToAuxInt(1)
  8140  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8141  		v1.AddArg2(x, y)
  8142  		v.AddArg2(v0, v1)
  8143  		return true
  8144  	}
  8145  }
  8146  func rewriteValueLOONG64_OpLeq8(v *Value) bool {
  8147  	v_1 := v.Args[1]
  8148  	v_0 := v.Args[0]
  8149  	b := v.Block
  8150  	typ := &b.Func.Config.Types
  8151  	// match: (Leq8 x y)
  8152  	// result: (XOR (MOVVconst [1]) (SGT (SignExt8to64 x) (SignExt8to64 y)))
  8153  	for {
  8154  		x := v_0
  8155  		y := v_1
  8156  		v.reset(OpLOONG64XOR)
  8157  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8158  		v0.AuxInt = int64ToAuxInt(1)
  8159  		v1 := b.NewValue0(v.Pos, OpLOONG64SGT, typ.Bool)
  8160  		v2 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  8161  		v2.AddArg(x)
  8162  		v3 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  8163  		v3.AddArg(y)
  8164  		v1.AddArg2(v2, v3)
  8165  		v.AddArg2(v0, v1)
  8166  		return true
  8167  	}
  8168  }
  8169  func rewriteValueLOONG64_OpLeq8U(v *Value) bool {
  8170  	v_1 := v.Args[1]
  8171  	v_0 := v.Args[0]
  8172  	b := v.Block
  8173  	typ := &b.Func.Config.Types
  8174  	// match: (Leq8U x y)
  8175  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt8to64 x) (ZeroExt8to64 y)))
  8176  	for {
  8177  		x := v_0
  8178  		y := v_1
  8179  		v.reset(OpLOONG64XOR)
  8180  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8181  		v0.AuxInt = int64ToAuxInt(1)
  8182  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8183  		v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8184  		v2.AddArg(x)
  8185  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8186  		v3.AddArg(y)
  8187  		v1.AddArg2(v2, v3)
  8188  		v.AddArg2(v0, v1)
  8189  		return true
  8190  	}
  8191  }
  8192  func rewriteValueLOONG64_OpLess16(v *Value) bool {
  8193  	v_1 := v.Args[1]
  8194  	v_0 := v.Args[0]
  8195  	b := v.Block
  8196  	typ := &b.Func.Config.Types
  8197  	// match: (Less16 x y)
  8198  	// result: (SGT (SignExt16to64 y) (SignExt16to64 x))
  8199  	for {
  8200  		x := v_0
  8201  		y := v_1
  8202  		v.reset(OpLOONG64SGT)
  8203  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  8204  		v0.AddArg(y)
  8205  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  8206  		v1.AddArg(x)
  8207  		v.AddArg2(v0, v1)
  8208  		return true
  8209  	}
  8210  }
  8211  func rewriteValueLOONG64_OpLess16U(v *Value) bool {
  8212  	v_1 := v.Args[1]
  8213  	v_0 := v.Args[0]
  8214  	b := v.Block
  8215  	typ := &b.Func.Config.Types
  8216  	// match: (Less16U x y)
  8217  	// result: (SGTU (ZeroExt16to64 y) (ZeroExt16to64 x))
  8218  	for {
  8219  		x := v_0
  8220  		y := v_1
  8221  		v.reset(OpLOONG64SGTU)
  8222  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8223  		v0.AddArg(y)
  8224  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8225  		v1.AddArg(x)
  8226  		v.AddArg2(v0, v1)
  8227  		return true
  8228  	}
  8229  }
  8230  func rewriteValueLOONG64_OpLess32(v *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: (Less32 x y)
  8236  	// result: (SGT (SignExt32to64 y) (SignExt32to64 x))
  8237  	for {
  8238  		x := v_0
  8239  		y := v_1
  8240  		v.reset(OpLOONG64SGT)
  8241  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  8242  		v0.AddArg(y)
  8243  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  8244  		v1.AddArg(x)
  8245  		v.AddArg2(v0, v1)
  8246  		return true
  8247  	}
  8248  }
  8249  func rewriteValueLOONG64_OpLess32F(v *Value) bool {
  8250  	v_1 := v.Args[1]
  8251  	v_0 := v.Args[0]
  8252  	b := v.Block
  8253  	// match: (Less32F x y)
  8254  	// result: (FPFlagTrue (CMPGTF y x))
  8255  	for {
  8256  		x := v_0
  8257  		y := v_1
  8258  		v.reset(OpLOONG64FPFlagTrue)
  8259  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPGTF, types.TypeFlags)
  8260  		v0.AddArg2(y, x)
  8261  		v.AddArg(v0)
  8262  		return true
  8263  	}
  8264  }
  8265  func rewriteValueLOONG64_OpLess32U(v *Value) bool {
  8266  	v_1 := v.Args[1]
  8267  	v_0 := v.Args[0]
  8268  	b := v.Block
  8269  	typ := &b.Func.Config.Types
  8270  	// match: (Less32U x y)
  8271  	// result: (SGTU (ZeroExt32to64 y) (ZeroExt32to64 x))
  8272  	for {
  8273  		x := v_0
  8274  		y := v_1
  8275  		v.reset(OpLOONG64SGTU)
  8276  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8277  		v0.AddArg(y)
  8278  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8279  		v1.AddArg(x)
  8280  		v.AddArg2(v0, v1)
  8281  		return true
  8282  	}
  8283  }
  8284  func rewriteValueLOONG64_OpLess64(v *Value) bool {
  8285  	v_1 := v.Args[1]
  8286  	v_0 := v.Args[0]
  8287  	// match: (Less64 x y)
  8288  	// result: (SGT y x)
  8289  	for {
  8290  		x := v_0
  8291  		y := v_1
  8292  		v.reset(OpLOONG64SGT)
  8293  		v.AddArg2(y, x)
  8294  		return true
  8295  	}
  8296  }
  8297  func rewriteValueLOONG64_OpLess64F(v *Value) bool {
  8298  	v_1 := v.Args[1]
  8299  	v_0 := v.Args[0]
  8300  	b := v.Block
  8301  	// match: (Less64F x y)
  8302  	// result: (FPFlagTrue (CMPGTD y x))
  8303  	for {
  8304  		x := v_0
  8305  		y := v_1
  8306  		v.reset(OpLOONG64FPFlagTrue)
  8307  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPGTD, types.TypeFlags)
  8308  		v0.AddArg2(y, x)
  8309  		v.AddArg(v0)
  8310  		return true
  8311  	}
  8312  }
  8313  func rewriteValueLOONG64_OpLess64U(v *Value) bool {
  8314  	v_1 := v.Args[1]
  8315  	v_0 := v.Args[0]
  8316  	// match: (Less64U x y)
  8317  	// result: (SGTU y x)
  8318  	for {
  8319  		x := v_0
  8320  		y := v_1
  8321  		v.reset(OpLOONG64SGTU)
  8322  		v.AddArg2(y, x)
  8323  		return true
  8324  	}
  8325  }
  8326  func rewriteValueLOONG64_OpLess8(v *Value) bool {
  8327  	v_1 := v.Args[1]
  8328  	v_0 := v.Args[0]
  8329  	b := v.Block
  8330  	typ := &b.Func.Config.Types
  8331  	// match: (Less8 x y)
  8332  	// result: (SGT (SignExt8to64 y) (SignExt8to64 x))
  8333  	for {
  8334  		x := v_0
  8335  		y := v_1
  8336  		v.reset(OpLOONG64SGT)
  8337  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  8338  		v0.AddArg(y)
  8339  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  8340  		v1.AddArg(x)
  8341  		v.AddArg2(v0, v1)
  8342  		return true
  8343  	}
  8344  }
  8345  func rewriteValueLOONG64_OpLess8U(v *Value) bool {
  8346  	v_1 := v.Args[1]
  8347  	v_0 := v.Args[0]
  8348  	b := v.Block
  8349  	typ := &b.Func.Config.Types
  8350  	// match: (Less8U x y)
  8351  	// result: (SGTU (ZeroExt8to64 y) (ZeroExt8to64 x))
  8352  	for {
  8353  		x := v_0
  8354  		y := v_1
  8355  		v.reset(OpLOONG64SGTU)
  8356  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8357  		v0.AddArg(y)
  8358  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8359  		v1.AddArg(x)
  8360  		v.AddArg2(v0, v1)
  8361  		return true
  8362  	}
  8363  }
  8364  func rewriteValueLOONG64_OpLoad(v *Value) bool {
  8365  	v_1 := v.Args[1]
  8366  	v_0 := v.Args[0]
  8367  	// match: (Load <t> ptr mem)
  8368  	// cond: t.IsBoolean()
  8369  	// result: (MOVBUload ptr mem)
  8370  	for {
  8371  		t := v.Type
  8372  		ptr := v_0
  8373  		mem := v_1
  8374  		if !(t.IsBoolean()) {
  8375  			break
  8376  		}
  8377  		v.reset(OpLOONG64MOVBUload)
  8378  		v.AddArg2(ptr, mem)
  8379  		return true
  8380  	}
  8381  	// match: (Load <t> ptr mem)
  8382  	// cond: (is8BitInt(t) && t.IsSigned())
  8383  	// result: (MOVBload ptr mem)
  8384  	for {
  8385  		t := v.Type
  8386  		ptr := v_0
  8387  		mem := v_1
  8388  		if !(is8BitInt(t) && t.IsSigned()) {
  8389  			break
  8390  		}
  8391  		v.reset(OpLOONG64MOVBload)
  8392  		v.AddArg2(ptr, mem)
  8393  		return true
  8394  	}
  8395  	// match: (Load <t> ptr mem)
  8396  	// cond: (is8BitInt(t) && !t.IsSigned())
  8397  	// result: (MOVBUload ptr mem)
  8398  	for {
  8399  		t := v.Type
  8400  		ptr := v_0
  8401  		mem := v_1
  8402  		if !(is8BitInt(t) && !t.IsSigned()) {
  8403  			break
  8404  		}
  8405  		v.reset(OpLOONG64MOVBUload)
  8406  		v.AddArg2(ptr, mem)
  8407  		return true
  8408  	}
  8409  	// match: (Load <t> ptr mem)
  8410  	// cond: (is16BitInt(t) && t.IsSigned())
  8411  	// result: (MOVHload ptr mem)
  8412  	for {
  8413  		t := v.Type
  8414  		ptr := v_0
  8415  		mem := v_1
  8416  		if !(is16BitInt(t) && t.IsSigned()) {
  8417  			break
  8418  		}
  8419  		v.reset(OpLOONG64MOVHload)
  8420  		v.AddArg2(ptr, mem)
  8421  		return true
  8422  	}
  8423  	// match: (Load <t> ptr mem)
  8424  	// cond: (is16BitInt(t) && !t.IsSigned())
  8425  	// result: (MOVHUload ptr mem)
  8426  	for {
  8427  		t := v.Type
  8428  		ptr := v_0
  8429  		mem := v_1
  8430  		if !(is16BitInt(t) && !t.IsSigned()) {
  8431  			break
  8432  		}
  8433  		v.reset(OpLOONG64MOVHUload)
  8434  		v.AddArg2(ptr, mem)
  8435  		return true
  8436  	}
  8437  	// match: (Load <t> ptr mem)
  8438  	// cond: (is32BitInt(t) && t.IsSigned())
  8439  	// result: (MOVWload ptr mem)
  8440  	for {
  8441  		t := v.Type
  8442  		ptr := v_0
  8443  		mem := v_1
  8444  		if !(is32BitInt(t) && t.IsSigned()) {
  8445  			break
  8446  		}
  8447  		v.reset(OpLOONG64MOVWload)
  8448  		v.AddArg2(ptr, mem)
  8449  		return true
  8450  	}
  8451  	// match: (Load <t> ptr mem)
  8452  	// cond: (is32BitInt(t) && !t.IsSigned())
  8453  	// result: (MOVWUload ptr mem)
  8454  	for {
  8455  		t := v.Type
  8456  		ptr := v_0
  8457  		mem := v_1
  8458  		if !(is32BitInt(t) && !t.IsSigned()) {
  8459  			break
  8460  		}
  8461  		v.reset(OpLOONG64MOVWUload)
  8462  		v.AddArg2(ptr, mem)
  8463  		return true
  8464  	}
  8465  	// match: (Load <t> ptr mem)
  8466  	// cond: (is64BitInt(t) || isPtr(t))
  8467  	// result: (MOVVload ptr mem)
  8468  	for {
  8469  		t := v.Type
  8470  		ptr := v_0
  8471  		mem := v_1
  8472  		if !(is64BitInt(t) || isPtr(t)) {
  8473  			break
  8474  		}
  8475  		v.reset(OpLOONG64MOVVload)
  8476  		v.AddArg2(ptr, mem)
  8477  		return true
  8478  	}
  8479  	// match: (Load <t> ptr mem)
  8480  	// cond: is32BitFloat(t)
  8481  	// result: (MOVFload ptr mem)
  8482  	for {
  8483  		t := v.Type
  8484  		ptr := v_0
  8485  		mem := v_1
  8486  		if !(is32BitFloat(t)) {
  8487  			break
  8488  		}
  8489  		v.reset(OpLOONG64MOVFload)
  8490  		v.AddArg2(ptr, mem)
  8491  		return true
  8492  	}
  8493  	// match: (Load <t> ptr mem)
  8494  	// cond: is64BitFloat(t)
  8495  	// result: (MOVDload ptr mem)
  8496  	for {
  8497  		t := v.Type
  8498  		ptr := v_0
  8499  		mem := v_1
  8500  		if !(is64BitFloat(t)) {
  8501  			break
  8502  		}
  8503  		v.reset(OpLOONG64MOVDload)
  8504  		v.AddArg2(ptr, mem)
  8505  		return true
  8506  	}
  8507  	return false
  8508  }
  8509  func rewriteValueLOONG64_OpLocalAddr(v *Value) bool {
  8510  	v_1 := v.Args[1]
  8511  	v_0 := v.Args[0]
  8512  	b := v.Block
  8513  	typ := &b.Func.Config.Types
  8514  	// match: (LocalAddr <t> {sym} base mem)
  8515  	// cond: t.Elem().HasPointers()
  8516  	// result: (MOVVaddr {sym} (SPanchored base mem))
  8517  	for {
  8518  		t := v.Type
  8519  		sym := auxToSym(v.Aux)
  8520  		base := v_0
  8521  		mem := v_1
  8522  		if !(t.Elem().HasPointers()) {
  8523  			break
  8524  		}
  8525  		v.reset(OpLOONG64MOVVaddr)
  8526  		v.Aux = symToAux(sym)
  8527  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
  8528  		v0.AddArg2(base, mem)
  8529  		v.AddArg(v0)
  8530  		return true
  8531  	}
  8532  	// match: (LocalAddr <t> {sym} base _)
  8533  	// cond: !t.Elem().HasPointers()
  8534  	// result: (MOVVaddr {sym} base)
  8535  	for {
  8536  		t := v.Type
  8537  		sym := auxToSym(v.Aux)
  8538  		base := v_0
  8539  		if !(!t.Elem().HasPointers()) {
  8540  			break
  8541  		}
  8542  		v.reset(OpLOONG64MOVVaddr)
  8543  		v.Aux = symToAux(sym)
  8544  		v.AddArg(base)
  8545  		return true
  8546  	}
  8547  	return false
  8548  }
  8549  func rewriteValueLOONG64_OpLsh16x16(v *Value) bool {
  8550  	v_1 := v.Args[1]
  8551  	v_0 := v.Args[0]
  8552  	b := v.Block
  8553  	typ := &b.Func.Config.Types
  8554  	// match: (Lsh16x16 x y)
  8555  	// cond: shiftIsBounded(v)
  8556  	// result: (SLLV x y)
  8557  	for {
  8558  		x := v_0
  8559  		y := v_1
  8560  		if !(shiftIsBounded(v)) {
  8561  			break
  8562  		}
  8563  		v.reset(OpLOONG64SLLV)
  8564  		v.AddArg2(x, y)
  8565  		return true
  8566  	}
  8567  	// match: (Lsh16x16 <t> x y)
  8568  	// cond: !shiftIsBounded(v)
  8569  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  8570  	for {
  8571  		t := v.Type
  8572  		x := v_0
  8573  		y := v_1
  8574  		if !(!shiftIsBounded(v)) {
  8575  			break
  8576  		}
  8577  		v.reset(OpLOONG64MASKEQZ)
  8578  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8579  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8580  		v1.AddArg(y)
  8581  		v0.AddArg2(x, v1)
  8582  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8583  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8584  		v3.AuxInt = int64ToAuxInt(64)
  8585  		v2.AddArg2(v3, v1)
  8586  		v.AddArg2(v0, v2)
  8587  		return true
  8588  	}
  8589  	return false
  8590  }
  8591  func rewriteValueLOONG64_OpLsh16x32(v *Value) bool {
  8592  	v_1 := v.Args[1]
  8593  	v_0 := v.Args[0]
  8594  	b := v.Block
  8595  	typ := &b.Func.Config.Types
  8596  	// match: (Lsh16x32 x y)
  8597  	// cond: shiftIsBounded(v)
  8598  	// result: (SLLV x y)
  8599  	for {
  8600  		x := v_0
  8601  		y := v_1
  8602  		if !(shiftIsBounded(v)) {
  8603  			break
  8604  		}
  8605  		v.reset(OpLOONG64SLLV)
  8606  		v.AddArg2(x, y)
  8607  		return true
  8608  	}
  8609  	// match: (Lsh16x32 <t> x y)
  8610  	// cond: !shiftIsBounded(v)
  8611  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  8612  	for {
  8613  		t := v.Type
  8614  		x := v_0
  8615  		y := v_1
  8616  		if !(!shiftIsBounded(v)) {
  8617  			break
  8618  		}
  8619  		v.reset(OpLOONG64MASKEQZ)
  8620  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8621  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8622  		v1.AddArg(y)
  8623  		v0.AddArg2(x, v1)
  8624  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8625  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8626  		v3.AuxInt = int64ToAuxInt(64)
  8627  		v2.AddArg2(v3, v1)
  8628  		v.AddArg2(v0, v2)
  8629  		return true
  8630  	}
  8631  	return false
  8632  }
  8633  func rewriteValueLOONG64_OpLsh16x64(v *Value) bool {
  8634  	v_1 := v.Args[1]
  8635  	v_0 := v.Args[0]
  8636  	b := v.Block
  8637  	typ := &b.Func.Config.Types
  8638  	// match: (Lsh16x64 x y)
  8639  	// cond: shiftIsBounded(v)
  8640  	// result: (SLLV x y)
  8641  	for {
  8642  		x := v_0
  8643  		y := v_1
  8644  		if !(shiftIsBounded(v)) {
  8645  			break
  8646  		}
  8647  		v.reset(OpLOONG64SLLV)
  8648  		v.AddArg2(x, y)
  8649  		return true
  8650  	}
  8651  	// match: (Lsh16x64 <t> x y)
  8652  	// cond: !shiftIsBounded(v)
  8653  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  8654  	for {
  8655  		t := v.Type
  8656  		x := v_0
  8657  		y := v_1
  8658  		if !(!shiftIsBounded(v)) {
  8659  			break
  8660  		}
  8661  		v.reset(OpLOONG64MASKEQZ)
  8662  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8663  		v0.AddArg2(x, y)
  8664  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8665  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8666  		v2.AuxInt = int64ToAuxInt(64)
  8667  		v1.AddArg2(v2, y)
  8668  		v.AddArg2(v0, v1)
  8669  		return true
  8670  	}
  8671  	return false
  8672  }
  8673  func rewriteValueLOONG64_OpLsh16x8(v *Value) bool {
  8674  	v_1 := v.Args[1]
  8675  	v_0 := v.Args[0]
  8676  	b := v.Block
  8677  	typ := &b.Func.Config.Types
  8678  	// match: (Lsh16x8 x y)
  8679  	// cond: shiftIsBounded(v)
  8680  	// result: (SLLV x y)
  8681  	for {
  8682  		x := v_0
  8683  		y := v_1
  8684  		if !(shiftIsBounded(v)) {
  8685  			break
  8686  		}
  8687  		v.reset(OpLOONG64SLLV)
  8688  		v.AddArg2(x, y)
  8689  		return true
  8690  	}
  8691  	// match: (Lsh16x8 <t> x y)
  8692  	// cond: !shiftIsBounded(v)
  8693  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  8694  	for {
  8695  		t := v.Type
  8696  		x := v_0
  8697  		y := v_1
  8698  		if !(!shiftIsBounded(v)) {
  8699  			break
  8700  		}
  8701  		v.reset(OpLOONG64MASKEQZ)
  8702  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8703  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8704  		v1.AddArg(y)
  8705  		v0.AddArg2(x, v1)
  8706  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8707  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8708  		v3.AuxInt = int64ToAuxInt(64)
  8709  		v2.AddArg2(v3, v1)
  8710  		v.AddArg2(v0, v2)
  8711  		return true
  8712  	}
  8713  	return false
  8714  }
  8715  func rewriteValueLOONG64_OpLsh32x16(v *Value) bool {
  8716  	v_1 := v.Args[1]
  8717  	v_0 := v.Args[0]
  8718  	b := v.Block
  8719  	typ := &b.Func.Config.Types
  8720  	// match: (Lsh32x16 x y)
  8721  	// cond: shiftIsBounded(v)
  8722  	// result: (SLL x y)
  8723  	for {
  8724  		x := v_0
  8725  		y := v_1
  8726  		if !(shiftIsBounded(v)) {
  8727  			break
  8728  		}
  8729  		v.reset(OpLOONG64SLL)
  8730  		v.AddArg2(x, y)
  8731  		return true
  8732  	}
  8733  	// match: (Lsh32x16 <t> x y)
  8734  	// cond: !shiftIsBounded(v)
  8735  	// result: (MASKEQZ (SLL <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt16to64 y)))
  8736  	for {
  8737  		t := v.Type
  8738  		x := v_0
  8739  		y := v_1
  8740  		if !(!shiftIsBounded(v)) {
  8741  			break
  8742  		}
  8743  		v.reset(OpLOONG64MASKEQZ)
  8744  		v0 := b.NewValue0(v.Pos, OpLOONG64SLL, t)
  8745  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8746  		v1.AddArg(y)
  8747  		v0.AddArg2(x, v1)
  8748  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8749  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8750  		v3.AuxInt = int64ToAuxInt(32)
  8751  		v2.AddArg2(v3, v1)
  8752  		v.AddArg2(v0, v2)
  8753  		return true
  8754  	}
  8755  	return false
  8756  }
  8757  func rewriteValueLOONG64_OpLsh32x32(v *Value) bool {
  8758  	v_1 := v.Args[1]
  8759  	v_0 := v.Args[0]
  8760  	b := v.Block
  8761  	typ := &b.Func.Config.Types
  8762  	// match: (Lsh32x32 x y)
  8763  	// cond: shiftIsBounded(v)
  8764  	// result: (SLL x y)
  8765  	for {
  8766  		x := v_0
  8767  		y := v_1
  8768  		if !(shiftIsBounded(v)) {
  8769  			break
  8770  		}
  8771  		v.reset(OpLOONG64SLL)
  8772  		v.AddArg2(x, y)
  8773  		return true
  8774  	}
  8775  	// match: (Lsh32x32 <t> x y)
  8776  	// cond: !shiftIsBounded(v)
  8777  	// result: (MASKEQZ (SLL <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt32to64 y)))
  8778  	for {
  8779  		t := v.Type
  8780  		x := v_0
  8781  		y := v_1
  8782  		if !(!shiftIsBounded(v)) {
  8783  			break
  8784  		}
  8785  		v.reset(OpLOONG64MASKEQZ)
  8786  		v0 := b.NewValue0(v.Pos, OpLOONG64SLL, t)
  8787  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8788  		v1.AddArg(y)
  8789  		v0.AddArg2(x, v1)
  8790  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8791  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8792  		v3.AuxInt = int64ToAuxInt(32)
  8793  		v2.AddArg2(v3, v1)
  8794  		v.AddArg2(v0, v2)
  8795  		return true
  8796  	}
  8797  	return false
  8798  }
  8799  func rewriteValueLOONG64_OpLsh32x64(v *Value) bool {
  8800  	v_1 := v.Args[1]
  8801  	v_0 := v.Args[0]
  8802  	b := v.Block
  8803  	typ := &b.Func.Config.Types
  8804  	// match: (Lsh32x64 x y)
  8805  	// cond: shiftIsBounded(v)
  8806  	// result: (SLL x y)
  8807  	for {
  8808  		x := v_0
  8809  		y := v_1
  8810  		if !(shiftIsBounded(v)) {
  8811  			break
  8812  		}
  8813  		v.reset(OpLOONG64SLL)
  8814  		v.AddArg2(x, y)
  8815  		return true
  8816  	}
  8817  	// match: (Lsh32x64 <t> x y)
  8818  	// cond: !shiftIsBounded(v)
  8819  	// result: (MASKEQZ (SLL <t> x y) (SGTU (MOVVconst <typ.UInt64> [32]) y))
  8820  	for {
  8821  		t := v.Type
  8822  		x := v_0
  8823  		y := v_1
  8824  		if !(!shiftIsBounded(v)) {
  8825  			break
  8826  		}
  8827  		v.reset(OpLOONG64MASKEQZ)
  8828  		v0 := b.NewValue0(v.Pos, OpLOONG64SLL, t)
  8829  		v0.AddArg2(x, y)
  8830  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8831  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8832  		v2.AuxInt = int64ToAuxInt(32)
  8833  		v1.AddArg2(v2, y)
  8834  		v.AddArg2(v0, v1)
  8835  		return true
  8836  	}
  8837  	return false
  8838  }
  8839  func rewriteValueLOONG64_OpLsh32x8(v *Value) bool {
  8840  	v_1 := v.Args[1]
  8841  	v_0 := v.Args[0]
  8842  	b := v.Block
  8843  	typ := &b.Func.Config.Types
  8844  	// match: (Lsh32x8 x y)
  8845  	// cond: shiftIsBounded(v)
  8846  	// result: (SLL x y)
  8847  	for {
  8848  		x := v_0
  8849  		y := v_1
  8850  		if !(shiftIsBounded(v)) {
  8851  			break
  8852  		}
  8853  		v.reset(OpLOONG64SLL)
  8854  		v.AddArg2(x, y)
  8855  		return true
  8856  	}
  8857  	// match: (Lsh32x8 <t> x y)
  8858  	// cond: !shiftIsBounded(v)
  8859  	// result: (MASKEQZ (SLL <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt8to64 y)))
  8860  	for {
  8861  		t := v.Type
  8862  		x := v_0
  8863  		y := v_1
  8864  		if !(!shiftIsBounded(v)) {
  8865  			break
  8866  		}
  8867  		v.reset(OpLOONG64MASKEQZ)
  8868  		v0 := b.NewValue0(v.Pos, OpLOONG64SLL, t)
  8869  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8870  		v1.AddArg(y)
  8871  		v0.AddArg2(x, v1)
  8872  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8873  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8874  		v3.AuxInt = int64ToAuxInt(32)
  8875  		v2.AddArg2(v3, v1)
  8876  		v.AddArg2(v0, v2)
  8877  		return true
  8878  	}
  8879  	return false
  8880  }
  8881  func rewriteValueLOONG64_OpLsh64x16(v *Value) bool {
  8882  	v_1 := v.Args[1]
  8883  	v_0 := v.Args[0]
  8884  	b := v.Block
  8885  	typ := &b.Func.Config.Types
  8886  	// match: (Lsh64x16 x y)
  8887  	// cond: shiftIsBounded(v)
  8888  	// result: (SLLV x y)
  8889  	for {
  8890  		x := v_0
  8891  		y := v_1
  8892  		if !(shiftIsBounded(v)) {
  8893  			break
  8894  		}
  8895  		v.reset(OpLOONG64SLLV)
  8896  		v.AddArg2(x, y)
  8897  		return true
  8898  	}
  8899  	// match: (Lsh64x16 <t> x y)
  8900  	// cond: !shiftIsBounded(v)
  8901  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  8902  	for {
  8903  		t := v.Type
  8904  		x := v_0
  8905  		y := v_1
  8906  		if !(!shiftIsBounded(v)) {
  8907  			break
  8908  		}
  8909  		v.reset(OpLOONG64MASKEQZ)
  8910  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8911  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8912  		v1.AddArg(y)
  8913  		v0.AddArg2(x, v1)
  8914  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8915  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8916  		v3.AuxInt = int64ToAuxInt(64)
  8917  		v2.AddArg2(v3, v1)
  8918  		v.AddArg2(v0, v2)
  8919  		return true
  8920  	}
  8921  	return false
  8922  }
  8923  func rewriteValueLOONG64_OpLsh64x32(v *Value) bool {
  8924  	v_1 := v.Args[1]
  8925  	v_0 := v.Args[0]
  8926  	b := v.Block
  8927  	typ := &b.Func.Config.Types
  8928  	// match: (Lsh64x32 x y)
  8929  	// cond: shiftIsBounded(v)
  8930  	// result: (SLLV x y)
  8931  	for {
  8932  		x := v_0
  8933  		y := v_1
  8934  		if !(shiftIsBounded(v)) {
  8935  			break
  8936  		}
  8937  		v.reset(OpLOONG64SLLV)
  8938  		v.AddArg2(x, y)
  8939  		return true
  8940  	}
  8941  	// match: (Lsh64x32 <t> x y)
  8942  	// cond: !shiftIsBounded(v)
  8943  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  8944  	for {
  8945  		t := v.Type
  8946  		x := v_0
  8947  		y := v_1
  8948  		if !(!shiftIsBounded(v)) {
  8949  			break
  8950  		}
  8951  		v.reset(OpLOONG64MASKEQZ)
  8952  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8953  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8954  		v1.AddArg(y)
  8955  		v0.AddArg2(x, v1)
  8956  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8957  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8958  		v3.AuxInt = int64ToAuxInt(64)
  8959  		v2.AddArg2(v3, v1)
  8960  		v.AddArg2(v0, v2)
  8961  		return true
  8962  	}
  8963  	return false
  8964  }
  8965  func rewriteValueLOONG64_OpLsh64x64(v *Value) bool {
  8966  	v_1 := v.Args[1]
  8967  	v_0 := v.Args[0]
  8968  	b := v.Block
  8969  	typ := &b.Func.Config.Types
  8970  	// match: (Lsh64x64 x y)
  8971  	// cond: shiftIsBounded(v)
  8972  	// result: (SLLV x y)
  8973  	for {
  8974  		x := v_0
  8975  		y := v_1
  8976  		if !(shiftIsBounded(v)) {
  8977  			break
  8978  		}
  8979  		v.reset(OpLOONG64SLLV)
  8980  		v.AddArg2(x, y)
  8981  		return true
  8982  	}
  8983  	// match: (Lsh64x64 <t> x y)
  8984  	// cond: !shiftIsBounded(v)
  8985  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  8986  	for {
  8987  		t := v.Type
  8988  		x := v_0
  8989  		y := v_1
  8990  		if !(!shiftIsBounded(v)) {
  8991  			break
  8992  		}
  8993  		v.reset(OpLOONG64MASKEQZ)
  8994  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8995  		v0.AddArg2(x, y)
  8996  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8997  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8998  		v2.AuxInt = int64ToAuxInt(64)
  8999  		v1.AddArg2(v2, y)
  9000  		v.AddArg2(v0, v1)
  9001  		return true
  9002  	}
  9003  	return false
  9004  }
  9005  func rewriteValueLOONG64_OpLsh64x8(v *Value) bool {
  9006  	v_1 := v.Args[1]
  9007  	v_0 := v.Args[0]
  9008  	b := v.Block
  9009  	typ := &b.Func.Config.Types
  9010  	// match: (Lsh64x8 x y)
  9011  	// cond: shiftIsBounded(v)
  9012  	// result: (SLLV x y)
  9013  	for {
  9014  		x := v_0
  9015  		y := v_1
  9016  		if !(shiftIsBounded(v)) {
  9017  			break
  9018  		}
  9019  		v.reset(OpLOONG64SLLV)
  9020  		v.AddArg2(x, y)
  9021  		return true
  9022  	}
  9023  	// match: (Lsh64x8 <t> x y)
  9024  	// cond: !shiftIsBounded(v)
  9025  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  9026  	for {
  9027  		t := v.Type
  9028  		x := v_0
  9029  		y := v_1
  9030  		if !(!shiftIsBounded(v)) {
  9031  			break
  9032  		}
  9033  		v.reset(OpLOONG64MASKEQZ)
  9034  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9035  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9036  		v1.AddArg(y)
  9037  		v0.AddArg2(x, v1)
  9038  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9039  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9040  		v3.AuxInt = int64ToAuxInt(64)
  9041  		v2.AddArg2(v3, v1)
  9042  		v.AddArg2(v0, v2)
  9043  		return true
  9044  	}
  9045  	return false
  9046  }
  9047  func rewriteValueLOONG64_OpLsh8x16(v *Value) bool {
  9048  	v_1 := v.Args[1]
  9049  	v_0 := v.Args[0]
  9050  	b := v.Block
  9051  	typ := &b.Func.Config.Types
  9052  	// match: (Lsh8x16 x y)
  9053  	// cond: shiftIsBounded(v)
  9054  	// result: (SLLV x y)
  9055  	for {
  9056  		x := v_0
  9057  		y := v_1
  9058  		if !(shiftIsBounded(v)) {
  9059  			break
  9060  		}
  9061  		v.reset(OpLOONG64SLLV)
  9062  		v.AddArg2(x, y)
  9063  		return true
  9064  	}
  9065  	// match: (Lsh8x16 <t> x y)
  9066  	// cond: !shiftIsBounded(v)
  9067  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  9068  	for {
  9069  		t := v.Type
  9070  		x := v_0
  9071  		y := v_1
  9072  		if !(!shiftIsBounded(v)) {
  9073  			break
  9074  		}
  9075  		v.reset(OpLOONG64MASKEQZ)
  9076  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9077  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  9078  		v1.AddArg(y)
  9079  		v0.AddArg2(x, v1)
  9080  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9081  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9082  		v3.AuxInt = int64ToAuxInt(64)
  9083  		v2.AddArg2(v3, v1)
  9084  		v.AddArg2(v0, v2)
  9085  		return true
  9086  	}
  9087  	return false
  9088  }
  9089  func rewriteValueLOONG64_OpLsh8x32(v *Value) bool {
  9090  	v_1 := v.Args[1]
  9091  	v_0 := v.Args[0]
  9092  	b := v.Block
  9093  	typ := &b.Func.Config.Types
  9094  	// match: (Lsh8x32 x y)
  9095  	// cond: shiftIsBounded(v)
  9096  	// result: (SLLV x y)
  9097  	for {
  9098  		x := v_0
  9099  		y := v_1
  9100  		if !(shiftIsBounded(v)) {
  9101  			break
  9102  		}
  9103  		v.reset(OpLOONG64SLLV)
  9104  		v.AddArg2(x, y)
  9105  		return true
  9106  	}
  9107  	// match: (Lsh8x32 <t> x y)
  9108  	// cond: !shiftIsBounded(v)
  9109  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  9110  	for {
  9111  		t := v.Type
  9112  		x := v_0
  9113  		y := v_1
  9114  		if !(!shiftIsBounded(v)) {
  9115  			break
  9116  		}
  9117  		v.reset(OpLOONG64MASKEQZ)
  9118  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9119  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  9120  		v1.AddArg(y)
  9121  		v0.AddArg2(x, v1)
  9122  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9123  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9124  		v3.AuxInt = int64ToAuxInt(64)
  9125  		v2.AddArg2(v3, v1)
  9126  		v.AddArg2(v0, v2)
  9127  		return true
  9128  	}
  9129  	return false
  9130  }
  9131  func rewriteValueLOONG64_OpLsh8x64(v *Value) bool {
  9132  	v_1 := v.Args[1]
  9133  	v_0 := v.Args[0]
  9134  	b := v.Block
  9135  	typ := &b.Func.Config.Types
  9136  	// match: (Lsh8x64 x y)
  9137  	// cond: shiftIsBounded(v)
  9138  	// result: (SLLV x y)
  9139  	for {
  9140  		x := v_0
  9141  		y := v_1
  9142  		if !(shiftIsBounded(v)) {
  9143  			break
  9144  		}
  9145  		v.reset(OpLOONG64SLLV)
  9146  		v.AddArg2(x, y)
  9147  		return true
  9148  	}
  9149  	// match: (Lsh8x64 <t> x y)
  9150  	// cond: !shiftIsBounded(v)
  9151  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  9152  	for {
  9153  		t := v.Type
  9154  		x := v_0
  9155  		y := v_1
  9156  		if !(!shiftIsBounded(v)) {
  9157  			break
  9158  		}
  9159  		v.reset(OpLOONG64MASKEQZ)
  9160  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9161  		v0.AddArg2(x, y)
  9162  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9163  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9164  		v2.AuxInt = int64ToAuxInt(64)
  9165  		v1.AddArg2(v2, y)
  9166  		v.AddArg2(v0, v1)
  9167  		return true
  9168  	}
  9169  	return false
  9170  }
  9171  func rewriteValueLOONG64_OpLsh8x8(v *Value) bool {
  9172  	v_1 := v.Args[1]
  9173  	v_0 := v.Args[0]
  9174  	b := v.Block
  9175  	typ := &b.Func.Config.Types
  9176  	// match: (Lsh8x8 x y)
  9177  	// cond: shiftIsBounded(v)
  9178  	// result: (SLLV x y)
  9179  	for {
  9180  		x := v_0
  9181  		y := v_1
  9182  		if !(shiftIsBounded(v)) {
  9183  			break
  9184  		}
  9185  		v.reset(OpLOONG64SLLV)
  9186  		v.AddArg2(x, y)
  9187  		return true
  9188  	}
  9189  	// match: (Lsh8x8 <t> x y)
  9190  	// cond: !shiftIsBounded(v)
  9191  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  9192  	for {
  9193  		t := v.Type
  9194  		x := v_0
  9195  		y := v_1
  9196  		if !(!shiftIsBounded(v)) {
  9197  			break
  9198  		}
  9199  		v.reset(OpLOONG64MASKEQZ)
  9200  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9201  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9202  		v1.AddArg(y)
  9203  		v0.AddArg2(x, v1)
  9204  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9205  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9206  		v3.AuxInt = int64ToAuxInt(64)
  9207  		v2.AddArg2(v3, v1)
  9208  		v.AddArg2(v0, v2)
  9209  		return true
  9210  	}
  9211  	return false
  9212  }
  9213  func rewriteValueLOONG64_OpMod16(v *Value) bool {
  9214  	v_1 := v.Args[1]
  9215  	v_0 := v.Args[0]
  9216  	b := v.Block
  9217  	typ := &b.Func.Config.Types
  9218  	// match: (Mod16 x y)
  9219  	// result: (REMV (SignExt16to64 x) (SignExt16to64 y))
  9220  	for {
  9221  		x := v_0
  9222  		y := v_1
  9223  		v.reset(OpLOONG64REMV)
  9224  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  9225  		v0.AddArg(x)
  9226  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  9227  		v1.AddArg(y)
  9228  		v.AddArg2(v0, v1)
  9229  		return true
  9230  	}
  9231  }
  9232  func rewriteValueLOONG64_OpMod16u(v *Value) bool {
  9233  	v_1 := v.Args[1]
  9234  	v_0 := v.Args[0]
  9235  	b := v.Block
  9236  	typ := &b.Func.Config.Types
  9237  	// match: (Mod16u x y)
  9238  	// result: (REMVU (ZeroExt16to64 x) (ZeroExt16to64 y))
  9239  	for {
  9240  		x := v_0
  9241  		y := v_1
  9242  		v.reset(OpLOONG64REMVU)
  9243  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  9244  		v0.AddArg(x)
  9245  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  9246  		v1.AddArg(y)
  9247  		v.AddArg2(v0, v1)
  9248  		return true
  9249  	}
  9250  }
  9251  func rewriteValueLOONG64_OpMod32(v *Value) bool {
  9252  	v_1 := v.Args[1]
  9253  	v_0 := v.Args[0]
  9254  	b := v.Block
  9255  	typ := &b.Func.Config.Types
  9256  	// match: (Mod32 x y)
  9257  	// result: (REMV (SignExt32to64 x) (SignExt32to64 y))
  9258  	for {
  9259  		x := v_0
  9260  		y := v_1
  9261  		v.reset(OpLOONG64REMV)
  9262  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  9263  		v0.AddArg(x)
  9264  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  9265  		v1.AddArg(y)
  9266  		v.AddArg2(v0, v1)
  9267  		return true
  9268  	}
  9269  }
  9270  func rewriteValueLOONG64_OpMod32u(v *Value) bool {
  9271  	v_1 := v.Args[1]
  9272  	v_0 := v.Args[0]
  9273  	b := v.Block
  9274  	typ := &b.Func.Config.Types
  9275  	// match: (Mod32u x y)
  9276  	// result: (REMVU (ZeroExt32to64 x) (ZeroExt32to64 y))
  9277  	for {
  9278  		x := v_0
  9279  		y := v_1
  9280  		v.reset(OpLOONG64REMVU)
  9281  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  9282  		v0.AddArg(x)
  9283  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  9284  		v1.AddArg(y)
  9285  		v.AddArg2(v0, v1)
  9286  		return true
  9287  	}
  9288  }
  9289  func rewriteValueLOONG64_OpMod64(v *Value) bool {
  9290  	v_1 := v.Args[1]
  9291  	v_0 := v.Args[0]
  9292  	// match: (Mod64 x y)
  9293  	// result: (REMV x y)
  9294  	for {
  9295  		x := v_0
  9296  		y := v_1
  9297  		v.reset(OpLOONG64REMV)
  9298  		v.AddArg2(x, y)
  9299  		return true
  9300  	}
  9301  }
  9302  func rewriteValueLOONG64_OpMod8(v *Value) bool {
  9303  	v_1 := v.Args[1]
  9304  	v_0 := v.Args[0]
  9305  	b := v.Block
  9306  	typ := &b.Func.Config.Types
  9307  	// match: (Mod8 x y)
  9308  	// result: (REMV (SignExt8to64 x) (SignExt8to64 y))
  9309  	for {
  9310  		x := v_0
  9311  		y := v_1
  9312  		v.reset(OpLOONG64REMV)
  9313  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  9314  		v0.AddArg(x)
  9315  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  9316  		v1.AddArg(y)
  9317  		v.AddArg2(v0, v1)
  9318  		return true
  9319  	}
  9320  }
  9321  func rewriteValueLOONG64_OpMod8u(v *Value) bool {
  9322  	v_1 := v.Args[1]
  9323  	v_0 := v.Args[0]
  9324  	b := v.Block
  9325  	typ := &b.Func.Config.Types
  9326  	// match: (Mod8u x y)
  9327  	// result: (REMVU (ZeroExt8to64 x) (ZeroExt8to64 y))
  9328  	for {
  9329  		x := v_0
  9330  		y := v_1
  9331  		v.reset(OpLOONG64REMVU)
  9332  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9333  		v0.AddArg(x)
  9334  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9335  		v1.AddArg(y)
  9336  		v.AddArg2(v0, v1)
  9337  		return true
  9338  	}
  9339  }
  9340  func rewriteValueLOONG64_OpMove(v *Value) bool {
  9341  	v_2 := v.Args[2]
  9342  	v_1 := v.Args[1]
  9343  	v_0 := v.Args[0]
  9344  	b := v.Block
  9345  	typ := &b.Func.Config.Types
  9346  	// match: (Move [0] _ _ mem)
  9347  	// result: mem
  9348  	for {
  9349  		if auxIntToInt64(v.AuxInt) != 0 {
  9350  			break
  9351  		}
  9352  		mem := v_2
  9353  		v.copyOf(mem)
  9354  		return true
  9355  	}
  9356  	// match: (Move [1] dst src mem)
  9357  	// result: (MOVBstore dst (MOVBUload src mem) mem)
  9358  	for {
  9359  		if auxIntToInt64(v.AuxInt) != 1 {
  9360  			break
  9361  		}
  9362  		dst := v_0
  9363  		src := v_1
  9364  		mem := v_2
  9365  		v.reset(OpLOONG64MOVBstore)
  9366  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVBUload, typ.UInt8)
  9367  		v0.AddArg2(src, mem)
  9368  		v.AddArg3(dst, v0, mem)
  9369  		return true
  9370  	}
  9371  	// match: (Move [2] dst src mem)
  9372  	// result: (MOVHstore dst (MOVHUload src mem) mem)
  9373  	for {
  9374  		if auxIntToInt64(v.AuxInt) != 2 {
  9375  			break
  9376  		}
  9377  		dst := v_0
  9378  		src := v_1
  9379  		mem := v_2
  9380  		v.reset(OpLOONG64MOVHstore)
  9381  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVHUload, typ.UInt16)
  9382  		v0.AddArg2(src, mem)
  9383  		v.AddArg3(dst, v0, mem)
  9384  		return true
  9385  	}
  9386  	// match: (Move [3] dst src mem)
  9387  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
  9388  	for {
  9389  		if auxIntToInt64(v.AuxInt) != 3 {
  9390  			break
  9391  		}
  9392  		dst := v_0
  9393  		src := v_1
  9394  		mem := v_2
  9395  		v.reset(OpLOONG64MOVBstore)
  9396  		v.AuxInt = int32ToAuxInt(2)
  9397  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVBUload, typ.UInt8)
  9398  		v0.AuxInt = int32ToAuxInt(2)
  9399  		v0.AddArg2(src, mem)
  9400  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVHstore, types.TypeMem)
  9401  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVHUload, typ.UInt16)
  9402  		v2.AddArg2(src, mem)
  9403  		v1.AddArg3(dst, v2, mem)
  9404  		v.AddArg3(dst, v0, v1)
  9405  		return true
  9406  	}
  9407  	// match: (Move [4] dst src mem)
  9408  	// result: (MOVWstore dst (MOVWUload src mem) mem)
  9409  	for {
  9410  		if auxIntToInt64(v.AuxInt) != 4 {
  9411  			break
  9412  		}
  9413  		dst := v_0
  9414  		src := v_1
  9415  		mem := v_2
  9416  		v.reset(OpLOONG64MOVWstore)
  9417  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9418  		v0.AddArg2(src, mem)
  9419  		v.AddArg3(dst, v0, mem)
  9420  		return true
  9421  	}
  9422  	// match: (Move [5] dst src mem)
  9423  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9424  	for {
  9425  		if auxIntToInt64(v.AuxInt) != 5 {
  9426  			break
  9427  		}
  9428  		dst := v_0
  9429  		src := v_1
  9430  		mem := v_2
  9431  		v.reset(OpLOONG64MOVBstore)
  9432  		v.AuxInt = int32ToAuxInt(4)
  9433  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVBUload, typ.UInt8)
  9434  		v0.AuxInt = int32ToAuxInt(4)
  9435  		v0.AddArg2(src, mem)
  9436  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
  9437  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9438  		v2.AddArg2(src, mem)
  9439  		v1.AddArg3(dst, v2, mem)
  9440  		v.AddArg3(dst, v0, v1)
  9441  		return true
  9442  	}
  9443  	// match: (Move [6] dst src mem)
  9444  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9445  	for {
  9446  		if auxIntToInt64(v.AuxInt) != 6 {
  9447  			break
  9448  		}
  9449  		dst := v_0
  9450  		src := v_1
  9451  		mem := v_2
  9452  		v.reset(OpLOONG64MOVHstore)
  9453  		v.AuxInt = int32ToAuxInt(4)
  9454  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVHUload, typ.UInt16)
  9455  		v0.AuxInt = int32ToAuxInt(4)
  9456  		v0.AddArg2(src, mem)
  9457  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
  9458  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9459  		v2.AddArg2(src, mem)
  9460  		v1.AddArg3(dst, v2, mem)
  9461  		v.AddArg3(dst, v0, v1)
  9462  		return true
  9463  	}
  9464  	// match: (Move [7] dst src mem)
  9465  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9466  	for {
  9467  		if auxIntToInt64(v.AuxInt) != 7 {
  9468  			break
  9469  		}
  9470  		dst := v_0
  9471  		src := v_1
  9472  		mem := v_2
  9473  		v.reset(OpLOONG64MOVWstore)
  9474  		v.AuxInt = int32ToAuxInt(3)
  9475  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9476  		v0.AuxInt = int32ToAuxInt(3)
  9477  		v0.AddArg2(src, mem)
  9478  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
  9479  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9480  		v2.AddArg2(src, mem)
  9481  		v1.AddArg3(dst, v2, mem)
  9482  		v.AddArg3(dst, v0, v1)
  9483  		return true
  9484  	}
  9485  	// match: (Move [8] dst src mem)
  9486  	// result: (MOVVstore dst (MOVVload src mem) mem)
  9487  	for {
  9488  		if auxIntToInt64(v.AuxInt) != 8 {
  9489  			break
  9490  		}
  9491  		dst := v_0
  9492  		src := v_1
  9493  		mem := v_2
  9494  		v.reset(OpLOONG64MOVVstore)
  9495  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9496  		v0.AddArg2(src, mem)
  9497  		v.AddArg3(dst, v0, mem)
  9498  		return true
  9499  	}
  9500  	// match: (Move [9] dst src mem)
  9501  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9502  	for {
  9503  		if auxIntToInt64(v.AuxInt) != 9 {
  9504  			break
  9505  		}
  9506  		dst := v_0
  9507  		src := v_1
  9508  		mem := v_2
  9509  		v.reset(OpLOONG64MOVBstore)
  9510  		v.AuxInt = int32ToAuxInt(8)
  9511  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVBUload, typ.UInt8)
  9512  		v0.AuxInt = int32ToAuxInt(8)
  9513  		v0.AddArg2(src, mem)
  9514  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9515  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9516  		v2.AddArg2(src, mem)
  9517  		v1.AddArg3(dst, v2, mem)
  9518  		v.AddArg3(dst, v0, v1)
  9519  		return true
  9520  	}
  9521  	// match: (Move [10] dst src mem)
  9522  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9523  	for {
  9524  		if auxIntToInt64(v.AuxInt) != 10 {
  9525  			break
  9526  		}
  9527  		dst := v_0
  9528  		src := v_1
  9529  		mem := v_2
  9530  		v.reset(OpLOONG64MOVHstore)
  9531  		v.AuxInt = int32ToAuxInt(8)
  9532  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVHUload, typ.UInt16)
  9533  		v0.AuxInt = int32ToAuxInt(8)
  9534  		v0.AddArg2(src, mem)
  9535  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9536  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9537  		v2.AddArg2(src, mem)
  9538  		v1.AddArg3(dst, v2, mem)
  9539  		v.AddArg3(dst, v0, v1)
  9540  		return true
  9541  	}
  9542  	// match: (Move [11] dst src mem)
  9543  	// result: (MOVWstore [7] dst (MOVWload [7] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9544  	for {
  9545  		if auxIntToInt64(v.AuxInt) != 11 {
  9546  			break
  9547  		}
  9548  		dst := v_0
  9549  		src := v_1
  9550  		mem := v_2
  9551  		v.reset(OpLOONG64MOVWstore)
  9552  		v.AuxInt = int32ToAuxInt(7)
  9553  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVWload, typ.Int32)
  9554  		v0.AuxInt = int32ToAuxInt(7)
  9555  		v0.AddArg2(src, mem)
  9556  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9557  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9558  		v2.AddArg2(src, mem)
  9559  		v1.AddArg3(dst, v2, mem)
  9560  		v.AddArg3(dst, v0, v1)
  9561  		return true
  9562  	}
  9563  	// match: (Move [12] dst src mem)
  9564  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9565  	for {
  9566  		if auxIntToInt64(v.AuxInt) != 12 {
  9567  			break
  9568  		}
  9569  		dst := v_0
  9570  		src := v_1
  9571  		mem := v_2
  9572  		v.reset(OpLOONG64MOVWstore)
  9573  		v.AuxInt = int32ToAuxInt(8)
  9574  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9575  		v0.AuxInt = int32ToAuxInt(8)
  9576  		v0.AddArg2(src, mem)
  9577  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9578  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9579  		v2.AddArg2(src, mem)
  9580  		v1.AddArg3(dst, v2, mem)
  9581  		v.AddArg3(dst, v0, v1)
  9582  		return true
  9583  	}
  9584  	// match: (Move [13] dst src mem)
  9585  	// result: (MOVVstore [5] dst (MOVVload [5] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9586  	for {
  9587  		if auxIntToInt64(v.AuxInt) != 13 {
  9588  			break
  9589  		}
  9590  		dst := v_0
  9591  		src := v_1
  9592  		mem := v_2
  9593  		v.reset(OpLOONG64MOVVstore)
  9594  		v.AuxInt = int32ToAuxInt(5)
  9595  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9596  		v0.AuxInt = int32ToAuxInt(5)
  9597  		v0.AddArg2(src, mem)
  9598  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9599  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9600  		v2.AddArg2(src, mem)
  9601  		v1.AddArg3(dst, v2, mem)
  9602  		v.AddArg3(dst, v0, v1)
  9603  		return true
  9604  	}
  9605  	// match: (Move [14] dst src mem)
  9606  	// result: (MOVVstore [6] dst (MOVVload [6] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9607  	for {
  9608  		if auxIntToInt64(v.AuxInt) != 14 {
  9609  			break
  9610  		}
  9611  		dst := v_0
  9612  		src := v_1
  9613  		mem := v_2
  9614  		v.reset(OpLOONG64MOVVstore)
  9615  		v.AuxInt = int32ToAuxInt(6)
  9616  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9617  		v0.AuxInt = int32ToAuxInt(6)
  9618  		v0.AddArg2(src, mem)
  9619  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9620  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9621  		v2.AddArg2(src, mem)
  9622  		v1.AddArg3(dst, v2, mem)
  9623  		v.AddArg3(dst, v0, v1)
  9624  		return true
  9625  	}
  9626  	// match: (Move [15] dst src mem)
  9627  	// result: (MOVVstore [7] dst (MOVVload [7] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9628  	for {
  9629  		if auxIntToInt64(v.AuxInt) != 15 {
  9630  			break
  9631  		}
  9632  		dst := v_0
  9633  		src := v_1
  9634  		mem := v_2
  9635  		v.reset(OpLOONG64MOVVstore)
  9636  		v.AuxInt = int32ToAuxInt(7)
  9637  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9638  		v0.AuxInt = int32ToAuxInt(7)
  9639  		v0.AddArg2(src, mem)
  9640  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9641  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9642  		v2.AddArg2(src, mem)
  9643  		v1.AddArg3(dst, v2, mem)
  9644  		v.AddArg3(dst, v0, v1)
  9645  		return true
  9646  	}
  9647  	// match: (Move [16] dst src mem)
  9648  	// result: (MOVVstore [8] dst (MOVVload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9649  	for {
  9650  		if auxIntToInt64(v.AuxInt) != 16 {
  9651  			break
  9652  		}
  9653  		dst := v_0
  9654  		src := v_1
  9655  		mem := v_2
  9656  		v.reset(OpLOONG64MOVVstore)
  9657  		v.AuxInt = int32ToAuxInt(8)
  9658  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9659  		v0.AuxInt = int32ToAuxInt(8)
  9660  		v0.AddArg2(src, mem)
  9661  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9662  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9663  		v2.AddArg2(src, mem)
  9664  		v1.AddArg3(dst, v2, mem)
  9665  		v.AddArg3(dst, v0, v1)
  9666  		return true
  9667  	}
  9668  	// match: (Move [s] dst src mem)
  9669  	// cond: s > 16 && s < 192 && logLargeCopy(v, s)
  9670  	// result: (LoweredMove [s] dst src mem)
  9671  	for {
  9672  		s := auxIntToInt64(v.AuxInt)
  9673  		dst := v_0
  9674  		src := v_1
  9675  		mem := v_2
  9676  		if !(s > 16 && s < 192 && logLargeCopy(v, s)) {
  9677  			break
  9678  		}
  9679  		v.reset(OpLOONG64LoweredMove)
  9680  		v.AuxInt = int64ToAuxInt(s)
  9681  		v.AddArg3(dst, src, mem)
  9682  		return true
  9683  	}
  9684  	// match: (Move [s] dst src mem)
  9685  	// cond: s >= 192 && logLargeCopy(v, s)
  9686  	// result: (LoweredMoveLoop [s] dst src mem)
  9687  	for {
  9688  		s := auxIntToInt64(v.AuxInt)
  9689  		dst := v_0
  9690  		src := v_1
  9691  		mem := v_2
  9692  		if !(s >= 192 && logLargeCopy(v, s)) {
  9693  			break
  9694  		}
  9695  		v.reset(OpLOONG64LoweredMoveLoop)
  9696  		v.AuxInt = int64ToAuxInt(s)
  9697  		v.AddArg3(dst, src, mem)
  9698  		return true
  9699  	}
  9700  	return false
  9701  }
  9702  func rewriteValueLOONG64_OpNeq16(v *Value) bool {
  9703  	v_1 := v.Args[1]
  9704  	v_0 := v.Args[0]
  9705  	b := v.Block
  9706  	typ := &b.Func.Config.Types
  9707  	// match: (Neq16 x y)
  9708  	// result: (SGTU (XOR (ZeroExt16to32 x) (ZeroExt16to64 y)) (MOVVconst [0]))
  9709  	for {
  9710  		x := v_0
  9711  		y := v_1
  9712  		v.reset(OpLOONG64SGTU)
  9713  		v0 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  9714  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  9715  		v1.AddArg(x)
  9716  		v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  9717  		v2.AddArg(y)
  9718  		v0.AddArg2(v1, v2)
  9719  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9720  		v3.AuxInt = int64ToAuxInt(0)
  9721  		v.AddArg2(v0, v3)
  9722  		return true
  9723  	}
  9724  }
  9725  func rewriteValueLOONG64_OpNeq32(v *Value) bool {
  9726  	v_1 := v.Args[1]
  9727  	v_0 := v.Args[0]
  9728  	b := v.Block
  9729  	typ := &b.Func.Config.Types
  9730  	// match: (Neq32 x y)
  9731  	// result: (SGTU (XOR (ZeroExt32to64 x) (ZeroExt32to64 y)) (MOVVconst [0]))
  9732  	for {
  9733  		x := v_0
  9734  		y := v_1
  9735  		v.reset(OpLOONG64SGTU)
  9736  		v0 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  9737  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  9738  		v1.AddArg(x)
  9739  		v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  9740  		v2.AddArg(y)
  9741  		v0.AddArg2(v1, v2)
  9742  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9743  		v3.AuxInt = int64ToAuxInt(0)
  9744  		v.AddArg2(v0, v3)
  9745  		return true
  9746  	}
  9747  }
  9748  func rewriteValueLOONG64_OpNeq32F(v *Value) bool {
  9749  	v_1 := v.Args[1]
  9750  	v_0 := v.Args[0]
  9751  	b := v.Block
  9752  	// match: (Neq32F x y)
  9753  	// result: (FPFlagFalse (CMPEQF x y))
  9754  	for {
  9755  		x := v_0
  9756  		y := v_1
  9757  		v.reset(OpLOONG64FPFlagFalse)
  9758  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPEQF, types.TypeFlags)
  9759  		v0.AddArg2(x, y)
  9760  		v.AddArg(v0)
  9761  		return true
  9762  	}
  9763  }
  9764  func rewriteValueLOONG64_OpNeq64(v *Value) bool {
  9765  	v_1 := v.Args[1]
  9766  	v_0 := v.Args[0]
  9767  	b := v.Block
  9768  	typ := &b.Func.Config.Types
  9769  	// match: (Neq64 x y)
  9770  	// result: (SGTU (XOR x y) (MOVVconst [0]))
  9771  	for {
  9772  		x := v_0
  9773  		y := v_1
  9774  		v.reset(OpLOONG64SGTU)
  9775  		v0 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  9776  		v0.AddArg2(x, y)
  9777  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9778  		v1.AuxInt = int64ToAuxInt(0)
  9779  		v.AddArg2(v0, v1)
  9780  		return true
  9781  	}
  9782  }
  9783  func rewriteValueLOONG64_OpNeq64F(v *Value) bool {
  9784  	v_1 := v.Args[1]
  9785  	v_0 := v.Args[0]
  9786  	b := v.Block
  9787  	// match: (Neq64F x y)
  9788  	// result: (FPFlagFalse (CMPEQD x y))
  9789  	for {
  9790  		x := v_0
  9791  		y := v_1
  9792  		v.reset(OpLOONG64FPFlagFalse)
  9793  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPEQD, types.TypeFlags)
  9794  		v0.AddArg2(x, y)
  9795  		v.AddArg(v0)
  9796  		return true
  9797  	}
  9798  }
  9799  func rewriteValueLOONG64_OpNeq8(v *Value) bool {
  9800  	v_1 := v.Args[1]
  9801  	v_0 := v.Args[0]
  9802  	b := v.Block
  9803  	typ := &b.Func.Config.Types
  9804  	// match: (Neq8 x y)
  9805  	// result: (SGTU (XOR (ZeroExt8to64 x) (ZeroExt8to64 y)) (MOVVconst [0]))
  9806  	for {
  9807  		x := v_0
  9808  		y := v_1
  9809  		v.reset(OpLOONG64SGTU)
  9810  		v0 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  9811  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9812  		v1.AddArg(x)
  9813  		v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9814  		v2.AddArg(y)
  9815  		v0.AddArg2(v1, v2)
  9816  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9817  		v3.AuxInt = int64ToAuxInt(0)
  9818  		v.AddArg2(v0, v3)
  9819  		return true
  9820  	}
  9821  }
  9822  func rewriteValueLOONG64_OpNeqPtr(v *Value) bool {
  9823  	v_1 := v.Args[1]
  9824  	v_0 := v.Args[0]
  9825  	b := v.Block
  9826  	typ := &b.Func.Config.Types
  9827  	// match: (NeqPtr x y)
  9828  	// result: (SGTU (XOR x y) (MOVVconst [0]))
  9829  	for {
  9830  		x := v_0
  9831  		y := v_1
  9832  		v.reset(OpLOONG64SGTU)
  9833  		v0 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  9834  		v0.AddArg2(x, y)
  9835  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9836  		v1.AuxInt = int64ToAuxInt(0)
  9837  		v.AddArg2(v0, v1)
  9838  		return true
  9839  	}
  9840  }
  9841  func rewriteValueLOONG64_OpNot(v *Value) bool {
  9842  	v_0 := v.Args[0]
  9843  	// match: (Not x)
  9844  	// result: (XORconst [1] x)
  9845  	for {
  9846  		x := v_0
  9847  		v.reset(OpLOONG64XORconst)
  9848  		v.AuxInt = int64ToAuxInt(1)
  9849  		v.AddArg(x)
  9850  		return true
  9851  	}
  9852  }
  9853  func rewriteValueLOONG64_OpOffPtr(v *Value) bool {
  9854  	v_0 := v.Args[0]
  9855  	// match: (OffPtr [off] ptr:(SP))
  9856  	// result: (MOVVaddr [int32(off)] ptr)
  9857  	for {
  9858  		off := auxIntToInt64(v.AuxInt)
  9859  		ptr := v_0
  9860  		if ptr.Op != OpSP {
  9861  			break
  9862  		}
  9863  		v.reset(OpLOONG64MOVVaddr)
  9864  		v.AuxInt = int32ToAuxInt(int32(off))
  9865  		v.AddArg(ptr)
  9866  		return true
  9867  	}
  9868  	// match: (OffPtr [off] ptr)
  9869  	// result: (ADDVconst [off] ptr)
  9870  	for {
  9871  		off := auxIntToInt64(v.AuxInt)
  9872  		ptr := v_0
  9873  		v.reset(OpLOONG64ADDVconst)
  9874  		v.AuxInt = int64ToAuxInt(off)
  9875  		v.AddArg(ptr)
  9876  		return true
  9877  	}
  9878  }
  9879  func rewriteValueLOONG64_OpPopCount16(v *Value) bool {
  9880  	v_0 := v.Args[0]
  9881  	b := v.Block
  9882  	typ := &b.Func.Config.Types
  9883  	// match: (PopCount16 <t> x)
  9884  	// result: (MOVWfpgp <t> (VPCNT16 <typ.Float32> (MOVWgpfp <typ.Float32> (ZeroExt16to32 x))))
  9885  	for {
  9886  		t := v.Type
  9887  		x := v_0
  9888  		v.reset(OpLOONG64MOVWfpgp)
  9889  		v.Type = t
  9890  		v0 := b.NewValue0(v.Pos, OpLOONG64VPCNT16, typ.Float32)
  9891  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWgpfp, typ.Float32)
  9892  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  9893  		v2.AddArg(x)
  9894  		v1.AddArg(v2)
  9895  		v0.AddArg(v1)
  9896  		v.AddArg(v0)
  9897  		return true
  9898  	}
  9899  }
  9900  func rewriteValueLOONG64_OpPopCount32(v *Value) bool {
  9901  	v_0 := v.Args[0]
  9902  	b := v.Block
  9903  	typ := &b.Func.Config.Types
  9904  	// match: (PopCount32 <t> x)
  9905  	// result: (MOVWfpgp <t> (VPCNT32 <typ.Float32> (MOVWgpfp <typ.Float32> x)))
  9906  	for {
  9907  		t := v.Type
  9908  		x := v_0
  9909  		v.reset(OpLOONG64MOVWfpgp)
  9910  		v.Type = t
  9911  		v0 := b.NewValue0(v.Pos, OpLOONG64VPCNT32, typ.Float32)
  9912  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWgpfp, typ.Float32)
  9913  		v1.AddArg(x)
  9914  		v0.AddArg(v1)
  9915  		v.AddArg(v0)
  9916  		return true
  9917  	}
  9918  }
  9919  func rewriteValueLOONG64_OpPopCount64(v *Value) bool {
  9920  	v_0 := v.Args[0]
  9921  	b := v.Block
  9922  	typ := &b.Func.Config.Types
  9923  	// match: (PopCount64 <t> x)
  9924  	// result: (MOVVfpgp <t> (VPCNT64 <typ.Float64> (MOVVgpfp <typ.Float64> x)))
  9925  	for {
  9926  		t := v.Type
  9927  		x := v_0
  9928  		v.reset(OpLOONG64MOVVfpgp)
  9929  		v.Type = t
  9930  		v0 := b.NewValue0(v.Pos, OpLOONG64VPCNT64, typ.Float64)
  9931  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVgpfp, typ.Float64)
  9932  		v1.AddArg(x)
  9933  		v0.AddArg(v1)
  9934  		v.AddArg(v0)
  9935  		return true
  9936  	}
  9937  }
  9938  func rewriteValueLOONG64_OpPrefetchCache(v *Value) bool {
  9939  	v_1 := v.Args[1]
  9940  	v_0 := v.Args[0]
  9941  	// match: (PrefetchCache addr mem)
  9942  	// result: (PRELD addr mem [0])
  9943  	for {
  9944  		addr := v_0
  9945  		mem := v_1
  9946  		v.reset(OpLOONG64PRELD)
  9947  		v.AuxInt = int64ToAuxInt(0)
  9948  		v.AddArg2(addr, mem)
  9949  		return true
  9950  	}
  9951  }
  9952  func rewriteValueLOONG64_OpPrefetchCacheStreamed(v *Value) bool {
  9953  	v_1 := v.Args[1]
  9954  	v_0 := v.Args[0]
  9955  	// match: (PrefetchCacheStreamed addr mem)
  9956  	// result: (PRELDX addr mem [(((512 << 1) + (1 << 12)) << 5) + 2])
  9957  	for {
  9958  		addr := v_0
  9959  		mem := v_1
  9960  		v.reset(OpLOONG64PRELDX)
  9961  		v.AuxInt = int64ToAuxInt((((512 << 1) + (1 << 12)) << 5) + 2)
  9962  		v.AddArg2(addr, mem)
  9963  		return true
  9964  	}
  9965  }
  9966  func rewriteValueLOONG64_OpRotateLeft16(v *Value) bool {
  9967  	v_1 := v.Args[1]
  9968  	v_0 := v.Args[0]
  9969  	b := v.Block
  9970  	typ := &b.Func.Config.Types
  9971  	// match: (RotateLeft16 <t> x (MOVVconst [c]))
  9972  	// result: (Or16 (Lsh16x64 <t> x (MOVVconst [c&15])) (Rsh16Ux64 <t> x (MOVVconst [-c&15])))
  9973  	for {
  9974  		t := v.Type
  9975  		x := v_0
  9976  		if v_1.Op != OpLOONG64MOVVconst {
  9977  			break
  9978  		}
  9979  		c := auxIntToInt64(v_1.AuxInt)
  9980  		v.reset(OpOr16)
  9981  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
  9982  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9983  		v1.AuxInt = int64ToAuxInt(c & 15)
  9984  		v0.AddArg2(x, v1)
  9985  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
  9986  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9987  		v3.AuxInt = int64ToAuxInt(-c & 15)
  9988  		v2.AddArg2(x, v3)
  9989  		v.AddArg2(v0, v2)
  9990  		return true
  9991  	}
  9992  	// match: (RotateLeft16 <t> x y)
  9993  	// result: (ROTR <t> (OR <typ.UInt32> (ZeroExt16to32 x) (SLLVconst <t> (ZeroExt16to32 x) [16])) (NEGV <typ.Int64> y))
  9994  	for {
  9995  		t := v.Type
  9996  		x := v_0
  9997  		y := v_1
  9998  		v.reset(OpLOONG64ROTR)
  9999  		v.Type = t
 10000  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, typ.UInt32)
 10001  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 10002  		v1.AddArg(x)
 10003  		v2 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, t)
 10004  		v2.AuxInt = int64ToAuxInt(16)
 10005  		v2.AddArg(v1)
 10006  		v0.AddArg2(v1, v2)
 10007  		v3 := b.NewValue0(v.Pos, OpLOONG64NEGV, typ.Int64)
 10008  		v3.AddArg(y)
 10009  		v.AddArg2(v0, v3)
 10010  		return true
 10011  	}
 10012  }
 10013  func rewriteValueLOONG64_OpRotateLeft32(v *Value) bool {
 10014  	v_1 := v.Args[1]
 10015  	v_0 := v.Args[0]
 10016  	b := v.Block
 10017  	// match: (RotateLeft32 x y)
 10018  	// result: (ROTR x (NEGV <y.Type> y))
 10019  	for {
 10020  		x := v_0
 10021  		y := v_1
 10022  		v.reset(OpLOONG64ROTR)
 10023  		v0 := b.NewValue0(v.Pos, OpLOONG64NEGV, y.Type)
 10024  		v0.AddArg(y)
 10025  		v.AddArg2(x, v0)
 10026  		return true
 10027  	}
 10028  }
 10029  func rewriteValueLOONG64_OpRotateLeft64(v *Value) bool {
 10030  	v_1 := v.Args[1]
 10031  	v_0 := v.Args[0]
 10032  	b := v.Block
 10033  	// match: (RotateLeft64 x y)
 10034  	// result: (ROTRV x (NEGV <y.Type> y))
 10035  	for {
 10036  		x := v_0
 10037  		y := v_1
 10038  		v.reset(OpLOONG64ROTRV)
 10039  		v0 := b.NewValue0(v.Pos, OpLOONG64NEGV, y.Type)
 10040  		v0.AddArg(y)
 10041  		v.AddArg2(x, v0)
 10042  		return true
 10043  	}
 10044  }
 10045  func rewriteValueLOONG64_OpRotateLeft8(v *Value) bool {
 10046  	v_1 := v.Args[1]
 10047  	v_0 := v.Args[0]
 10048  	b := v.Block
 10049  	typ := &b.Func.Config.Types
 10050  	// match: (RotateLeft8 <t> x (MOVVconst [c]))
 10051  	// result: (Or8 (Lsh8x64 <t> x (MOVVconst [c&7])) (Rsh8Ux64 <t> x (MOVVconst [-c&7])))
 10052  	for {
 10053  		t := v.Type
 10054  		x := v_0
 10055  		if v_1.Op != OpLOONG64MOVVconst {
 10056  			break
 10057  		}
 10058  		c := auxIntToInt64(v_1.AuxInt)
 10059  		v.reset(OpOr8)
 10060  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
 10061  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10062  		v1.AuxInt = int64ToAuxInt(c & 7)
 10063  		v0.AddArg2(x, v1)
 10064  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
 10065  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10066  		v3.AuxInt = int64ToAuxInt(-c & 7)
 10067  		v2.AddArg2(x, v3)
 10068  		v.AddArg2(v0, v2)
 10069  		return true
 10070  	}
 10071  	// match: (RotateLeft8 <t> x y)
 10072  	// result: (OR <t> (SLLV <t> x (ANDconst <typ.Int64> [7] y)) (SRLV <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEGV <typ.Int64> y))))
 10073  	for {
 10074  		t := v.Type
 10075  		x := v_0
 10076  		y := v_1
 10077  		v.reset(OpLOONG64OR)
 10078  		v.Type = t
 10079  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
 10080  		v1 := b.NewValue0(v.Pos, OpLOONG64ANDconst, typ.Int64)
 10081  		v1.AuxInt = int64ToAuxInt(7)
 10082  		v1.AddArg(y)
 10083  		v0.AddArg2(x, v1)
 10084  		v2 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10085  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 10086  		v3.AddArg(x)
 10087  		v4 := b.NewValue0(v.Pos, OpLOONG64ANDconst, typ.Int64)
 10088  		v4.AuxInt = int64ToAuxInt(7)
 10089  		v5 := b.NewValue0(v.Pos, OpLOONG64NEGV, typ.Int64)
 10090  		v5.AddArg(y)
 10091  		v4.AddArg(v5)
 10092  		v2.AddArg2(v3, v4)
 10093  		v.AddArg2(v0, v2)
 10094  		return true
 10095  	}
 10096  }
 10097  func rewriteValueLOONG64_OpRsh16Ux16(v *Value) bool {
 10098  	v_1 := v.Args[1]
 10099  	v_0 := v.Args[0]
 10100  	b := v.Block
 10101  	typ := &b.Func.Config.Types
 10102  	// match: (Rsh16Ux16 x y)
 10103  	// cond: shiftIsBounded(v)
 10104  	// result: (SRLV (ZeroExt16to64 x) y)
 10105  	for {
 10106  		x := v_0
 10107  		y := v_1
 10108  		if !(shiftIsBounded(v)) {
 10109  			break
 10110  		}
 10111  		v.reset(OpLOONG64SRLV)
 10112  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10113  		v0.AddArg(x)
 10114  		v.AddArg2(v0, y)
 10115  		return true
 10116  	}
 10117  	// match: (Rsh16Ux16 <t> x y)
 10118  	// cond: !shiftIsBounded(v)
 10119  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 10120  	for {
 10121  		t := v.Type
 10122  		x := v_0
 10123  		y := v_1
 10124  		if !(!shiftIsBounded(v)) {
 10125  			break
 10126  		}
 10127  		v.reset(OpLOONG64MASKEQZ)
 10128  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10129  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10130  		v1.AddArg(x)
 10131  		v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10132  		v2.AddArg(y)
 10133  		v0.AddArg2(v1, v2)
 10134  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10135  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10136  		v4.AuxInt = int64ToAuxInt(64)
 10137  		v3.AddArg2(v4, v2)
 10138  		v.AddArg2(v0, v3)
 10139  		return true
 10140  	}
 10141  	return false
 10142  }
 10143  func rewriteValueLOONG64_OpRsh16Ux32(v *Value) bool {
 10144  	v_1 := v.Args[1]
 10145  	v_0 := v.Args[0]
 10146  	b := v.Block
 10147  	typ := &b.Func.Config.Types
 10148  	// match: (Rsh16Ux32 x y)
 10149  	// cond: shiftIsBounded(v)
 10150  	// result: (SRLV (ZeroExt16to64 x) y)
 10151  	for {
 10152  		x := v_0
 10153  		y := v_1
 10154  		if !(shiftIsBounded(v)) {
 10155  			break
 10156  		}
 10157  		v.reset(OpLOONG64SRLV)
 10158  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10159  		v0.AddArg(x)
 10160  		v.AddArg2(v0, y)
 10161  		return true
 10162  	}
 10163  	// match: (Rsh16Ux32 <t> x y)
 10164  	// cond: !shiftIsBounded(v)
 10165  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 10166  	for {
 10167  		t := v.Type
 10168  		x := v_0
 10169  		y := v_1
 10170  		if !(!shiftIsBounded(v)) {
 10171  			break
 10172  		}
 10173  		v.reset(OpLOONG64MASKEQZ)
 10174  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10175  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10176  		v1.AddArg(x)
 10177  		v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 10178  		v2.AddArg(y)
 10179  		v0.AddArg2(v1, v2)
 10180  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10181  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10182  		v4.AuxInt = int64ToAuxInt(64)
 10183  		v3.AddArg2(v4, v2)
 10184  		v.AddArg2(v0, v3)
 10185  		return true
 10186  	}
 10187  	return false
 10188  }
 10189  func rewriteValueLOONG64_OpRsh16Ux64(v *Value) bool {
 10190  	v_1 := v.Args[1]
 10191  	v_0 := v.Args[0]
 10192  	b := v.Block
 10193  	typ := &b.Func.Config.Types
 10194  	// match: (Rsh16Ux64 x y)
 10195  	// cond: shiftIsBounded(v)
 10196  	// result: (SRLV (ZeroExt16to64 x) y)
 10197  	for {
 10198  		x := v_0
 10199  		y := v_1
 10200  		if !(shiftIsBounded(v)) {
 10201  			break
 10202  		}
 10203  		v.reset(OpLOONG64SRLV)
 10204  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10205  		v0.AddArg(x)
 10206  		v.AddArg2(v0, y)
 10207  		return true
 10208  	}
 10209  	// match: (Rsh16Ux64 <t> x y)
 10210  	// cond: !shiftIsBounded(v)
 10211  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 10212  	for {
 10213  		t := v.Type
 10214  		x := v_0
 10215  		y := v_1
 10216  		if !(!shiftIsBounded(v)) {
 10217  			break
 10218  		}
 10219  		v.reset(OpLOONG64MASKEQZ)
 10220  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10221  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10222  		v1.AddArg(x)
 10223  		v0.AddArg2(v1, y)
 10224  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10225  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10226  		v3.AuxInt = int64ToAuxInt(64)
 10227  		v2.AddArg2(v3, y)
 10228  		v.AddArg2(v0, v2)
 10229  		return true
 10230  	}
 10231  	return false
 10232  }
 10233  func rewriteValueLOONG64_OpRsh16Ux8(v *Value) bool {
 10234  	v_1 := v.Args[1]
 10235  	v_0 := v.Args[0]
 10236  	b := v.Block
 10237  	typ := &b.Func.Config.Types
 10238  	// match: (Rsh16Ux8 x y)
 10239  	// cond: shiftIsBounded(v)
 10240  	// result: (SRLV (ZeroExt16to64 x) y)
 10241  	for {
 10242  		x := v_0
 10243  		y := v_1
 10244  		if !(shiftIsBounded(v)) {
 10245  			break
 10246  		}
 10247  		v.reset(OpLOONG64SRLV)
 10248  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10249  		v0.AddArg(x)
 10250  		v.AddArg2(v0, y)
 10251  		return true
 10252  	}
 10253  	// match: (Rsh16Ux8 <t> x y)
 10254  	// cond: !shiftIsBounded(v)
 10255  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 10256  	for {
 10257  		t := v.Type
 10258  		x := v_0
 10259  		y := v_1
 10260  		if !(!shiftIsBounded(v)) {
 10261  			break
 10262  		}
 10263  		v.reset(OpLOONG64MASKEQZ)
 10264  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10265  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10266  		v1.AddArg(x)
 10267  		v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 10268  		v2.AddArg(y)
 10269  		v0.AddArg2(v1, v2)
 10270  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10271  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10272  		v4.AuxInt = int64ToAuxInt(64)
 10273  		v3.AddArg2(v4, v2)
 10274  		v.AddArg2(v0, v3)
 10275  		return true
 10276  	}
 10277  	return false
 10278  }
 10279  func rewriteValueLOONG64_OpRsh16x16(v *Value) bool {
 10280  	v_1 := v.Args[1]
 10281  	v_0 := v.Args[0]
 10282  	b := v.Block
 10283  	typ := &b.Func.Config.Types
 10284  	// match: (Rsh16x16 x y)
 10285  	// cond: shiftIsBounded(v)
 10286  	// result: (SRAV (SignExt16to64 x) y)
 10287  	for {
 10288  		x := v_0
 10289  		y := v_1
 10290  		if !(shiftIsBounded(v)) {
 10291  			break
 10292  		}
 10293  		v.reset(OpLOONG64SRAV)
 10294  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10295  		v0.AddArg(x)
 10296  		v.AddArg2(v0, y)
 10297  		return true
 10298  	}
 10299  	// match: (Rsh16x16 <t> x y)
 10300  	// cond: !shiftIsBounded(v)
 10301  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 10302  	for {
 10303  		t := v.Type
 10304  		x := v_0
 10305  		y := v_1
 10306  		if !(!shiftIsBounded(v)) {
 10307  			break
 10308  		}
 10309  		v.reset(OpLOONG64SRAV)
 10310  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10311  		v0.AddArg(x)
 10312  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10313  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10314  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10315  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10316  		v4.AddArg(y)
 10317  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10318  		v5.AuxInt = int64ToAuxInt(63)
 10319  		v3.AddArg2(v4, v5)
 10320  		v2.AddArg(v3)
 10321  		v1.AddArg2(v2, v4)
 10322  		v.AddArg2(v0, v1)
 10323  		return true
 10324  	}
 10325  	return false
 10326  }
 10327  func rewriteValueLOONG64_OpRsh16x32(v *Value) bool {
 10328  	v_1 := v.Args[1]
 10329  	v_0 := v.Args[0]
 10330  	b := v.Block
 10331  	typ := &b.Func.Config.Types
 10332  	// match: (Rsh16x32 x y)
 10333  	// cond: shiftIsBounded(v)
 10334  	// result: (SRAV (SignExt16to64 x) y)
 10335  	for {
 10336  		x := v_0
 10337  		y := v_1
 10338  		if !(shiftIsBounded(v)) {
 10339  			break
 10340  		}
 10341  		v.reset(OpLOONG64SRAV)
 10342  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10343  		v0.AddArg(x)
 10344  		v.AddArg2(v0, y)
 10345  		return true
 10346  	}
 10347  	// match: (Rsh16x32 <t> x y)
 10348  	// cond: !shiftIsBounded(v)
 10349  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 10350  	for {
 10351  		t := v.Type
 10352  		x := v_0
 10353  		y := v_1
 10354  		if !(!shiftIsBounded(v)) {
 10355  			break
 10356  		}
 10357  		v.reset(OpLOONG64SRAV)
 10358  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10359  		v0.AddArg(x)
 10360  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10361  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10362  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10363  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 10364  		v4.AddArg(y)
 10365  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10366  		v5.AuxInt = int64ToAuxInt(63)
 10367  		v3.AddArg2(v4, v5)
 10368  		v2.AddArg(v3)
 10369  		v1.AddArg2(v2, v4)
 10370  		v.AddArg2(v0, v1)
 10371  		return true
 10372  	}
 10373  	return false
 10374  }
 10375  func rewriteValueLOONG64_OpRsh16x64(v *Value) bool {
 10376  	v_1 := v.Args[1]
 10377  	v_0 := v.Args[0]
 10378  	b := v.Block
 10379  	typ := &b.Func.Config.Types
 10380  	// match: (Rsh16x64 x y)
 10381  	// cond: shiftIsBounded(v)
 10382  	// result: (SRAV (SignExt16to64 x) y)
 10383  	for {
 10384  		x := v_0
 10385  		y := v_1
 10386  		if !(shiftIsBounded(v)) {
 10387  			break
 10388  		}
 10389  		v.reset(OpLOONG64SRAV)
 10390  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10391  		v0.AddArg(x)
 10392  		v.AddArg2(v0, y)
 10393  		return true
 10394  	}
 10395  	// match: (Rsh16x64 <t> x y)
 10396  	// cond: !shiftIsBounded(v)
 10397  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 10398  	for {
 10399  		t := v.Type
 10400  		x := v_0
 10401  		y := v_1
 10402  		if !(!shiftIsBounded(v)) {
 10403  			break
 10404  		}
 10405  		v.reset(OpLOONG64SRAV)
 10406  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10407  		v0.AddArg(x)
 10408  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10409  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10410  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10411  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10412  		v4.AuxInt = int64ToAuxInt(63)
 10413  		v3.AddArg2(y, v4)
 10414  		v2.AddArg(v3)
 10415  		v1.AddArg2(v2, y)
 10416  		v.AddArg2(v0, v1)
 10417  		return true
 10418  	}
 10419  	return false
 10420  }
 10421  func rewriteValueLOONG64_OpRsh16x8(v *Value) bool {
 10422  	v_1 := v.Args[1]
 10423  	v_0 := v.Args[0]
 10424  	b := v.Block
 10425  	typ := &b.Func.Config.Types
 10426  	// match: (Rsh16x8 x y)
 10427  	// cond: shiftIsBounded(v)
 10428  	// result: (SRAV (SignExt16to64 x) y)
 10429  	for {
 10430  		x := v_0
 10431  		y := v_1
 10432  		if !(shiftIsBounded(v)) {
 10433  			break
 10434  		}
 10435  		v.reset(OpLOONG64SRAV)
 10436  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10437  		v0.AddArg(x)
 10438  		v.AddArg2(v0, y)
 10439  		return true
 10440  	}
 10441  	// match: (Rsh16x8 <t> x y)
 10442  	// cond: !shiftIsBounded(v)
 10443  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 10444  	for {
 10445  		t := v.Type
 10446  		x := v_0
 10447  		y := v_1
 10448  		if !(!shiftIsBounded(v)) {
 10449  			break
 10450  		}
 10451  		v.reset(OpLOONG64SRAV)
 10452  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10453  		v0.AddArg(x)
 10454  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10455  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10456  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10457  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 10458  		v4.AddArg(y)
 10459  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10460  		v5.AuxInt = int64ToAuxInt(63)
 10461  		v3.AddArg2(v4, v5)
 10462  		v2.AddArg(v3)
 10463  		v1.AddArg2(v2, v4)
 10464  		v.AddArg2(v0, v1)
 10465  		return true
 10466  	}
 10467  	return false
 10468  }
 10469  func rewriteValueLOONG64_OpRsh32Ux16(v *Value) bool {
 10470  	v_1 := v.Args[1]
 10471  	v_0 := v.Args[0]
 10472  	b := v.Block
 10473  	typ := &b.Func.Config.Types
 10474  	// match: (Rsh32Ux16 x y)
 10475  	// cond: shiftIsBounded(v)
 10476  	// result: (SRL x y)
 10477  	for {
 10478  		x := v_0
 10479  		y := v_1
 10480  		if !(shiftIsBounded(v)) {
 10481  			break
 10482  		}
 10483  		v.reset(OpLOONG64SRL)
 10484  		v.AddArg2(x, y)
 10485  		return true
 10486  	}
 10487  	// match: (Rsh32Ux16 <t> x y)
 10488  	// cond: !shiftIsBounded(v)
 10489  	// result: (MASKEQZ (SRL <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt16to64 y)))
 10490  	for {
 10491  		t := v.Type
 10492  		x := v_0
 10493  		y := v_1
 10494  		if !(!shiftIsBounded(v)) {
 10495  			break
 10496  		}
 10497  		v.reset(OpLOONG64MASKEQZ)
 10498  		v0 := b.NewValue0(v.Pos, OpLOONG64SRL, t)
 10499  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10500  		v1.AddArg(y)
 10501  		v0.AddArg2(x, v1)
 10502  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10503  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10504  		v3.AuxInt = int64ToAuxInt(32)
 10505  		v2.AddArg2(v3, v1)
 10506  		v.AddArg2(v0, v2)
 10507  		return true
 10508  	}
 10509  	return false
 10510  }
 10511  func rewriteValueLOONG64_OpRsh32Ux32(v *Value) bool {
 10512  	v_1 := v.Args[1]
 10513  	v_0 := v.Args[0]
 10514  	b := v.Block
 10515  	typ := &b.Func.Config.Types
 10516  	// match: (Rsh32Ux32 x y)
 10517  	// cond: shiftIsBounded(v)
 10518  	// result: (SRL x y)
 10519  	for {
 10520  		x := v_0
 10521  		y := v_1
 10522  		if !(shiftIsBounded(v)) {
 10523  			break
 10524  		}
 10525  		v.reset(OpLOONG64SRL)
 10526  		v.AddArg2(x, y)
 10527  		return true
 10528  	}
 10529  	// match: (Rsh32Ux32 <t> x y)
 10530  	// cond: !shiftIsBounded(v)
 10531  	// result: (MASKEQZ (SRL <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt32to64 y)))
 10532  	for {
 10533  		t := v.Type
 10534  		x := v_0
 10535  		y := v_1
 10536  		if !(!shiftIsBounded(v)) {
 10537  			break
 10538  		}
 10539  		v.reset(OpLOONG64MASKEQZ)
 10540  		v0 := b.NewValue0(v.Pos, OpLOONG64SRL, t)
 10541  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 10542  		v1.AddArg(y)
 10543  		v0.AddArg2(x, v1)
 10544  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10545  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10546  		v3.AuxInt = int64ToAuxInt(32)
 10547  		v2.AddArg2(v3, v1)
 10548  		v.AddArg2(v0, v2)
 10549  		return true
 10550  	}
 10551  	return false
 10552  }
 10553  func rewriteValueLOONG64_OpRsh32Ux64(v *Value) bool {
 10554  	v_1 := v.Args[1]
 10555  	v_0 := v.Args[0]
 10556  	b := v.Block
 10557  	typ := &b.Func.Config.Types
 10558  	// match: (Rsh32Ux64 x y)
 10559  	// cond: shiftIsBounded(v)
 10560  	// result: (SRL x y)
 10561  	for {
 10562  		x := v_0
 10563  		y := v_1
 10564  		if !(shiftIsBounded(v)) {
 10565  			break
 10566  		}
 10567  		v.reset(OpLOONG64SRL)
 10568  		v.AddArg2(x, y)
 10569  		return true
 10570  	}
 10571  	// match: (Rsh32Ux64 <t> x y)
 10572  	// cond: !shiftIsBounded(v)
 10573  	// result: (MASKEQZ (SRL <t> x y) (SGTU (MOVVconst <typ.UInt64> [32]) y))
 10574  	for {
 10575  		t := v.Type
 10576  		x := v_0
 10577  		y := v_1
 10578  		if !(!shiftIsBounded(v)) {
 10579  			break
 10580  		}
 10581  		v.reset(OpLOONG64MASKEQZ)
 10582  		v0 := b.NewValue0(v.Pos, OpLOONG64SRL, t)
 10583  		v0.AddArg2(x, y)
 10584  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10585  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10586  		v2.AuxInt = int64ToAuxInt(32)
 10587  		v1.AddArg2(v2, y)
 10588  		v.AddArg2(v0, v1)
 10589  		return true
 10590  	}
 10591  	return false
 10592  }
 10593  func rewriteValueLOONG64_OpRsh32Ux8(v *Value) bool {
 10594  	v_1 := v.Args[1]
 10595  	v_0 := v.Args[0]
 10596  	b := v.Block
 10597  	typ := &b.Func.Config.Types
 10598  	// match: (Rsh32Ux8 x y)
 10599  	// cond: shiftIsBounded(v)
 10600  	// result: (SRL x y)
 10601  	for {
 10602  		x := v_0
 10603  		y := v_1
 10604  		if !(shiftIsBounded(v)) {
 10605  			break
 10606  		}
 10607  		v.reset(OpLOONG64SRL)
 10608  		v.AddArg2(x, y)
 10609  		return true
 10610  	}
 10611  	// match: (Rsh32Ux8 <t> x y)
 10612  	// cond: !shiftIsBounded(v)
 10613  	// result: (MASKEQZ (SRL <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt8to64 y)))
 10614  	for {
 10615  		t := v.Type
 10616  		x := v_0
 10617  		y := v_1
 10618  		if !(!shiftIsBounded(v)) {
 10619  			break
 10620  		}
 10621  		v.reset(OpLOONG64MASKEQZ)
 10622  		v0 := b.NewValue0(v.Pos, OpLOONG64SRL, t)
 10623  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 10624  		v1.AddArg(y)
 10625  		v0.AddArg2(x, v1)
 10626  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10627  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10628  		v3.AuxInt = int64ToAuxInt(32)
 10629  		v2.AddArg2(v3, v1)
 10630  		v.AddArg2(v0, v2)
 10631  		return true
 10632  	}
 10633  	return false
 10634  }
 10635  func rewriteValueLOONG64_OpRsh32x16(v *Value) bool {
 10636  	v_1 := v.Args[1]
 10637  	v_0 := v.Args[0]
 10638  	b := v.Block
 10639  	typ := &b.Func.Config.Types
 10640  	// match: (Rsh32x16 x y)
 10641  	// cond: shiftIsBounded(v)
 10642  	// result: (SRA x y)
 10643  	for {
 10644  		x := v_0
 10645  		y := v_1
 10646  		if !(shiftIsBounded(v)) {
 10647  			break
 10648  		}
 10649  		v.reset(OpLOONG64SRA)
 10650  		v.AddArg2(x, y)
 10651  		return true
 10652  	}
 10653  	// match: (Rsh32x16 <t> x y)
 10654  	// cond: !shiftIsBounded(v)
 10655  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt16to64 y)))
 10656  	for {
 10657  		t := v.Type
 10658  		x := v_0
 10659  		y := v_1
 10660  		if !(!shiftIsBounded(v)) {
 10661  			break
 10662  		}
 10663  		v.reset(OpLOONG64SRA)
 10664  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10665  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10666  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10667  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10668  		v3.AddArg(y)
 10669  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10670  		v4.AuxInt = int64ToAuxInt(31)
 10671  		v2.AddArg2(v3, v4)
 10672  		v1.AddArg(v2)
 10673  		v0.AddArg2(v1, v3)
 10674  		v.AddArg2(x, v0)
 10675  		return true
 10676  	}
 10677  	return false
 10678  }
 10679  func rewriteValueLOONG64_OpRsh32x32(v *Value) bool {
 10680  	v_1 := v.Args[1]
 10681  	v_0 := v.Args[0]
 10682  	b := v.Block
 10683  	typ := &b.Func.Config.Types
 10684  	// match: (Rsh32x32 x y)
 10685  	// cond: shiftIsBounded(v)
 10686  	// result: (SRA x y)
 10687  	for {
 10688  		x := v_0
 10689  		y := v_1
 10690  		if !(shiftIsBounded(v)) {
 10691  			break
 10692  		}
 10693  		v.reset(OpLOONG64SRA)
 10694  		v.AddArg2(x, y)
 10695  		return true
 10696  	}
 10697  	// match: (Rsh32x32 <t> x y)
 10698  	// cond: !shiftIsBounded(v)
 10699  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt32to64 y)))
 10700  	for {
 10701  		t := v.Type
 10702  		x := v_0
 10703  		y := v_1
 10704  		if !(!shiftIsBounded(v)) {
 10705  			break
 10706  		}
 10707  		v.reset(OpLOONG64SRA)
 10708  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10709  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10710  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10711  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 10712  		v3.AddArg(y)
 10713  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10714  		v4.AuxInt = int64ToAuxInt(31)
 10715  		v2.AddArg2(v3, v4)
 10716  		v1.AddArg(v2)
 10717  		v0.AddArg2(v1, v3)
 10718  		v.AddArg2(x, v0)
 10719  		return true
 10720  	}
 10721  	return false
 10722  }
 10723  func rewriteValueLOONG64_OpRsh32x64(v *Value) bool {
 10724  	v_1 := v.Args[1]
 10725  	v_0 := v.Args[0]
 10726  	b := v.Block
 10727  	typ := &b.Func.Config.Types
 10728  	// match: (Rsh32x64 x y)
 10729  	// cond: shiftIsBounded(v)
 10730  	// result: (SRA x y)
 10731  	for {
 10732  		x := v_0
 10733  		y := v_1
 10734  		if !(shiftIsBounded(v)) {
 10735  			break
 10736  		}
 10737  		v.reset(OpLOONG64SRA)
 10738  		v.AddArg2(x, y)
 10739  		return true
 10740  	}
 10741  	// match: (Rsh32x64 <t> x y)
 10742  	// cond: !shiftIsBounded(v)
 10743  	// result: (SRA x (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [31]))) y))
 10744  	for {
 10745  		t := v.Type
 10746  		x := v_0
 10747  		y := v_1
 10748  		if !(!shiftIsBounded(v)) {
 10749  			break
 10750  		}
 10751  		v.reset(OpLOONG64SRA)
 10752  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10753  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10754  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10755  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10756  		v3.AuxInt = int64ToAuxInt(31)
 10757  		v2.AddArg2(y, v3)
 10758  		v1.AddArg(v2)
 10759  		v0.AddArg2(v1, y)
 10760  		v.AddArg2(x, v0)
 10761  		return true
 10762  	}
 10763  	return false
 10764  }
 10765  func rewriteValueLOONG64_OpRsh32x8(v *Value) bool {
 10766  	v_1 := v.Args[1]
 10767  	v_0 := v.Args[0]
 10768  	b := v.Block
 10769  	typ := &b.Func.Config.Types
 10770  	// match: (Rsh32x8 x y)
 10771  	// cond: shiftIsBounded(v)
 10772  	// result: (SRA x y)
 10773  	for {
 10774  		x := v_0
 10775  		y := v_1
 10776  		if !(shiftIsBounded(v)) {
 10777  			break
 10778  		}
 10779  		v.reset(OpLOONG64SRA)
 10780  		v.AddArg2(x, y)
 10781  		return true
 10782  	}
 10783  	// match: (Rsh32x8 <t> x y)
 10784  	// cond: !shiftIsBounded(v)
 10785  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt8to64 y)))
 10786  	for {
 10787  		t := v.Type
 10788  		x := v_0
 10789  		y := v_1
 10790  		if !(!shiftIsBounded(v)) {
 10791  			break
 10792  		}
 10793  		v.reset(OpLOONG64SRA)
 10794  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10795  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10796  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10797  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 10798  		v3.AddArg(y)
 10799  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10800  		v4.AuxInt = int64ToAuxInt(31)
 10801  		v2.AddArg2(v3, v4)
 10802  		v1.AddArg(v2)
 10803  		v0.AddArg2(v1, v3)
 10804  		v.AddArg2(x, v0)
 10805  		return true
 10806  	}
 10807  	return false
 10808  }
 10809  func rewriteValueLOONG64_OpRsh64Ux16(v *Value) bool {
 10810  	v_1 := v.Args[1]
 10811  	v_0 := v.Args[0]
 10812  	b := v.Block
 10813  	typ := &b.Func.Config.Types
 10814  	// match: (Rsh64Ux16 x y)
 10815  	// cond: shiftIsBounded(v)
 10816  	// result: (SRLV x y)
 10817  	for {
 10818  		x := v_0
 10819  		y := v_1
 10820  		if !(shiftIsBounded(v)) {
 10821  			break
 10822  		}
 10823  		v.reset(OpLOONG64SRLV)
 10824  		v.AddArg2(x, y)
 10825  		return true
 10826  	}
 10827  	// match: (Rsh64Ux16 <t> x y)
 10828  	// cond: !shiftIsBounded(v)
 10829  	// result: (MASKEQZ (SRLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 10830  	for {
 10831  		t := v.Type
 10832  		x := v_0
 10833  		y := v_1
 10834  		if !(!shiftIsBounded(v)) {
 10835  			break
 10836  		}
 10837  		v.reset(OpLOONG64MASKEQZ)
 10838  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10839  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10840  		v1.AddArg(y)
 10841  		v0.AddArg2(x, v1)
 10842  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10843  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10844  		v3.AuxInt = int64ToAuxInt(64)
 10845  		v2.AddArg2(v3, v1)
 10846  		v.AddArg2(v0, v2)
 10847  		return true
 10848  	}
 10849  	return false
 10850  }
 10851  func rewriteValueLOONG64_OpRsh64Ux32(v *Value) bool {
 10852  	v_1 := v.Args[1]
 10853  	v_0 := v.Args[0]
 10854  	b := v.Block
 10855  	typ := &b.Func.Config.Types
 10856  	// match: (Rsh64Ux32 x y)
 10857  	// cond: shiftIsBounded(v)
 10858  	// result: (SRLV x y)
 10859  	for {
 10860  		x := v_0
 10861  		y := v_1
 10862  		if !(shiftIsBounded(v)) {
 10863  			break
 10864  		}
 10865  		v.reset(OpLOONG64SRLV)
 10866  		v.AddArg2(x, y)
 10867  		return true
 10868  	}
 10869  	// match: (Rsh64Ux32 <t> x y)
 10870  	// cond: !shiftIsBounded(v)
 10871  	// result: (MASKEQZ (SRLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 10872  	for {
 10873  		t := v.Type
 10874  		x := v_0
 10875  		y := v_1
 10876  		if !(!shiftIsBounded(v)) {
 10877  			break
 10878  		}
 10879  		v.reset(OpLOONG64MASKEQZ)
 10880  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10881  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 10882  		v1.AddArg(y)
 10883  		v0.AddArg2(x, v1)
 10884  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10885  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10886  		v3.AuxInt = int64ToAuxInt(64)
 10887  		v2.AddArg2(v3, v1)
 10888  		v.AddArg2(v0, v2)
 10889  		return true
 10890  	}
 10891  	return false
 10892  }
 10893  func rewriteValueLOONG64_OpRsh64Ux64(v *Value) bool {
 10894  	v_1 := v.Args[1]
 10895  	v_0 := v.Args[0]
 10896  	b := v.Block
 10897  	typ := &b.Func.Config.Types
 10898  	// match: (Rsh64Ux64 x y)
 10899  	// cond: shiftIsBounded(v)
 10900  	// result: (SRLV x y)
 10901  	for {
 10902  		x := v_0
 10903  		y := v_1
 10904  		if !(shiftIsBounded(v)) {
 10905  			break
 10906  		}
 10907  		v.reset(OpLOONG64SRLV)
 10908  		v.AddArg2(x, y)
 10909  		return true
 10910  	}
 10911  	// match: (Rsh64Ux64 <t> x y)
 10912  	// cond: !shiftIsBounded(v)
 10913  	// result: (MASKEQZ (SRLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 10914  	for {
 10915  		t := v.Type
 10916  		x := v_0
 10917  		y := v_1
 10918  		if !(!shiftIsBounded(v)) {
 10919  			break
 10920  		}
 10921  		v.reset(OpLOONG64MASKEQZ)
 10922  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10923  		v0.AddArg2(x, y)
 10924  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10925  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10926  		v2.AuxInt = int64ToAuxInt(64)
 10927  		v1.AddArg2(v2, y)
 10928  		v.AddArg2(v0, v1)
 10929  		return true
 10930  	}
 10931  	return false
 10932  }
 10933  func rewriteValueLOONG64_OpRsh64Ux8(v *Value) bool {
 10934  	v_1 := v.Args[1]
 10935  	v_0 := v.Args[0]
 10936  	b := v.Block
 10937  	typ := &b.Func.Config.Types
 10938  	// match: (Rsh64Ux8 x y)
 10939  	// cond: shiftIsBounded(v)
 10940  	// result: (SRLV x y)
 10941  	for {
 10942  		x := v_0
 10943  		y := v_1
 10944  		if !(shiftIsBounded(v)) {
 10945  			break
 10946  		}
 10947  		v.reset(OpLOONG64SRLV)
 10948  		v.AddArg2(x, y)
 10949  		return true
 10950  	}
 10951  	// match: (Rsh64Ux8 <t> x y)
 10952  	// cond: !shiftIsBounded(v)
 10953  	// result: (MASKEQZ (SRLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 10954  	for {
 10955  		t := v.Type
 10956  		x := v_0
 10957  		y := v_1
 10958  		if !(!shiftIsBounded(v)) {
 10959  			break
 10960  		}
 10961  		v.reset(OpLOONG64MASKEQZ)
 10962  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10963  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 10964  		v1.AddArg(y)
 10965  		v0.AddArg2(x, v1)
 10966  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10967  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10968  		v3.AuxInt = int64ToAuxInt(64)
 10969  		v2.AddArg2(v3, v1)
 10970  		v.AddArg2(v0, v2)
 10971  		return true
 10972  	}
 10973  	return false
 10974  }
 10975  func rewriteValueLOONG64_OpRsh64x16(v *Value) bool {
 10976  	v_1 := v.Args[1]
 10977  	v_0 := v.Args[0]
 10978  	b := v.Block
 10979  	typ := &b.Func.Config.Types
 10980  	// match: (Rsh64x16 x y)
 10981  	// cond: shiftIsBounded(v)
 10982  	// result: (SRAV x y)
 10983  	for {
 10984  		x := v_0
 10985  		y := v_1
 10986  		if !(shiftIsBounded(v)) {
 10987  			break
 10988  		}
 10989  		v.reset(OpLOONG64SRAV)
 10990  		v.AddArg2(x, y)
 10991  		return true
 10992  	}
 10993  	// match: (Rsh64x16 <t> x y)
 10994  	// cond: !shiftIsBounded(v)
 10995  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 10996  	for {
 10997  		t := v.Type
 10998  		x := v_0
 10999  		y := v_1
 11000  		if !(!shiftIsBounded(v)) {
 11001  			break
 11002  		}
 11003  		v.reset(OpLOONG64SRAV)
 11004  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11005  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11006  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11007  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 11008  		v3.AddArg(y)
 11009  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11010  		v4.AuxInt = int64ToAuxInt(63)
 11011  		v2.AddArg2(v3, v4)
 11012  		v1.AddArg(v2)
 11013  		v0.AddArg2(v1, v3)
 11014  		v.AddArg2(x, v0)
 11015  		return true
 11016  	}
 11017  	return false
 11018  }
 11019  func rewriteValueLOONG64_OpRsh64x32(v *Value) bool {
 11020  	v_1 := v.Args[1]
 11021  	v_0 := v.Args[0]
 11022  	b := v.Block
 11023  	typ := &b.Func.Config.Types
 11024  	// match: (Rsh64x32 x y)
 11025  	// cond: shiftIsBounded(v)
 11026  	// result: (SRAV x y)
 11027  	for {
 11028  		x := v_0
 11029  		y := v_1
 11030  		if !(shiftIsBounded(v)) {
 11031  			break
 11032  		}
 11033  		v.reset(OpLOONG64SRAV)
 11034  		v.AddArg2(x, y)
 11035  		return true
 11036  	}
 11037  	// match: (Rsh64x32 <t> x y)
 11038  	// cond: !shiftIsBounded(v)
 11039  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 11040  	for {
 11041  		t := v.Type
 11042  		x := v_0
 11043  		y := v_1
 11044  		if !(!shiftIsBounded(v)) {
 11045  			break
 11046  		}
 11047  		v.reset(OpLOONG64SRAV)
 11048  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11049  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11050  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11051  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 11052  		v3.AddArg(y)
 11053  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11054  		v4.AuxInt = int64ToAuxInt(63)
 11055  		v2.AddArg2(v3, v4)
 11056  		v1.AddArg(v2)
 11057  		v0.AddArg2(v1, v3)
 11058  		v.AddArg2(x, v0)
 11059  		return true
 11060  	}
 11061  	return false
 11062  }
 11063  func rewriteValueLOONG64_OpRsh64x64(v *Value) bool {
 11064  	v_1 := v.Args[1]
 11065  	v_0 := v.Args[0]
 11066  	b := v.Block
 11067  	typ := &b.Func.Config.Types
 11068  	// match: (Rsh64x64 x y)
 11069  	// cond: shiftIsBounded(v)
 11070  	// result: (SRAV x y)
 11071  	for {
 11072  		x := v_0
 11073  		y := v_1
 11074  		if !(shiftIsBounded(v)) {
 11075  			break
 11076  		}
 11077  		v.reset(OpLOONG64SRAV)
 11078  		v.AddArg2(x, y)
 11079  		return true
 11080  	}
 11081  	// match: (Rsh64x64 <t> x y)
 11082  	// cond: !shiftIsBounded(v)
 11083  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 11084  	for {
 11085  		t := v.Type
 11086  		x := v_0
 11087  		y := v_1
 11088  		if !(!shiftIsBounded(v)) {
 11089  			break
 11090  		}
 11091  		v.reset(OpLOONG64SRAV)
 11092  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11093  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11094  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11095  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11096  		v3.AuxInt = int64ToAuxInt(63)
 11097  		v2.AddArg2(y, v3)
 11098  		v1.AddArg(v2)
 11099  		v0.AddArg2(v1, y)
 11100  		v.AddArg2(x, v0)
 11101  		return true
 11102  	}
 11103  	return false
 11104  }
 11105  func rewriteValueLOONG64_OpRsh64x8(v *Value) bool {
 11106  	v_1 := v.Args[1]
 11107  	v_0 := v.Args[0]
 11108  	b := v.Block
 11109  	typ := &b.Func.Config.Types
 11110  	// match: (Rsh64x8 x y)
 11111  	// cond: shiftIsBounded(v)
 11112  	// result: (SRAV x y)
 11113  	for {
 11114  		x := v_0
 11115  		y := v_1
 11116  		if !(shiftIsBounded(v)) {
 11117  			break
 11118  		}
 11119  		v.reset(OpLOONG64SRAV)
 11120  		v.AddArg2(x, y)
 11121  		return true
 11122  	}
 11123  	// match: (Rsh64x8 <t> x y)
 11124  	// cond: !shiftIsBounded(v)
 11125  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 11126  	for {
 11127  		t := v.Type
 11128  		x := v_0
 11129  		y := v_1
 11130  		if !(!shiftIsBounded(v)) {
 11131  			break
 11132  		}
 11133  		v.reset(OpLOONG64SRAV)
 11134  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11135  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11136  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11137  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11138  		v3.AddArg(y)
 11139  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11140  		v4.AuxInt = int64ToAuxInt(63)
 11141  		v2.AddArg2(v3, v4)
 11142  		v1.AddArg(v2)
 11143  		v0.AddArg2(v1, v3)
 11144  		v.AddArg2(x, v0)
 11145  		return true
 11146  	}
 11147  	return false
 11148  }
 11149  func rewriteValueLOONG64_OpRsh8Ux16(v *Value) bool {
 11150  	v_1 := v.Args[1]
 11151  	v_0 := v.Args[0]
 11152  	b := v.Block
 11153  	typ := &b.Func.Config.Types
 11154  	// match: (Rsh8Ux16 x y)
 11155  	// cond: shiftIsBounded(v)
 11156  	// result: (SRLV (ZeroExt8to64 x) y)
 11157  	for {
 11158  		x := v_0
 11159  		y := v_1
 11160  		if !(shiftIsBounded(v)) {
 11161  			break
 11162  		}
 11163  		v.reset(OpLOONG64SRLV)
 11164  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11165  		v0.AddArg(x)
 11166  		v.AddArg2(v0, y)
 11167  		return true
 11168  	}
 11169  	// match: (Rsh8Ux16 <t> x y)
 11170  	// cond: !shiftIsBounded(v)
 11171  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 11172  	for {
 11173  		t := v.Type
 11174  		x := v_0
 11175  		y := v_1
 11176  		if !(!shiftIsBounded(v)) {
 11177  			break
 11178  		}
 11179  		v.reset(OpLOONG64MASKEQZ)
 11180  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 11181  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11182  		v1.AddArg(x)
 11183  		v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 11184  		v2.AddArg(y)
 11185  		v0.AddArg2(v1, v2)
 11186  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11187  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11188  		v4.AuxInt = int64ToAuxInt(64)
 11189  		v3.AddArg2(v4, v2)
 11190  		v.AddArg2(v0, v3)
 11191  		return true
 11192  	}
 11193  	return false
 11194  }
 11195  func rewriteValueLOONG64_OpRsh8Ux32(v *Value) bool {
 11196  	v_1 := v.Args[1]
 11197  	v_0 := v.Args[0]
 11198  	b := v.Block
 11199  	typ := &b.Func.Config.Types
 11200  	// match: (Rsh8Ux32 x y)
 11201  	// cond: shiftIsBounded(v)
 11202  	// result: (SRLV (ZeroExt8to64 x) y)
 11203  	for {
 11204  		x := v_0
 11205  		y := v_1
 11206  		if !(shiftIsBounded(v)) {
 11207  			break
 11208  		}
 11209  		v.reset(OpLOONG64SRLV)
 11210  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11211  		v0.AddArg(x)
 11212  		v.AddArg2(v0, y)
 11213  		return true
 11214  	}
 11215  	// match: (Rsh8Ux32 <t> x y)
 11216  	// cond: !shiftIsBounded(v)
 11217  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 11218  	for {
 11219  		t := v.Type
 11220  		x := v_0
 11221  		y := v_1
 11222  		if !(!shiftIsBounded(v)) {
 11223  			break
 11224  		}
 11225  		v.reset(OpLOONG64MASKEQZ)
 11226  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 11227  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11228  		v1.AddArg(x)
 11229  		v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 11230  		v2.AddArg(y)
 11231  		v0.AddArg2(v1, v2)
 11232  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11233  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11234  		v4.AuxInt = int64ToAuxInt(64)
 11235  		v3.AddArg2(v4, v2)
 11236  		v.AddArg2(v0, v3)
 11237  		return true
 11238  	}
 11239  	return false
 11240  }
 11241  func rewriteValueLOONG64_OpRsh8Ux64(v *Value) bool {
 11242  	v_1 := v.Args[1]
 11243  	v_0 := v.Args[0]
 11244  	b := v.Block
 11245  	typ := &b.Func.Config.Types
 11246  	// match: (Rsh8Ux64 x y)
 11247  	// cond: shiftIsBounded(v)
 11248  	// result: (SRLV (ZeroExt8to64 x) y)
 11249  	for {
 11250  		x := v_0
 11251  		y := v_1
 11252  		if !(shiftIsBounded(v)) {
 11253  			break
 11254  		}
 11255  		v.reset(OpLOONG64SRLV)
 11256  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11257  		v0.AddArg(x)
 11258  		v.AddArg2(v0, y)
 11259  		return true
 11260  	}
 11261  	// match: (Rsh8Ux64 <t> x y)
 11262  	// cond: !shiftIsBounded(v)
 11263  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 11264  	for {
 11265  		t := v.Type
 11266  		x := v_0
 11267  		y := v_1
 11268  		if !(!shiftIsBounded(v)) {
 11269  			break
 11270  		}
 11271  		v.reset(OpLOONG64MASKEQZ)
 11272  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 11273  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11274  		v1.AddArg(x)
 11275  		v0.AddArg2(v1, y)
 11276  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11277  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11278  		v3.AuxInt = int64ToAuxInt(64)
 11279  		v2.AddArg2(v3, y)
 11280  		v.AddArg2(v0, v2)
 11281  		return true
 11282  	}
 11283  	return false
 11284  }
 11285  func rewriteValueLOONG64_OpRsh8Ux8(v *Value) bool {
 11286  	v_1 := v.Args[1]
 11287  	v_0 := v.Args[0]
 11288  	b := v.Block
 11289  	typ := &b.Func.Config.Types
 11290  	// match: (Rsh8Ux8 x y)
 11291  	// cond: shiftIsBounded(v)
 11292  	// result: (SRLV (ZeroExt8to64 x) y)
 11293  	for {
 11294  		x := v_0
 11295  		y := v_1
 11296  		if !(shiftIsBounded(v)) {
 11297  			break
 11298  		}
 11299  		v.reset(OpLOONG64SRLV)
 11300  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11301  		v0.AddArg(x)
 11302  		v.AddArg2(v0, y)
 11303  		return true
 11304  	}
 11305  	// match: (Rsh8Ux8 <t> x y)
 11306  	// cond: !shiftIsBounded(v)
 11307  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 11308  	for {
 11309  		t := v.Type
 11310  		x := v_0
 11311  		y := v_1
 11312  		if !(!shiftIsBounded(v)) {
 11313  			break
 11314  		}
 11315  		v.reset(OpLOONG64MASKEQZ)
 11316  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 11317  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11318  		v1.AddArg(x)
 11319  		v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11320  		v2.AddArg(y)
 11321  		v0.AddArg2(v1, v2)
 11322  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11323  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11324  		v4.AuxInt = int64ToAuxInt(64)
 11325  		v3.AddArg2(v4, v2)
 11326  		v.AddArg2(v0, v3)
 11327  		return true
 11328  	}
 11329  	return false
 11330  }
 11331  func rewriteValueLOONG64_OpRsh8x16(v *Value) bool {
 11332  	v_1 := v.Args[1]
 11333  	v_0 := v.Args[0]
 11334  	b := v.Block
 11335  	typ := &b.Func.Config.Types
 11336  	// match: (Rsh8x16 x y)
 11337  	// cond: shiftIsBounded(v)
 11338  	// result: (SRAV (SignExt8to64 x) y)
 11339  	for {
 11340  		x := v_0
 11341  		y := v_1
 11342  		if !(shiftIsBounded(v)) {
 11343  			break
 11344  		}
 11345  		v.reset(OpLOONG64SRAV)
 11346  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11347  		v0.AddArg(x)
 11348  		v.AddArg2(v0, y)
 11349  		return true
 11350  	}
 11351  	// match: (Rsh8x16 <t> x y)
 11352  	// cond: !shiftIsBounded(v)
 11353  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 11354  	for {
 11355  		t := v.Type
 11356  		x := v_0
 11357  		y := v_1
 11358  		if !(!shiftIsBounded(v)) {
 11359  			break
 11360  		}
 11361  		v.reset(OpLOONG64SRAV)
 11362  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11363  		v0.AddArg(x)
 11364  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11365  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11366  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11367  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 11368  		v4.AddArg(y)
 11369  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11370  		v5.AuxInt = int64ToAuxInt(63)
 11371  		v3.AddArg2(v4, v5)
 11372  		v2.AddArg(v3)
 11373  		v1.AddArg2(v2, v4)
 11374  		v.AddArg2(v0, v1)
 11375  		return true
 11376  	}
 11377  	return false
 11378  }
 11379  func rewriteValueLOONG64_OpRsh8x32(v *Value) bool {
 11380  	v_1 := v.Args[1]
 11381  	v_0 := v.Args[0]
 11382  	b := v.Block
 11383  	typ := &b.Func.Config.Types
 11384  	// match: (Rsh8x32 x y)
 11385  	// cond: shiftIsBounded(v)
 11386  	// result: (SRAV (SignExt8to64 x) y)
 11387  	for {
 11388  		x := v_0
 11389  		y := v_1
 11390  		if !(shiftIsBounded(v)) {
 11391  			break
 11392  		}
 11393  		v.reset(OpLOONG64SRAV)
 11394  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11395  		v0.AddArg(x)
 11396  		v.AddArg2(v0, y)
 11397  		return true
 11398  	}
 11399  	// match: (Rsh8x32 <t> x y)
 11400  	// cond: !shiftIsBounded(v)
 11401  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 11402  	for {
 11403  		t := v.Type
 11404  		x := v_0
 11405  		y := v_1
 11406  		if !(!shiftIsBounded(v)) {
 11407  			break
 11408  		}
 11409  		v.reset(OpLOONG64SRAV)
 11410  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11411  		v0.AddArg(x)
 11412  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11413  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11414  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11415  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 11416  		v4.AddArg(y)
 11417  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11418  		v5.AuxInt = int64ToAuxInt(63)
 11419  		v3.AddArg2(v4, v5)
 11420  		v2.AddArg(v3)
 11421  		v1.AddArg2(v2, v4)
 11422  		v.AddArg2(v0, v1)
 11423  		return true
 11424  	}
 11425  	return false
 11426  }
 11427  func rewriteValueLOONG64_OpRsh8x64(v *Value) bool {
 11428  	v_1 := v.Args[1]
 11429  	v_0 := v.Args[0]
 11430  	b := v.Block
 11431  	typ := &b.Func.Config.Types
 11432  	// match: (Rsh8x64 x y)
 11433  	// cond: shiftIsBounded(v)
 11434  	// result: (SRAV (SignExt8to64 x) y)
 11435  	for {
 11436  		x := v_0
 11437  		y := v_1
 11438  		if !(shiftIsBounded(v)) {
 11439  			break
 11440  		}
 11441  		v.reset(OpLOONG64SRAV)
 11442  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11443  		v0.AddArg(x)
 11444  		v.AddArg2(v0, y)
 11445  		return true
 11446  	}
 11447  	// match: (Rsh8x64 <t> x y)
 11448  	// cond: !shiftIsBounded(v)
 11449  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 11450  	for {
 11451  		t := v.Type
 11452  		x := v_0
 11453  		y := v_1
 11454  		if !(!shiftIsBounded(v)) {
 11455  			break
 11456  		}
 11457  		v.reset(OpLOONG64SRAV)
 11458  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11459  		v0.AddArg(x)
 11460  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11461  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11462  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11463  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11464  		v4.AuxInt = int64ToAuxInt(63)
 11465  		v3.AddArg2(y, v4)
 11466  		v2.AddArg(v3)
 11467  		v1.AddArg2(v2, y)
 11468  		v.AddArg2(v0, v1)
 11469  		return true
 11470  	}
 11471  	return false
 11472  }
 11473  func rewriteValueLOONG64_OpRsh8x8(v *Value) bool {
 11474  	v_1 := v.Args[1]
 11475  	v_0 := v.Args[0]
 11476  	b := v.Block
 11477  	typ := &b.Func.Config.Types
 11478  	// match: (Rsh8x8 x y)
 11479  	// cond: shiftIsBounded(v)
 11480  	// result: (SRAV (SignExt8to64 x) y)
 11481  	for {
 11482  		x := v_0
 11483  		y := v_1
 11484  		if !(shiftIsBounded(v)) {
 11485  			break
 11486  		}
 11487  		v.reset(OpLOONG64SRAV)
 11488  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11489  		v0.AddArg(x)
 11490  		v.AddArg2(v0, y)
 11491  		return true
 11492  	}
 11493  	// match: (Rsh8x8 <t> x y)
 11494  	// cond: !shiftIsBounded(v)
 11495  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 11496  	for {
 11497  		t := v.Type
 11498  		x := v_0
 11499  		y := v_1
 11500  		if !(!shiftIsBounded(v)) {
 11501  			break
 11502  		}
 11503  		v.reset(OpLOONG64SRAV)
 11504  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11505  		v0.AddArg(x)
 11506  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11507  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11508  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11509  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11510  		v4.AddArg(y)
 11511  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11512  		v5.AuxInt = int64ToAuxInt(63)
 11513  		v3.AddArg2(v4, v5)
 11514  		v2.AddArg(v3)
 11515  		v1.AddArg2(v2, v4)
 11516  		v.AddArg2(v0, v1)
 11517  		return true
 11518  	}
 11519  	return false
 11520  }
 11521  func rewriteValueLOONG64_OpSelect0(v *Value) bool {
 11522  	v_0 := v.Args[0]
 11523  	b := v.Block
 11524  	// match: (Select0 (Mul64uhilo x y))
 11525  	// result: (MULHVU x y)
 11526  	for {
 11527  		if v_0.Op != OpMul64uhilo {
 11528  			break
 11529  		}
 11530  		y := v_0.Args[1]
 11531  		x := v_0.Args[0]
 11532  		v.reset(OpLOONG64MULHVU)
 11533  		v.AddArg2(x, y)
 11534  		return true
 11535  	}
 11536  	// match: (Select0 (Mul64uover x y))
 11537  	// result: (MULV x y)
 11538  	for {
 11539  		if v_0.Op != OpMul64uover {
 11540  			break
 11541  		}
 11542  		y := v_0.Args[1]
 11543  		x := v_0.Args[0]
 11544  		v.reset(OpLOONG64MULV)
 11545  		v.AddArg2(x, y)
 11546  		return true
 11547  	}
 11548  	// match: (Select0 <t> (Add64carry x y c))
 11549  	// result: (ADDV (ADDV <t> x y) c)
 11550  	for {
 11551  		t := v.Type
 11552  		if v_0.Op != OpAdd64carry {
 11553  			break
 11554  		}
 11555  		c := v_0.Args[2]
 11556  		x := v_0.Args[0]
 11557  		y := v_0.Args[1]
 11558  		v.reset(OpLOONG64ADDV)
 11559  		v0 := b.NewValue0(v.Pos, OpLOONG64ADDV, t)
 11560  		v0.AddArg2(x, y)
 11561  		v.AddArg2(v0, c)
 11562  		return true
 11563  	}
 11564  	// match: (Select0 <t> (Sub64borrow x y c))
 11565  	// result: (SUBV (SUBV <t> x y) c)
 11566  	for {
 11567  		t := v.Type
 11568  		if v_0.Op != OpSub64borrow {
 11569  			break
 11570  		}
 11571  		c := v_0.Args[2]
 11572  		x := v_0.Args[0]
 11573  		y := v_0.Args[1]
 11574  		v.reset(OpLOONG64SUBV)
 11575  		v0 := b.NewValue0(v.Pos, OpLOONG64SUBV, t)
 11576  		v0.AddArg2(x, y)
 11577  		v.AddArg2(v0, c)
 11578  		return true
 11579  	}
 11580  	return false
 11581  }
 11582  func rewriteValueLOONG64_OpSelect1(v *Value) bool {
 11583  	v_0 := v.Args[0]
 11584  	b := v.Block
 11585  	typ := &b.Func.Config.Types
 11586  	// match: (Select1 (Mul64uhilo x y))
 11587  	// result: (MULV x y)
 11588  	for {
 11589  		if v_0.Op != OpMul64uhilo {
 11590  			break
 11591  		}
 11592  		y := v_0.Args[1]
 11593  		x := v_0.Args[0]
 11594  		v.reset(OpLOONG64MULV)
 11595  		v.AddArg2(x, y)
 11596  		return true
 11597  	}
 11598  	// match: (Select1 (Mul64uover x y))
 11599  	// result: (SGTU <typ.Bool> (MULHVU x y) (MOVVconst <typ.UInt64> [0]))
 11600  	for {
 11601  		if v_0.Op != OpMul64uover {
 11602  			break
 11603  		}
 11604  		y := v_0.Args[1]
 11605  		x := v_0.Args[0]
 11606  		v.reset(OpLOONG64SGTU)
 11607  		v.Type = typ.Bool
 11608  		v0 := b.NewValue0(v.Pos, OpLOONG64MULHVU, typ.UInt64)
 11609  		v0.AddArg2(x, y)
 11610  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11611  		v1.AuxInt = int64ToAuxInt(0)
 11612  		v.AddArg2(v0, v1)
 11613  		return true
 11614  	}
 11615  	// match: (Select1 <t> (Add64carry x y c))
 11616  	// result: (OR (SGTU <t> x s:(ADDV <t> x y)) (SGTU <t> s (ADDV <t> s c)))
 11617  	for {
 11618  		t := v.Type
 11619  		if v_0.Op != OpAdd64carry {
 11620  			break
 11621  		}
 11622  		c := v_0.Args[2]
 11623  		x := v_0.Args[0]
 11624  		y := v_0.Args[1]
 11625  		v.reset(OpLOONG64OR)
 11626  		v0 := b.NewValue0(v.Pos, OpLOONG64SGTU, t)
 11627  		s := b.NewValue0(v.Pos, OpLOONG64ADDV, t)
 11628  		s.AddArg2(x, y)
 11629  		v0.AddArg2(x, s)
 11630  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, t)
 11631  		v3 := b.NewValue0(v.Pos, OpLOONG64ADDV, t)
 11632  		v3.AddArg2(s, c)
 11633  		v2.AddArg2(s, v3)
 11634  		v.AddArg2(v0, v2)
 11635  		return true
 11636  	}
 11637  	// match: (Select1 <t> (Sub64borrow x y c))
 11638  	// result: (OR (SGTU <t> s:(SUBV <t> x y) x) (SGTU <t> (SUBV <t> s c) s))
 11639  	for {
 11640  		t := v.Type
 11641  		if v_0.Op != OpSub64borrow {
 11642  			break
 11643  		}
 11644  		c := v_0.Args[2]
 11645  		x := v_0.Args[0]
 11646  		y := v_0.Args[1]
 11647  		v.reset(OpLOONG64OR)
 11648  		v0 := b.NewValue0(v.Pos, OpLOONG64SGTU, t)
 11649  		s := b.NewValue0(v.Pos, OpLOONG64SUBV, t)
 11650  		s.AddArg2(x, y)
 11651  		v0.AddArg2(s, x)
 11652  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, t)
 11653  		v3 := b.NewValue0(v.Pos, OpLOONG64SUBV, t)
 11654  		v3.AddArg2(s, c)
 11655  		v2.AddArg2(v3, s)
 11656  		v.AddArg2(v0, v2)
 11657  		return true
 11658  	}
 11659  	return false
 11660  }
 11661  func rewriteValueLOONG64_OpSelectN(v *Value) bool {
 11662  	v_0 := v.Args[0]
 11663  	b := v.Block
 11664  	config := b.Func.Config
 11665  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVVconst [sz]) mem))
 11666  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)
 11667  	// result: (Move [sz] dst src mem)
 11668  	for {
 11669  		if auxIntToInt64(v.AuxInt) != 0 {
 11670  			break
 11671  		}
 11672  		call := v_0
 11673  		if call.Op != OpLOONG64CALLstatic || len(call.Args) != 4 {
 11674  			break
 11675  		}
 11676  		sym := auxToCall(call.Aux)
 11677  		mem := call.Args[3]
 11678  		dst := call.Args[0]
 11679  		src := call.Args[1]
 11680  		call_2 := call.Args[2]
 11681  		if call_2.Op != OpLOONG64MOVVconst {
 11682  			break
 11683  		}
 11684  		sz := auxIntToInt64(call_2.AuxInt)
 11685  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
 11686  			break
 11687  		}
 11688  		v.reset(OpMove)
 11689  		v.AuxInt = int64ToAuxInt(sz)
 11690  		v.AddArg3(dst, src, mem)
 11691  		return true
 11692  	}
 11693  	return false
 11694  }
 11695  func rewriteValueLOONG64_OpSlicemask(v *Value) bool {
 11696  	v_0 := v.Args[0]
 11697  	b := v.Block
 11698  	// match: (Slicemask <t> x)
 11699  	// result: (SRAVconst (NEGV <t> x) [63])
 11700  	for {
 11701  		t := v.Type
 11702  		x := v_0
 11703  		v.reset(OpLOONG64SRAVconst)
 11704  		v.AuxInt = int64ToAuxInt(63)
 11705  		v0 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11706  		v0.AddArg(x)
 11707  		v.AddArg(v0)
 11708  		return true
 11709  	}
 11710  }
 11711  func rewriteValueLOONG64_OpStore(v *Value) bool {
 11712  	v_2 := v.Args[2]
 11713  	v_1 := v.Args[1]
 11714  	v_0 := v.Args[0]
 11715  	// match: (Store {t} ptr val mem)
 11716  	// cond: t.Size() == 1
 11717  	// result: (MOVBstore ptr val mem)
 11718  	for {
 11719  		t := auxToType(v.Aux)
 11720  		ptr := v_0
 11721  		val := v_1
 11722  		mem := v_2
 11723  		if !(t.Size() == 1) {
 11724  			break
 11725  		}
 11726  		v.reset(OpLOONG64MOVBstore)
 11727  		v.AddArg3(ptr, val, mem)
 11728  		return true
 11729  	}
 11730  	// match: (Store {t} ptr val mem)
 11731  	// cond: t.Size() == 2
 11732  	// result: (MOVHstore ptr val mem)
 11733  	for {
 11734  		t := auxToType(v.Aux)
 11735  		ptr := v_0
 11736  		val := v_1
 11737  		mem := v_2
 11738  		if !(t.Size() == 2) {
 11739  			break
 11740  		}
 11741  		v.reset(OpLOONG64MOVHstore)
 11742  		v.AddArg3(ptr, val, mem)
 11743  		return true
 11744  	}
 11745  	// match: (Store {t} ptr val mem)
 11746  	// cond: t.Size() == 4 && !t.IsFloat()
 11747  	// result: (MOVWstore ptr val mem)
 11748  	for {
 11749  		t := auxToType(v.Aux)
 11750  		ptr := v_0
 11751  		val := v_1
 11752  		mem := v_2
 11753  		if !(t.Size() == 4 && !t.IsFloat()) {
 11754  			break
 11755  		}
 11756  		v.reset(OpLOONG64MOVWstore)
 11757  		v.AddArg3(ptr, val, mem)
 11758  		return true
 11759  	}
 11760  	// match: (Store {t} ptr val mem)
 11761  	// cond: t.Size() == 8 && !t.IsFloat()
 11762  	// result: (MOVVstore ptr val mem)
 11763  	for {
 11764  		t := auxToType(v.Aux)
 11765  		ptr := v_0
 11766  		val := v_1
 11767  		mem := v_2
 11768  		if !(t.Size() == 8 && !t.IsFloat()) {
 11769  			break
 11770  		}
 11771  		v.reset(OpLOONG64MOVVstore)
 11772  		v.AddArg3(ptr, val, mem)
 11773  		return true
 11774  	}
 11775  	// match: (Store {t} ptr val mem)
 11776  	// cond: t.Size() == 4 && t.IsFloat()
 11777  	// result: (MOVFstore ptr val mem)
 11778  	for {
 11779  		t := auxToType(v.Aux)
 11780  		ptr := v_0
 11781  		val := v_1
 11782  		mem := v_2
 11783  		if !(t.Size() == 4 && t.IsFloat()) {
 11784  			break
 11785  		}
 11786  		v.reset(OpLOONG64MOVFstore)
 11787  		v.AddArg3(ptr, val, mem)
 11788  		return true
 11789  	}
 11790  	// match: (Store {t} ptr val mem)
 11791  	// cond: t.Size() == 8 && t.IsFloat()
 11792  	// result: (MOVDstore ptr val mem)
 11793  	for {
 11794  		t := auxToType(v.Aux)
 11795  		ptr := v_0
 11796  		val := v_1
 11797  		mem := v_2
 11798  		if !(t.Size() == 8 && t.IsFloat()) {
 11799  			break
 11800  		}
 11801  		v.reset(OpLOONG64MOVDstore)
 11802  		v.AddArg3(ptr, val, mem)
 11803  		return true
 11804  	}
 11805  	return false
 11806  }
 11807  func rewriteValueLOONG64_OpZero(v *Value) bool {
 11808  	v_1 := v.Args[1]
 11809  	v_0 := v.Args[0]
 11810  	b := v.Block
 11811  	typ := &b.Func.Config.Types
 11812  	// match: (Zero [0] _ mem)
 11813  	// result: mem
 11814  	for {
 11815  		if auxIntToInt64(v.AuxInt) != 0 {
 11816  			break
 11817  		}
 11818  		mem := v_1
 11819  		v.copyOf(mem)
 11820  		return true
 11821  	}
 11822  	// match: (Zero [1] ptr mem)
 11823  	// result: (MOVBstore ptr (MOVVconst [0]) mem)
 11824  	for {
 11825  		if auxIntToInt64(v.AuxInt) != 1 {
 11826  			break
 11827  		}
 11828  		ptr := v_0
 11829  		mem := v_1
 11830  		v.reset(OpLOONG64MOVBstore)
 11831  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11832  		v0.AuxInt = int64ToAuxInt(0)
 11833  		v.AddArg3(ptr, v0, mem)
 11834  		return true
 11835  	}
 11836  	// match: (Zero [2] ptr mem)
 11837  	// result: (MOVHstore ptr (MOVVconst [0]) mem)
 11838  	for {
 11839  		if auxIntToInt64(v.AuxInt) != 2 {
 11840  			break
 11841  		}
 11842  		ptr := v_0
 11843  		mem := v_1
 11844  		v.reset(OpLOONG64MOVHstore)
 11845  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11846  		v0.AuxInt = int64ToAuxInt(0)
 11847  		v.AddArg3(ptr, v0, mem)
 11848  		return true
 11849  	}
 11850  	// match: (Zero [3] ptr mem)
 11851  	// result: (MOVBstore [2] ptr (MOVVconst [0]) (MOVHstore ptr (MOVVconst [0]) mem))
 11852  	for {
 11853  		if auxIntToInt64(v.AuxInt) != 3 {
 11854  			break
 11855  		}
 11856  		ptr := v_0
 11857  		mem := v_1
 11858  		v.reset(OpLOONG64MOVBstore)
 11859  		v.AuxInt = int32ToAuxInt(2)
 11860  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11861  		v0.AuxInt = int64ToAuxInt(0)
 11862  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVHstore, types.TypeMem)
 11863  		v1.AddArg3(ptr, v0, mem)
 11864  		v.AddArg3(ptr, v0, v1)
 11865  		return true
 11866  	}
 11867  	// match: (Zero [4] {t} ptr mem)
 11868  	// result: (MOVWstore ptr (MOVVconst [0]) mem)
 11869  	for {
 11870  		if auxIntToInt64(v.AuxInt) != 4 {
 11871  			break
 11872  		}
 11873  		ptr := v_0
 11874  		mem := v_1
 11875  		v.reset(OpLOONG64MOVWstore)
 11876  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11877  		v0.AuxInt = int64ToAuxInt(0)
 11878  		v.AddArg3(ptr, v0, mem)
 11879  		return true
 11880  	}
 11881  	// match: (Zero [5] ptr mem)
 11882  	// result: (MOVBstore [4] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11883  	for {
 11884  		if auxIntToInt64(v.AuxInt) != 5 {
 11885  			break
 11886  		}
 11887  		ptr := v_0
 11888  		mem := v_1
 11889  		v.reset(OpLOONG64MOVBstore)
 11890  		v.AuxInt = int32ToAuxInt(4)
 11891  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11892  		v0.AuxInt = int64ToAuxInt(0)
 11893  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
 11894  		v1.AddArg3(ptr, v0, mem)
 11895  		v.AddArg3(ptr, v0, v1)
 11896  		return true
 11897  	}
 11898  	// match: (Zero [6] ptr mem)
 11899  	// result: (MOVHstore [4] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11900  	for {
 11901  		if auxIntToInt64(v.AuxInt) != 6 {
 11902  			break
 11903  		}
 11904  		ptr := v_0
 11905  		mem := v_1
 11906  		v.reset(OpLOONG64MOVHstore)
 11907  		v.AuxInt = int32ToAuxInt(4)
 11908  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11909  		v0.AuxInt = int64ToAuxInt(0)
 11910  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
 11911  		v1.AddArg3(ptr, v0, mem)
 11912  		v.AddArg3(ptr, v0, v1)
 11913  		return true
 11914  	}
 11915  	// match: (Zero [7] ptr mem)
 11916  	// result: (MOVWstore [3] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11917  	for {
 11918  		if auxIntToInt64(v.AuxInt) != 7 {
 11919  			break
 11920  		}
 11921  		ptr := v_0
 11922  		mem := v_1
 11923  		v.reset(OpLOONG64MOVWstore)
 11924  		v.AuxInt = int32ToAuxInt(3)
 11925  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11926  		v0.AuxInt = int64ToAuxInt(0)
 11927  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
 11928  		v1.AddArg3(ptr, v0, mem)
 11929  		v.AddArg3(ptr, v0, v1)
 11930  		return true
 11931  	}
 11932  	// match: (Zero [8] {t} ptr mem)
 11933  	// result: (MOVVstore ptr (MOVVconst [0]) mem)
 11934  	for {
 11935  		if auxIntToInt64(v.AuxInt) != 8 {
 11936  			break
 11937  		}
 11938  		ptr := v_0
 11939  		mem := v_1
 11940  		v.reset(OpLOONG64MOVVstore)
 11941  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11942  		v0.AuxInt = int64ToAuxInt(0)
 11943  		v.AddArg3(ptr, v0, mem)
 11944  		return true
 11945  	}
 11946  	// match: (Zero [9] ptr mem)
 11947  	// result: (MOVBstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11948  	for {
 11949  		if auxIntToInt64(v.AuxInt) != 9 {
 11950  			break
 11951  		}
 11952  		ptr := v_0
 11953  		mem := v_1
 11954  		v.reset(OpLOONG64MOVBstore)
 11955  		v.AuxInt = int32ToAuxInt(8)
 11956  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11957  		v0.AuxInt = int64ToAuxInt(0)
 11958  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 11959  		v1.AddArg3(ptr, v0, mem)
 11960  		v.AddArg3(ptr, v0, v1)
 11961  		return true
 11962  	}
 11963  	// match: (Zero [10] ptr mem)
 11964  	// result: (MOVHstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11965  	for {
 11966  		if auxIntToInt64(v.AuxInt) != 10 {
 11967  			break
 11968  		}
 11969  		ptr := v_0
 11970  		mem := v_1
 11971  		v.reset(OpLOONG64MOVHstore)
 11972  		v.AuxInt = int32ToAuxInt(8)
 11973  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11974  		v0.AuxInt = int64ToAuxInt(0)
 11975  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 11976  		v1.AddArg3(ptr, v0, mem)
 11977  		v.AddArg3(ptr, v0, v1)
 11978  		return true
 11979  	}
 11980  	// match: (Zero [11] ptr mem)
 11981  	// result: (MOVWstore [7] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11982  	for {
 11983  		if auxIntToInt64(v.AuxInt) != 11 {
 11984  			break
 11985  		}
 11986  		ptr := v_0
 11987  		mem := v_1
 11988  		v.reset(OpLOONG64MOVWstore)
 11989  		v.AuxInt = int32ToAuxInt(7)
 11990  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11991  		v0.AuxInt = int64ToAuxInt(0)
 11992  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 11993  		v1.AddArg3(ptr, v0, mem)
 11994  		v.AddArg3(ptr, v0, v1)
 11995  		return true
 11996  	}
 11997  	// match: (Zero [12] ptr mem)
 11998  	// result: (MOVWstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11999  	for {
 12000  		if auxIntToInt64(v.AuxInt) != 12 {
 12001  			break
 12002  		}
 12003  		ptr := v_0
 12004  		mem := v_1
 12005  		v.reset(OpLOONG64MOVWstore)
 12006  		v.AuxInt = int32ToAuxInt(8)
 12007  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12008  		v0.AuxInt = int64ToAuxInt(0)
 12009  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12010  		v1.AddArg3(ptr, v0, mem)
 12011  		v.AddArg3(ptr, v0, v1)
 12012  		return true
 12013  	}
 12014  	// match: (Zero [13] ptr mem)
 12015  	// result: (MOVVstore [5] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12016  	for {
 12017  		if auxIntToInt64(v.AuxInt) != 13 {
 12018  			break
 12019  		}
 12020  		ptr := v_0
 12021  		mem := v_1
 12022  		v.reset(OpLOONG64MOVVstore)
 12023  		v.AuxInt = int32ToAuxInt(5)
 12024  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12025  		v0.AuxInt = int64ToAuxInt(0)
 12026  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12027  		v1.AddArg3(ptr, v0, mem)
 12028  		v.AddArg3(ptr, v0, v1)
 12029  		return true
 12030  	}
 12031  	// match: (Zero [14] ptr mem)
 12032  	// result: (MOVVstore [6] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12033  	for {
 12034  		if auxIntToInt64(v.AuxInt) != 14 {
 12035  			break
 12036  		}
 12037  		ptr := v_0
 12038  		mem := v_1
 12039  		v.reset(OpLOONG64MOVVstore)
 12040  		v.AuxInt = int32ToAuxInt(6)
 12041  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12042  		v0.AuxInt = int64ToAuxInt(0)
 12043  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12044  		v1.AddArg3(ptr, v0, mem)
 12045  		v.AddArg3(ptr, v0, v1)
 12046  		return true
 12047  	}
 12048  	// match: (Zero [15] ptr mem)
 12049  	// result: (MOVVstore [7] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12050  	for {
 12051  		if auxIntToInt64(v.AuxInt) != 15 {
 12052  			break
 12053  		}
 12054  		ptr := v_0
 12055  		mem := v_1
 12056  		v.reset(OpLOONG64MOVVstore)
 12057  		v.AuxInt = int32ToAuxInt(7)
 12058  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12059  		v0.AuxInt = int64ToAuxInt(0)
 12060  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12061  		v1.AddArg3(ptr, v0, mem)
 12062  		v.AddArg3(ptr, v0, v1)
 12063  		return true
 12064  	}
 12065  	// match: (Zero [16] ptr mem)
 12066  	// result: (MOVVstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12067  	for {
 12068  		if auxIntToInt64(v.AuxInt) != 16 {
 12069  			break
 12070  		}
 12071  		ptr := v_0
 12072  		mem := v_1
 12073  		v.reset(OpLOONG64MOVVstore)
 12074  		v.AuxInt = int32ToAuxInt(8)
 12075  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12076  		v0.AuxInt = int64ToAuxInt(0)
 12077  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12078  		v1.AddArg3(ptr, v0, mem)
 12079  		v.AddArg3(ptr, v0, v1)
 12080  		return true
 12081  	}
 12082  	// match: (Zero [s] ptr mem)
 12083  	// cond: s > 16 && s < 192
 12084  	// result: (LoweredZero [s] ptr mem)
 12085  	for {
 12086  		s := auxIntToInt64(v.AuxInt)
 12087  		ptr := v_0
 12088  		mem := v_1
 12089  		if !(s > 16 && s < 192) {
 12090  			break
 12091  		}
 12092  		v.reset(OpLOONG64LoweredZero)
 12093  		v.AuxInt = int64ToAuxInt(s)
 12094  		v.AddArg2(ptr, mem)
 12095  		return true
 12096  	}
 12097  	// match: (Zero [s] ptr mem)
 12098  	// cond: s >= 192
 12099  	// result: (LoweredZeroLoop [s] ptr mem)
 12100  	for {
 12101  		s := auxIntToInt64(v.AuxInt)
 12102  		ptr := v_0
 12103  		mem := v_1
 12104  		if !(s >= 192) {
 12105  			break
 12106  		}
 12107  		v.reset(OpLOONG64LoweredZeroLoop)
 12108  		v.AuxInt = int64ToAuxInt(s)
 12109  		v.AddArg2(ptr, mem)
 12110  		return true
 12111  	}
 12112  	return false
 12113  }
 12114  func rewriteBlockLOONG64(b *Block) bool {
 12115  	typ := &b.Func.Config.Types
 12116  	switch b.Kind {
 12117  	case BlockLOONG64BEQ:
 12118  		// match: (BEQ (MOVVconst [0]) cond yes no)
 12119  		// result: (EQZ cond yes no)
 12120  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12121  			v_0 := b.Controls[0]
 12122  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12123  				break
 12124  			}
 12125  			cond := b.Controls[1]
 12126  			b.resetWithControl(BlockLOONG64EQZ, cond)
 12127  			return true
 12128  		}
 12129  		// match: (BEQ cond (MOVVconst [0]) yes no)
 12130  		// result: (EQZ cond yes no)
 12131  		for b.Controls[1].Op == OpLOONG64MOVVconst {
 12132  			cond := b.Controls[0]
 12133  			v_1 := b.Controls[1]
 12134  			if auxIntToInt64(v_1.AuxInt) != 0 {
 12135  				break
 12136  			}
 12137  			b.resetWithControl(BlockLOONG64EQZ, cond)
 12138  			return true
 12139  		}
 12140  	case BlockLOONG64BGE:
 12141  		// match: (BGE (MOVVconst [0]) cond yes no)
 12142  		// result: (LEZ cond yes no)
 12143  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12144  			v_0 := b.Controls[0]
 12145  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12146  				break
 12147  			}
 12148  			cond := b.Controls[1]
 12149  			b.resetWithControl(BlockLOONG64LEZ, cond)
 12150  			return true
 12151  		}
 12152  		// match: (BGE cond (MOVVconst [0]) yes no)
 12153  		// result: (GEZ cond yes no)
 12154  		for b.Controls[1].Op == OpLOONG64MOVVconst {
 12155  			cond := b.Controls[0]
 12156  			v_1 := b.Controls[1]
 12157  			if auxIntToInt64(v_1.AuxInt) != 0 {
 12158  				break
 12159  			}
 12160  			b.resetWithControl(BlockLOONG64GEZ, cond)
 12161  			return true
 12162  		}
 12163  	case BlockLOONG64BGEU:
 12164  		// match: (BGEU (MOVVconst [0]) cond yes no)
 12165  		// result: (EQZ cond yes no)
 12166  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12167  			v_0 := b.Controls[0]
 12168  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12169  				break
 12170  			}
 12171  			cond := b.Controls[1]
 12172  			b.resetWithControl(BlockLOONG64EQZ, cond)
 12173  			return true
 12174  		}
 12175  	case BlockLOONG64BLT:
 12176  		// match: (BLT (MOVVconst [0]) cond yes no)
 12177  		// result: (GTZ cond yes no)
 12178  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12179  			v_0 := b.Controls[0]
 12180  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12181  				break
 12182  			}
 12183  			cond := b.Controls[1]
 12184  			b.resetWithControl(BlockLOONG64GTZ, cond)
 12185  			return true
 12186  		}
 12187  		// match: (BLT cond (MOVVconst [0]) yes no)
 12188  		// result: (LTZ cond yes no)
 12189  		for b.Controls[1].Op == OpLOONG64MOVVconst {
 12190  			cond := b.Controls[0]
 12191  			v_1 := b.Controls[1]
 12192  			if auxIntToInt64(v_1.AuxInt) != 0 {
 12193  				break
 12194  			}
 12195  			b.resetWithControl(BlockLOONG64LTZ, cond)
 12196  			return true
 12197  		}
 12198  	case BlockLOONG64BLTU:
 12199  		// match: (BLTU (MOVVconst [0]) cond yes no)
 12200  		// result: (NEZ cond yes no)
 12201  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12202  			v_0 := b.Controls[0]
 12203  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12204  				break
 12205  			}
 12206  			cond := b.Controls[1]
 12207  			b.resetWithControl(BlockLOONG64NEZ, cond)
 12208  			return true
 12209  		}
 12210  	case BlockLOONG64BNE:
 12211  		// match: (BNE (MOVVconst [0]) cond yes no)
 12212  		// result: (NEZ cond yes no)
 12213  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12214  			v_0 := b.Controls[0]
 12215  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12216  				break
 12217  			}
 12218  			cond := b.Controls[1]
 12219  			b.resetWithControl(BlockLOONG64NEZ, cond)
 12220  			return true
 12221  		}
 12222  		// match: (BNE cond (MOVVconst [0]) yes no)
 12223  		// result: (NEZ cond yes no)
 12224  		for b.Controls[1].Op == OpLOONG64MOVVconst {
 12225  			cond := b.Controls[0]
 12226  			v_1 := b.Controls[1]
 12227  			if auxIntToInt64(v_1.AuxInt) != 0 {
 12228  				break
 12229  			}
 12230  			b.resetWithControl(BlockLOONG64NEZ, cond)
 12231  			return true
 12232  		}
 12233  	case BlockLOONG64EQZ:
 12234  		// match: (EQZ (FPFlagTrue cmp) yes no)
 12235  		// result: (FPF cmp yes no)
 12236  		for b.Controls[0].Op == OpLOONG64FPFlagTrue {
 12237  			v_0 := b.Controls[0]
 12238  			cmp := v_0.Args[0]
 12239  			b.resetWithControl(BlockLOONG64FPF, cmp)
 12240  			return true
 12241  		}
 12242  		// match: (EQZ (FPFlagFalse cmp) yes no)
 12243  		// result: (FPT cmp yes no)
 12244  		for b.Controls[0].Op == OpLOONG64FPFlagFalse {
 12245  			v_0 := b.Controls[0]
 12246  			cmp := v_0.Args[0]
 12247  			b.resetWithControl(BlockLOONG64FPT, cmp)
 12248  			return true
 12249  		}
 12250  		// match: (EQZ (XORconst [1] cmp:(SGT _ _)) yes no)
 12251  		// result: (NEZ cmp yes no)
 12252  		for b.Controls[0].Op == OpLOONG64XORconst {
 12253  			v_0 := b.Controls[0]
 12254  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12255  				break
 12256  			}
 12257  			cmp := v_0.Args[0]
 12258  			if cmp.Op != OpLOONG64SGT {
 12259  				break
 12260  			}
 12261  			b.resetWithControl(BlockLOONG64NEZ, cmp)
 12262  			return true
 12263  		}
 12264  		// match: (EQZ (XORconst [1] cmp:(SGTU _ _)) yes no)
 12265  		// result: (NEZ cmp yes no)
 12266  		for b.Controls[0].Op == OpLOONG64XORconst {
 12267  			v_0 := b.Controls[0]
 12268  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12269  				break
 12270  			}
 12271  			cmp := v_0.Args[0]
 12272  			if cmp.Op != OpLOONG64SGTU {
 12273  				break
 12274  			}
 12275  			b.resetWithControl(BlockLOONG64NEZ, cmp)
 12276  			return true
 12277  		}
 12278  		// match: (EQZ (XORconst [1] cmp:(SGTconst _)) yes no)
 12279  		// result: (NEZ cmp yes no)
 12280  		for b.Controls[0].Op == OpLOONG64XORconst {
 12281  			v_0 := b.Controls[0]
 12282  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12283  				break
 12284  			}
 12285  			cmp := v_0.Args[0]
 12286  			if cmp.Op != OpLOONG64SGTconst {
 12287  				break
 12288  			}
 12289  			b.resetWithControl(BlockLOONG64NEZ, cmp)
 12290  			return true
 12291  		}
 12292  		// match: (EQZ (XORconst [1] cmp:(SGTUconst _)) yes no)
 12293  		// result: (NEZ cmp yes no)
 12294  		for b.Controls[0].Op == OpLOONG64XORconst {
 12295  			v_0 := b.Controls[0]
 12296  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12297  				break
 12298  			}
 12299  			cmp := v_0.Args[0]
 12300  			if cmp.Op != OpLOONG64SGTUconst {
 12301  				break
 12302  			}
 12303  			b.resetWithControl(BlockLOONG64NEZ, cmp)
 12304  			return true
 12305  		}
 12306  		// match: (EQZ (SGTUconst [1] x) yes no)
 12307  		// result: (NEZ x yes no)
 12308  		for b.Controls[0].Op == OpLOONG64SGTUconst {
 12309  			v_0 := b.Controls[0]
 12310  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12311  				break
 12312  			}
 12313  			x := v_0.Args[0]
 12314  			b.resetWithControl(BlockLOONG64NEZ, x)
 12315  			return true
 12316  		}
 12317  		// match: (EQZ (SGTU x (MOVVconst [0])) yes no)
 12318  		// result: (EQZ x yes no)
 12319  		for b.Controls[0].Op == OpLOONG64SGTU {
 12320  			v_0 := b.Controls[0]
 12321  			_ = v_0.Args[1]
 12322  			x := v_0.Args[0]
 12323  			v_0_1 := v_0.Args[1]
 12324  			if v_0_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
 12325  				break
 12326  			}
 12327  			b.resetWithControl(BlockLOONG64EQZ, x)
 12328  			return true
 12329  		}
 12330  		// match: (EQZ (SGTconst [0] x) yes no)
 12331  		// result: (GEZ x yes no)
 12332  		for b.Controls[0].Op == OpLOONG64SGTconst {
 12333  			v_0 := b.Controls[0]
 12334  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12335  				break
 12336  			}
 12337  			x := v_0.Args[0]
 12338  			b.resetWithControl(BlockLOONG64GEZ, x)
 12339  			return true
 12340  		}
 12341  		// match: (EQZ (SGT x (MOVVconst [0])) yes no)
 12342  		// result: (LEZ x yes no)
 12343  		for b.Controls[0].Op == OpLOONG64SGT {
 12344  			v_0 := b.Controls[0]
 12345  			_ = v_0.Args[1]
 12346  			x := v_0.Args[0]
 12347  			v_0_1 := v_0.Args[1]
 12348  			if v_0_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
 12349  				break
 12350  			}
 12351  			b.resetWithControl(BlockLOONG64LEZ, x)
 12352  			return true
 12353  		}
 12354  		// match: (EQZ (SGTU (MOVVconst [c]) y) yes no)
 12355  		// cond: c >= -2048 && c <= 2047
 12356  		// result: (EQZ (SGTUconst [c] y) yes no)
 12357  		for b.Controls[0].Op == OpLOONG64SGTU {
 12358  			v_0 := b.Controls[0]
 12359  			y := v_0.Args[1]
 12360  			v_0_0 := v_0.Args[0]
 12361  			if v_0_0.Op != OpLOONG64MOVVconst {
 12362  				break
 12363  			}
 12364  			c := auxIntToInt64(v_0_0.AuxInt)
 12365  			if !(c >= -2048 && c <= 2047) {
 12366  				break
 12367  			}
 12368  			v0 := b.NewValue0(v_0.Pos, OpLOONG64SGTUconst, typ.Bool)
 12369  			v0.AuxInt = int64ToAuxInt(c)
 12370  			v0.AddArg(y)
 12371  			b.resetWithControl(BlockLOONG64EQZ, v0)
 12372  			return true
 12373  		}
 12374  		// match: (EQZ (SUBV x y) yes no)
 12375  		// result: (BEQ x y yes no)
 12376  		for b.Controls[0].Op == OpLOONG64SUBV {
 12377  			v_0 := b.Controls[0]
 12378  			y := v_0.Args[1]
 12379  			x := v_0.Args[0]
 12380  			b.resetWithControl2(BlockLOONG64BEQ, x, y)
 12381  			return true
 12382  		}
 12383  		// match: (EQZ (SGT x y) yes no)
 12384  		// result: (BGE y x yes no)
 12385  		for b.Controls[0].Op == OpLOONG64SGT {
 12386  			v_0 := b.Controls[0]
 12387  			y := v_0.Args[1]
 12388  			x := v_0.Args[0]
 12389  			b.resetWithControl2(BlockLOONG64BGE, y, x)
 12390  			return true
 12391  		}
 12392  		// match: (EQZ (SGTU x y) yes no)
 12393  		// result: (BGEU y x yes no)
 12394  		for b.Controls[0].Op == OpLOONG64SGTU {
 12395  			v_0 := b.Controls[0]
 12396  			y := v_0.Args[1]
 12397  			x := v_0.Args[0]
 12398  			b.resetWithControl2(BlockLOONG64BGEU, y, x)
 12399  			return true
 12400  		}
 12401  		// match: (EQZ (SGTconst [c] y) yes no)
 12402  		// result: (BGE y (MOVVconst [c]) yes no)
 12403  		for b.Controls[0].Op == OpLOONG64SGTconst {
 12404  			v_0 := b.Controls[0]
 12405  			c := auxIntToInt64(v_0.AuxInt)
 12406  			y := v_0.Args[0]
 12407  			v0 := b.NewValue0(b.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12408  			v0.AuxInt = int64ToAuxInt(c)
 12409  			b.resetWithControl2(BlockLOONG64BGE, y, v0)
 12410  			return true
 12411  		}
 12412  		// match: (EQZ (SGTUconst [c] y) yes no)
 12413  		// result: (BGEU y (MOVVconst [c]) yes no)
 12414  		for b.Controls[0].Op == OpLOONG64SGTUconst {
 12415  			v_0 := b.Controls[0]
 12416  			c := auxIntToInt64(v_0.AuxInt)
 12417  			y := v_0.Args[0]
 12418  			v0 := b.NewValue0(b.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12419  			v0.AuxInt = int64ToAuxInt(c)
 12420  			b.resetWithControl2(BlockLOONG64BGEU, y, v0)
 12421  			return true
 12422  		}
 12423  		// match: (EQZ (MOVVconst [0]) yes no)
 12424  		// result: (First yes no)
 12425  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12426  			v_0 := b.Controls[0]
 12427  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12428  				break
 12429  			}
 12430  			b.Reset(BlockFirst)
 12431  			return true
 12432  		}
 12433  		// match: (EQZ (MOVVconst [c]) yes no)
 12434  		// cond: c != 0
 12435  		// result: (First no yes)
 12436  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12437  			v_0 := b.Controls[0]
 12438  			c := auxIntToInt64(v_0.AuxInt)
 12439  			if !(c != 0) {
 12440  				break
 12441  			}
 12442  			b.Reset(BlockFirst)
 12443  			b.swapSuccessors()
 12444  			return true
 12445  		}
 12446  		// match: (EQZ (NEGV x) yes no)
 12447  		// result: (EQZ x yes no)
 12448  		for b.Controls[0].Op == OpLOONG64NEGV {
 12449  			v_0 := b.Controls[0]
 12450  			x := v_0.Args[0]
 12451  			b.resetWithControl(BlockLOONG64EQZ, x)
 12452  			return true
 12453  		}
 12454  	case BlockLOONG64GEZ:
 12455  		// match: (GEZ (MOVVconst [c]) yes no)
 12456  		// cond: c >= 0
 12457  		// result: (First yes no)
 12458  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12459  			v_0 := b.Controls[0]
 12460  			c := auxIntToInt64(v_0.AuxInt)
 12461  			if !(c >= 0) {
 12462  				break
 12463  			}
 12464  			b.Reset(BlockFirst)
 12465  			return true
 12466  		}
 12467  		// match: (GEZ (MOVVconst [c]) yes no)
 12468  		// cond: c < 0
 12469  		// result: (First no yes)
 12470  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12471  			v_0 := b.Controls[0]
 12472  			c := auxIntToInt64(v_0.AuxInt)
 12473  			if !(c < 0) {
 12474  				break
 12475  			}
 12476  			b.Reset(BlockFirst)
 12477  			b.swapSuccessors()
 12478  			return true
 12479  		}
 12480  	case BlockLOONG64GTZ:
 12481  		// match: (GTZ (MOVVconst [c]) yes no)
 12482  		// cond: c > 0
 12483  		// result: (First yes no)
 12484  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12485  			v_0 := b.Controls[0]
 12486  			c := auxIntToInt64(v_0.AuxInt)
 12487  			if !(c > 0) {
 12488  				break
 12489  			}
 12490  			b.Reset(BlockFirst)
 12491  			return true
 12492  		}
 12493  		// match: (GTZ (MOVVconst [c]) yes no)
 12494  		// cond: c <= 0
 12495  		// result: (First no yes)
 12496  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12497  			v_0 := b.Controls[0]
 12498  			c := auxIntToInt64(v_0.AuxInt)
 12499  			if !(c <= 0) {
 12500  				break
 12501  			}
 12502  			b.Reset(BlockFirst)
 12503  			b.swapSuccessors()
 12504  			return true
 12505  		}
 12506  	case BlockIf:
 12507  		// match: (If cond yes no)
 12508  		// result: (NEZ (MOVBUreg <typ.UInt64> cond) yes no)
 12509  		for {
 12510  			cond := b.Controls[0]
 12511  			v0 := b.NewValue0(cond.Pos, OpLOONG64MOVBUreg, typ.UInt64)
 12512  			v0.AddArg(cond)
 12513  			b.resetWithControl(BlockLOONG64NEZ, v0)
 12514  			return true
 12515  		}
 12516  	case BlockJumpTable:
 12517  		// match: (JumpTable idx)
 12518  		// result: (JUMPTABLE {makeJumpTableSym(b)} idx (MOVVaddr <typ.Uintptr> {makeJumpTableSym(b)} (SB)))
 12519  		for {
 12520  			idx := b.Controls[0]
 12521  			v0 := b.NewValue0(b.Pos, OpLOONG64MOVVaddr, typ.Uintptr)
 12522  			v0.Aux = symToAux(makeJumpTableSym(b))
 12523  			v1 := b.NewValue0(b.Pos, OpSB, typ.Uintptr)
 12524  			v0.AddArg(v1)
 12525  			b.resetWithControl2(BlockLOONG64JUMPTABLE, idx, v0)
 12526  			b.Aux = symToAux(makeJumpTableSym(b))
 12527  			return true
 12528  		}
 12529  	case BlockLOONG64LEZ:
 12530  		// match: (LEZ (MOVVconst [c]) yes no)
 12531  		// cond: c <= 0
 12532  		// result: (First yes no)
 12533  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12534  			v_0 := b.Controls[0]
 12535  			c := auxIntToInt64(v_0.AuxInt)
 12536  			if !(c <= 0) {
 12537  				break
 12538  			}
 12539  			b.Reset(BlockFirst)
 12540  			return true
 12541  		}
 12542  		// match: (LEZ (MOVVconst [c]) yes no)
 12543  		// cond: c > 0
 12544  		// result: (First no yes)
 12545  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12546  			v_0 := b.Controls[0]
 12547  			c := auxIntToInt64(v_0.AuxInt)
 12548  			if !(c > 0) {
 12549  				break
 12550  			}
 12551  			b.Reset(BlockFirst)
 12552  			b.swapSuccessors()
 12553  			return true
 12554  		}
 12555  	case BlockLOONG64LTZ:
 12556  		// match: (LTZ (MOVVconst [c]) yes no)
 12557  		// cond: c < 0
 12558  		// result: (First yes no)
 12559  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12560  			v_0 := b.Controls[0]
 12561  			c := auxIntToInt64(v_0.AuxInt)
 12562  			if !(c < 0) {
 12563  				break
 12564  			}
 12565  			b.Reset(BlockFirst)
 12566  			return true
 12567  		}
 12568  		// match: (LTZ (MOVVconst [c]) yes no)
 12569  		// cond: c >= 0
 12570  		// result: (First no yes)
 12571  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12572  			v_0 := b.Controls[0]
 12573  			c := auxIntToInt64(v_0.AuxInt)
 12574  			if !(c >= 0) {
 12575  				break
 12576  			}
 12577  			b.Reset(BlockFirst)
 12578  			b.swapSuccessors()
 12579  			return true
 12580  		}
 12581  	case BlockLOONG64NEZ:
 12582  		// match: (NEZ (FPFlagTrue cmp) yes no)
 12583  		// result: (FPT cmp yes no)
 12584  		for b.Controls[0].Op == OpLOONG64FPFlagTrue {
 12585  			v_0 := b.Controls[0]
 12586  			cmp := v_0.Args[0]
 12587  			b.resetWithControl(BlockLOONG64FPT, cmp)
 12588  			return true
 12589  		}
 12590  		// match: (NEZ (FPFlagFalse cmp) yes no)
 12591  		// result: (FPF cmp yes no)
 12592  		for b.Controls[0].Op == OpLOONG64FPFlagFalse {
 12593  			v_0 := b.Controls[0]
 12594  			cmp := v_0.Args[0]
 12595  			b.resetWithControl(BlockLOONG64FPF, cmp)
 12596  			return true
 12597  		}
 12598  		// match: (NEZ (XORconst [1] cmp:(SGT _ _)) yes no)
 12599  		// result: (EQZ cmp yes no)
 12600  		for b.Controls[0].Op == OpLOONG64XORconst {
 12601  			v_0 := b.Controls[0]
 12602  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12603  				break
 12604  			}
 12605  			cmp := v_0.Args[0]
 12606  			if cmp.Op != OpLOONG64SGT {
 12607  				break
 12608  			}
 12609  			b.resetWithControl(BlockLOONG64EQZ, cmp)
 12610  			return true
 12611  		}
 12612  		// match: (NEZ (XORconst [1] cmp:(SGTU _ _)) yes no)
 12613  		// result: (EQZ cmp yes no)
 12614  		for b.Controls[0].Op == OpLOONG64XORconst {
 12615  			v_0 := b.Controls[0]
 12616  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12617  				break
 12618  			}
 12619  			cmp := v_0.Args[0]
 12620  			if cmp.Op != OpLOONG64SGTU {
 12621  				break
 12622  			}
 12623  			b.resetWithControl(BlockLOONG64EQZ, cmp)
 12624  			return true
 12625  		}
 12626  		// match: (NEZ (XORconst [1] cmp:(SGTconst _)) yes no)
 12627  		// result: (EQZ cmp yes no)
 12628  		for b.Controls[0].Op == OpLOONG64XORconst {
 12629  			v_0 := b.Controls[0]
 12630  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12631  				break
 12632  			}
 12633  			cmp := v_0.Args[0]
 12634  			if cmp.Op != OpLOONG64SGTconst {
 12635  				break
 12636  			}
 12637  			b.resetWithControl(BlockLOONG64EQZ, cmp)
 12638  			return true
 12639  		}
 12640  		// match: (NEZ (XORconst [1] cmp:(SGTUconst _)) yes no)
 12641  		// result: (EQZ cmp yes no)
 12642  		for b.Controls[0].Op == OpLOONG64XORconst {
 12643  			v_0 := b.Controls[0]
 12644  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12645  				break
 12646  			}
 12647  			cmp := v_0.Args[0]
 12648  			if cmp.Op != OpLOONG64SGTUconst {
 12649  				break
 12650  			}
 12651  			b.resetWithControl(BlockLOONG64EQZ, cmp)
 12652  			return true
 12653  		}
 12654  		// match: (NEZ (SGTUconst [1] x) yes no)
 12655  		// result: (EQZ x yes no)
 12656  		for b.Controls[0].Op == OpLOONG64SGTUconst {
 12657  			v_0 := b.Controls[0]
 12658  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12659  				break
 12660  			}
 12661  			x := v_0.Args[0]
 12662  			b.resetWithControl(BlockLOONG64EQZ, x)
 12663  			return true
 12664  		}
 12665  		// match: (NEZ (SGTU x (MOVVconst [0])) yes no)
 12666  		// result: (NEZ x yes no)
 12667  		for b.Controls[0].Op == OpLOONG64SGTU {
 12668  			v_0 := b.Controls[0]
 12669  			_ = v_0.Args[1]
 12670  			x := v_0.Args[0]
 12671  			v_0_1 := v_0.Args[1]
 12672  			if v_0_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
 12673  				break
 12674  			}
 12675  			b.resetWithControl(BlockLOONG64NEZ, x)
 12676  			return true
 12677  		}
 12678  		// match: (NEZ (SGTconst [0] x) yes no)
 12679  		// result: (LTZ x yes no)
 12680  		for b.Controls[0].Op == OpLOONG64SGTconst {
 12681  			v_0 := b.Controls[0]
 12682  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12683  				break
 12684  			}
 12685  			x := v_0.Args[0]
 12686  			b.resetWithControl(BlockLOONG64LTZ, x)
 12687  			return true
 12688  		}
 12689  		// match: (NEZ (SGT x (MOVVconst [0])) yes no)
 12690  		// result: (GTZ x yes no)
 12691  		for b.Controls[0].Op == OpLOONG64SGT {
 12692  			v_0 := b.Controls[0]
 12693  			_ = v_0.Args[1]
 12694  			x := v_0.Args[0]
 12695  			v_0_1 := v_0.Args[1]
 12696  			if v_0_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
 12697  				break
 12698  			}
 12699  			b.resetWithControl(BlockLOONG64GTZ, x)
 12700  			return true
 12701  		}
 12702  		// match: (NEZ (SGTU (MOVVconst [c]) y) yes no)
 12703  		// cond: c >= -2048 && c <= 2047
 12704  		// result: (NEZ (SGTUconst [c] y) yes no)
 12705  		for b.Controls[0].Op == OpLOONG64SGTU {
 12706  			v_0 := b.Controls[0]
 12707  			y := v_0.Args[1]
 12708  			v_0_0 := v_0.Args[0]
 12709  			if v_0_0.Op != OpLOONG64MOVVconst {
 12710  				break
 12711  			}
 12712  			c := auxIntToInt64(v_0_0.AuxInt)
 12713  			if !(c >= -2048 && c <= 2047) {
 12714  				break
 12715  			}
 12716  			v0 := b.NewValue0(v_0.Pos, OpLOONG64SGTUconst, typ.Bool)
 12717  			v0.AuxInt = int64ToAuxInt(c)
 12718  			v0.AddArg(y)
 12719  			b.resetWithControl(BlockLOONG64NEZ, v0)
 12720  			return true
 12721  		}
 12722  		// match: (NEZ (SUBV x y) yes no)
 12723  		// result: (BNE x y yes no)
 12724  		for b.Controls[0].Op == OpLOONG64SUBV {
 12725  			v_0 := b.Controls[0]
 12726  			y := v_0.Args[1]
 12727  			x := v_0.Args[0]
 12728  			b.resetWithControl2(BlockLOONG64BNE, x, y)
 12729  			return true
 12730  		}
 12731  		// match: (NEZ (SGT x y) yes no)
 12732  		// result: (BLT y x yes no)
 12733  		for b.Controls[0].Op == OpLOONG64SGT {
 12734  			v_0 := b.Controls[0]
 12735  			y := v_0.Args[1]
 12736  			x := v_0.Args[0]
 12737  			b.resetWithControl2(BlockLOONG64BLT, y, x)
 12738  			return true
 12739  		}
 12740  		// match: (NEZ (SGTU x y) yes no)
 12741  		// result: (BLTU y x yes no)
 12742  		for b.Controls[0].Op == OpLOONG64SGTU {
 12743  			v_0 := b.Controls[0]
 12744  			y := v_0.Args[1]
 12745  			x := v_0.Args[0]
 12746  			b.resetWithControl2(BlockLOONG64BLTU, y, x)
 12747  			return true
 12748  		}
 12749  		// match: (NEZ (SGTconst [c] y) yes no)
 12750  		// result: (BLT y (MOVVconst [c]) yes no)
 12751  		for b.Controls[0].Op == OpLOONG64SGTconst {
 12752  			v_0 := b.Controls[0]
 12753  			c := auxIntToInt64(v_0.AuxInt)
 12754  			y := v_0.Args[0]
 12755  			v0 := b.NewValue0(b.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12756  			v0.AuxInt = int64ToAuxInt(c)
 12757  			b.resetWithControl2(BlockLOONG64BLT, y, v0)
 12758  			return true
 12759  		}
 12760  		// match: (NEZ (SGTUconst [c] y) yes no)
 12761  		// result: (BLTU y (MOVVconst [c]) yes no)
 12762  		for b.Controls[0].Op == OpLOONG64SGTUconst {
 12763  			v_0 := b.Controls[0]
 12764  			c := auxIntToInt64(v_0.AuxInt)
 12765  			y := v_0.Args[0]
 12766  			v0 := b.NewValue0(b.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12767  			v0.AuxInt = int64ToAuxInt(c)
 12768  			b.resetWithControl2(BlockLOONG64BLTU, y, v0)
 12769  			return true
 12770  		}
 12771  		// match: (NEZ (MOVVconst [0]) yes no)
 12772  		// result: (First no yes)
 12773  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12774  			v_0 := b.Controls[0]
 12775  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12776  				break
 12777  			}
 12778  			b.Reset(BlockFirst)
 12779  			b.swapSuccessors()
 12780  			return true
 12781  		}
 12782  		// match: (NEZ (MOVVconst [c]) yes no)
 12783  		// cond: c != 0
 12784  		// result: (First yes no)
 12785  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12786  			v_0 := b.Controls[0]
 12787  			c := auxIntToInt64(v_0.AuxInt)
 12788  			if !(c != 0) {
 12789  				break
 12790  			}
 12791  			b.Reset(BlockFirst)
 12792  			return true
 12793  		}
 12794  		// match: (NEZ (NEGV x) yes no)
 12795  		// result: (NEZ x yes no)
 12796  		for b.Controls[0].Op == OpLOONG64NEGV {
 12797  			v_0 := b.Controls[0]
 12798  			x := v_0.Args[0]
 12799  			b.resetWithControl(BlockLOONG64NEZ, x)
 12800  			return true
 12801  		}
 12802  	}
 12803  	return false
 12804  }
 12805  

View as plain text