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:(SRLconst [c] y))
  2681  	// cond: c >= 24
  2682  	// result: x
  2683  	for {
  2684  		x := v_0
  2685  		if x.Op != OpLOONG64SRLconst {
  2686  			break
  2687  		}
  2688  		c := auxIntToInt64(x.AuxInt)
  2689  		if !(c >= 24) {
  2690  			break
  2691  		}
  2692  		v.copyOf(x)
  2693  		return true
  2694  	}
  2695  	// match: (MOVBUreg x:(ANDconst [c] y))
  2696  	// cond: c >= 0 && int64(uint8(c)) == c
  2697  	// result: x
  2698  	for {
  2699  		x := v_0
  2700  		if x.Op != OpLOONG64ANDconst {
  2701  			break
  2702  		}
  2703  		c := auxIntToInt64(x.AuxInt)
  2704  		if !(c >= 0 && int64(uint8(c)) == c) {
  2705  			break
  2706  		}
  2707  		v.copyOf(x)
  2708  		return true
  2709  	}
  2710  	return false
  2711  }
  2712  func rewriteValueLOONG64_OpLOONG64MOVBload(v *Value) bool {
  2713  	v_1 := v.Args[1]
  2714  	v_0 := v.Args[0]
  2715  	b := v.Block
  2716  	config := b.Func.Config
  2717  	typ := &b.Func.Config.Types
  2718  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off] {sym} ptr x _))
  2719  	// result: (MOVBreg x)
  2720  	for {
  2721  		off := auxIntToInt32(v.AuxInt)
  2722  		sym := auxToSym(v.Aux)
  2723  		ptr := v_0
  2724  		if v_1.Op != OpLOONG64MOVBstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  2725  			break
  2726  		}
  2727  		x := v_1.Args[1]
  2728  		if ptr != v_1.Args[0] {
  2729  			break
  2730  		}
  2731  		v.reset(OpLOONG64MOVBreg)
  2732  		v.AddArg(x)
  2733  		return true
  2734  	}
  2735  	// match: (MOVBload [off1] {sym} (ADDVconst [off2] ptr) mem)
  2736  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  2737  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
  2738  	for {
  2739  		off1 := auxIntToInt32(v.AuxInt)
  2740  		sym := auxToSym(v.Aux)
  2741  		if v_0.Op != OpLOONG64ADDVconst {
  2742  			break
  2743  		}
  2744  		off2 := auxIntToInt64(v_0.AuxInt)
  2745  		ptr := v_0.Args[0]
  2746  		mem := v_1
  2747  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  2748  			break
  2749  		}
  2750  		v.reset(OpLOONG64MOVBload)
  2751  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  2752  		v.Aux = symToAux(sym)
  2753  		v.AddArg2(ptr, mem)
  2754  		return true
  2755  	}
  2756  	// match: (MOVBload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  2757  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  2758  	// result: (MOVBload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  2759  	for {
  2760  		off1 := auxIntToInt32(v.AuxInt)
  2761  		sym1 := auxToSym(v.Aux)
  2762  		if v_0.Op != OpLOONG64MOVVaddr {
  2763  			break
  2764  		}
  2765  		off2 := auxIntToInt32(v_0.AuxInt)
  2766  		sym2 := auxToSym(v_0.Aux)
  2767  		ptr := v_0.Args[0]
  2768  		mem := v_1
  2769  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  2770  			break
  2771  		}
  2772  		v.reset(OpLOONG64MOVBload)
  2773  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  2774  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2775  		v.AddArg2(ptr, mem)
  2776  		return true
  2777  	}
  2778  	// match: (MOVBload [off] {sym} (ADDV ptr idx) mem)
  2779  	// cond: off == 0 && sym == nil
  2780  	// result: (MOVBloadidx ptr idx mem)
  2781  	for {
  2782  		off := auxIntToInt32(v.AuxInt)
  2783  		sym := auxToSym(v.Aux)
  2784  		if v_0.Op != OpLOONG64ADDV {
  2785  			break
  2786  		}
  2787  		idx := v_0.Args[1]
  2788  		ptr := v_0.Args[0]
  2789  		mem := v_1
  2790  		if !(off == 0 && sym == nil) {
  2791  			break
  2792  		}
  2793  		v.reset(OpLOONG64MOVBloadidx)
  2794  		v.AddArg3(ptr, idx, mem)
  2795  		return true
  2796  	}
  2797  	// match: (MOVBload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  2798  	// cond: off == 0 && sym == nil
  2799  	// result: (MOVBloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  2800  	for {
  2801  		off := auxIntToInt32(v.AuxInt)
  2802  		sym := auxToSym(v.Aux)
  2803  		if v_0.Op != OpLOONG64ADDshiftLLV {
  2804  			break
  2805  		}
  2806  		shift := auxIntToInt64(v_0.AuxInt)
  2807  		idx := v_0.Args[1]
  2808  		ptr := v_0.Args[0]
  2809  		mem := v_1
  2810  		if !(off == 0 && sym == nil) {
  2811  			break
  2812  		}
  2813  		v.reset(OpLOONG64MOVBloadidx)
  2814  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  2815  		v0.AuxInt = int64ToAuxInt(shift)
  2816  		v0.AddArg(idx)
  2817  		v.AddArg3(ptr, v0, mem)
  2818  		return true
  2819  	}
  2820  	// match: (MOVBload [off] {sym} (SB) _)
  2821  	// cond: symIsRO(sym)
  2822  	// result: (MOVVconst [int64(int8(read8(sym, int64(off))))])
  2823  	for {
  2824  		off := auxIntToInt32(v.AuxInt)
  2825  		sym := auxToSym(v.Aux)
  2826  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  2827  			break
  2828  		}
  2829  		v.reset(OpLOONG64MOVVconst)
  2830  		v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, int64(off)))))
  2831  		return true
  2832  	}
  2833  	return false
  2834  }
  2835  func rewriteValueLOONG64_OpLOONG64MOVBloadidx(v *Value) bool {
  2836  	v_2 := v.Args[2]
  2837  	v_1 := v.Args[1]
  2838  	v_0 := v.Args[0]
  2839  	// match: (MOVBloadidx ptr (MOVVconst [c]) mem)
  2840  	// cond: is32Bit(c)
  2841  	// result: (MOVBload [int32(c)] ptr mem)
  2842  	for {
  2843  		ptr := v_0
  2844  		if v_1.Op != OpLOONG64MOVVconst {
  2845  			break
  2846  		}
  2847  		c := auxIntToInt64(v_1.AuxInt)
  2848  		mem := v_2
  2849  		if !(is32Bit(c)) {
  2850  			break
  2851  		}
  2852  		v.reset(OpLOONG64MOVBload)
  2853  		v.AuxInt = int32ToAuxInt(int32(c))
  2854  		v.AddArg2(ptr, mem)
  2855  		return true
  2856  	}
  2857  	// match: (MOVBloadidx (MOVVconst [c]) ptr mem)
  2858  	// cond: is32Bit(c)
  2859  	// result: (MOVBload [int32(c)] ptr mem)
  2860  	for {
  2861  		if v_0.Op != OpLOONG64MOVVconst {
  2862  			break
  2863  		}
  2864  		c := auxIntToInt64(v_0.AuxInt)
  2865  		ptr := v_1
  2866  		mem := v_2
  2867  		if !(is32Bit(c)) {
  2868  			break
  2869  		}
  2870  		v.reset(OpLOONG64MOVBload)
  2871  		v.AuxInt = int32ToAuxInt(int32(c))
  2872  		v.AddArg2(ptr, mem)
  2873  		return true
  2874  	}
  2875  	return false
  2876  }
  2877  func rewriteValueLOONG64_OpLOONG64MOVBreg(v *Value) bool {
  2878  	v_0 := v.Args[0]
  2879  	// match: (MOVBreg x:(MOVBload _ _))
  2880  	// result: (MOVVreg x)
  2881  	for {
  2882  		x := v_0
  2883  		if x.Op != OpLOONG64MOVBload {
  2884  			break
  2885  		}
  2886  		v.reset(OpLOONG64MOVVreg)
  2887  		v.AddArg(x)
  2888  		return true
  2889  	}
  2890  	// match: (MOVBreg x:(MOVBloadidx _ _ _))
  2891  	// result: (MOVVreg x)
  2892  	for {
  2893  		x := v_0
  2894  		if x.Op != OpLOONG64MOVBloadidx {
  2895  			break
  2896  		}
  2897  		v.reset(OpLOONG64MOVVreg)
  2898  		v.AddArg(x)
  2899  		return true
  2900  	}
  2901  	// match: (MOVBreg x:(MOVBreg _))
  2902  	// result: (MOVVreg x)
  2903  	for {
  2904  		x := v_0
  2905  		if x.Op != OpLOONG64MOVBreg {
  2906  			break
  2907  		}
  2908  		v.reset(OpLOONG64MOVVreg)
  2909  		v.AddArg(x)
  2910  		return true
  2911  	}
  2912  	// match: (MOVBreg (MOVVconst [c]))
  2913  	// result: (MOVVconst [int64(int8(c))])
  2914  	for {
  2915  		if v_0.Op != OpLOONG64MOVVconst {
  2916  			break
  2917  		}
  2918  		c := auxIntToInt64(v_0.AuxInt)
  2919  		v.reset(OpLOONG64MOVVconst)
  2920  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  2921  		return true
  2922  	}
  2923  	// match: (MOVBreg x:(ANDconst [c] y))
  2924  	// cond: c >= 0 && int64(int8(c)) == c
  2925  	// result: x
  2926  	for {
  2927  		x := v_0
  2928  		if x.Op != OpLOONG64ANDconst {
  2929  			break
  2930  		}
  2931  		c := auxIntToInt64(x.AuxInt)
  2932  		if !(c >= 0 && int64(int8(c)) == c) {
  2933  			break
  2934  		}
  2935  		v.copyOf(x)
  2936  		return true
  2937  	}
  2938  	return false
  2939  }
  2940  func rewriteValueLOONG64_OpLOONG64MOVBstore(v *Value) bool {
  2941  	v_2 := v.Args[2]
  2942  	v_1 := v.Args[1]
  2943  	v_0 := v.Args[0]
  2944  	b := v.Block
  2945  	config := b.Func.Config
  2946  	typ := &b.Func.Config.Types
  2947  	// match: (MOVBstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  2948  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  2949  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
  2950  	for {
  2951  		off1 := auxIntToInt32(v.AuxInt)
  2952  		sym := auxToSym(v.Aux)
  2953  		if v_0.Op != OpLOONG64ADDVconst {
  2954  			break
  2955  		}
  2956  		off2 := auxIntToInt64(v_0.AuxInt)
  2957  		ptr := v_0.Args[0]
  2958  		val := v_1
  2959  		mem := v_2
  2960  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  2961  			break
  2962  		}
  2963  		v.reset(OpLOONG64MOVBstore)
  2964  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  2965  		v.Aux = symToAux(sym)
  2966  		v.AddArg3(ptr, val, mem)
  2967  		return true
  2968  	}
  2969  	// match: (MOVBstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  2970  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  2971  	// result: (MOVBstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  2972  	for {
  2973  		off1 := auxIntToInt32(v.AuxInt)
  2974  		sym1 := auxToSym(v.Aux)
  2975  		if v_0.Op != OpLOONG64MOVVaddr {
  2976  			break
  2977  		}
  2978  		off2 := auxIntToInt32(v_0.AuxInt)
  2979  		sym2 := auxToSym(v_0.Aux)
  2980  		ptr := v_0.Args[0]
  2981  		val := v_1
  2982  		mem := v_2
  2983  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  2984  			break
  2985  		}
  2986  		v.reset(OpLOONG64MOVBstore)
  2987  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  2988  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2989  		v.AddArg3(ptr, val, mem)
  2990  		return true
  2991  	}
  2992  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  2993  	// result: (MOVBstore [off] {sym} ptr x mem)
  2994  	for {
  2995  		off := auxIntToInt32(v.AuxInt)
  2996  		sym := auxToSym(v.Aux)
  2997  		ptr := v_0
  2998  		if v_1.Op != OpLOONG64MOVBreg {
  2999  			break
  3000  		}
  3001  		x := v_1.Args[0]
  3002  		mem := v_2
  3003  		v.reset(OpLOONG64MOVBstore)
  3004  		v.AuxInt = int32ToAuxInt(off)
  3005  		v.Aux = symToAux(sym)
  3006  		v.AddArg3(ptr, x, mem)
  3007  		return true
  3008  	}
  3009  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  3010  	// result: (MOVBstore [off] {sym} ptr x mem)
  3011  	for {
  3012  		off := auxIntToInt32(v.AuxInt)
  3013  		sym := auxToSym(v.Aux)
  3014  		ptr := v_0
  3015  		if v_1.Op != OpLOONG64MOVBUreg {
  3016  			break
  3017  		}
  3018  		x := v_1.Args[0]
  3019  		mem := v_2
  3020  		v.reset(OpLOONG64MOVBstore)
  3021  		v.AuxInt = int32ToAuxInt(off)
  3022  		v.Aux = symToAux(sym)
  3023  		v.AddArg3(ptr, x, mem)
  3024  		return true
  3025  	}
  3026  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  3027  	// result: (MOVBstore [off] {sym} ptr x mem)
  3028  	for {
  3029  		off := auxIntToInt32(v.AuxInt)
  3030  		sym := auxToSym(v.Aux)
  3031  		ptr := v_0
  3032  		if v_1.Op != OpLOONG64MOVHreg {
  3033  			break
  3034  		}
  3035  		x := v_1.Args[0]
  3036  		mem := v_2
  3037  		v.reset(OpLOONG64MOVBstore)
  3038  		v.AuxInt = int32ToAuxInt(off)
  3039  		v.Aux = symToAux(sym)
  3040  		v.AddArg3(ptr, x, mem)
  3041  		return true
  3042  	}
  3043  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  3044  	// result: (MOVBstore [off] {sym} ptr x mem)
  3045  	for {
  3046  		off := auxIntToInt32(v.AuxInt)
  3047  		sym := auxToSym(v.Aux)
  3048  		ptr := v_0
  3049  		if v_1.Op != OpLOONG64MOVHUreg {
  3050  			break
  3051  		}
  3052  		x := v_1.Args[0]
  3053  		mem := v_2
  3054  		v.reset(OpLOONG64MOVBstore)
  3055  		v.AuxInt = int32ToAuxInt(off)
  3056  		v.Aux = symToAux(sym)
  3057  		v.AddArg3(ptr, x, mem)
  3058  		return true
  3059  	}
  3060  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  3061  	// result: (MOVBstore [off] {sym} ptr x mem)
  3062  	for {
  3063  		off := auxIntToInt32(v.AuxInt)
  3064  		sym := auxToSym(v.Aux)
  3065  		ptr := v_0
  3066  		if v_1.Op != OpLOONG64MOVWreg {
  3067  			break
  3068  		}
  3069  		x := v_1.Args[0]
  3070  		mem := v_2
  3071  		v.reset(OpLOONG64MOVBstore)
  3072  		v.AuxInt = int32ToAuxInt(off)
  3073  		v.Aux = symToAux(sym)
  3074  		v.AddArg3(ptr, x, mem)
  3075  		return true
  3076  	}
  3077  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
  3078  	// result: (MOVBstore [off] {sym} ptr x mem)
  3079  	for {
  3080  		off := auxIntToInt32(v.AuxInt)
  3081  		sym := auxToSym(v.Aux)
  3082  		ptr := v_0
  3083  		if v_1.Op != OpLOONG64MOVWUreg {
  3084  			break
  3085  		}
  3086  		x := v_1.Args[0]
  3087  		mem := v_2
  3088  		v.reset(OpLOONG64MOVBstore)
  3089  		v.AuxInt = int32ToAuxInt(off)
  3090  		v.Aux = symToAux(sym)
  3091  		v.AddArg3(ptr, x, mem)
  3092  		return true
  3093  	}
  3094  	// match: (MOVBstore [off] {sym} (ADDV ptr idx) val mem)
  3095  	// cond: off == 0 && sym == nil
  3096  	// result: (MOVBstoreidx ptr idx val mem)
  3097  	for {
  3098  		off := auxIntToInt32(v.AuxInt)
  3099  		sym := auxToSym(v.Aux)
  3100  		if v_0.Op != OpLOONG64ADDV {
  3101  			break
  3102  		}
  3103  		idx := v_0.Args[1]
  3104  		ptr := v_0.Args[0]
  3105  		val := v_1
  3106  		mem := v_2
  3107  		if !(off == 0 && sym == nil) {
  3108  			break
  3109  		}
  3110  		v.reset(OpLOONG64MOVBstoreidx)
  3111  		v.AddArg4(ptr, idx, val, mem)
  3112  		return true
  3113  	}
  3114  	// match: (MOVBstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3115  	// cond: off == 0 && sym == nil
  3116  	// result: (MOVBstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3117  	for {
  3118  		off := auxIntToInt32(v.AuxInt)
  3119  		sym := auxToSym(v.Aux)
  3120  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3121  			break
  3122  		}
  3123  		shift := auxIntToInt64(v_0.AuxInt)
  3124  		idx := v_0.Args[1]
  3125  		ptr := v_0.Args[0]
  3126  		val := v_1
  3127  		mem := v_2
  3128  		if !(off == 0 && sym == nil) {
  3129  			break
  3130  		}
  3131  		v.reset(OpLOONG64MOVBstoreidx)
  3132  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3133  		v0.AuxInt = int64ToAuxInt(shift)
  3134  		v0.AddArg(idx)
  3135  		v.AddArg4(ptr, v0, val, mem)
  3136  		return true
  3137  	}
  3138  	return false
  3139  }
  3140  func rewriteValueLOONG64_OpLOONG64MOVBstoreidx(v *Value) bool {
  3141  	v_3 := v.Args[3]
  3142  	v_2 := v.Args[2]
  3143  	v_1 := v.Args[1]
  3144  	v_0 := v.Args[0]
  3145  	// match: (MOVBstoreidx ptr (MOVVconst [c]) val mem)
  3146  	// cond: is32Bit(c)
  3147  	// result: (MOVBstore [int32(c)] ptr val mem)
  3148  	for {
  3149  		ptr := v_0
  3150  		if v_1.Op != OpLOONG64MOVVconst {
  3151  			break
  3152  		}
  3153  		c := auxIntToInt64(v_1.AuxInt)
  3154  		val := v_2
  3155  		mem := v_3
  3156  		if !(is32Bit(c)) {
  3157  			break
  3158  		}
  3159  		v.reset(OpLOONG64MOVBstore)
  3160  		v.AuxInt = int32ToAuxInt(int32(c))
  3161  		v.AddArg3(ptr, val, mem)
  3162  		return true
  3163  	}
  3164  	// match: (MOVBstoreidx (MOVVconst [c]) idx val mem)
  3165  	// cond: is32Bit(c)
  3166  	// result: (MOVBstore [int32(c)] idx val mem)
  3167  	for {
  3168  		if v_0.Op != OpLOONG64MOVVconst {
  3169  			break
  3170  		}
  3171  		c := auxIntToInt64(v_0.AuxInt)
  3172  		idx := v_1
  3173  		val := v_2
  3174  		mem := v_3
  3175  		if !(is32Bit(c)) {
  3176  			break
  3177  		}
  3178  		v.reset(OpLOONG64MOVBstore)
  3179  		v.AuxInt = int32ToAuxInt(int32(c))
  3180  		v.AddArg3(idx, val, mem)
  3181  		return true
  3182  	}
  3183  	return false
  3184  }
  3185  func rewriteValueLOONG64_OpLOONG64MOVDload(v *Value) bool {
  3186  	v_1 := v.Args[1]
  3187  	v_0 := v.Args[0]
  3188  	b := v.Block
  3189  	config := b.Func.Config
  3190  	typ := &b.Func.Config.Types
  3191  	// match: (MOVDload [off] {sym} ptr (MOVVstore [off] {sym} ptr val _))
  3192  	// result: (MOVVgpfp val)
  3193  	for {
  3194  		off := auxIntToInt32(v.AuxInt)
  3195  		sym := auxToSym(v.Aux)
  3196  		ptr := v_0
  3197  		if v_1.Op != OpLOONG64MOVVstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  3198  			break
  3199  		}
  3200  		val := v_1.Args[1]
  3201  		if ptr != v_1.Args[0] {
  3202  			break
  3203  		}
  3204  		v.reset(OpLOONG64MOVVgpfp)
  3205  		v.AddArg(val)
  3206  		return true
  3207  	}
  3208  	// match: (MOVDload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3209  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3210  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
  3211  	for {
  3212  		off1 := auxIntToInt32(v.AuxInt)
  3213  		sym := auxToSym(v.Aux)
  3214  		if v_0.Op != OpLOONG64ADDVconst {
  3215  			break
  3216  		}
  3217  		off2 := auxIntToInt64(v_0.AuxInt)
  3218  		ptr := v_0.Args[0]
  3219  		mem := v_1
  3220  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3221  			break
  3222  		}
  3223  		v.reset(OpLOONG64MOVDload)
  3224  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3225  		v.Aux = symToAux(sym)
  3226  		v.AddArg2(ptr, mem)
  3227  		return true
  3228  	}
  3229  	// match: (MOVDload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3230  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3231  	// result: (MOVDload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  3232  	for {
  3233  		off1 := auxIntToInt32(v.AuxInt)
  3234  		sym1 := auxToSym(v.Aux)
  3235  		if v_0.Op != OpLOONG64MOVVaddr {
  3236  			break
  3237  		}
  3238  		off2 := auxIntToInt32(v_0.AuxInt)
  3239  		sym2 := auxToSym(v_0.Aux)
  3240  		ptr := v_0.Args[0]
  3241  		mem := v_1
  3242  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3243  			break
  3244  		}
  3245  		v.reset(OpLOONG64MOVDload)
  3246  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3247  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3248  		v.AddArg2(ptr, mem)
  3249  		return true
  3250  	}
  3251  	// match: (MOVDload [off] {sym} (ADDV ptr idx) mem)
  3252  	// cond: off == 0 && sym == nil
  3253  	// result: (MOVDloadidx ptr idx mem)
  3254  	for {
  3255  		off := auxIntToInt32(v.AuxInt)
  3256  		sym := auxToSym(v.Aux)
  3257  		if v_0.Op != OpLOONG64ADDV {
  3258  			break
  3259  		}
  3260  		idx := v_0.Args[1]
  3261  		ptr := v_0.Args[0]
  3262  		mem := v_1
  3263  		if !(off == 0 && sym == nil) {
  3264  			break
  3265  		}
  3266  		v.reset(OpLOONG64MOVDloadidx)
  3267  		v.AddArg3(ptr, idx, mem)
  3268  		return true
  3269  	}
  3270  	// match: (MOVDload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3271  	// cond: off == 0 && sym == nil
  3272  	// result: (MOVDloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3273  	for {
  3274  		off := auxIntToInt32(v.AuxInt)
  3275  		sym := auxToSym(v.Aux)
  3276  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3277  			break
  3278  		}
  3279  		shift := auxIntToInt64(v_0.AuxInt)
  3280  		idx := v_0.Args[1]
  3281  		ptr := v_0.Args[0]
  3282  		mem := v_1
  3283  		if !(off == 0 && sym == nil) {
  3284  			break
  3285  		}
  3286  		v.reset(OpLOONG64MOVDloadidx)
  3287  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3288  		v0.AuxInt = int64ToAuxInt(shift)
  3289  		v0.AddArg(idx)
  3290  		v.AddArg3(ptr, v0, mem)
  3291  		return true
  3292  	}
  3293  	return false
  3294  }
  3295  func rewriteValueLOONG64_OpLOONG64MOVDloadidx(v *Value) bool {
  3296  	v_2 := v.Args[2]
  3297  	v_1 := v.Args[1]
  3298  	v_0 := v.Args[0]
  3299  	// match: (MOVDloadidx ptr (MOVVconst [c]) mem)
  3300  	// cond: is32Bit(c)
  3301  	// result: (MOVDload [int32(c)] ptr mem)
  3302  	for {
  3303  		ptr := v_0
  3304  		if v_1.Op != OpLOONG64MOVVconst {
  3305  			break
  3306  		}
  3307  		c := auxIntToInt64(v_1.AuxInt)
  3308  		mem := v_2
  3309  		if !(is32Bit(c)) {
  3310  			break
  3311  		}
  3312  		v.reset(OpLOONG64MOVDload)
  3313  		v.AuxInt = int32ToAuxInt(int32(c))
  3314  		v.AddArg2(ptr, mem)
  3315  		return true
  3316  	}
  3317  	// match: (MOVDloadidx (MOVVconst [c]) ptr mem)
  3318  	// cond: is32Bit(c)
  3319  	// result: (MOVDload [int32(c)] ptr mem)
  3320  	for {
  3321  		if v_0.Op != OpLOONG64MOVVconst {
  3322  			break
  3323  		}
  3324  		c := auxIntToInt64(v_0.AuxInt)
  3325  		ptr := v_1
  3326  		mem := v_2
  3327  		if !(is32Bit(c)) {
  3328  			break
  3329  		}
  3330  		v.reset(OpLOONG64MOVDload)
  3331  		v.AuxInt = int32ToAuxInt(int32(c))
  3332  		v.AddArg2(ptr, mem)
  3333  		return true
  3334  	}
  3335  	return false
  3336  }
  3337  func rewriteValueLOONG64_OpLOONG64MOVDstore(v *Value) bool {
  3338  	v_2 := v.Args[2]
  3339  	v_1 := v.Args[1]
  3340  	v_0 := v.Args[0]
  3341  	b := v.Block
  3342  	config := b.Func.Config
  3343  	typ := &b.Func.Config.Types
  3344  	// match: (MOVDstore [off] {sym} ptr (MOVVgpfp val) mem)
  3345  	// result: (MOVVstore [off] {sym} ptr val mem)
  3346  	for {
  3347  		off := auxIntToInt32(v.AuxInt)
  3348  		sym := auxToSym(v.Aux)
  3349  		ptr := v_0
  3350  		if v_1.Op != OpLOONG64MOVVgpfp {
  3351  			break
  3352  		}
  3353  		val := v_1.Args[0]
  3354  		mem := v_2
  3355  		v.reset(OpLOONG64MOVVstore)
  3356  		v.AuxInt = int32ToAuxInt(off)
  3357  		v.Aux = symToAux(sym)
  3358  		v.AddArg3(ptr, val, mem)
  3359  		return true
  3360  	}
  3361  	// match: (MOVDstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  3362  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3363  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
  3364  	for {
  3365  		off1 := auxIntToInt32(v.AuxInt)
  3366  		sym := auxToSym(v.Aux)
  3367  		if v_0.Op != OpLOONG64ADDVconst {
  3368  			break
  3369  		}
  3370  		off2 := auxIntToInt64(v_0.AuxInt)
  3371  		ptr := v_0.Args[0]
  3372  		val := v_1
  3373  		mem := v_2
  3374  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3375  			break
  3376  		}
  3377  		v.reset(OpLOONG64MOVDstore)
  3378  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3379  		v.Aux = symToAux(sym)
  3380  		v.AddArg3(ptr, val, mem)
  3381  		return true
  3382  	}
  3383  	// match: (MOVDstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  3384  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3385  	// result: (MOVDstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  3386  	for {
  3387  		off1 := auxIntToInt32(v.AuxInt)
  3388  		sym1 := auxToSym(v.Aux)
  3389  		if v_0.Op != OpLOONG64MOVVaddr {
  3390  			break
  3391  		}
  3392  		off2 := auxIntToInt32(v_0.AuxInt)
  3393  		sym2 := auxToSym(v_0.Aux)
  3394  		ptr := v_0.Args[0]
  3395  		val := v_1
  3396  		mem := v_2
  3397  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3398  			break
  3399  		}
  3400  		v.reset(OpLOONG64MOVDstore)
  3401  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3402  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3403  		v.AddArg3(ptr, val, mem)
  3404  		return true
  3405  	}
  3406  	// match: (MOVDstore [off] {sym} (ADDV ptr idx) val mem)
  3407  	// cond: off == 0 && sym == nil
  3408  	// result: (MOVDstoreidx ptr idx val mem)
  3409  	for {
  3410  		off := auxIntToInt32(v.AuxInt)
  3411  		sym := auxToSym(v.Aux)
  3412  		if v_0.Op != OpLOONG64ADDV {
  3413  			break
  3414  		}
  3415  		idx := v_0.Args[1]
  3416  		ptr := v_0.Args[0]
  3417  		val := v_1
  3418  		mem := v_2
  3419  		if !(off == 0 && sym == nil) {
  3420  			break
  3421  		}
  3422  		v.reset(OpLOONG64MOVDstoreidx)
  3423  		v.AddArg4(ptr, idx, val, mem)
  3424  		return true
  3425  	}
  3426  	// match: (MOVDstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3427  	// cond: off == 0 && sym == nil
  3428  	// result: (MOVDstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3429  	for {
  3430  		off := auxIntToInt32(v.AuxInt)
  3431  		sym := auxToSym(v.Aux)
  3432  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3433  			break
  3434  		}
  3435  		shift := auxIntToInt64(v_0.AuxInt)
  3436  		idx := v_0.Args[1]
  3437  		ptr := v_0.Args[0]
  3438  		val := v_1
  3439  		mem := v_2
  3440  		if !(off == 0 && sym == nil) {
  3441  			break
  3442  		}
  3443  		v.reset(OpLOONG64MOVDstoreidx)
  3444  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3445  		v0.AuxInt = int64ToAuxInt(shift)
  3446  		v0.AddArg(idx)
  3447  		v.AddArg4(ptr, v0, val, mem)
  3448  		return true
  3449  	}
  3450  	return false
  3451  }
  3452  func rewriteValueLOONG64_OpLOONG64MOVDstoreidx(v *Value) bool {
  3453  	v_3 := v.Args[3]
  3454  	v_2 := v.Args[2]
  3455  	v_1 := v.Args[1]
  3456  	v_0 := v.Args[0]
  3457  	// match: (MOVDstoreidx ptr (MOVVconst [c]) val mem)
  3458  	// cond: is32Bit(c)
  3459  	// result: (MOVDstore [int32(c)] ptr val mem)
  3460  	for {
  3461  		ptr := v_0
  3462  		if v_1.Op != OpLOONG64MOVVconst {
  3463  			break
  3464  		}
  3465  		c := auxIntToInt64(v_1.AuxInt)
  3466  		val := v_2
  3467  		mem := v_3
  3468  		if !(is32Bit(c)) {
  3469  			break
  3470  		}
  3471  		v.reset(OpLOONG64MOVDstore)
  3472  		v.AuxInt = int32ToAuxInt(int32(c))
  3473  		v.AddArg3(ptr, val, mem)
  3474  		return true
  3475  	}
  3476  	// match: (MOVDstoreidx (MOVVconst [c]) idx val mem)
  3477  	// cond: is32Bit(c)
  3478  	// result: (MOVDstore [int32(c)] idx val mem)
  3479  	for {
  3480  		if v_0.Op != OpLOONG64MOVVconst {
  3481  			break
  3482  		}
  3483  		c := auxIntToInt64(v_0.AuxInt)
  3484  		idx := v_1
  3485  		val := v_2
  3486  		mem := v_3
  3487  		if !(is32Bit(c)) {
  3488  			break
  3489  		}
  3490  		v.reset(OpLOONG64MOVDstore)
  3491  		v.AuxInt = int32ToAuxInt(int32(c))
  3492  		v.AddArg3(idx, val, mem)
  3493  		return true
  3494  	}
  3495  	return false
  3496  }
  3497  func rewriteValueLOONG64_OpLOONG64MOVFload(v *Value) bool {
  3498  	v_1 := v.Args[1]
  3499  	v_0 := v.Args[0]
  3500  	b := v.Block
  3501  	config := b.Func.Config
  3502  	typ := &b.Func.Config.Types
  3503  	// match: (MOVFload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  3504  	// result: (MOVWgpfp val)
  3505  	for {
  3506  		off := auxIntToInt32(v.AuxInt)
  3507  		sym := auxToSym(v.Aux)
  3508  		ptr := v_0
  3509  		if v_1.Op != OpLOONG64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  3510  			break
  3511  		}
  3512  		val := v_1.Args[1]
  3513  		if ptr != v_1.Args[0] {
  3514  			break
  3515  		}
  3516  		v.reset(OpLOONG64MOVWgpfp)
  3517  		v.AddArg(val)
  3518  		return true
  3519  	}
  3520  	// match: (MOVFload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3521  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3522  	// result: (MOVFload [off1+int32(off2)] {sym} ptr mem)
  3523  	for {
  3524  		off1 := auxIntToInt32(v.AuxInt)
  3525  		sym := auxToSym(v.Aux)
  3526  		if v_0.Op != OpLOONG64ADDVconst {
  3527  			break
  3528  		}
  3529  		off2 := auxIntToInt64(v_0.AuxInt)
  3530  		ptr := v_0.Args[0]
  3531  		mem := v_1
  3532  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3533  			break
  3534  		}
  3535  		v.reset(OpLOONG64MOVFload)
  3536  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3537  		v.Aux = symToAux(sym)
  3538  		v.AddArg2(ptr, mem)
  3539  		return true
  3540  	}
  3541  	// match: (MOVFload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3542  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3543  	// result: (MOVFload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  3544  	for {
  3545  		off1 := auxIntToInt32(v.AuxInt)
  3546  		sym1 := auxToSym(v.Aux)
  3547  		if v_0.Op != OpLOONG64MOVVaddr {
  3548  			break
  3549  		}
  3550  		off2 := auxIntToInt32(v_0.AuxInt)
  3551  		sym2 := auxToSym(v_0.Aux)
  3552  		ptr := v_0.Args[0]
  3553  		mem := v_1
  3554  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3555  			break
  3556  		}
  3557  		v.reset(OpLOONG64MOVFload)
  3558  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3559  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3560  		v.AddArg2(ptr, mem)
  3561  		return true
  3562  	}
  3563  	// match: (MOVFload [off] {sym} (ADDV ptr idx) mem)
  3564  	// cond: off == 0 && sym == nil
  3565  	// result: (MOVFloadidx ptr idx mem)
  3566  	for {
  3567  		off := auxIntToInt32(v.AuxInt)
  3568  		sym := auxToSym(v.Aux)
  3569  		if v_0.Op != OpLOONG64ADDV {
  3570  			break
  3571  		}
  3572  		idx := v_0.Args[1]
  3573  		ptr := v_0.Args[0]
  3574  		mem := v_1
  3575  		if !(off == 0 && sym == nil) {
  3576  			break
  3577  		}
  3578  		v.reset(OpLOONG64MOVFloadidx)
  3579  		v.AddArg3(ptr, idx, mem)
  3580  		return true
  3581  	}
  3582  	// match: (MOVFload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3583  	// cond: off == 0 && sym == nil
  3584  	// result: (MOVFloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3585  	for {
  3586  		off := auxIntToInt32(v.AuxInt)
  3587  		sym := auxToSym(v.Aux)
  3588  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3589  			break
  3590  		}
  3591  		shift := auxIntToInt64(v_0.AuxInt)
  3592  		idx := v_0.Args[1]
  3593  		ptr := v_0.Args[0]
  3594  		mem := v_1
  3595  		if !(off == 0 && sym == nil) {
  3596  			break
  3597  		}
  3598  		v.reset(OpLOONG64MOVFloadidx)
  3599  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3600  		v0.AuxInt = int64ToAuxInt(shift)
  3601  		v0.AddArg(idx)
  3602  		v.AddArg3(ptr, v0, mem)
  3603  		return true
  3604  	}
  3605  	return false
  3606  }
  3607  func rewriteValueLOONG64_OpLOONG64MOVFloadidx(v *Value) bool {
  3608  	v_2 := v.Args[2]
  3609  	v_1 := v.Args[1]
  3610  	v_0 := v.Args[0]
  3611  	// match: (MOVFloadidx ptr (MOVVconst [c]) mem)
  3612  	// cond: is32Bit(c)
  3613  	// result: (MOVFload [int32(c)] ptr mem)
  3614  	for {
  3615  		ptr := v_0
  3616  		if v_1.Op != OpLOONG64MOVVconst {
  3617  			break
  3618  		}
  3619  		c := auxIntToInt64(v_1.AuxInt)
  3620  		mem := v_2
  3621  		if !(is32Bit(c)) {
  3622  			break
  3623  		}
  3624  		v.reset(OpLOONG64MOVFload)
  3625  		v.AuxInt = int32ToAuxInt(int32(c))
  3626  		v.AddArg2(ptr, mem)
  3627  		return true
  3628  	}
  3629  	// match: (MOVFloadidx (MOVVconst [c]) ptr mem)
  3630  	// cond: is32Bit(c)
  3631  	// result: (MOVFload [int32(c)] ptr mem)
  3632  	for {
  3633  		if v_0.Op != OpLOONG64MOVVconst {
  3634  			break
  3635  		}
  3636  		c := auxIntToInt64(v_0.AuxInt)
  3637  		ptr := v_1
  3638  		mem := v_2
  3639  		if !(is32Bit(c)) {
  3640  			break
  3641  		}
  3642  		v.reset(OpLOONG64MOVFload)
  3643  		v.AuxInt = int32ToAuxInt(int32(c))
  3644  		v.AddArg2(ptr, mem)
  3645  		return true
  3646  	}
  3647  	return false
  3648  }
  3649  func rewriteValueLOONG64_OpLOONG64MOVFstore(v *Value) bool {
  3650  	v_2 := v.Args[2]
  3651  	v_1 := v.Args[1]
  3652  	v_0 := v.Args[0]
  3653  	b := v.Block
  3654  	config := b.Func.Config
  3655  	typ := &b.Func.Config.Types
  3656  	// match: (MOVFstore [off] {sym} ptr (MOVWgpfp val) mem)
  3657  	// result: (MOVWstore [off] {sym} ptr val mem)
  3658  	for {
  3659  		off := auxIntToInt32(v.AuxInt)
  3660  		sym := auxToSym(v.Aux)
  3661  		ptr := v_0
  3662  		if v_1.Op != OpLOONG64MOVWgpfp {
  3663  			break
  3664  		}
  3665  		val := v_1.Args[0]
  3666  		mem := v_2
  3667  		v.reset(OpLOONG64MOVWstore)
  3668  		v.AuxInt = int32ToAuxInt(off)
  3669  		v.Aux = symToAux(sym)
  3670  		v.AddArg3(ptr, val, mem)
  3671  		return true
  3672  	}
  3673  	// match: (MOVFstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  3674  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3675  	// result: (MOVFstore [off1+int32(off2)] {sym} ptr val mem)
  3676  	for {
  3677  		off1 := auxIntToInt32(v.AuxInt)
  3678  		sym := auxToSym(v.Aux)
  3679  		if v_0.Op != OpLOONG64ADDVconst {
  3680  			break
  3681  		}
  3682  		off2 := auxIntToInt64(v_0.AuxInt)
  3683  		ptr := v_0.Args[0]
  3684  		val := v_1
  3685  		mem := v_2
  3686  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3687  			break
  3688  		}
  3689  		v.reset(OpLOONG64MOVFstore)
  3690  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3691  		v.Aux = symToAux(sym)
  3692  		v.AddArg3(ptr, val, mem)
  3693  		return true
  3694  	}
  3695  	// match: (MOVFstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  3696  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3697  	// result: (MOVFstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  3698  	for {
  3699  		off1 := auxIntToInt32(v.AuxInt)
  3700  		sym1 := auxToSym(v.Aux)
  3701  		if v_0.Op != OpLOONG64MOVVaddr {
  3702  			break
  3703  		}
  3704  		off2 := auxIntToInt32(v_0.AuxInt)
  3705  		sym2 := auxToSym(v_0.Aux)
  3706  		ptr := v_0.Args[0]
  3707  		val := v_1
  3708  		mem := v_2
  3709  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3710  			break
  3711  		}
  3712  		v.reset(OpLOONG64MOVFstore)
  3713  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3714  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3715  		v.AddArg3(ptr, val, mem)
  3716  		return true
  3717  	}
  3718  	// match: (MOVFstore [off] {sym} (ADDV ptr idx) val mem)
  3719  	// cond: off == 0 && sym == nil
  3720  	// result: (MOVFstoreidx ptr idx val mem)
  3721  	for {
  3722  		off := auxIntToInt32(v.AuxInt)
  3723  		sym := auxToSym(v.Aux)
  3724  		if v_0.Op != OpLOONG64ADDV {
  3725  			break
  3726  		}
  3727  		idx := v_0.Args[1]
  3728  		ptr := v_0.Args[0]
  3729  		val := v_1
  3730  		mem := v_2
  3731  		if !(off == 0 && sym == nil) {
  3732  			break
  3733  		}
  3734  		v.reset(OpLOONG64MOVFstoreidx)
  3735  		v.AddArg4(ptr, idx, val, mem)
  3736  		return true
  3737  	}
  3738  	// match: (MOVFstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3739  	// cond: off == 0 && sym == nil
  3740  	// result: (MOVFstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3741  	for {
  3742  		off := auxIntToInt32(v.AuxInt)
  3743  		sym := auxToSym(v.Aux)
  3744  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3745  			break
  3746  		}
  3747  		shift := auxIntToInt64(v_0.AuxInt)
  3748  		idx := v_0.Args[1]
  3749  		ptr := v_0.Args[0]
  3750  		val := v_1
  3751  		mem := v_2
  3752  		if !(off == 0 && sym == nil) {
  3753  			break
  3754  		}
  3755  		v.reset(OpLOONG64MOVFstoreidx)
  3756  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3757  		v0.AuxInt = int64ToAuxInt(shift)
  3758  		v0.AddArg(idx)
  3759  		v.AddArg4(ptr, v0, val, mem)
  3760  		return true
  3761  	}
  3762  	return false
  3763  }
  3764  func rewriteValueLOONG64_OpLOONG64MOVFstoreidx(v *Value) bool {
  3765  	v_3 := v.Args[3]
  3766  	v_2 := v.Args[2]
  3767  	v_1 := v.Args[1]
  3768  	v_0 := v.Args[0]
  3769  	// match: (MOVFstoreidx ptr (MOVVconst [c]) val mem)
  3770  	// cond: is32Bit(c)
  3771  	// result: (MOVFstore [int32(c)] ptr val mem)
  3772  	for {
  3773  		ptr := v_0
  3774  		if v_1.Op != OpLOONG64MOVVconst {
  3775  			break
  3776  		}
  3777  		c := auxIntToInt64(v_1.AuxInt)
  3778  		val := v_2
  3779  		mem := v_3
  3780  		if !(is32Bit(c)) {
  3781  			break
  3782  		}
  3783  		v.reset(OpLOONG64MOVFstore)
  3784  		v.AuxInt = int32ToAuxInt(int32(c))
  3785  		v.AddArg3(ptr, val, mem)
  3786  		return true
  3787  	}
  3788  	// match: (MOVFstoreidx (MOVVconst [c]) idx val mem)
  3789  	// cond: is32Bit(c)
  3790  	// result: (MOVFstore [int32(c)] idx val mem)
  3791  	for {
  3792  		if v_0.Op != OpLOONG64MOVVconst {
  3793  			break
  3794  		}
  3795  		c := auxIntToInt64(v_0.AuxInt)
  3796  		idx := v_1
  3797  		val := v_2
  3798  		mem := v_3
  3799  		if !(is32Bit(c)) {
  3800  			break
  3801  		}
  3802  		v.reset(OpLOONG64MOVFstore)
  3803  		v.AuxInt = int32ToAuxInt(int32(c))
  3804  		v.AddArg3(idx, val, mem)
  3805  		return true
  3806  	}
  3807  	return false
  3808  }
  3809  func rewriteValueLOONG64_OpLOONG64MOVHUload(v *Value) bool {
  3810  	v_1 := v.Args[1]
  3811  	v_0 := v.Args[0]
  3812  	b := v.Block
  3813  	config := b.Func.Config
  3814  	typ := &b.Func.Config.Types
  3815  	// match: (MOVHUload [off] {sym} ptr (MOVHstore [off] {sym} ptr x _))
  3816  	// result: (MOVHUreg x)
  3817  	for {
  3818  		off := auxIntToInt32(v.AuxInt)
  3819  		sym := auxToSym(v.Aux)
  3820  		ptr := v_0
  3821  		if v_1.Op != OpLOONG64MOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  3822  			break
  3823  		}
  3824  		x := v_1.Args[1]
  3825  		if ptr != v_1.Args[0] {
  3826  			break
  3827  		}
  3828  		v.reset(OpLOONG64MOVHUreg)
  3829  		v.AddArg(x)
  3830  		return true
  3831  	}
  3832  	// match: (MOVHUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3833  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3834  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
  3835  	for {
  3836  		off1 := auxIntToInt32(v.AuxInt)
  3837  		sym := auxToSym(v.Aux)
  3838  		if v_0.Op != OpLOONG64ADDVconst {
  3839  			break
  3840  		}
  3841  		off2 := auxIntToInt64(v_0.AuxInt)
  3842  		ptr := v_0.Args[0]
  3843  		mem := v_1
  3844  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3845  			break
  3846  		}
  3847  		v.reset(OpLOONG64MOVHUload)
  3848  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3849  		v.Aux = symToAux(sym)
  3850  		v.AddArg2(ptr, mem)
  3851  		return true
  3852  	}
  3853  	// match: (MOVHUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3854  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  3855  	// result: (MOVHUload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  3856  	for {
  3857  		off1 := auxIntToInt32(v.AuxInt)
  3858  		sym1 := auxToSym(v.Aux)
  3859  		if v_0.Op != OpLOONG64MOVVaddr {
  3860  			break
  3861  		}
  3862  		off2 := auxIntToInt32(v_0.AuxInt)
  3863  		sym2 := auxToSym(v_0.Aux)
  3864  		ptr := v_0.Args[0]
  3865  		mem := v_1
  3866  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  3867  			break
  3868  		}
  3869  		v.reset(OpLOONG64MOVHUload)
  3870  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  3871  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3872  		v.AddArg2(ptr, mem)
  3873  		return true
  3874  	}
  3875  	// match: (MOVHUload [off] {sym} (ADDV ptr idx) mem)
  3876  	// cond: off == 0 && sym == nil
  3877  	// result: (MOVHUloadidx ptr idx mem)
  3878  	for {
  3879  		off := auxIntToInt32(v.AuxInt)
  3880  		sym := auxToSym(v.Aux)
  3881  		if v_0.Op != OpLOONG64ADDV {
  3882  			break
  3883  		}
  3884  		idx := v_0.Args[1]
  3885  		ptr := v_0.Args[0]
  3886  		mem := v_1
  3887  		if !(off == 0 && sym == nil) {
  3888  			break
  3889  		}
  3890  		v.reset(OpLOONG64MOVHUloadidx)
  3891  		v.AddArg3(ptr, idx, mem)
  3892  		return true
  3893  	}
  3894  	// match: (MOVHUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3895  	// cond: off == 0 && sym == nil
  3896  	// result: (MOVHUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3897  	for {
  3898  		off := auxIntToInt32(v.AuxInt)
  3899  		sym := auxToSym(v.Aux)
  3900  		if v_0.Op != OpLOONG64ADDshiftLLV {
  3901  			break
  3902  		}
  3903  		shift := auxIntToInt64(v_0.AuxInt)
  3904  		idx := v_0.Args[1]
  3905  		ptr := v_0.Args[0]
  3906  		mem := v_1
  3907  		if !(off == 0 && sym == nil) {
  3908  			break
  3909  		}
  3910  		v.reset(OpLOONG64MOVHUloadidx)
  3911  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  3912  		v0.AuxInt = int64ToAuxInt(shift)
  3913  		v0.AddArg(idx)
  3914  		v.AddArg3(ptr, v0, mem)
  3915  		return true
  3916  	}
  3917  	// match: (MOVHUload [off] {sym} (SB) _)
  3918  	// cond: symIsRO(sym)
  3919  	// result: (MOVVconst [int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  3920  	for {
  3921  		off := auxIntToInt32(v.AuxInt)
  3922  		sym := auxToSym(v.Aux)
  3923  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  3924  			break
  3925  		}
  3926  		v.reset(OpLOONG64MOVVconst)
  3927  		v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  3928  		return true
  3929  	}
  3930  	return false
  3931  }
  3932  func rewriteValueLOONG64_OpLOONG64MOVHUloadidx(v *Value) bool {
  3933  	v_2 := v.Args[2]
  3934  	v_1 := v.Args[1]
  3935  	v_0 := v.Args[0]
  3936  	// match: (MOVHUloadidx ptr (MOVVconst [c]) mem)
  3937  	// cond: is32Bit(c)
  3938  	// result: (MOVHUload [int32(c)] ptr mem)
  3939  	for {
  3940  		ptr := v_0
  3941  		if v_1.Op != OpLOONG64MOVVconst {
  3942  			break
  3943  		}
  3944  		c := auxIntToInt64(v_1.AuxInt)
  3945  		mem := v_2
  3946  		if !(is32Bit(c)) {
  3947  			break
  3948  		}
  3949  		v.reset(OpLOONG64MOVHUload)
  3950  		v.AuxInt = int32ToAuxInt(int32(c))
  3951  		v.AddArg2(ptr, mem)
  3952  		return true
  3953  	}
  3954  	// match: (MOVHUloadidx (MOVVconst [c]) ptr mem)
  3955  	// cond: is32Bit(c)
  3956  	// result: (MOVHUload [int32(c)] ptr mem)
  3957  	for {
  3958  		if v_0.Op != OpLOONG64MOVVconst {
  3959  			break
  3960  		}
  3961  		c := auxIntToInt64(v_0.AuxInt)
  3962  		ptr := v_1
  3963  		mem := v_2
  3964  		if !(is32Bit(c)) {
  3965  			break
  3966  		}
  3967  		v.reset(OpLOONG64MOVHUload)
  3968  		v.AuxInt = int32ToAuxInt(int32(c))
  3969  		v.AddArg2(ptr, mem)
  3970  		return true
  3971  	}
  3972  	return false
  3973  }
  3974  func rewriteValueLOONG64_OpLOONG64MOVHUreg(v *Value) bool {
  3975  	v_0 := v.Args[0]
  3976  	// match: (MOVHUreg (SRLVconst [rc] x))
  3977  	// cond: rc < 16
  3978  	// result: (BSTRPICKV [rc + (15+rc)<<6] x)
  3979  	for {
  3980  		if v_0.Op != OpLOONG64SRLVconst {
  3981  			break
  3982  		}
  3983  		rc := auxIntToInt64(v_0.AuxInt)
  3984  		x := v_0.Args[0]
  3985  		if !(rc < 16) {
  3986  			break
  3987  		}
  3988  		v.reset(OpLOONG64BSTRPICKV)
  3989  		v.AuxInt = int64ToAuxInt(rc + (15+rc)<<6)
  3990  		v.AddArg(x)
  3991  		return true
  3992  	}
  3993  	// match: (MOVHUreg x:(MOVBUload _ _))
  3994  	// result: (MOVVreg x)
  3995  	for {
  3996  		x := v_0
  3997  		if x.Op != OpLOONG64MOVBUload {
  3998  			break
  3999  		}
  4000  		v.reset(OpLOONG64MOVVreg)
  4001  		v.AddArg(x)
  4002  		return true
  4003  	}
  4004  	// match: (MOVHUreg x:(MOVHUload _ _))
  4005  	// result: (MOVVreg x)
  4006  	for {
  4007  		x := v_0
  4008  		if x.Op != OpLOONG64MOVHUload {
  4009  			break
  4010  		}
  4011  		v.reset(OpLOONG64MOVVreg)
  4012  		v.AddArg(x)
  4013  		return true
  4014  	}
  4015  	// match: (MOVHUreg x:(MOVBUloadidx _ _ _))
  4016  	// result: (MOVVreg x)
  4017  	for {
  4018  		x := v_0
  4019  		if x.Op != OpLOONG64MOVBUloadidx {
  4020  			break
  4021  		}
  4022  		v.reset(OpLOONG64MOVVreg)
  4023  		v.AddArg(x)
  4024  		return true
  4025  	}
  4026  	// match: (MOVHUreg x:(MOVHUloadidx _ _ _))
  4027  	// result: (MOVVreg x)
  4028  	for {
  4029  		x := v_0
  4030  		if x.Op != OpLOONG64MOVHUloadidx {
  4031  			break
  4032  		}
  4033  		v.reset(OpLOONG64MOVVreg)
  4034  		v.AddArg(x)
  4035  		return true
  4036  	}
  4037  	// match: (MOVHUreg x:(MOVBUreg _))
  4038  	// result: (MOVVreg x)
  4039  	for {
  4040  		x := v_0
  4041  		if x.Op != OpLOONG64MOVBUreg {
  4042  			break
  4043  		}
  4044  		v.reset(OpLOONG64MOVVreg)
  4045  		v.AddArg(x)
  4046  		return true
  4047  	}
  4048  	// match: (MOVHUreg x:(MOVHUreg _))
  4049  	// result: (MOVVreg x)
  4050  	for {
  4051  		x := v_0
  4052  		if x.Op != OpLOONG64MOVHUreg {
  4053  			break
  4054  		}
  4055  		v.reset(OpLOONG64MOVVreg)
  4056  		v.AddArg(x)
  4057  		return true
  4058  	}
  4059  	// match: (MOVHUreg (SLLVconst [lc] x))
  4060  	// cond: lc >= 16
  4061  	// result: (MOVVconst [0])
  4062  	for {
  4063  		if v_0.Op != OpLOONG64SLLVconst {
  4064  			break
  4065  		}
  4066  		lc := auxIntToInt64(v_0.AuxInt)
  4067  		if !(lc >= 16) {
  4068  			break
  4069  		}
  4070  		v.reset(OpLOONG64MOVVconst)
  4071  		v.AuxInt = int64ToAuxInt(0)
  4072  		return true
  4073  	}
  4074  	// match: (MOVHUreg (MOVVconst [c]))
  4075  	// result: (MOVVconst [int64(uint16(c))])
  4076  	for {
  4077  		if v_0.Op != OpLOONG64MOVVconst {
  4078  			break
  4079  		}
  4080  		c := auxIntToInt64(v_0.AuxInt)
  4081  		v.reset(OpLOONG64MOVVconst)
  4082  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
  4083  		return true
  4084  	}
  4085  	// match: (MOVHUreg x:(SRLconst [c] y))
  4086  	// cond: c >= 16
  4087  	// result: x
  4088  	for {
  4089  		x := v_0
  4090  		if x.Op != OpLOONG64SRLconst {
  4091  			break
  4092  		}
  4093  		c := auxIntToInt64(x.AuxInt)
  4094  		if !(c >= 16) {
  4095  			break
  4096  		}
  4097  		v.copyOf(x)
  4098  		return true
  4099  	}
  4100  	// match: (MOVHUreg x:(ANDconst [c] y))
  4101  	// cond: c >= 0 && int64(uint16(c)) == c
  4102  	// result: x
  4103  	for {
  4104  		x := v_0
  4105  		if x.Op != OpLOONG64ANDconst {
  4106  			break
  4107  		}
  4108  		c := auxIntToInt64(x.AuxInt)
  4109  		if !(c >= 0 && int64(uint16(c)) == c) {
  4110  			break
  4111  		}
  4112  		v.copyOf(x)
  4113  		return true
  4114  	}
  4115  	return false
  4116  }
  4117  func rewriteValueLOONG64_OpLOONG64MOVHload(v *Value) bool {
  4118  	v_1 := v.Args[1]
  4119  	v_0 := v.Args[0]
  4120  	b := v.Block
  4121  	config := b.Func.Config
  4122  	typ := &b.Func.Config.Types
  4123  	// match: (MOVHload [off] {sym} ptr (MOVHstore [off] {sym} ptr x _))
  4124  	// result: (MOVHreg x)
  4125  	for {
  4126  		off := auxIntToInt32(v.AuxInt)
  4127  		sym := auxToSym(v.Aux)
  4128  		ptr := v_0
  4129  		if v_1.Op != OpLOONG64MOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  4130  			break
  4131  		}
  4132  		x := v_1.Args[1]
  4133  		if ptr != v_1.Args[0] {
  4134  			break
  4135  		}
  4136  		v.reset(OpLOONG64MOVHreg)
  4137  		v.AddArg(x)
  4138  		return true
  4139  	}
  4140  	// match: (MOVHload [off1] {sym} (ADDVconst [off2] ptr) mem)
  4141  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4142  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
  4143  	for {
  4144  		off1 := auxIntToInt32(v.AuxInt)
  4145  		sym := auxToSym(v.Aux)
  4146  		if v_0.Op != OpLOONG64ADDVconst {
  4147  			break
  4148  		}
  4149  		off2 := auxIntToInt64(v_0.AuxInt)
  4150  		ptr := v_0.Args[0]
  4151  		mem := v_1
  4152  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4153  			break
  4154  		}
  4155  		v.reset(OpLOONG64MOVHload)
  4156  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4157  		v.Aux = symToAux(sym)
  4158  		v.AddArg2(ptr, mem)
  4159  		return true
  4160  	}
  4161  	// match: (MOVHload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  4162  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4163  	// result: (MOVHload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  4164  	for {
  4165  		off1 := auxIntToInt32(v.AuxInt)
  4166  		sym1 := auxToSym(v.Aux)
  4167  		if v_0.Op != OpLOONG64MOVVaddr {
  4168  			break
  4169  		}
  4170  		off2 := auxIntToInt32(v_0.AuxInt)
  4171  		sym2 := auxToSym(v_0.Aux)
  4172  		ptr := v_0.Args[0]
  4173  		mem := v_1
  4174  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4175  			break
  4176  		}
  4177  		v.reset(OpLOONG64MOVHload)
  4178  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4179  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4180  		v.AddArg2(ptr, mem)
  4181  		return true
  4182  	}
  4183  	// match: (MOVHload [off] {sym} (ADDV ptr idx) mem)
  4184  	// cond: off == 0 && sym == nil
  4185  	// result: (MOVHloadidx ptr idx mem)
  4186  	for {
  4187  		off := auxIntToInt32(v.AuxInt)
  4188  		sym := auxToSym(v.Aux)
  4189  		if v_0.Op != OpLOONG64ADDV {
  4190  			break
  4191  		}
  4192  		idx := v_0.Args[1]
  4193  		ptr := v_0.Args[0]
  4194  		mem := v_1
  4195  		if !(off == 0 && sym == nil) {
  4196  			break
  4197  		}
  4198  		v.reset(OpLOONG64MOVHloadidx)
  4199  		v.AddArg3(ptr, idx, mem)
  4200  		return true
  4201  	}
  4202  	// match: (MOVHload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4203  	// cond: off == 0 && sym == nil
  4204  	// result: (MOVHloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4205  	for {
  4206  		off := auxIntToInt32(v.AuxInt)
  4207  		sym := auxToSym(v.Aux)
  4208  		if v_0.Op != OpLOONG64ADDshiftLLV {
  4209  			break
  4210  		}
  4211  		shift := auxIntToInt64(v_0.AuxInt)
  4212  		idx := v_0.Args[1]
  4213  		ptr := v_0.Args[0]
  4214  		mem := v_1
  4215  		if !(off == 0 && sym == nil) {
  4216  			break
  4217  		}
  4218  		v.reset(OpLOONG64MOVHloadidx)
  4219  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  4220  		v0.AuxInt = int64ToAuxInt(shift)
  4221  		v0.AddArg(idx)
  4222  		v.AddArg3(ptr, v0, mem)
  4223  		return true
  4224  	}
  4225  	// match: (MOVHload [off] {sym} (SB) _)
  4226  	// cond: symIsRO(sym)
  4227  	// result: (MOVVconst [int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
  4228  	for {
  4229  		off := auxIntToInt32(v.AuxInt)
  4230  		sym := auxToSym(v.Aux)
  4231  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  4232  			break
  4233  		}
  4234  		v.reset(OpLOONG64MOVVconst)
  4235  		v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))))
  4236  		return true
  4237  	}
  4238  	return false
  4239  }
  4240  func rewriteValueLOONG64_OpLOONG64MOVHloadidx(v *Value) bool {
  4241  	v_2 := v.Args[2]
  4242  	v_1 := v.Args[1]
  4243  	v_0 := v.Args[0]
  4244  	// match: (MOVHloadidx ptr (MOVVconst [c]) mem)
  4245  	// cond: is32Bit(c)
  4246  	// result: (MOVHload [int32(c)] ptr mem)
  4247  	for {
  4248  		ptr := v_0
  4249  		if v_1.Op != OpLOONG64MOVVconst {
  4250  			break
  4251  		}
  4252  		c := auxIntToInt64(v_1.AuxInt)
  4253  		mem := v_2
  4254  		if !(is32Bit(c)) {
  4255  			break
  4256  		}
  4257  		v.reset(OpLOONG64MOVHload)
  4258  		v.AuxInt = int32ToAuxInt(int32(c))
  4259  		v.AddArg2(ptr, mem)
  4260  		return true
  4261  	}
  4262  	// match: (MOVHloadidx (MOVVconst [c]) ptr mem)
  4263  	// cond: is32Bit(c)
  4264  	// result: (MOVHload [int32(c)] ptr mem)
  4265  	for {
  4266  		if v_0.Op != OpLOONG64MOVVconst {
  4267  			break
  4268  		}
  4269  		c := auxIntToInt64(v_0.AuxInt)
  4270  		ptr := v_1
  4271  		mem := v_2
  4272  		if !(is32Bit(c)) {
  4273  			break
  4274  		}
  4275  		v.reset(OpLOONG64MOVHload)
  4276  		v.AuxInt = int32ToAuxInt(int32(c))
  4277  		v.AddArg2(ptr, mem)
  4278  		return true
  4279  	}
  4280  	return false
  4281  }
  4282  func rewriteValueLOONG64_OpLOONG64MOVHreg(v *Value) bool {
  4283  	v_0 := v.Args[0]
  4284  	// match: (MOVHreg x:(MOVBload _ _))
  4285  	// result: (MOVVreg x)
  4286  	for {
  4287  		x := v_0
  4288  		if x.Op != OpLOONG64MOVBload {
  4289  			break
  4290  		}
  4291  		v.reset(OpLOONG64MOVVreg)
  4292  		v.AddArg(x)
  4293  		return true
  4294  	}
  4295  	// match: (MOVHreg x:(MOVBUload _ _))
  4296  	// result: (MOVVreg x)
  4297  	for {
  4298  		x := v_0
  4299  		if x.Op != OpLOONG64MOVBUload {
  4300  			break
  4301  		}
  4302  		v.reset(OpLOONG64MOVVreg)
  4303  		v.AddArg(x)
  4304  		return true
  4305  	}
  4306  	// match: (MOVHreg x:(MOVHload _ _))
  4307  	// result: (MOVVreg x)
  4308  	for {
  4309  		x := v_0
  4310  		if x.Op != OpLOONG64MOVHload {
  4311  			break
  4312  		}
  4313  		v.reset(OpLOONG64MOVVreg)
  4314  		v.AddArg(x)
  4315  		return true
  4316  	}
  4317  	// match: (MOVHreg x:(MOVBloadidx _ _ _))
  4318  	// result: (MOVVreg x)
  4319  	for {
  4320  		x := v_0
  4321  		if x.Op != OpLOONG64MOVBloadidx {
  4322  			break
  4323  		}
  4324  		v.reset(OpLOONG64MOVVreg)
  4325  		v.AddArg(x)
  4326  		return true
  4327  	}
  4328  	// match: (MOVHreg x:(MOVBUloadidx _ _ _))
  4329  	// result: (MOVVreg x)
  4330  	for {
  4331  		x := v_0
  4332  		if x.Op != OpLOONG64MOVBUloadidx {
  4333  			break
  4334  		}
  4335  		v.reset(OpLOONG64MOVVreg)
  4336  		v.AddArg(x)
  4337  		return true
  4338  	}
  4339  	// match: (MOVHreg x:(MOVHloadidx _ _ _))
  4340  	// result: (MOVVreg x)
  4341  	for {
  4342  		x := v_0
  4343  		if x.Op != OpLOONG64MOVHloadidx {
  4344  			break
  4345  		}
  4346  		v.reset(OpLOONG64MOVVreg)
  4347  		v.AddArg(x)
  4348  		return true
  4349  	}
  4350  	// match: (MOVHreg x:(MOVBreg _))
  4351  	// result: (MOVVreg x)
  4352  	for {
  4353  		x := v_0
  4354  		if x.Op != OpLOONG64MOVBreg {
  4355  			break
  4356  		}
  4357  		v.reset(OpLOONG64MOVVreg)
  4358  		v.AddArg(x)
  4359  		return true
  4360  	}
  4361  	// match: (MOVHreg x:(MOVBUreg _))
  4362  	// result: (MOVVreg x)
  4363  	for {
  4364  		x := v_0
  4365  		if x.Op != OpLOONG64MOVBUreg {
  4366  			break
  4367  		}
  4368  		v.reset(OpLOONG64MOVVreg)
  4369  		v.AddArg(x)
  4370  		return true
  4371  	}
  4372  	// match: (MOVHreg x:(MOVHreg _))
  4373  	// result: (MOVVreg x)
  4374  	for {
  4375  		x := v_0
  4376  		if x.Op != OpLOONG64MOVHreg {
  4377  			break
  4378  		}
  4379  		v.reset(OpLOONG64MOVVreg)
  4380  		v.AddArg(x)
  4381  		return true
  4382  	}
  4383  	// match: (MOVHreg (MOVVconst [c]))
  4384  	// result: (MOVVconst [int64(int16(c))])
  4385  	for {
  4386  		if v_0.Op != OpLOONG64MOVVconst {
  4387  			break
  4388  		}
  4389  		c := auxIntToInt64(v_0.AuxInt)
  4390  		v.reset(OpLOONG64MOVVconst)
  4391  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
  4392  		return true
  4393  	}
  4394  	// match: (MOVHreg x:(ANDconst [c] y))
  4395  	// cond: c >= 0 && int64(int16(c)) == c
  4396  	// result: x
  4397  	for {
  4398  		x := v_0
  4399  		if x.Op != OpLOONG64ANDconst {
  4400  			break
  4401  		}
  4402  		c := auxIntToInt64(x.AuxInt)
  4403  		if !(c >= 0 && int64(int16(c)) == c) {
  4404  			break
  4405  		}
  4406  		v.copyOf(x)
  4407  		return true
  4408  	}
  4409  	return false
  4410  }
  4411  func rewriteValueLOONG64_OpLOONG64MOVHstore(v *Value) bool {
  4412  	v_2 := v.Args[2]
  4413  	v_1 := v.Args[1]
  4414  	v_0 := v.Args[0]
  4415  	b := v.Block
  4416  	config := b.Func.Config
  4417  	typ := &b.Func.Config.Types
  4418  	// match: (MOVHstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  4419  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4420  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
  4421  	for {
  4422  		off1 := auxIntToInt32(v.AuxInt)
  4423  		sym := auxToSym(v.Aux)
  4424  		if v_0.Op != OpLOONG64ADDVconst {
  4425  			break
  4426  		}
  4427  		off2 := auxIntToInt64(v_0.AuxInt)
  4428  		ptr := v_0.Args[0]
  4429  		val := v_1
  4430  		mem := v_2
  4431  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4432  			break
  4433  		}
  4434  		v.reset(OpLOONG64MOVHstore)
  4435  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4436  		v.Aux = symToAux(sym)
  4437  		v.AddArg3(ptr, val, mem)
  4438  		return true
  4439  	}
  4440  	// match: (MOVHstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  4441  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4442  	// result: (MOVHstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  4443  	for {
  4444  		off1 := auxIntToInt32(v.AuxInt)
  4445  		sym1 := auxToSym(v.Aux)
  4446  		if v_0.Op != OpLOONG64MOVVaddr {
  4447  			break
  4448  		}
  4449  		off2 := auxIntToInt32(v_0.AuxInt)
  4450  		sym2 := auxToSym(v_0.Aux)
  4451  		ptr := v_0.Args[0]
  4452  		val := v_1
  4453  		mem := v_2
  4454  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4455  			break
  4456  		}
  4457  		v.reset(OpLOONG64MOVHstore)
  4458  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4459  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4460  		v.AddArg3(ptr, val, mem)
  4461  		return true
  4462  	}
  4463  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  4464  	// result: (MOVHstore [off] {sym} ptr x mem)
  4465  	for {
  4466  		off := auxIntToInt32(v.AuxInt)
  4467  		sym := auxToSym(v.Aux)
  4468  		ptr := v_0
  4469  		if v_1.Op != OpLOONG64MOVHreg {
  4470  			break
  4471  		}
  4472  		x := v_1.Args[0]
  4473  		mem := v_2
  4474  		v.reset(OpLOONG64MOVHstore)
  4475  		v.AuxInt = int32ToAuxInt(off)
  4476  		v.Aux = symToAux(sym)
  4477  		v.AddArg3(ptr, x, mem)
  4478  		return true
  4479  	}
  4480  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
  4481  	// result: (MOVHstore [off] {sym} ptr x mem)
  4482  	for {
  4483  		off := auxIntToInt32(v.AuxInt)
  4484  		sym := auxToSym(v.Aux)
  4485  		ptr := v_0
  4486  		if v_1.Op != OpLOONG64MOVHUreg {
  4487  			break
  4488  		}
  4489  		x := v_1.Args[0]
  4490  		mem := v_2
  4491  		v.reset(OpLOONG64MOVHstore)
  4492  		v.AuxInt = int32ToAuxInt(off)
  4493  		v.Aux = symToAux(sym)
  4494  		v.AddArg3(ptr, x, mem)
  4495  		return true
  4496  	}
  4497  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
  4498  	// result: (MOVHstore [off] {sym} ptr x mem)
  4499  	for {
  4500  		off := auxIntToInt32(v.AuxInt)
  4501  		sym := auxToSym(v.Aux)
  4502  		ptr := v_0
  4503  		if v_1.Op != OpLOONG64MOVWreg {
  4504  			break
  4505  		}
  4506  		x := v_1.Args[0]
  4507  		mem := v_2
  4508  		v.reset(OpLOONG64MOVHstore)
  4509  		v.AuxInt = int32ToAuxInt(off)
  4510  		v.Aux = symToAux(sym)
  4511  		v.AddArg3(ptr, x, mem)
  4512  		return true
  4513  	}
  4514  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
  4515  	// result: (MOVHstore [off] {sym} ptr x mem)
  4516  	for {
  4517  		off := auxIntToInt32(v.AuxInt)
  4518  		sym := auxToSym(v.Aux)
  4519  		ptr := v_0
  4520  		if v_1.Op != OpLOONG64MOVWUreg {
  4521  			break
  4522  		}
  4523  		x := v_1.Args[0]
  4524  		mem := v_2
  4525  		v.reset(OpLOONG64MOVHstore)
  4526  		v.AuxInt = int32ToAuxInt(off)
  4527  		v.Aux = symToAux(sym)
  4528  		v.AddArg3(ptr, x, mem)
  4529  		return true
  4530  	}
  4531  	// match: (MOVHstore [off] {sym} (ADDV ptr idx) val mem)
  4532  	// cond: off == 0 && sym == nil
  4533  	// result: (MOVHstoreidx ptr idx val mem)
  4534  	for {
  4535  		off := auxIntToInt32(v.AuxInt)
  4536  		sym := auxToSym(v.Aux)
  4537  		if v_0.Op != OpLOONG64ADDV {
  4538  			break
  4539  		}
  4540  		idx := v_0.Args[1]
  4541  		ptr := v_0.Args[0]
  4542  		val := v_1
  4543  		mem := v_2
  4544  		if !(off == 0 && sym == nil) {
  4545  			break
  4546  		}
  4547  		v.reset(OpLOONG64MOVHstoreidx)
  4548  		v.AddArg4(ptr, idx, val, mem)
  4549  		return true
  4550  	}
  4551  	// match: (MOVHstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  4552  	// cond: off == 0 && sym == nil
  4553  	// result: (MOVHstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  4554  	for {
  4555  		off := auxIntToInt32(v.AuxInt)
  4556  		sym := auxToSym(v.Aux)
  4557  		if v_0.Op != OpLOONG64ADDshiftLLV {
  4558  			break
  4559  		}
  4560  		shift := auxIntToInt64(v_0.AuxInt)
  4561  		idx := v_0.Args[1]
  4562  		ptr := v_0.Args[0]
  4563  		val := v_1
  4564  		mem := v_2
  4565  		if !(off == 0 && sym == nil) {
  4566  			break
  4567  		}
  4568  		v.reset(OpLOONG64MOVHstoreidx)
  4569  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  4570  		v0.AuxInt = int64ToAuxInt(shift)
  4571  		v0.AddArg(idx)
  4572  		v.AddArg4(ptr, v0, val, mem)
  4573  		return true
  4574  	}
  4575  	return false
  4576  }
  4577  func rewriteValueLOONG64_OpLOONG64MOVHstoreidx(v *Value) bool {
  4578  	v_3 := v.Args[3]
  4579  	v_2 := v.Args[2]
  4580  	v_1 := v.Args[1]
  4581  	v_0 := v.Args[0]
  4582  	// match: (MOVHstoreidx ptr (MOVVconst [c]) val mem)
  4583  	// cond: is32Bit(c)
  4584  	// result: (MOVHstore [int32(c)] ptr val mem)
  4585  	for {
  4586  		ptr := v_0
  4587  		if v_1.Op != OpLOONG64MOVVconst {
  4588  			break
  4589  		}
  4590  		c := auxIntToInt64(v_1.AuxInt)
  4591  		val := v_2
  4592  		mem := v_3
  4593  		if !(is32Bit(c)) {
  4594  			break
  4595  		}
  4596  		v.reset(OpLOONG64MOVHstore)
  4597  		v.AuxInt = int32ToAuxInt(int32(c))
  4598  		v.AddArg3(ptr, val, mem)
  4599  		return true
  4600  	}
  4601  	// match: (MOVHstoreidx (MOVVconst [c]) idx val mem)
  4602  	// cond: is32Bit(c)
  4603  	// result: (MOVHstore [int32(c)] idx val mem)
  4604  	for {
  4605  		if v_0.Op != OpLOONG64MOVVconst {
  4606  			break
  4607  		}
  4608  		c := auxIntToInt64(v_0.AuxInt)
  4609  		idx := v_1
  4610  		val := v_2
  4611  		mem := v_3
  4612  		if !(is32Bit(c)) {
  4613  			break
  4614  		}
  4615  		v.reset(OpLOONG64MOVHstore)
  4616  		v.AuxInt = int32ToAuxInt(int32(c))
  4617  		v.AddArg3(idx, val, mem)
  4618  		return true
  4619  	}
  4620  	return false
  4621  }
  4622  func rewriteValueLOONG64_OpLOONG64MOVVload(v *Value) bool {
  4623  	v_1 := v.Args[1]
  4624  	v_0 := v.Args[0]
  4625  	b := v.Block
  4626  	config := b.Func.Config
  4627  	typ := &b.Func.Config.Types
  4628  	// match: (MOVVload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  4629  	// result: (MOVVfpgp val)
  4630  	for {
  4631  		off := auxIntToInt32(v.AuxInt)
  4632  		sym := auxToSym(v.Aux)
  4633  		ptr := v_0
  4634  		if v_1.Op != OpLOONG64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  4635  			break
  4636  		}
  4637  		val := v_1.Args[1]
  4638  		if ptr != v_1.Args[0] {
  4639  			break
  4640  		}
  4641  		v.reset(OpLOONG64MOVVfpgp)
  4642  		v.AddArg(val)
  4643  		return true
  4644  	}
  4645  	// match: (MOVVload [off] {sym} ptr (MOVVstore [off] {sym} ptr x _))
  4646  	// result: (MOVVreg x)
  4647  	for {
  4648  		off := auxIntToInt32(v.AuxInt)
  4649  		sym := auxToSym(v.Aux)
  4650  		ptr := v_0
  4651  		if v_1.Op != OpLOONG64MOVVstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  4652  			break
  4653  		}
  4654  		x := v_1.Args[1]
  4655  		if ptr != v_1.Args[0] {
  4656  			break
  4657  		}
  4658  		v.reset(OpLOONG64MOVVreg)
  4659  		v.AddArg(x)
  4660  		return true
  4661  	}
  4662  	// match: (MOVVload [off1] {sym} (ADDVconst [off2] ptr) mem)
  4663  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4664  	// result: (MOVVload [off1+int32(off2)] {sym} ptr mem)
  4665  	for {
  4666  		off1 := auxIntToInt32(v.AuxInt)
  4667  		sym := auxToSym(v.Aux)
  4668  		if v_0.Op != OpLOONG64ADDVconst {
  4669  			break
  4670  		}
  4671  		off2 := auxIntToInt64(v_0.AuxInt)
  4672  		ptr := v_0.Args[0]
  4673  		mem := v_1
  4674  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4675  			break
  4676  		}
  4677  		v.reset(OpLOONG64MOVVload)
  4678  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4679  		v.Aux = symToAux(sym)
  4680  		v.AddArg2(ptr, mem)
  4681  		return true
  4682  	}
  4683  	// match: (MOVVload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  4684  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4685  	// result: (MOVVload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  4686  	for {
  4687  		off1 := auxIntToInt32(v.AuxInt)
  4688  		sym1 := auxToSym(v.Aux)
  4689  		if v_0.Op != OpLOONG64MOVVaddr {
  4690  			break
  4691  		}
  4692  		off2 := auxIntToInt32(v_0.AuxInt)
  4693  		sym2 := auxToSym(v_0.Aux)
  4694  		ptr := v_0.Args[0]
  4695  		mem := v_1
  4696  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4697  			break
  4698  		}
  4699  		v.reset(OpLOONG64MOVVload)
  4700  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4701  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4702  		v.AddArg2(ptr, mem)
  4703  		return true
  4704  	}
  4705  	// match: (MOVVload [off] {sym} (ADDV ptr idx) mem)
  4706  	// cond: off == 0 && sym == nil
  4707  	// result: (MOVVloadidx ptr idx mem)
  4708  	for {
  4709  		off := auxIntToInt32(v.AuxInt)
  4710  		sym := auxToSym(v.Aux)
  4711  		if v_0.Op != OpLOONG64ADDV {
  4712  			break
  4713  		}
  4714  		idx := v_0.Args[1]
  4715  		ptr := v_0.Args[0]
  4716  		mem := v_1
  4717  		if !(off == 0 && sym == nil) {
  4718  			break
  4719  		}
  4720  		v.reset(OpLOONG64MOVVloadidx)
  4721  		v.AddArg3(ptr, idx, mem)
  4722  		return true
  4723  	}
  4724  	// match: (MOVVload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4725  	// cond: off == 0 && sym == nil
  4726  	// result: (MOVVloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4727  	for {
  4728  		off := auxIntToInt32(v.AuxInt)
  4729  		sym := auxToSym(v.Aux)
  4730  		if v_0.Op != OpLOONG64ADDshiftLLV {
  4731  			break
  4732  		}
  4733  		shift := auxIntToInt64(v_0.AuxInt)
  4734  		idx := v_0.Args[1]
  4735  		ptr := v_0.Args[0]
  4736  		mem := v_1
  4737  		if !(off == 0 && sym == nil) {
  4738  			break
  4739  		}
  4740  		v.reset(OpLOONG64MOVVloadidx)
  4741  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  4742  		v0.AuxInt = int64ToAuxInt(shift)
  4743  		v0.AddArg(idx)
  4744  		v.AddArg3(ptr, v0, mem)
  4745  		return true
  4746  	}
  4747  	// match: (MOVVload [off] {sym} (SB) _)
  4748  	// cond: symIsRO(sym)
  4749  	// result: (MOVVconst [int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  4750  	for {
  4751  		off := auxIntToInt32(v.AuxInt)
  4752  		sym := auxToSym(v.Aux)
  4753  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  4754  			break
  4755  		}
  4756  		v.reset(OpLOONG64MOVVconst)
  4757  		v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  4758  		return true
  4759  	}
  4760  	return false
  4761  }
  4762  func rewriteValueLOONG64_OpLOONG64MOVVloadidx(v *Value) bool {
  4763  	v_2 := v.Args[2]
  4764  	v_1 := v.Args[1]
  4765  	v_0 := v.Args[0]
  4766  	// match: (MOVVloadidx ptr (MOVVconst [c]) mem)
  4767  	// cond: is32Bit(c)
  4768  	// result: (MOVVload [int32(c)] ptr mem)
  4769  	for {
  4770  		ptr := v_0
  4771  		if v_1.Op != OpLOONG64MOVVconst {
  4772  			break
  4773  		}
  4774  		c := auxIntToInt64(v_1.AuxInt)
  4775  		mem := v_2
  4776  		if !(is32Bit(c)) {
  4777  			break
  4778  		}
  4779  		v.reset(OpLOONG64MOVVload)
  4780  		v.AuxInt = int32ToAuxInt(int32(c))
  4781  		v.AddArg2(ptr, mem)
  4782  		return true
  4783  	}
  4784  	// match: (MOVVloadidx (MOVVconst [c]) ptr mem)
  4785  	// cond: is32Bit(c)
  4786  	// result: (MOVVload [int32(c)] ptr mem)
  4787  	for {
  4788  		if v_0.Op != OpLOONG64MOVVconst {
  4789  			break
  4790  		}
  4791  		c := auxIntToInt64(v_0.AuxInt)
  4792  		ptr := v_1
  4793  		mem := v_2
  4794  		if !(is32Bit(c)) {
  4795  			break
  4796  		}
  4797  		v.reset(OpLOONG64MOVVload)
  4798  		v.AuxInt = int32ToAuxInt(int32(c))
  4799  		v.AddArg2(ptr, mem)
  4800  		return true
  4801  	}
  4802  	return false
  4803  }
  4804  func rewriteValueLOONG64_OpLOONG64MOVVnop(v *Value) bool {
  4805  	v_0 := v.Args[0]
  4806  	// match: (MOVVnop (MOVVconst [c]))
  4807  	// result: (MOVVconst [c])
  4808  	for {
  4809  		if v_0.Op != OpLOONG64MOVVconst {
  4810  			break
  4811  		}
  4812  		c := auxIntToInt64(v_0.AuxInt)
  4813  		v.reset(OpLOONG64MOVVconst)
  4814  		v.AuxInt = int64ToAuxInt(c)
  4815  		return true
  4816  	}
  4817  	return false
  4818  }
  4819  func rewriteValueLOONG64_OpLOONG64MOVVreg(v *Value) bool {
  4820  	v_0 := v.Args[0]
  4821  	// match: (MOVVreg x)
  4822  	// cond: x.Uses == 1
  4823  	// result: (MOVVnop x)
  4824  	for {
  4825  		x := v_0
  4826  		if !(x.Uses == 1) {
  4827  			break
  4828  		}
  4829  		v.reset(OpLOONG64MOVVnop)
  4830  		v.AddArg(x)
  4831  		return true
  4832  	}
  4833  	// match: (MOVVreg (MOVVconst [c]))
  4834  	// result: (MOVVconst [c])
  4835  	for {
  4836  		if v_0.Op != OpLOONG64MOVVconst {
  4837  			break
  4838  		}
  4839  		c := auxIntToInt64(v_0.AuxInt)
  4840  		v.reset(OpLOONG64MOVVconst)
  4841  		v.AuxInt = int64ToAuxInt(c)
  4842  		return true
  4843  	}
  4844  	return false
  4845  }
  4846  func rewriteValueLOONG64_OpLOONG64MOVVstore(v *Value) bool {
  4847  	v_2 := v.Args[2]
  4848  	v_1 := v.Args[1]
  4849  	v_0 := v.Args[0]
  4850  	b := v.Block
  4851  	config := b.Func.Config
  4852  	typ := &b.Func.Config.Types
  4853  	// match: (MOVVstore [off] {sym} ptr (MOVVfpgp val) mem)
  4854  	// result: (MOVDstore [off] {sym} ptr val mem)
  4855  	for {
  4856  		off := auxIntToInt32(v.AuxInt)
  4857  		sym := auxToSym(v.Aux)
  4858  		ptr := v_0
  4859  		if v_1.Op != OpLOONG64MOVVfpgp {
  4860  			break
  4861  		}
  4862  		val := v_1.Args[0]
  4863  		mem := v_2
  4864  		v.reset(OpLOONG64MOVDstore)
  4865  		v.AuxInt = int32ToAuxInt(off)
  4866  		v.Aux = symToAux(sym)
  4867  		v.AddArg3(ptr, val, mem)
  4868  		return true
  4869  	}
  4870  	// match: (MOVVstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  4871  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4872  	// result: (MOVVstore [off1+int32(off2)] {sym} ptr val mem)
  4873  	for {
  4874  		off1 := auxIntToInt32(v.AuxInt)
  4875  		sym := auxToSym(v.Aux)
  4876  		if v_0.Op != OpLOONG64ADDVconst {
  4877  			break
  4878  		}
  4879  		off2 := auxIntToInt64(v_0.AuxInt)
  4880  		ptr := v_0.Args[0]
  4881  		val := v_1
  4882  		mem := v_2
  4883  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4884  			break
  4885  		}
  4886  		v.reset(OpLOONG64MOVVstore)
  4887  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4888  		v.Aux = symToAux(sym)
  4889  		v.AddArg3(ptr, val, mem)
  4890  		return true
  4891  	}
  4892  	// match: (MOVVstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  4893  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4894  	// result: (MOVVstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  4895  	for {
  4896  		off1 := auxIntToInt32(v.AuxInt)
  4897  		sym1 := auxToSym(v.Aux)
  4898  		if v_0.Op != OpLOONG64MOVVaddr {
  4899  			break
  4900  		}
  4901  		off2 := auxIntToInt32(v_0.AuxInt)
  4902  		sym2 := auxToSym(v_0.Aux)
  4903  		ptr := v_0.Args[0]
  4904  		val := v_1
  4905  		mem := v_2
  4906  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4907  			break
  4908  		}
  4909  		v.reset(OpLOONG64MOVVstore)
  4910  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4911  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4912  		v.AddArg3(ptr, val, mem)
  4913  		return true
  4914  	}
  4915  	// match: (MOVVstore [off] {sym} (ADDV ptr idx) val mem)
  4916  	// cond: off == 0 && sym == nil
  4917  	// result: (MOVVstoreidx ptr idx val mem)
  4918  	for {
  4919  		off := auxIntToInt32(v.AuxInt)
  4920  		sym := auxToSym(v.Aux)
  4921  		if v_0.Op != OpLOONG64ADDV {
  4922  			break
  4923  		}
  4924  		idx := v_0.Args[1]
  4925  		ptr := v_0.Args[0]
  4926  		val := v_1
  4927  		mem := v_2
  4928  		if !(off == 0 && sym == nil) {
  4929  			break
  4930  		}
  4931  		v.reset(OpLOONG64MOVVstoreidx)
  4932  		v.AddArg4(ptr, idx, val, mem)
  4933  		return true
  4934  	}
  4935  	// match: (MOVVstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  4936  	// cond: off == 0 && sym == nil
  4937  	// result: (MOVVstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  4938  	for {
  4939  		off := auxIntToInt32(v.AuxInt)
  4940  		sym := auxToSym(v.Aux)
  4941  		if v_0.Op != OpLOONG64ADDshiftLLV {
  4942  			break
  4943  		}
  4944  		shift := auxIntToInt64(v_0.AuxInt)
  4945  		idx := v_0.Args[1]
  4946  		ptr := v_0.Args[0]
  4947  		val := v_1
  4948  		mem := v_2
  4949  		if !(off == 0 && sym == nil) {
  4950  			break
  4951  		}
  4952  		v.reset(OpLOONG64MOVVstoreidx)
  4953  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  4954  		v0.AuxInt = int64ToAuxInt(shift)
  4955  		v0.AddArg(idx)
  4956  		v.AddArg4(ptr, v0, val, mem)
  4957  		return true
  4958  	}
  4959  	return false
  4960  }
  4961  func rewriteValueLOONG64_OpLOONG64MOVVstoreidx(v *Value) bool {
  4962  	v_3 := v.Args[3]
  4963  	v_2 := v.Args[2]
  4964  	v_1 := v.Args[1]
  4965  	v_0 := v.Args[0]
  4966  	// match: (MOVVstoreidx ptr (MOVVconst [c]) val mem)
  4967  	// cond: is32Bit(c)
  4968  	// result: (MOVVstore [int32(c)] ptr val mem)
  4969  	for {
  4970  		ptr := v_0
  4971  		if v_1.Op != OpLOONG64MOVVconst {
  4972  			break
  4973  		}
  4974  		c := auxIntToInt64(v_1.AuxInt)
  4975  		val := v_2
  4976  		mem := v_3
  4977  		if !(is32Bit(c)) {
  4978  			break
  4979  		}
  4980  		v.reset(OpLOONG64MOVVstore)
  4981  		v.AuxInt = int32ToAuxInt(int32(c))
  4982  		v.AddArg3(ptr, val, mem)
  4983  		return true
  4984  	}
  4985  	// match: (MOVVstoreidx (MOVVconst [c]) idx val mem)
  4986  	// cond: is32Bit(c)
  4987  	// result: (MOVVstore [int32(c)] idx val mem)
  4988  	for {
  4989  		if v_0.Op != OpLOONG64MOVVconst {
  4990  			break
  4991  		}
  4992  		c := auxIntToInt64(v_0.AuxInt)
  4993  		idx := v_1
  4994  		val := v_2
  4995  		mem := v_3
  4996  		if !(is32Bit(c)) {
  4997  			break
  4998  		}
  4999  		v.reset(OpLOONG64MOVVstore)
  5000  		v.AuxInt = int32ToAuxInt(int32(c))
  5001  		v.AddArg3(idx, val, mem)
  5002  		return true
  5003  	}
  5004  	return false
  5005  }
  5006  func rewriteValueLOONG64_OpLOONG64MOVWUload(v *Value) bool {
  5007  	v_1 := v.Args[1]
  5008  	v_0 := v.Args[0]
  5009  	b := v.Block
  5010  	config := b.Func.Config
  5011  	typ := &b.Func.Config.Types
  5012  	// match: (MOVWUload [off] {sym} ptr (MOVFstore [off] {sym} ptr val _))
  5013  	// result: (ZeroExt32to64 (MOVWfpgp <typ.Float32> val))
  5014  	for {
  5015  		off := auxIntToInt32(v.AuxInt)
  5016  		sym := auxToSym(v.Aux)
  5017  		ptr := v_0
  5018  		if v_1.Op != OpLOONG64MOVFstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5019  			break
  5020  		}
  5021  		val := v_1.Args[1]
  5022  		if ptr != v_1.Args[0] {
  5023  			break
  5024  		}
  5025  		v.reset(OpZeroExt32to64)
  5026  		v0 := b.NewValue0(v_1.Pos, OpLOONG64MOVWfpgp, typ.Float32)
  5027  		v0.AddArg(val)
  5028  		v.AddArg(v0)
  5029  		return true
  5030  	}
  5031  	// match: (MOVWUload [off] {sym} ptr (MOVWstore [off] {sym} ptr x _))
  5032  	// result: (MOVWUreg x)
  5033  	for {
  5034  		off := auxIntToInt32(v.AuxInt)
  5035  		sym := auxToSym(v.Aux)
  5036  		ptr := v_0
  5037  		if v_1.Op != OpLOONG64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5038  			break
  5039  		}
  5040  		x := v_1.Args[1]
  5041  		if ptr != v_1.Args[0] {
  5042  			break
  5043  		}
  5044  		v.reset(OpLOONG64MOVWUreg)
  5045  		v.AddArg(x)
  5046  		return true
  5047  	}
  5048  	// match: (MOVWUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  5049  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5050  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
  5051  	for {
  5052  		off1 := auxIntToInt32(v.AuxInt)
  5053  		sym := auxToSym(v.Aux)
  5054  		if v_0.Op != OpLOONG64ADDVconst {
  5055  			break
  5056  		}
  5057  		off2 := auxIntToInt64(v_0.AuxInt)
  5058  		ptr := v_0.Args[0]
  5059  		mem := v_1
  5060  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5061  			break
  5062  		}
  5063  		v.reset(OpLOONG64MOVWUload)
  5064  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5065  		v.Aux = symToAux(sym)
  5066  		v.AddArg2(ptr, mem)
  5067  		return true
  5068  	}
  5069  	// match: (MOVWUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  5070  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5071  	// result: (MOVWUload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  5072  	for {
  5073  		off1 := auxIntToInt32(v.AuxInt)
  5074  		sym1 := auxToSym(v.Aux)
  5075  		if v_0.Op != OpLOONG64MOVVaddr {
  5076  			break
  5077  		}
  5078  		off2 := auxIntToInt32(v_0.AuxInt)
  5079  		sym2 := auxToSym(v_0.Aux)
  5080  		ptr := v_0.Args[0]
  5081  		mem := v_1
  5082  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5083  			break
  5084  		}
  5085  		v.reset(OpLOONG64MOVWUload)
  5086  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5087  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5088  		v.AddArg2(ptr, mem)
  5089  		return true
  5090  	}
  5091  	// match: (MOVWUload [off] {sym} (ADDV ptr idx) mem)
  5092  	// cond: off == 0 && sym == nil
  5093  	// result: (MOVWUloadidx ptr idx mem)
  5094  	for {
  5095  		off := auxIntToInt32(v.AuxInt)
  5096  		sym := auxToSym(v.Aux)
  5097  		if v_0.Op != OpLOONG64ADDV {
  5098  			break
  5099  		}
  5100  		idx := v_0.Args[1]
  5101  		ptr := v_0.Args[0]
  5102  		mem := v_1
  5103  		if !(off == 0 && sym == nil) {
  5104  			break
  5105  		}
  5106  		v.reset(OpLOONG64MOVWUloadidx)
  5107  		v.AddArg3(ptr, idx, mem)
  5108  		return true
  5109  	}
  5110  	// match: (MOVWUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  5111  	// cond: off == 0 && sym == nil
  5112  	// result: (MOVWUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  5113  	for {
  5114  		off := auxIntToInt32(v.AuxInt)
  5115  		sym := auxToSym(v.Aux)
  5116  		if v_0.Op != OpLOONG64ADDshiftLLV {
  5117  			break
  5118  		}
  5119  		shift := auxIntToInt64(v_0.AuxInt)
  5120  		idx := v_0.Args[1]
  5121  		ptr := v_0.Args[0]
  5122  		mem := v_1
  5123  		if !(off == 0 && sym == nil) {
  5124  			break
  5125  		}
  5126  		v.reset(OpLOONG64MOVWUloadidx)
  5127  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  5128  		v0.AuxInt = int64ToAuxInt(shift)
  5129  		v0.AddArg(idx)
  5130  		v.AddArg3(ptr, v0, mem)
  5131  		return true
  5132  	}
  5133  	// match: (MOVWUload [off] {sym} (SB) _)
  5134  	// cond: symIsRO(sym)
  5135  	// result: (MOVVconst [int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  5136  	for {
  5137  		off := auxIntToInt32(v.AuxInt)
  5138  		sym := auxToSym(v.Aux)
  5139  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  5140  			break
  5141  		}
  5142  		v.reset(OpLOONG64MOVVconst)
  5143  		v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  5144  		return true
  5145  	}
  5146  	return false
  5147  }
  5148  func rewriteValueLOONG64_OpLOONG64MOVWUloadidx(v *Value) bool {
  5149  	v_2 := v.Args[2]
  5150  	v_1 := v.Args[1]
  5151  	v_0 := v.Args[0]
  5152  	// match: (MOVWUloadidx ptr (MOVVconst [c]) mem)
  5153  	// cond: is32Bit(c)
  5154  	// result: (MOVWUload [int32(c)] ptr mem)
  5155  	for {
  5156  		ptr := v_0
  5157  		if v_1.Op != OpLOONG64MOVVconst {
  5158  			break
  5159  		}
  5160  		c := auxIntToInt64(v_1.AuxInt)
  5161  		mem := v_2
  5162  		if !(is32Bit(c)) {
  5163  			break
  5164  		}
  5165  		v.reset(OpLOONG64MOVWUload)
  5166  		v.AuxInt = int32ToAuxInt(int32(c))
  5167  		v.AddArg2(ptr, mem)
  5168  		return true
  5169  	}
  5170  	// match: (MOVWUloadidx (MOVVconst [c]) ptr mem)
  5171  	// cond: is32Bit(c)
  5172  	// result: (MOVWUload [int32(c)] ptr mem)
  5173  	for {
  5174  		if v_0.Op != OpLOONG64MOVVconst {
  5175  			break
  5176  		}
  5177  		c := auxIntToInt64(v_0.AuxInt)
  5178  		ptr := v_1
  5179  		mem := v_2
  5180  		if !(is32Bit(c)) {
  5181  			break
  5182  		}
  5183  		v.reset(OpLOONG64MOVWUload)
  5184  		v.AuxInt = int32ToAuxInt(int32(c))
  5185  		v.AddArg2(ptr, mem)
  5186  		return true
  5187  	}
  5188  	return false
  5189  }
  5190  func rewriteValueLOONG64_OpLOONG64MOVWUreg(v *Value) bool {
  5191  	v_0 := v.Args[0]
  5192  	// match: (MOVWUreg (SRLVconst [rc] x))
  5193  	// cond: rc < 32
  5194  	// result: (BSTRPICKV [rc + (31+rc)<<6] x)
  5195  	for {
  5196  		if v_0.Op != OpLOONG64SRLVconst {
  5197  			break
  5198  		}
  5199  		rc := auxIntToInt64(v_0.AuxInt)
  5200  		x := v_0.Args[0]
  5201  		if !(rc < 32) {
  5202  			break
  5203  		}
  5204  		v.reset(OpLOONG64BSTRPICKV)
  5205  		v.AuxInt = int64ToAuxInt(rc + (31+rc)<<6)
  5206  		v.AddArg(x)
  5207  		return true
  5208  	}
  5209  	// match: (MOVWUreg x:(MOVBUload _ _))
  5210  	// result: (MOVVreg x)
  5211  	for {
  5212  		x := v_0
  5213  		if x.Op != OpLOONG64MOVBUload {
  5214  			break
  5215  		}
  5216  		v.reset(OpLOONG64MOVVreg)
  5217  		v.AddArg(x)
  5218  		return true
  5219  	}
  5220  	// match: (MOVWUreg x:(MOVHUload _ _))
  5221  	// result: (MOVVreg x)
  5222  	for {
  5223  		x := v_0
  5224  		if x.Op != OpLOONG64MOVHUload {
  5225  			break
  5226  		}
  5227  		v.reset(OpLOONG64MOVVreg)
  5228  		v.AddArg(x)
  5229  		return true
  5230  	}
  5231  	// match: (MOVWUreg x:(MOVWUload _ _))
  5232  	// result: (MOVVreg x)
  5233  	for {
  5234  		x := v_0
  5235  		if x.Op != OpLOONG64MOVWUload {
  5236  			break
  5237  		}
  5238  		v.reset(OpLOONG64MOVVreg)
  5239  		v.AddArg(x)
  5240  		return true
  5241  	}
  5242  	// match: (MOVWUreg x:(MOVBUloadidx _ _ _))
  5243  	// result: (MOVVreg x)
  5244  	for {
  5245  		x := v_0
  5246  		if x.Op != OpLOONG64MOVBUloadidx {
  5247  			break
  5248  		}
  5249  		v.reset(OpLOONG64MOVVreg)
  5250  		v.AddArg(x)
  5251  		return true
  5252  	}
  5253  	// match: (MOVWUreg x:(MOVHUloadidx _ _ _))
  5254  	// result: (MOVVreg x)
  5255  	for {
  5256  		x := v_0
  5257  		if x.Op != OpLOONG64MOVHUloadidx {
  5258  			break
  5259  		}
  5260  		v.reset(OpLOONG64MOVVreg)
  5261  		v.AddArg(x)
  5262  		return true
  5263  	}
  5264  	// match: (MOVWUreg x:(MOVWUloadidx _ _ _))
  5265  	// result: (MOVVreg x)
  5266  	for {
  5267  		x := v_0
  5268  		if x.Op != OpLOONG64MOVWUloadidx {
  5269  			break
  5270  		}
  5271  		v.reset(OpLOONG64MOVVreg)
  5272  		v.AddArg(x)
  5273  		return true
  5274  	}
  5275  	// match: (MOVWUreg x:(MOVBUreg _))
  5276  	// result: (MOVVreg x)
  5277  	for {
  5278  		x := v_0
  5279  		if x.Op != OpLOONG64MOVBUreg {
  5280  			break
  5281  		}
  5282  		v.reset(OpLOONG64MOVVreg)
  5283  		v.AddArg(x)
  5284  		return true
  5285  	}
  5286  	// match: (MOVWUreg x:(MOVHUreg _))
  5287  	// result: (MOVVreg x)
  5288  	for {
  5289  		x := v_0
  5290  		if x.Op != OpLOONG64MOVHUreg {
  5291  			break
  5292  		}
  5293  		v.reset(OpLOONG64MOVVreg)
  5294  		v.AddArg(x)
  5295  		return true
  5296  	}
  5297  	// match: (MOVWUreg x:(MOVWUreg _))
  5298  	// result: (MOVVreg x)
  5299  	for {
  5300  		x := v_0
  5301  		if x.Op != OpLOONG64MOVWUreg {
  5302  			break
  5303  		}
  5304  		v.reset(OpLOONG64MOVVreg)
  5305  		v.AddArg(x)
  5306  		return true
  5307  	}
  5308  	// match: (MOVWUreg (SLLVconst [lc] x))
  5309  	// cond: lc >= 32
  5310  	// result: (MOVVconst [0])
  5311  	for {
  5312  		if v_0.Op != OpLOONG64SLLVconst {
  5313  			break
  5314  		}
  5315  		lc := auxIntToInt64(v_0.AuxInt)
  5316  		if !(lc >= 32) {
  5317  			break
  5318  		}
  5319  		v.reset(OpLOONG64MOVVconst)
  5320  		v.AuxInt = int64ToAuxInt(0)
  5321  		return true
  5322  	}
  5323  	// match: (MOVWUreg (MOVVconst [c]))
  5324  	// result: (MOVVconst [int64(uint32(c))])
  5325  	for {
  5326  		if v_0.Op != OpLOONG64MOVVconst {
  5327  			break
  5328  		}
  5329  		c := auxIntToInt64(v_0.AuxInt)
  5330  		v.reset(OpLOONG64MOVVconst)
  5331  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
  5332  		return true
  5333  	}
  5334  	// match: (MOVWUreg x:(SRLconst [c] y))
  5335  	// result: x
  5336  	for {
  5337  		x := v_0
  5338  		if x.Op != OpLOONG64SRLconst {
  5339  			break
  5340  		}
  5341  		v.copyOf(x)
  5342  		return true
  5343  	}
  5344  	// match: (MOVWUreg x:(ANDconst [c] y))
  5345  	// cond: c >= 0 && int64(uint32(c)) == c
  5346  	// result: x
  5347  	for {
  5348  		x := v_0
  5349  		if x.Op != OpLOONG64ANDconst {
  5350  			break
  5351  		}
  5352  		c := auxIntToInt64(x.AuxInt)
  5353  		if !(c >= 0 && int64(uint32(c)) == c) {
  5354  			break
  5355  		}
  5356  		v.copyOf(x)
  5357  		return true
  5358  	}
  5359  	return false
  5360  }
  5361  func rewriteValueLOONG64_OpLOONG64MOVWload(v *Value) bool {
  5362  	v_1 := v.Args[1]
  5363  	v_0 := v.Args[0]
  5364  	b := v.Block
  5365  	config := b.Func.Config
  5366  	typ := &b.Func.Config.Types
  5367  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off] {sym} ptr x _))
  5368  	// result: (MOVWreg x)
  5369  	for {
  5370  		off := auxIntToInt32(v.AuxInt)
  5371  		sym := auxToSym(v.Aux)
  5372  		ptr := v_0
  5373  		if v_1.Op != OpLOONG64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5374  			break
  5375  		}
  5376  		x := v_1.Args[1]
  5377  		if ptr != v_1.Args[0] {
  5378  			break
  5379  		}
  5380  		v.reset(OpLOONG64MOVWreg)
  5381  		v.AddArg(x)
  5382  		return true
  5383  	}
  5384  	// match: (MOVWload [off1] {sym} (ADDVconst [off2] ptr) mem)
  5385  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5386  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
  5387  	for {
  5388  		off1 := auxIntToInt32(v.AuxInt)
  5389  		sym := auxToSym(v.Aux)
  5390  		if v_0.Op != OpLOONG64ADDVconst {
  5391  			break
  5392  		}
  5393  		off2 := auxIntToInt64(v_0.AuxInt)
  5394  		ptr := v_0.Args[0]
  5395  		mem := v_1
  5396  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5397  			break
  5398  		}
  5399  		v.reset(OpLOONG64MOVWload)
  5400  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5401  		v.Aux = symToAux(sym)
  5402  		v.AddArg2(ptr, mem)
  5403  		return true
  5404  	}
  5405  	// match: (MOVWload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  5406  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5407  	// result: (MOVWload [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr mem)
  5408  	for {
  5409  		off1 := auxIntToInt32(v.AuxInt)
  5410  		sym1 := auxToSym(v.Aux)
  5411  		if v_0.Op != OpLOONG64MOVVaddr {
  5412  			break
  5413  		}
  5414  		off2 := auxIntToInt32(v_0.AuxInt)
  5415  		sym2 := auxToSym(v_0.Aux)
  5416  		ptr := v_0.Args[0]
  5417  		mem := v_1
  5418  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5419  			break
  5420  		}
  5421  		v.reset(OpLOONG64MOVWload)
  5422  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5423  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5424  		v.AddArg2(ptr, mem)
  5425  		return true
  5426  	}
  5427  	// match: (MOVWload [off] {sym} (ADDV ptr idx) mem)
  5428  	// cond: off == 0 && sym == nil
  5429  	// result: (MOVWloadidx ptr idx mem)
  5430  	for {
  5431  		off := auxIntToInt32(v.AuxInt)
  5432  		sym := auxToSym(v.Aux)
  5433  		if v_0.Op != OpLOONG64ADDV {
  5434  			break
  5435  		}
  5436  		idx := v_0.Args[1]
  5437  		ptr := v_0.Args[0]
  5438  		mem := v_1
  5439  		if !(off == 0 && sym == nil) {
  5440  			break
  5441  		}
  5442  		v.reset(OpLOONG64MOVWloadidx)
  5443  		v.AddArg3(ptr, idx, mem)
  5444  		return true
  5445  	}
  5446  	// match: (MOVWload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  5447  	// cond: off == 0 && sym == nil
  5448  	// result: (MOVWloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  5449  	for {
  5450  		off := auxIntToInt32(v.AuxInt)
  5451  		sym := auxToSym(v.Aux)
  5452  		if v_0.Op != OpLOONG64ADDshiftLLV {
  5453  			break
  5454  		}
  5455  		shift := auxIntToInt64(v_0.AuxInt)
  5456  		idx := v_0.Args[1]
  5457  		ptr := v_0.Args[0]
  5458  		mem := v_1
  5459  		if !(off == 0 && sym == nil) {
  5460  			break
  5461  		}
  5462  		v.reset(OpLOONG64MOVWloadidx)
  5463  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  5464  		v0.AuxInt = int64ToAuxInt(shift)
  5465  		v0.AddArg(idx)
  5466  		v.AddArg3(ptr, v0, mem)
  5467  		return true
  5468  	}
  5469  	// match: (MOVWload [off] {sym} (SB) _)
  5470  	// cond: symIsRO(sym)
  5471  	// result: (MOVVconst [int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
  5472  	for {
  5473  		off := auxIntToInt32(v.AuxInt)
  5474  		sym := auxToSym(v.Aux)
  5475  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  5476  			break
  5477  		}
  5478  		v.reset(OpLOONG64MOVVconst)
  5479  		v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))))
  5480  		return true
  5481  	}
  5482  	return false
  5483  }
  5484  func rewriteValueLOONG64_OpLOONG64MOVWloadidx(v *Value) bool {
  5485  	v_2 := v.Args[2]
  5486  	v_1 := v.Args[1]
  5487  	v_0 := v.Args[0]
  5488  	// match: (MOVWloadidx ptr (MOVVconst [c]) mem)
  5489  	// cond: is32Bit(c)
  5490  	// result: (MOVWload [int32(c)] ptr mem)
  5491  	for {
  5492  		ptr := v_0
  5493  		if v_1.Op != OpLOONG64MOVVconst {
  5494  			break
  5495  		}
  5496  		c := auxIntToInt64(v_1.AuxInt)
  5497  		mem := v_2
  5498  		if !(is32Bit(c)) {
  5499  			break
  5500  		}
  5501  		v.reset(OpLOONG64MOVWload)
  5502  		v.AuxInt = int32ToAuxInt(int32(c))
  5503  		v.AddArg2(ptr, mem)
  5504  		return true
  5505  	}
  5506  	// match: (MOVWloadidx (MOVVconst [c]) ptr mem)
  5507  	// cond: is32Bit(c)
  5508  	// result: (MOVWload [int32(c)] ptr mem)
  5509  	for {
  5510  		if v_0.Op != OpLOONG64MOVVconst {
  5511  			break
  5512  		}
  5513  		c := auxIntToInt64(v_0.AuxInt)
  5514  		ptr := v_1
  5515  		mem := v_2
  5516  		if !(is32Bit(c)) {
  5517  			break
  5518  		}
  5519  		v.reset(OpLOONG64MOVWload)
  5520  		v.AuxInt = int32ToAuxInt(int32(c))
  5521  		v.AddArg2(ptr, mem)
  5522  		return true
  5523  	}
  5524  	return false
  5525  }
  5526  func rewriteValueLOONG64_OpLOONG64MOVWreg(v *Value) bool {
  5527  	v_0 := v.Args[0]
  5528  	// match: (MOVWreg x:(MOVBload _ _))
  5529  	// result: (MOVVreg x)
  5530  	for {
  5531  		x := v_0
  5532  		if x.Op != OpLOONG64MOVBload {
  5533  			break
  5534  		}
  5535  		v.reset(OpLOONG64MOVVreg)
  5536  		v.AddArg(x)
  5537  		return true
  5538  	}
  5539  	// match: (MOVWreg x:(MOVBUload _ _))
  5540  	// result: (MOVVreg x)
  5541  	for {
  5542  		x := v_0
  5543  		if x.Op != OpLOONG64MOVBUload {
  5544  			break
  5545  		}
  5546  		v.reset(OpLOONG64MOVVreg)
  5547  		v.AddArg(x)
  5548  		return true
  5549  	}
  5550  	// match: (MOVWreg x:(MOVHload _ _))
  5551  	// result: (MOVVreg x)
  5552  	for {
  5553  		x := v_0
  5554  		if x.Op != OpLOONG64MOVHload {
  5555  			break
  5556  		}
  5557  		v.reset(OpLOONG64MOVVreg)
  5558  		v.AddArg(x)
  5559  		return true
  5560  	}
  5561  	// match: (MOVWreg x:(MOVHUload _ _))
  5562  	// result: (MOVVreg x)
  5563  	for {
  5564  		x := v_0
  5565  		if x.Op != OpLOONG64MOVHUload {
  5566  			break
  5567  		}
  5568  		v.reset(OpLOONG64MOVVreg)
  5569  		v.AddArg(x)
  5570  		return true
  5571  	}
  5572  	// match: (MOVWreg x:(MOVWload _ _))
  5573  	// result: (MOVVreg x)
  5574  	for {
  5575  		x := v_0
  5576  		if x.Op != OpLOONG64MOVWload {
  5577  			break
  5578  		}
  5579  		v.reset(OpLOONG64MOVVreg)
  5580  		v.AddArg(x)
  5581  		return true
  5582  	}
  5583  	// match: (MOVWreg x:(MOVBloadidx _ _ _))
  5584  	// result: (MOVVreg x)
  5585  	for {
  5586  		x := v_0
  5587  		if x.Op != OpLOONG64MOVBloadidx {
  5588  			break
  5589  		}
  5590  		v.reset(OpLOONG64MOVVreg)
  5591  		v.AddArg(x)
  5592  		return true
  5593  	}
  5594  	// match: (MOVWreg x:(MOVBUloadidx _ _ _))
  5595  	// result: (MOVVreg x)
  5596  	for {
  5597  		x := v_0
  5598  		if x.Op != OpLOONG64MOVBUloadidx {
  5599  			break
  5600  		}
  5601  		v.reset(OpLOONG64MOVVreg)
  5602  		v.AddArg(x)
  5603  		return true
  5604  	}
  5605  	// match: (MOVWreg x:(MOVHloadidx _ _ _))
  5606  	// result: (MOVVreg x)
  5607  	for {
  5608  		x := v_0
  5609  		if x.Op != OpLOONG64MOVHloadidx {
  5610  			break
  5611  		}
  5612  		v.reset(OpLOONG64MOVVreg)
  5613  		v.AddArg(x)
  5614  		return true
  5615  	}
  5616  	// match: (MOVWreg x:(MOVHUloadidx _ _ _))
  5617  	// result: (MOVVreg x)
  5618  	for {
  5619  		x := v_0
  5620  		if x.Op != OpLOONG64MOVHUloadidx {
  5621  			break
  5622  		}
  5623  		v.reset(OpLOONG64MOVVreg)
  5624  		v.AddArg(x)
  5625  		return true
  5626  	}
  5627  	// match: (MOVWreg x:(MOVWloadidx _ _ _))
  5628  	// result: (MOVVreg x)
  5629  	for {
  5630  		x := v_0
  5631  		if x.Op != OpLOONG64MOVWloadidx {
  5632  			break
  5633  		}
  5634  		v.reset(OpLOONG64MOVVreg)
  5635  		v.AddArg(x)
  5636  		return true
  5637  	}
  5638  	// match: (MOVWreg x:(MOVBreg _))
  5639  	// result: (MOVVreg x)
  5640  	for {
  5641  		x := v_0
  5642  		if x.Op != OpLOONG64MOVBreg {
  5643  			break
  5644  		}
  5645  		v.reset(OpLOONG64MOVVreg)
  5646  		v.AddArg(x)
  5647  		return true
  5648  	}
  5649  	// match: (MOVWreg x:(MOVBUreg _))
  5650  	// result: (MOVVreg x)
  5651  	for {
  5652  		x := v_0
  5653  		if x.Op != OpLOONG64MOVBUreg {
  5654  			break
  5655  		}
  5656  		v.reset(OpLOONG64MOVVreg)
  5657  		v.AddArg(x)
  5658  		return true
  5659  	}
  5660  	// match: (MOVWreg x:(MOVHreg _))
  5661  	// result: (MOVVreg x)
  5662  	for {
  5663  		x := v_0
  5664  		if x.Op != OpLOONG64MOVHreg {
  5665  			break
  5666  		}
  5667  		v.reset(OpLOONG64MOVVreg)
  5668  		v.AddArg(x)
  5669  		return true
  5670  	}
  5671  	// match: (MOVWreg x:(MOVWreg _))
  5672  	// result: (MOVVreg x)
  5673  	for {
  5674  		x := v_0
  5675  		if x.Op != OpLOONG64MOVWreg {
  5676  			break
  5677  		}
  5678  		v.reset(OpLOONG64MOVVreg)
  5679  		v.AddArg(x)
  5680  		return true
  5681  	}
  5682  	// match: (MOVWreg (MOVVconst [c]))
  5683  	// result: (MOVVconst [int64(int32(c))])
  5684  	for {
  5685  		if v_0.Op != OpLOONG64MOVVconst {
  5686  			break
  5687  		}
  5688  		c := auxIntToInt64(v_0.AuxInt)
  5689  		v.reset(OpLOONG64MOVVconst)
  5690  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
  5691  		return true
  5692  	}
  5693  	// match: (MOVWreg x:(ANDconst [c] y))
  5694  	// cond: c >= 0 && int64(int32(c)) == c
  5695  	// result: x
  5696  	for {
  5697  		x := v_0
  5698  		if x.Op != OpLOONG64ANDconst {
  5699  			break
  5700  		}
  5701  		c := auxIntToInt64(x.AuxInt)
  5702  		if !(c >= 0 && int64(int32(c)) == c) {
  5703  			break
  5704  		}
  5705  		v.copyOf(x)
  5706  		return true
  5707  	}
  5708  	return false
  5709  }
  5710  func rewriteValueLOONG64_OpLOONG64MOVWstore(v *Value) bool {
  5711  	v_2 := v.Args[2]
  5712  	v_1 := v.Args[1]
  5713  	v_0 := v.Args[0]
  5714  	b := v.Block
  5715  	config := b.Func.Config
  5716  	typ := &b.Func.Config.Types
  5717  	// match: (MOVWstore [off] {sym} ptr (MOVWfpgp val) mem)
  5718  	// result: (MOVFstore [off] {sym} ptr val mem)
  5719  	for {
  5720  		off := auxIntToInt32(v.AuxInt)
  5721  		sym := auxToSym(v.Aux)
  5722  		ptr := v_0
  5723  		if v_1.Op != OpLOONG64MOVWfpgp {
  5724  			break
  5725  		}
  5726  		val := v_1.Args[0]
  5727  		mem := v_2
  5728  		v.reset(OpLOONG64MOVFstore)
  5729  		v.AuxInt = int32ToAuxInt(off)
  5730  		v.Aux = symToAux(sym)
  5731  		v.AddArg3(ptr, val, mem)
  5732  		return true
  5733  	}
  5734  	// match: (MOVWstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  5735  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5736  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
  5737  	for {
  5738  		off1 := auxIntToInt32(v.AuxInt)
  5739  		sym := auxToSym(v.Aux)
  5740  		if v_0.Op != OpLOONG64ADDVconst {
  5741  			break
  5742  		}
  5743  		off2 := auxIntToInt64(v_0.AuxInt)
  5744  		ptr := v_0.Args[0]
  5745  		val := v_1
  5746  		mem := v_2
  5747  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5748  			break
  5749  		}
  5750  		v.reset(OpLOONG64MOVWstore)
  5751  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5752  		v.Aux = symToAux(sym)
  5753  		v.AddArg3(ptr, val, mem)
  5754  		return true
  5755  	}
  5756  	// match: (MOVWstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  5757  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5758  	// result: (MOVWstore [off1+int32(off2)] {mergeSym(sym1,sym2)} ptr val mem)
  5759  	for {
  5760  		off1 := auxIntToInt32(v.AuxInt)
  5761  		sym1 := auxToSym(v.Aux)
  5762  		if v_0.Op != OpLOONG64MOVVaddr {
  5763  			break
  5764  		}
  5765  		off2 := auxIntToInt32(v_0.AuxInt)
  5766  		sym2 := auxToSym(v_0.Aux)
  5767  		ptr := v_0.Args[0]
  5768  		val := v_1
  5769  		mem := v_2
  5770  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5771  			break
  5772  		}
  5773  		v.reset(OpLOONG64MOVWstore)
  5774  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5775  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5776  		v.AddArg3(ptr, val, mem)
  5777  		return true
  5778  	}
  5779  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
  5780  	// result: (MOVWstore [off] {sym} ptr x mem)
  5781  	for {
  5782  		off := auxIntToInt32(v.AuxInt)
  5783  		sym := auxToSym(v.Aux)
  5784  		ptr := v_0
  5785  		if v_1.Op != OpLOONG64MOVWreg {
  5786  			break
  5787  		}
  5788  		x := v_1.Args[0]
  5789  		mem := v_2
  5790  		v.reset(OpLOONG64MOVWstore)
  5791  		v.AuxInt = int32ToAuxInt(off)
  5792  		v.Aux = symToAux(sym)
  5793  		v.AddArg3(ptr, x, mem)
  5794  		return true
  5795  	}
  5796  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
  5797  	// result: (MOVWstore [off] {sym} ptr x mem)
  5798  	for {
  5799  		off := auxIntToInt32(v.AuxInt)
  5800  		sym := auxToSym(v.Aux)
  5801  		ptr := v_0
  5802  		if v_1.Op != OpLOONG64MOVWUreg {
  5803  			break
  5804  		}
  5805  		x := v_1.Args[0]
  5806  		mem := v_2
  5807  		v.reset(OpLOONG64MOVWstore)
  5808  		v.AuxInt = int32ToAuxInt(off)
  5809  		v.Aux = symToAux(sym)
  5810  		v.AddArg3(ptr, x, mem)
  5811  		return true
  5812  	}
  5813  	// match: (MOVWstore [off] {sym} (ADDV ptr idx) val mem)
  5814  	// cond: off == 0 && sym == nil
  5815  	// result: (MOVWstoreidx ptr idx val mem)
  5816  	for {
  5817  		off := auxIntToInt32(v.AuxInt)
  5818  		sym := auxToSym(v.Aux)
  5819  		if v_0.Op != OpLOONG64ADDV {
  5820  			break
  5821  		}
  5822  		idx := v_0.Args[1]
  5823  		ptr := v_0.Args[0]
  5824  		val := v_1
  5825  		mem := v_2
  5826  		if !(off == 0 && sym == nil) {
  5827  			break
  5828  		}
  5829  		v.reset(OpLOONG64MOVWstoreidx)
  5830  		v.AddArg4(ptr, idx, val, mem)
  5831  		return true
  5832  	}
  5833  	// match: (MOVWstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  5834  	// cond: off == 0 && sym == nil
  5835  	// result: (MOVWstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  5836  	for {
  5837  		off := auxIntToInt32(v.AuxInt)
  5838  		sym := auxToSym(v.Aux)
  5839  		if v_0.Op != OpLOONG64ADDshiftLLV {
  5840  			break
  5841  		}
  5842  		shift := auxIntToInt64(v_0.AuxInt)
  5843  		idx := v_0.Args[1]
  5844  		ptr := v_0.Args[0]
  5845  		val := v_1
  5846  		mem := v_2
  5847  		if !(off == 0 && sym == nil) {
  5848  			break
  5849  		}
  5850  		v.reset(OpLOONG64MOVWstoreidx)
  5851  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, typ.Int64)
  5852  		v0.AuxInt = int64ToAuxInt(shift)
  5853  		v0.AddArg(idx)
  5854  		v.AddArg4(ptr, v0, val, mem)
  5855  		return true
  5856  	}
  5857  	return false
  5858  }
  5859  func rewriteValueLOONG64_OpLOONG64MOVWstoreidx(v *Value) bool {
  5860  	v_3 := v.Args[3]
  5861  	v_2 := v.Args[2]
  5862  	v_1 := v.Args[1]
  5863  	v_0 := v.Args[0]
  5864  	// match: (MOVWstoreidx ptr (MOVVconst [c]) val mem)
  5865  	// cond: is32Bit(c)
  5866  	// result: (MOVWstore [int32(c)] ptr val mem)
  5867  	for {
  5868  		ptr := v_0
  5869  		if v_1.Op != OpLOONG64MOVVconst {
  5870  			break
  5871  		}
  5872  		c := auxIntToInt64(v_1.AuxInt)
  5873  		val := v_2
  5874  		mem := v_3
  5875  		if !(is32Bit(c)) {
  5876  			break
  5877  		}
  5878  		v.reset(OpLOONG64MOVWstore)
  5879  		v.AuxInt = int32ToAuxInt(int32(c))
  5880  		v.AddArg3(ptr, val, mem)
  5881  		return true
  5882  	}
  5883  	// match: (MOVWstoreidx (MOVVconst [c]) idx val mem)
  5884  	// cond: is32Bit(c)
  5885  	// result: (MOVWstore [int32(c)] idx val mem)
  5886  	for {
  5887  		if v_0.Op != OpLOONG64MOVVconst {
  5888  			break
  5889  		}
  5890  		c := auxIntToInt64(v_0.AuxInt)
  5891  		idx := v_1
  5892  		val := v_2
  5893  		mem := v_3
  5894  		if !(is32Bit(c)) {
  5895  			break
  5896  		}
  5897  		v.reset(OpLOONG64MOVWstore)
  5898  		v.AuxInt = int32ToAuxInt(int32(c))
  5899  		v.AddArg3(idx, val, mem)
  5900  		return true
  5901  	}
  5902  	return false
  5903  }
  5904  func rewriteValueLOONG64_OpLOONG64MULV(v *Value) bool {
  5905  	v_1 := v.Args[1]
  5906  	v_0 := v.Args[0]
  5907  	b := v.Block
  5908  	config := b.Func.Config
  5909  	// match: (MULV r:(MOVWUreg x) s:(MOVWUreg y))
  5910  	// cond: r.Uses == 1 && s.Uses == 1
  5911  	// result: (MULWVWU x y)
  5912  	for {
  5913  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5914  			r := v_0
  5915  			if r.Op != OpLOONG64MOVWUreg {
  5916  				continue
  5917  			}
  5918  			x := r.Args[0]
  5919  			s := v_1
  5920  			if s.Op != OpLOONG64MOVWUreg {
  5921  				continue
  5922  			}
  5923  			y := s.Args[0]
  5924  			if !(r.Uses == 1 && s.Uses == 1) {
  5925  				continue
  5926  			}
  5927  			v.reset(OpLOONG64MULWVWU)
  5928  			v.AddArg2(x, y)
  5929  			return true
  5930  		}
  5931  		break
  5932  	}
  5933  	// match: (MULV r:(MOVWreg x) s:(MOVWreg y))
  5934  	// cond: r.Uses == 1 && s.Uses == 1
  5935  	// result: (MULWVW x y)
  5936  	for {
  5937  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5938  			r := v_0
  5939  			if r.Op != OpLOONG64MOVWreg {
  5940  				continue
  5941  			}
  5942  			x := r.Args[0]
  5943  			s := v_1
  5944  			if s.Op != OpLOONG64MOVWreg {
  5945  				continue
  5946  			}
  5947  			y := s.Args[0]
  5948  			if !(r.Uses == 1 && s.Uses == 1) {
  5949  				continue
  5950  			}
  5951  			v.reset(OpLOONG64MULWVW)
  5952  			v.AddArg2(x, y)
  5953  			return true
  5954  		}
  5955  		break
  5956  	}
  5957  	// match: (MULV _ (MOVVconst [0]))
  5958  	// result: (MOVVconst [0])
  5959  	for {
  5960  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5961  			if v_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_1.AuxInt) != 0 {
  5962  				continue
  5963  			}
  5964  			v.reset(OpLOONG64MOVVconst)
  5965  			v.AuxInt = int64ToAuxInt(0)
  5966  			return true
  5967  		}
  5968  		break
  5969  	}
  5970  	// match: (MULV x (MOVVconst [1]))
  5971  	// result: x
  5972  	for {
  5973  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5974  			x := v_0
  5975  			if v_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_1.AuxInt) != 1 {
  5976  				continue
  5977  			}
  5978  			v.copyOf(x)
  5979  			return true
  5980  		}
  5981  		break
  5982  	}
  5983  	// match: (MULV x (MOVVconst [c]))
  5984  	// cond: canMulStrengthReduce(config, c)
  5985  	// result: {mulStrengthReduce(v, x, c)}
  5986  	for {
  5987  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5988  			x := v_0
  5989  			if v_1.Op != OpLOONG64MOVVconst {
  5990  				continue
  5991  			}
  5992  			c := auxIntToInt64(v_1.AuxInt)
  5993  			if !(canMulStrengthReduce(config, c)) {
  5994  				continue
  5995  			}
  5996  			v.copyOf(mulStrengthReduce(v, x, c))
  5997  			return true
  5998  		}
  5999  		break
  6000  	}
  6001  	// match: (MULV (MOVVconst [c]) (MOVVconst [d]))
  6002  	// result: (MOVVconst [c*d])
  6003  	for {
  6004  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6005  			if v_0.Op != OpLOONG64MOVVconst {
  6006  				continue
  6007  			}
  6008  			c := auxIntToInt64(v_0.AuxInt)
  6009  			if v_1.Op != OpLOONG64MOVVconst {
  6010  				continue
  6011  			}
  6012  			d := auxIntToInt64(v_1.AuxInt)
  6013  			v.reset(OpLOONG64MOVVconst)
  6014  			v.AuxInt = int64ToAuxInt(c * d)
  6015  			return true
  6016  		}
  6017  		break
  6018  	}
  6019  	return false
  6020  }
  6021  func rewriteValueLOONG64_OpLOONG64NEGV(v *Value) bool {
  6022  	v_0 := v.Args[0]
  6023  	b := v.Block
  6024  	// match: (NEGV (SUBV x y))
  6025  	// result: (SUBV y x)
  6026  	for {
  6027  		if v_0.Op != OpLOONG64SUBV {
  6028  			break
  6029  		}
  6030  		y := v_0.Args[1]
  6031  		x := v_0.Args[0]
  6032  		v.reset(OpLOONG64SUBV)
  6033  		v.AddArg2(y, x)
  6034  		return true
  6035  	}
  6036  	// match: (NEGV <t> s:(ADDVconst [c] (SUBV x y)))
  6037  	// cond: s.Uses == 1 && is12Bit(-c)
  6038  	// result: (ADDVconst [-c] (SUBV <t> y x))
  6039  	for {
  6040  		t := v.Type
  6041  		s := v_0
  6042  		if s.Op != OpLOONG64ADDVconst {
  6043  			break
  6044  		}
  6045  		c := auxIntToInt64(s.AuxInt)
  6046  		s_0 := s.Args[0]
  6047  		if s_0.Op != OpLOONG64SUBV {
  6048  			break
  6049  		}
  6050  		y := s_0.Args[1]
  6051  		x := s_0.Args[0]
  6052  		if !(s.Uses == 1 && is12Bit(-c)) {
  6053  			break
  6054  		}
  6055  		v.reset(OpLOONG64ADDVconst)
  6056  		v.AuxInt = int64ToAuxInt(-c)
  6057  		v0 := b.NewValue0(v.Pos, OpLOONG64SUBV, t)
  6058  		v0.AddArg2(y, x)
  6059  		v.AddArg(v0)
  6060  		return true
  6061  	}
  6062  	// match: (NEGV (NEGV x))
  6063  	// result: x
  6064  	for {
  6065  		if v_0.Op != OpLOONG64NEGV {
  6066  			break
  6067  		}
  6068  		x := v_0.Args[0]
  6069  		v.copyOf(x)
  6070  		return true
  6071  	}
  6072  	// match: (NEGV <t> s:(ADDVconst [c] (NEGV x)))
  6073  	// cond: s.Uses == 1 && is12Bit(-c)
  6074  	// result: (ADDVconst [-c] x)
  6075  	for {
  6076  		s := v_0
  6077  		if s.Op != OpLOONG64ADDVconst {
  6078  			break
  6079  		}
  6080  		c := auxIntToInt64(s.AuxInt)
  6081  		s_0 := s.Args[0]
  6082  		if s_0.Op != OpLOONG64NEGV {
  6083  			break
  6084  		}
  6085  		x := s_0.Args[0]
  6086  		if !(s.Uses == 1 && is12Bit(-c)) {
  6087  			break
  6088  		}
  6089  		v.reset(OpLOONG64ADDVconst)
  6090  		v.AuxInt = int64ToAuxInt(-c)
  6091  		v.AddArg(x)
  6092  		return true
  6093  	}
  6094  	// match: (NEGV (MOVVconst [c]))
  6095  	// result: (MOVVconst [-c])
  6096  	for {
  6097  		if v_0.Op != OpLOONG64MOVVconst {
  6098  			break
  6099  		}
  6100  		c := auxIntToInt64(v_0.AuxInt)
  6101  		v.reset(OpLOONG64MOVVconst)
  6102  		v.AuxInt = int64ToAuxInt(-c)
  6103  		return true
  6104  	}
  6105  	return false
  6106  }
  6107  func rewriteValueLOONG64_OpLOONG64NOR(v *Value) bool {
  6108  	v_1 := v.Args[1]
  6109  	v_0 := v.Args[0]
  6110  	// match: (NOR x (MOVVconst [c]))
  6111  	// cond: is32Bit(c)
  6112  	// result: (NORconst [c] x)
  6113  	for {
  6114  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6115  			x := v_0
  6116  			if v_1.Op != OpLOONG64MOVVconst {
  6117  				continue
  6118  			}
  6119  			c := auxIntToInt64(v_1.AuxInt)
  6120  			if !(is32Bit(c)) {
  6121  				continue
  6122  			}
  6123  			v.reset(OpLOONG64NORconst)
  6124  			v.AuxInt = int64ToAuxInt(c)
  6125  			v.AddArg(x)
  6126  			return true
  6127  		}
  6128  		break
  6129  	}
  6130  	return false
  6131  }
  6132  func rewriteValueLOONG64_OpLOONG64NORconst(v *Value) bool {
  6133  	v_0 := v.Args[0]
  6134  	// match: (NORconst [c] (MOVVconst [d]))
  6135  	// result: (MOVVconst [^(c|d)])
  6136  	for {
  6137  		c := auxIntToInt64(v.AuxInt)
  6138  		if v_0.Op != OpLOONG64MOVVconst {
  6139  			break
  6140  		}
  6141  		d := auxIntToInt64(v_0.AuxInt)
  6142  		v.reset(OpLOONG64MOVVconst)
  6143  		v.AuxInt = int64ToAuxInt(^(c | d))
  6144  		return true
  6145  	}
  6146  	return false
  6147  }
  6148  func rewriteValueLOONG64_OpLOONG64OR(v *Value) bool {
  6149  	v_1 := v.Args[1]
  6150  	v_0 := v.Args[0]
  6151  	b := v.Block
  6152  	typ := &b.Func.Config.Types
  6153  	// match: (OR <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  6154  	// result: (REVB2H x)
  6155  	for {
  6156  		if v.Type != typ.UInt16 {
  6157  			break
  6158  		}
  6159  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6160  			if v_0.Op != OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || auxIntToInt64(v_0.AuxInt) != 8 {
  6161  				continue
  6162  			}
  6163  			x := v_0.Args[0]
  6164  			if v_1.Op != OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || auxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  6165  				continue
  6166  			}
  6167  			v.reset(OpLOONG64REVB2H)
  6168  			v.AddArg(x)
  6169  			return true
  6170  		}
  6171  		break
  6172  	}
  6173  	// match: (OR (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  6174  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  6175  	// result: (REVB2H x)
  6176  	for {
  6177  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6178  			if v_0.Op != OpLOONG64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  6179  				continue
  6180  			}
  6181  			v_0_0 := v_0.Args[0]
  6182  			if v_0_0.Op != OpLOONG64ANDconst {
  6183  				continue
  6184  			}
  6185  			c1 := auxIntToInt64(v_0_0.AuxInt)
  6186  			x := v_0_0.Args[0]
  6187  			if v_1.Op != OpLOONG64SLLconst || auxIntToInt64(v_1.AuxInt) != 8 {
  6188  				continue
  6189  			}
  6190  			v_1_0 := v_1.Args[0]
  6191  			if v_1_0.Op != OpLOONG64ANDconst {
  6192  				continue
  6193  			}
  6194  			c2 := auxIntToInt64(v_1_0.AuxInt)
  6195  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  6196  				continue
  6197  			}
  6198  			v.reset(OpLOONG64REVB2H)
  6199  			v.AddArg(x)
  6200  			return true
  6201  		}
  6202  		break
  6203  	}
  6204  	// match: (OR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  6205  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  6206  	// result: (REVB4H x)
  6207  	for {
  6208  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6209  			if v_0.Op != OpLOONG64SRLVconst || auxIntToInt64(v_0.AuxInt) != 8 {
  6210  				continue
  6211  			}
  6212  			v_0_0 := v_0.Args[0]
  6213  			if v_0_0.Op != OpLOONG64AND {
  6214  				continue
  6215  			}
  6216  			_ = v_0_0.Args[1]
  6217  			v_0_0_0 := v_0_0.Args[0]
  6218  			v_0_0_1 := v_0_0.Args[1]
  6219  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  6220  				if v_0_0_0.Op != OpLOONG64MOVVconst {
  6221  					continue
  6222  				}
  6223  				c1 := auxIntToInt64(v_0_0_0.AuxInt)
  6224  				x := v_0_0_1
  6225  				if v_1.Op != OpLOONG64SLLVconst || auxIntToInt64(v_1.AuxInt) != 8 {
  6226  					continue
  6227  				}
  6228  				v_1_0 := v_1.Args[0]
  6229  				if v_1_0.Op != OpLOONG64AND {
  6230  					continue
  6231  				}
  6232  				_ = v_1_0.Args[1]
  6233  				v_1_0_0 := v_1_0.Args[0]
  6234  				v_1_0_1 := v_1_0.Args[1]
  6235  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  6236  					if v_1_0_0.Op != OpLOONG64MOVVconst {
  6237  						continue
  6238  					}
  6239  					c2 := auxIntToInt64(v_1_0_0.AuxInt)
  6240  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  6241  						continue
  6242  					}
  6243  					v.reset(OpLOONG64REVB4H)
  6244  					v.AddArg(x)
  6245  					return true
  6246  				}
  6247  			}
  6248  		}
  6249  		break
  6250  	}
  6251  	// match: (OR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  6252  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  6253  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  6254  	for {
  6255  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6256  			if v_0.Op != OpLOONG64SRLVconst || auxIntToInt64(v_0.AuxInt) != 8 {
  6257  				continue
  6258  			}
  6259  			v_0_0 := v_0.Args[0]
  6260  			if v_0_0.Op != OpLOONG64AND {
  6261  				continue
  6262  			}
  6263  			_ = v_0_0.Args[1]
  6264  			v_0_0_0 := v_0_0.Args[0]
  6265  			v_0_0_1 := v_0_0.Args[1]
  6266  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  6267  				if v_0_0_0.Op != OpLOONG64MOVVconst {
  6268  					continue
  6269  				}
  6270  				c1 := auxIntToInt64(v_0_0_0.AuxInt)
  6271  				x := v_0_0_1
  6272  				if v_1.Op != OpLOONG64SLLVconst || auxIntToInt64(v_1.AuxInt) != 8 {
  6273  					continue
  6274  				}
  6275  				v_1_0 := v_1.Args[0]
  6276  				if v_1_0.Op != OpLOONG64ANDconst {
  6277  					continue
  6278  				}
  6279  				c2 := auxIntToInt64(v_1_0.AuxInt)
  6280  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  6281  					continue
  6282  				}
  6283  				v.reset(OpLOONG64REVB4H)
  6284  				v0 := b.NewValue0(v.Pos, OpLOONG64ANDconst, x.Type)
  6285  				v0.AuxInt = int64ToAuxInt(0xffffffff)
  6286  				v0.AddArg(x)
  6287  				v.AddArg(v0)
  6288  				return true
  6289  			}
  6290  		}
  6291  		break
  6292  	}
  6293  	// match: (OR x (MOVVconst [c]))
  6294  	// cond: is32Bit(c)
  6295  	// result: (ORconst [c] x)
  6296  	for {
  6297  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6298  			x := v_0
  6299  			if v_1.Op != OpLOONG64MOVVconst {
  6300  				continue
  6301  			}
  6302  			c := auxIntToInt64(v_1.AuxInt)
  6303  			if !(is32Bit(c)) {
  6304  				continue
  6305  			}
  6306  			v.reset(OpLOONG64ORconst)
  6307  			v.AuxInt = int64ToAuxInt(c)
  6308  			v.AddArg(x)
  6309  			return true
  6310  		}
  6311  		break
  6312  	}
  6313  	// match: (OR x x)
  6314  	// result: x
  6315  	for {
  6316  		x := v_0
  6317  		if x != v_1 {
  6318  			break
  6319  		}
  6320  		v.copyOf(x)
  6321  		return true
  6322  	}
  6323  	// match: (OR x (NORconst [0] y))
  6324  	// result: (ORN x y)
  6325  	for {
  6326  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6327  			x := v_0
  6328  			if v_1.Op != OpLOONG64NORconst || auxIntToInt64(v_1.AuxInt) != 0 {
  6329  				continue
  6330  			}
  6331  			y := v_1.Args[0]
  6332  			v.reset(OpLOONG64ORN)
  6333  			v.AddArg2(x, y)
  6334  			return true
  6335  		}
  6336  		break
  6337  	}
  6338  	return false
  6339  }
  6340  func rewriteValueLOONG64_OpLOONG64ORN(v *Value) bool {
  6341  	v_1 := v.Args[1]
  6342  	v_0 := v.Args[0]
  6343  	// match: (ORN x (MOVVconst [-1]))
  6344  	// result: x
  6345  	for {
  6346  		x := v_0
  6347  		if v_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_1.AuxInt) != -1 {
  6348  			break
  6349  		}
  6350  		v.copyOf(x)
  6351  		return true
  6352  	}
  6353  	return false
  6354  }
  6355  func rewriteValueLOONG64_OpLOONG64ORconst(v *Value) bool {
  6356  	v_0 := v.Args[0]
  6357  	// match: (ORconst [0] x)
  6358  	// result: x
  6359  	for {
  6360  		if auxIntToInt64(v.AuxInt) != 0 {
  6361  			break
  6362  		}
  6363  		x := v_0
  6364  		v.copyOf(x)
  6365  		return true
  6366  	}
  6367  	// match: (ORconst [-1] _)
  6368  	// result: (MOVVconst [-1])
  6369  	for {
  6370  		if auxIntToInt64(v.AuxInt) != -1 {
  6371  			break
  6372  		}
  6373  		v.reset(OpLOONG64MOVVconst)
  6374  		v.AuxInt = int64ToAuxInt(-1)
  6375  		return true
  6376  	}
  6377  	// match: (ORconst [c] (MOVVconst [d]))
  6378  	// result: (MOVVconst [c|d])
  6379  	for {
  6380  		c := auxIntToInt64(v.AuxInt)
  6381  		if v_0.Op != OpLOONG64MOVVconst {
  6382  			break
  6383  		}
  6384  		d := auxIntToInt64(v_0.AuxInt)
  6385  		v.reset(OpLOONG64MOVVconst)
  6386  		v.AuxInt = int64ToAuxInt(c | d)
  6387  		return true
  6388  	}
  6389  	// match: (ORconst [c] (ORconst [d] x))
  6390  	// cond: is32Bit(c|d)
  6391  	// result: (ORconst [c|d] x)
  6392  	for {
  6393  		c := auxIntToInt64(v.AuxInt)
  6394  		if v_0.Op != OpLOONG64ORconst {
  6395  			break
  6396  		}
  6397  		d := auxIntToInt64(v_0.AuxInt)
  6398  		x := v_0.Args[0]
  6399  		if !(is32Bit(c | d)) {
  6400  			break
  6401  		}
  6402  		v.reset(OpLOONG64ORconst)
  6403  		v.AuxInt = int64ToAuxInt(c | d)
  6404  		v.AddArg(x)
  6405  		return true
  6406  	}
  6407  	return false
  6408  }
  6409  func rewriteValueLOONG64_OpLOONG64REMV(v *Value) bool {
  6410  	v_1 := v.Args[1]
  6411  	v_0 := v.Args[0]
  6412  	// match: (REMV (MOVVconst [c]) (MOVVconst [d]))
  6413  	// cond: d != 0
  6414  	// result: (MOVVconst [c%d])
  6415  	for {
  6416  		if v_0.Op != OpLOONG64MOVVconst {
  6417  			break
  6418  		}
  6419  		c := auxIntToInt64(v_0.AuxInt)
  6420  		if v_1.Op != OpLOONG64MOVVconst {
  6421  			break
  6422  		}
  6423  		d := auxIntToInt64(v_1.AuxInt)
  6424  		if !(d != 0) {
  6425  			break
  6426  		}
  6427  		v.reset(OpLOONG64MOVVconst)
  6428  		v.AuxInt = int64ToAuxInt(c % d)
  6429  		return true
  6430  	}
  6431  	return false
  6432  }
  6433  func rewriteValueLOONG64_OpLOONG64REMVU(v *Value) bool {
  6434  	v_1 := v.Args[1]
  6435  	v_0 := v.Args[0]
  6436  	// match: (REMVU _ (MOVVconst [1]))
  6437  	// result: (MOVVconst [0])
  6438  	for {
  6439  		if v_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_1.AuxInt) != 1 {
  6440  			break
  6441  		}
  6442  		v.reset(OpLOONG64MOVVconst)
  6443  		v.AuxInt = int64ToAuxInt(0)
  6444  		return true
  6445  	}
  6446  	// match: (REMVU x (MOVVconst [c]))
  6447  	// cond: isPowerOfTwo(c)
  6448  	// result: (ANDconst [c-1] x)
  6449  	for {
  6450  		x := v_0
  6451  		if v_1.Op != OpLOONG64MOVVconst {
  6452  			break
  6453  		}
  6454  		c := auxIntToInt64(v_1.AuxInt)
  6455  		if !(isPowerOfTwo(c)) {
  6456  			break
  6457  		}
  6458  		v.reset(OpLOONG64ANDconst)
  6459  		v.AuxInt = int64ToAuxInt(c - 1)
  6460  		v.AddArg(x)
  6461  		return true
  6462  	}
  6463  	// match: (REMVU (MOVVconst [c]) (MOVVconst [d]))
  6464  	// cond: d != 0
  6465  	// result: (MOVVconst [int64(uint64(c)%uint64(d))])
  6466  	for {
  6467  		if v_0.Op != OpLOONG64MOVVconst {
  6468  			break
  6469  		}
  6470  		c := auxIntToInt64(v_0.AuxInt)
  6471  		if v_1.Op != OpLOONG64MOVVconst {
  6472  			break
  6473  		}
  6474  		d := auxIntToInt64(v_1.AuxInt)
  6475  		if !(d != 0) {
  6476  			break
  6477  		}
  6478  		v.reset(OpLOONG64MOVVconst)
  6479  		v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
  6480  		return true
  6481  	}
  6482  	return false
  6483  }
  6484  func rewriteValueLOONG64_OpLOONG64ROTR(v *Value) bool {
  6485  	v_1 := v.Args[1]
  6486  	v_0 := v.Args[0]
  6487  	// match: (ROTR x (MOVVconst [c]))
  6488  	// result: (ROTRconst x [c&31])
  6489  	for {
  6490  		x := v_0
  6491  		if v_1.Op != OpLOONG64MOVVconst {
  6492  			break
  6493  		}
  6494  		c := auxIntToInt64(v_1.AuxInt)
  6495  		v.reset(OpLOONG64ROTRconst)
  6496  		v.AuxInt = int64ToAuxInt(c & 31)
  6497  		v.AddArg(x)
  6498  		return true
  6499  	}
  6500  	return false
  6501  }
  6502  func rewriteValueLOONG64_OpLOONG64ROTRV(v *Value) bool {
  6503  	v_1 := v.Args[1]
  6504  	v_0 := v.Args[0]
  6505  	// match: (ROTRV x (MOVVconst [c]))
  6506  	// result: (ROTRVconst x [c&63])
  6507  	for {
  6508  		x := v_0
  6509  		if v_1.Op != OpLOONG64MOVVconst {
  6510  			break
  6511  		}
  6512  		c := auxIntToInt64(v_1.AuxInt)
  6513  		v.reset(OpLOONG64ROTRVconst)
  6514  		v.AuxInt = int64ToAuxInt(c & 63)
  6515  		v.AddArg(x)
  6516  		return true
  6517  	}
  6518  	return false
  6519  }
  6520  func rewriteValueLOONG64_OpLOONG64SGT(v *Value) bool {
  6521  	v_1 := v.Args[1]
  6522  	v_0 := v.Args[0]
  6523  	b := v.Block
  6524  	typ := &b.Func.Config.Types
  6525  	// match: (SGT (MOVVconst [c]) (NEGV (SUBVconst [d] x)))
  6526  	// cond: is32Bit(d-c)
  6527  	// result: (SGT x (MOVVconst [d-c]))
  6528  	for {
  6529  		if v_0.Op != OpLOONG64MOVVconst {
  6530  			break
  6531  		}
  6532  		c := auxIntToInt64(v_0.AuxInt)
  6533  		if v_1.Op != OpLOONG64NEGV {
  6534  			break
  6535  		}
  6536  		v_1_0 := v_1.Args[0]
  6537  		if v_1_0.Op != OpLOONG64SUBVconst {
  6538  			break
  6539  		}
  6540  		d := auxIntToInt64(v_1_0.AuxInt)
  6541  		x := v_1_0.Args[0]
  6542  		if !(is32Bit(d - c)) {
  6543  			break
  6544  		}
  6545  		v.reset(OpLOONG64SGT)
  6546  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  6547  		v0.AuxInt = int64ToAuxInt(d - c)
  6548  		v.AddArg2(x, v0)
  6549  		return true
  6550  	}
  6551  	// match: (SGT (MOVVconst [c]) x)
  6552  	// cond: is32Bit(c)
  6553  	// result: (SGTconst [c] x)
  6554  	for {
  6555  		if v_0.Op != OpLOONG64MOVVconst {
  6556  			break
  6557  		}
  6558  		c := auxIntToInt64(v_0.AuxInt)
  6559  		x := v_1
  6560  		if !(is32Bit(c)) {
  6561  			break
  6562  		}
  6563  		v.reset(OpLOONG64SGTconst)
  6564  		v.AuxInt = int64ToAuxInt(c)
  6565  		v.AddArg(x)
  6566  		return true
  6567  	}
  6568  	// match: (SGT x x)
  6569  	// result: (MOVVconst [0])
  6570  	for {
  6571  		x := v_0
  6572  		if x != v_1 {
  6573  			break
  6574  		}
  6575  		v.reset(OpLOONG64MOVVconst)
  6576  		v.AuxInt = int64ToAuxInt(0)
  6577  		return true
  6578  	}
  6579  	return false
  6580  }
  6581  func rewriteValueLOONG64_OpLOONG64SGTU(v *Value) bool {
  6582  	v_1 := v.Args[1]
  6583  	v_0 := v.Args[0]
  6584  	// match: (SGTU (MOVVconst [c]) x)
  6585  	// cond: is32Bit(c)
  6586  	// result: (SGTUconst [c] x)
  6587  	for {
  6588  		if v_0.Op != OpLOONG64MOVVconst {
  6589  			break
  6590  		}
  6591  		c := auxIntToInt64(v_0.AuxInt)
  6592  		x := v_1
  6593  		if !(is32Bit(c)) {
  6594  			break
  6595  		}
  6596  		v.reset(OpLOONG64SGTUconst)
  6597  		v.AuxInt = int64ToAuxInt(c)
  6598  		v.AddArg(x)
  6599  		return true
  6600  	}
  6601  	// match: (SGTU x x)
  6602  	// result: (MOVVconst [0])
  6603  	for {
  6604  		x := v_0
  6605  		if x != v_1 {
  6606  			break
  6607  		}
  6608  		v.reset(OpLOONG64MOVVconst)
  6609  		v.AuxInt = int64ToAuxInt(0)
  6610  		return true
  6611  	}
  6612  	return false
  6613  }
  6614  func rewriteValueLOONG64_OpLOONG64SGTUconst(v *Value) bool {
  6615  	v_0 := v.Args[0]
  6616  	// match: (SGTUconst [c] (MOVVconst [d]))
  6617  	// cond: uint64(c)>uint64(d)
  6618  	// result: (MOVVconst [1])
  6619  	for {
  6620  		c := auxIntToInt64(v.AuxInt)
  6621  		if v_0.Op != OpLOONG64MOVVconst {
  6622  			break
  6623  		}
  6624  		d := auxIntToInt64(v_0.AuxInt)
  6625  		if !(uint64(c) > uint64(d)) {
  6626  			break
  6627  		}
  6628  		v.reset(OpLOONG64MOVVconst)
  6629  		v.AuxInt = int64ToAuxInt(1)
  6630  		return true
  6631  	}
  6632  	// match: (SGTUconst [c] (MOVVconst [d]))
  6633  	// cond: uint64(c)<=uint64(d)
  6634  	// result: (MOVVconst [0])
  6635  	for {
  6636  		c := auxIntToInt64(v.AuxInt)
  6637  		if v_0.Op != OpLOONG64MOVVconst {
  6638  			break
  6639  		}
  6640  		d := auxIntToInt64(v_0.AuxInt)
  6641  		if !(uint64(c) <= uint64(d)) {
  6642  			break
  6643  		}
  6644  		v.reset(OpLOONG64MOVVconst)
  6645  		v.AuxInt = int64ToAuxInt(0)
  6646  		return true
  6647  	}
  6648  	// match: (SGTUconst [c] (MOVBUreg _))
  6649  	// cond: 0xff < uint64(c)
  6650  	// result: (MOVVconst [1])
  6651  	for {
  6652  		c := auxIntToInt64(v.AuxInt)
  6653  		if v_0.Op != OpLOONG64MOVBUreg || !(0xff < uint64(c)) {
  6654  			break
  6655  		}
  6656  		v.reset(OpLOONG64MOVVconst)
  6657  		v.AuxInt = int64ToAuxInt(1)
  6658  		return true
  6659  	}
  6660  	// match: (SGTUconst [c] (MOVHUreg _))
  6661  	// cond: 0xffff < uint64(c)
  6662  	// result: (MOVVconst [1])
  6663  	for {
  6664  		c := auxIntToInt64(v.AuxInt)
  6665  		if v_0.Op != OpLOONG64MOVHUreg || !(0xffff < uint64(c)) {
  6666  			break
  6667  		}
  6668  		v.reset(OpLOONG64MOVVconst)
  6669  		v.AuxInt = int64ToAuxInt(1)
  6670  		return true
  6671  	}
  6672  	// match: (SGTUconst [c] (ANDconst [m] _))
  6673  	// cond: uint64(m) < uint64(c)
  6674  	// result: (MOVVconst [1])
  6675  	for {
  6676  		c := auxIntToInt64(v.AuxInt)
  6677  		if v_0.Op != OpLOONG64ANDconst {
  6678  			break
  6679  		}
  6680  		m := auxIntToInt64(v_0.AuxInt)
  6681  		if !(uint64(m) < uint64(c)) {
  6682  			break
  6683  		}
  6684  		v.reset(OpLOONG64MOVVconst)
  6685  		v.AuxInt = int64ToAuxInt(1)
  6686  		return true
  6687  	}
  6688  	// match: (SGTUconst [c] (SRLVconst _ [d]))
  6689  	// cond: 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)
  6690  	// result: (MOVVconst [1])
  6691  	for {
  6692  		c := auxIntToInt64(v.AuxInt)
  6693  		if v_0.Op != OpLOONG64SRLVconst {
  6694  			break
  6695  		}
  6696  		d := auxIntToInt64(v_0.AuxInt)
  6697  		if !(0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
  6698  			break
  6699  		}
  6700  		v.reset(OpLOONG64MOVVconst)
  6701  		v.AuxInt = int64ToAuxInt(1)
  6702  		return true
  6703  	}
  6704  	return false
  6705  }
  6706  func rewriteValueLOONG64_OpLOONG64SGTconst(v *Value) bool {
  6707  	v_0 := v.Args[0]
  6708  	// match: (SGTconst [c] (MOVVconst [d]))
  6709  	// cond: c>d
  6710  	// result: (MOVVconst [1])
  6711  	for {
  6712  		c := auxIntToInt64(v.AuxInt)
  6713  		if v_0.Op != OpLOONG64MOVVconst {
  6714  			break
  6715  		}
  6716  		d := auxIntToInt64(v_0.AuxInt)
  6717  		if !(c > d) {
  6718  			break
  6719  		}
  6720  		v.reset(OpLOONG64MOVVconst)
  6721  		v.AuxInt = int64ToAuxInt(1)
  6722  		return true
  6723  	}
  6724  	// match: (SGTconst [c] (MOVVconst [d]))
  6725  	// cond: c<=d
  6726  	// result: (MOVVconst [0])
  6727  	for {
  6728  		c := auxIntToInt64(v.AuxInt)
  6729  		if v_0.Op != OpLOONG64MOVVconst {
  6730  			break
  6731  		}
  6732  		d := auxIntToInt64(v_0.AuxInt)
  6733  		if !(c <= d) {
  6734  			break
  6735  		}
  6736  		v.reset(OpLOONG64MOVVconst)
  6737  		v.AuxInt = int64ToAuxInt(0)
  6738  		return true
  6739  	}
  6740  	// match: (SGTconst [c] (MOVBreg _))
  6741  	// cond: 0x7f < c
  6742  	// result: (MOVVconst [1])
  6743  	for {
  6744  		c := auxIntToInt64(v.AuxInt)
  6745  		if v_0.Op != OpLOONG64MOVBreg || !(0x7f < c) {
  6746  			break
  6747  		}
  6748  		v.reset(OpLOONG64MOVVconst)
  6749  		v.AuxInt = int64ToAuxInt(1)
  6750  		return true
  6751  	}
  6752  	// match: (SGTconst [c] (MOVBreg _))
  6753  	// cond: c <= -0x80
  6754  	// result: (MOVVconst [0])
  6755  	for {
  6756  		c := auxIntToInt64(v.AuxInt)
  6757  		if v_0.Op != OpLOONG64MOVBreg || !(c <= -0x80) {
  6758  			break
  6759  		}
  6760  		v.reset(OpLOONG64MOVVconst)
  6761  		v.AuxInt = int64ToAuxInt(0)
  6762  		return true
  6763  	}
  6764  	// match: (SGTconst [c] (MOVBUreg _))
  6765  	// cond: 0xff < c
  6766  	// result: (MOVVconst [1])
  6767  	for {
  6768  		c := auxIntToInt64(v.AuxInt)
  6769  		if v_0.Op != OpLOONG64MOVBUreg || !(0xff < c) {
  6770  			break
  6771  		}
  6772  		v.reset(OpLOONG64MOVVconst)
  6773  		v.AuxInt = int64ToAuxInt(1)
  6774  		return true
  6775  	}
  6776  	// match: (SGTconst [c] (MOVBUreg _))
  6777  	// cond: c < 0
  6778  	// result: (MOVVconst [0])
  6779  	for {
  6780  		c := auxIntToInt64(v.AuxInt)
  6781  		if v_0.Op != OpLOONG64MOVBUreg || !(c < 0) {
  6782  			break
  6783  		}
  6784  		v.reset(OpLOONG64MOVVconst)
  6785  		v.AuxInt = int64ToAuxInt(0)
  6786  		return true
  6787  	}
  6788  	// match: (SGTconst [c] (MOVHreg _))
  6789  	// cond: 0x7fff < c
  6790  	// result: (MOVVconst [1])
  6791  	for {
  6792  		c := auxIntToInt64(v.AuxInt)
  6793  		if v_0.Op != OpLOONG64MOVHreg || !(0x7fff < c) {
  6794  			break
  6795  		}
  6796  		v.reset(OpLOONG64MOVVconst)
  6797  		v.AuxInt = int64ToAuxInt(1)
  6798  		return true
  6799  	}
  6800  	// match: (SGTconst [c] (MOVHreg _))
  6801  	// cond: c <= -0x8000
  6802  	// result: (MOVVconst [0])
  6803  	for {
  6804  		c := auxIntToInt64(v.AuxInt)
  6805  		if v_0.Op != OpLOONG64MOVHreg || !(c <= -0x8000) {
  6806  			break
  6807  		}
  6808  		v.reset(OpLOONG64MOVVconst)
  6809  		v.AuxInt = int64ToAuxInt(0)
  6810  		return true
  6811  	}
  6812  	// match: (SGTconst [c] (MOVHUreg _))
  6813  	// cond: 0xffff < c
  6814  	// result: (MOVVconst [1])
  6815  	for {
  6816  		c := auxIntToInt64(v.AuxInt)
  6817  		if v_0.Op != OpLOONG64MOVHUreg || !(0xffff < c) {
  6818  			break
  6819  		}
  6820  		v.reset(OpLOONG64MOVVconst)
  6821  		v.AuxInt = int64ToAuxInt(1)
  6822  		return true
  6823  	}
  6824  	// match: (SGTconst [c] (MOVHUreg _))
  6825  	// cond: c < 0
  6826  	// result: (MOVVconst [0])
  6827  	for {
  6828  		c := auxIntToInt64(v.AuxInt)
  6829  		if v_0.Op != OpLOONG64MOVHUreg || !(c < 0) {
  6830  			break
  6831  		}
  6832  		v.reset(OpLOONG64MOVVconst)
  6833  		v.AuxInt = int64ToAuxInt(0)
  6834  		return true
  6835  	}
  6836  	// match: (SGTconst [c] (MOVWUreg _))
  6837  	// cond: c < 0
  6838  	// result: (MOVVconst [0])
  6839  	for {
  6840  		c := auxIntToInt64(v.AuxInt)
  6841  		if v_0.Op != OpLOONG64MOVWUreg || !(c < 0) {
  6842  			break
  6843  		}
  6844  		v.reset(OpLOONG64MOVVconst)
  6845  		v.AuxInt = int64ToAuxInt(0)
  6846  		return true
  6847  	}
  6848  	// match: (SGTconst [c] (ANDconst [m] _))
  6849  	// cond: 0 <= m && m < c
  6850  	// result: (MOVVconst [1])
  6851  	for {
  6852  		c := auxIntToInt64(v.AuxInt)
  6853  		if v_0.Op != OpLOONG64ANDconst {
  6854  			break
  6855  		}
  6856  		m := auxIntToInt64(v_0.AuxInt)
  6857  		if !(0 <= m && m < c) {
  6858  			break
  6859  		}
  6860  		v.reset(OpLOONG64MOVVconst)
  6861  		v.AuxInt = int64ToAuxInt(1)
  6862  		return true
  6863  	}
  6864  	// match: (SGTconst [c] (SRLVconst _ [d]))
  6865  	// cond: 0 <= c && 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)
  6866  	// result: (MOVVconst [1])
  6867  	for {
  6868  		c := auxIntToInt64(v.AuxInt)
  6869  		if v_0.Op != OpLOONG64SRLVconst {
  6870  			break
  6871  		}
  6872  		d := auxIntToInt64(v_0.AuxInt)
  6873  		if !(0 <= c && 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
  6874  			break
  6875  		}
  6876  		v.reset(OpLOONG64MOVVconst)
  6877  		v.AuxInt = int64ToAuxInt(1)
  6878  		return true
  6879  	}
  6880  	return false
  6881  }
  6882  func rewriteValueLOONG64_OpLOONG64SLL(v *Value) bool {
  6883  	v_1 := v.Args[1]
  6884  	v_0 := v.Args[0]
  6885  	// match: (SLL _ (MOVVconst [c]))
  6886  	// cond: uint64(c)>=32
  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) >= 32) {
  6894  			break
  6895  		}
  6896  		v.reset(OpLOONG64MOVVconst)
  6897  		v.AuxInt = int64ToAuxInt(0)
  6898  		return true
  6899  	}
  6900  	// match: (SLL x (MOVVconst [c]))
  6901  	// cond: uint64(c) >=0 && uint64(c) <=31
  6902  	// result: (SLLconst x [c])
  6903  	for {
  6904  		x := v_0
  6905  		if v_1.Op != OpLOONG64MOVVconst {
  6906  			break
  6907  		}
  6908  		c := auxIntToInt64(v_1.AuxInt)
  6909  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  6910  			break
  6911  		}
  6912  		v.reset(OpLOONG64SLLconst)
  6913  		v.AuxInt = int64ToAuxInt(c)
  6914  		v.AddArg(x)
  6915  		return true
  6916  	}
  6917  	// match: (SLL x (ANDconst [31] y))
  6918  	// result: (SLL x y)
  6919  	for {
  6920  		x := v_0
  6921  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 31 {
  6922  			break
  6923  		}
  6924  		y := v_1.Args[0]
  6925  		v.reset(OpLOONG64SLL)
  6926  		v.AddArg2(x, y)
  6927  		return true
  6928  	}
  6929  	return false
  6930  }
  6931  func rewriteValueLOONG64_OpLOONG64SLLV(v *Value) bool {
  6932  	v_1 := v.Args[1]
  6933  	v_0 := v.Args[0]
  6934  	// match: (SLLV _ (MOVVconst [c]))
  6935  	// cond: uint64(c)>=64
  6936  	// result: (MOVVconst [0])
  6937  	for {
  6938  		if v_1.Op != OpLOONG64MOVVconst {
  6939  			break
  6940  		}
  6941  		c := auxIntToInt64(v_1.AuxInt)
  6942  		if !(uint64(c) >= 64) {
  6943  			break
  6944  		}
  6945  		v.reset(OpLOONG64MOVVconst)
  6946  		v.AuxInt = int64ToAuxInt(0)
  6947  		return true
  6948  	}
  6949  	// match: (SLLV x (MOVVconst [c]))
  6950  	// result: (SLLVconst x [c])
  6951  	for {
  6952  		x := v_0
  6953  		if v_1.Op != OpLOONG64MOVVconst {
  6954  			break
  6955  		}
  6956  		c := auxIntToInt64(v_1.AuxInt)
  6957  		v.reset(OpLOONG64SLLVconst)
  6958  		v.AuxInt = int64ToAuxInt(c)
  6959  		v.AddArg(x)
  6960  		return true
  6961  	}
  6962  	// match: (SLLV x (ANDconst [63] y))
  6963  	// result: (SLLV x y)
  6964  	for {
  6965  		x := v_0
  6966  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
  6967  			break
  6968  		}
  6969  		y := v_1.Args[0]
  6970  		v.reset(OpLOONG64SLLV)
  6971  		v.AddArg2(x, y)
  6972  		return true
  6973  	}
  6974  	return false
  6975  }
  6976  func rewriteValueLOONG64_OpLOONG64SLLVconst(v *Value) bool {
  6977  	v_0 := v.Args[0]
  6978  	// match: (SLLVconst <t> [c] (ADDV x x))
  6979  	// cond: c < t.Size() * 8 - 1
  6980  	// result: (SLLVconst [c+1] x)
  6981  	for {
  6982  		t := v.Type
  6983  		c := auxIntToInt64(v.AuxInt)
  6984  		if v_0.Op != OpLOONG64ADDV {
  6985  			break
  6986  		}
  6987  		x := v_0.Args[1]
  6988  		if x != v_0.Args[0] || !(c < t.Size()*8-1) {
  6989  			break
  6990  		}
  6991  		v.reset(OpLOONG64SLLVconst)
  6992  		v.AuxInt = int64ToAuxInt(c + 1)
  6993  		v.AddArg(x)
  6994  		return true
  6995  	}
  6996  	// match: (SLLVconst <t> [c] (ADDV x x))
  6997  	// cond: c >= t.Size() * 8 - 1
  6998  	// result: (MOVVconst [0])
  6999  	for {
  7000  		t := v.Type
  7001  		c := auxIntToInt64(v.AuxInt)
  7002  		if v_0.Op != OpLOONG64ADDV {
  7003  			break
  7004  		}
  7005  		x := v_0.Args[1]
  7006  		if x != v_0.Args[0] || !(c >= t.Size()*8-1) {
  7007  			break
  7008  		}
  7009  		v.reset(OpLOONG64MOVVconst)
  7010  		v.AuxInt = int64ToAuxInt(0)
  7011  		return true
  7012  	}
  7013  	// match: (SLLVconst [c] (MOVVconst [d]))
  7014  	// result: (MOVVconst [d<<uint64(c)])
  7015  	for {
  7016  		c := auxIntToInt64(v.AuxInt)
  7017  		if v_0.Op != OpLOONG64MOVVconst {
  7018  			break
  7019  		}
  7020  		d := auxIntToInt64(v_0.AuxInt)
  7021  		v.reset(OpLOONG64MOVVconst)
  7022  		v.AuxInt = int64ToAuxInt(d << uint64(c))
  7023  		return true
  7024  	}
  7025  	return false
  7026  }
  7027  func rewriteValueLOONG64_OpLOONG64SLLconst(v *Value) bool {
  7028  	v_0 := v.Args[0]
  7029  	// match: (SLLconst <t> [c] (ADDV x x))
  7030  	// cond: c < t.Size() * 8 - 1
  7031  	// result: (SLLconst [c+1] x)
  7032  	for {
  7033  		t := v.Type
  7034  		c := auxIntToInt64(v.AuxInt)
  7035  		if v_0.Op != OpLOONG64ADDV {
  7036  			break
  7037  		}
  7038  		x := v_0.Args[1]
  7039  		if x != v_0.Args[0] || !(c < t.Size()*8-1) {
  7040  			break
  7041  		}
  7042  		v.reset(OpLOONG64SLLconst)
  7043  		v.AuxInt = int64ToAuxInt(c + 1)
  7044  		v.AddArg(x)
  7045  		return true
  7046  	}
  7047  	// match: (SLLconst <t> [c] (ADDV x x))
  7048  	// cond: c >= t.Size() * 8 - 1
  7049  	// result: (MOVVconst [0])
  7050  	for {
  7051  		t := v.Type
  7052  		c := auxIntToInt64(v.AuxInt)
  7053  		if v_0.Op != OpLOONG64ADDV {
  7054  			break
  7055  		}
  7056  		x := v_0.Args[1]
  7057  		if x != v_0.Args[0] || !(c >= t.Size()*8-1) {
  7058  			break
  7059  		}
  7060  		v.reset(OpLOONG64MOVVconst)
  7061  		v.AuxInt = int64ToAuxInt(0)
  7062  		return true
  7063  	}
  7064  	return false
  7065  }
  7066  func rewriteValueLOONG64_OpLOONG64SRA(v *Value) bool {
  7067  	v_1 := v.Args[1]
  7068  	v_0 := v.Args[0]
  7069  	// match: (SRA x (MOVVconst [c]))
  7070  	// cond: uint64(c)>=32
  7071  	// result: (SRAconst x [31])
  7072  	for {
  7073  		x := v_0
  7074  		if v_1.Op != OpLOONG64MOVVconst {
  7075  			break
  7076  		}
  7077  		c := auxIntToInt64(v_1.AuxInt)
  7078  		if !(uint64(c) >= 32) {
  7079  			break
  7080  		}
  7081  		v.reset(OpLOONG64SRAconst)
  7082  		v.AuxInt = int64ToAuxInt(31)
  7083  		v.AddArg(x)
  7084  		return true
  7085  	}
  7086  	// match: (SRA x (MOVVconst [c]))
  7087  	// cond: uint64(c) >=0 && uint64(c) <=31
  7088  	// result: (SRAconst x [c])
  7089  	for {
  7090  		x := v_0
  7091  		if v_1.Op != OpLOONG64MOVVconst {
  7092  			break
  7093  		}
  7094  		c := auxIntToInt64(v_1.AuxInt)
  7095  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  7096  			break
  7097  		}
  7098  		v.reset(OpLOONG64SRAconst)
  7099  		v.AuxInt = int64ToAuxInt(c)
  7100  		v.AddArg(x)
  7101  		return true
  7102  	}
  7103  	// match: (SRA x (ANDconst [31] y))
  7104  	// result: (SRA x y)
  7105  	for {
  7106  		x := v_0
  7107  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 31 {
  7108  			break
  7109  		}
  7110  		y := v_1.Args[0]
  7111  		v.reset(OpLOONG64SRA)
  7112  		v.AddArg2(x, y)
  7113  		return true
  7114  	}
  7115  	return false
  7116  }
  7117  func rewriteValueLOONG64_OpLOONG64SRAV(v *Value) bool {
  7118  	v_1 := v.Args[1]
  7119  	v_0 := v.Args[0]
  7120  	// match: (SRAV x (MOVVconst [c]))
  7121  	// cond: uint64(c)>=64
  7122  	// result: (SRAVconst x [63])
  7123  	for {
  7124  		x := v_0
  7125  		if v_1.Op != OpLOONG64MOVVconst {
  7126  			break
  7127  		}
  7128  		c := auxIntToInt64(v_1.AuxInt)
  7129  		if !(uint64(c) >= 64) {
  7130  			break
  7131  		}
  7132  		v.reset(OpLOONG64SRAVconst)
  7133  		v.AuxInt = int64ToAuxInt(63)
  7134  		v.AddArg(x)
  7135  		return true
  7136  	}
  7137  	// match: (SRAV x (MOVVconst [c]))
  7138  	// result: (SRAVconst x [c])
  7139  	for {
  7140  		x := v_0
  7141  		if v_1.Op != OpLOONG64MOVVconst {
  7142  			break
  7143  		}
  7144  		c := auxIntToInt64(v_1.AuxInt)
  7145  		v.reset(OpLOONG64SRAVconst)
  7146  		v.AuxInt = int64ToAuxInt(c)
  7147  		v.AddArg(x)
  7148  		return true
  7149  	}
  7150  	// match: (SRAV x (ANDconst [63] y))
  7151  	// result: (SRAV x y)
  7152  	for {
  7153  		x := v_0
  7154  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
  7155  			break
  7156  		}
  7157  		y := v_1.Args[0]
  7158  		v.reset(OpLOONG64SRAV)
  7159  		v.AddArg2(x, y)
  7160  		return true
  7161  	}
  7162  	return false
  7163  }
  7164  func rewriteValueLOONG64_OpLOONG64SRAVconst(v *Value) bool {
  7165  	v_0 := v.Args[0]
  7166  	b := v.Block
  7167  	// match: (SRAVconst [rc] (MOVWreg y))
  7168  	// cond: rc >= 0 && rc <= 31
  7169  	// result: (SRAconst [int64(rc)] y)
  7170  	for {
  7171  		rc := auxIntToInt64(v.AuxInt)
  7172  		if v_0.Op != OpLOONG64MOVWreg {
  7173  			break
  7174  		}
  7175  		y := v_0.Args[0]
  7176  		if !(rc >= 0 && rc <= 31) {
  7177  			break
  7178  		}
  7179  		v.reset(OpLOONG64SRAconst)
  7180  		v.AuxInt = int64ToAuxInt(int64(rc))
  7181  		v.AddArg(y)
  7182  		return true
  7183  	}
  7184  	// match: (SRAVconst <t> [rc] (MOVBreg y))
  7185  	// cond: rc >= 8
  7186  	// result: (SRAVconst [63] (SLLVconst <t> [56] y))
  7187  	for {
  7188  		t := v.Type
  7189  		rc := auxIntToInt64(v.AuxInt)
  7190  		if v_0.Op != OpLOONG64MOVBreg {
  7191  			break
  7192  		}
  7193  		y := v_0.Args[0]
  7194  		if !(rc >= 8) {
  7195  			break
  7196  		}
  7197  		v.reset(OpLOONG64SRAVconst)
  7198  		v.AuxInt = int64ToAuxInt(63)
  7199  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, t)
  7200  		v0.AuxInt = int64ToAuxInt(56)
  7201  		v0.AddArg(y)
  7202  		v.AddArg(v0)
  7203  		return true
  7204  	}
  7205  	// match: (SRAVconst <t> [rc] (MOVHreg y))
  7206  	// cond: rc >= 16
  7207  	// result: (SRAVconst [63] (SLLVconst <t> [48] y))
  7208  	for {
  7209  		t := v.Type
  7210  		rc := auxIntToInt64(v.AuxInt)
  7211  		if v_0.Op != OpLOONG64MOVHreg {
  7212  			break
  7213  		}
  7214  		y := v_0.Args[0]
  7215  		if !(rc >= 16) {
  7216  			break
  7217  		}
  7218  		v.reset(OpLOONG64SRAVconst)
  7219  		v.AuxInt = int64ToAuxInt(63)
  7220  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, t)
  7221  		v0.AuxInt = int64ToAuxInt(48)
  7222  		v0.AddArg(y)
  7223  		v.AddArg(v0)
  7224  		return true
  7225  	}
  7226  	// match: (SRAVconst <t> [rc] (MOVWreg y))
  7227  	// cond: rc >= 32
  7228  	// result: (SRAconst [31] y)
  7229  	for {
  7230  		rc := auxIntToInt64(v.AuxInt)
  7231  		if v_0.Op != OpLOONG64MOVWreg {
  7232  			break
  7233  		}
  7234  		y := v_0.Args[0]
  7235  		if !(rc >= 32) {
  7236  			break
  7237  		}
  7238  		v.reset(OpLOONG64SRAconst)
  7239  		v.AuxInt = int64ToAuxInt(31)
  7240  		v.AddArg(y)
  7241  		return true
  7242  	}
  7243  	// match: (SRAVconst [c] (MOVVconst [d]))
  7244  	// result: (MOVVconst [d>>uint64(c)])
  7245  	for {
  7246  		c := auxIntToInt64(v.AuxInt)
  7247  		if v_0.Op != OpLOONG64MOVVconst {
  7248  			break
  7249  		}
  7250  		d := auxIntToInt64(v_0.AuxInt)
  7251  		v.reset(OpLOONG64MOVVconst)
  7252  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
  7253  		return true
  7254  	}
  7255  	return false
  7256  }
  7257  func rewriteValueLOONG64_OpLOONG64SRL(v *Value) bool {
  7258  	v_1 := v.Args[1]
  7259  	v_0 := v.Args[0]
  7260  	// match: (SRL _ (MOVVconst [c]))
  7261  	// cond: uint64(c)>=32
  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) >= 32) {
  7269  			break
  7270  		}
  7271  		v.reset(OpLOONG64MOVVconst)
  7272  		v.AuxInt = int64ToAuxInt(0)
  7273  		return true
  7274  	}
  7275  	// match: (SRL x (MOVVconst [c]))
  7276  	// cond: uint64(c) >=0 && uint64(c) <=31
  7277  	// result: (SRLconst x [c])
  7278  	for {
  7279  		x := v_0
  7280  		if v_1.Op != OpLOONG64MOVVconst {
  7281  			break
  7282  		}
  7283  		c := auxIntToInt64(v_1.AuxInt)
  7284  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  7285  			break
  7286  		}
  7287  		v.reset(OpLOONG64SRLconst)
  7288  		v.AuxInt = int64ToAuxInt(c)
  7289  		v.AddArg(x)
  7290  		return true
  7291  	}
  7292  	// match: (SRL x (ANDconst [31] y))
  7293  	// result: (SRL x y)
  7294  	for {
  7295  		x := v_0
  7296  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 31 {
  7297  			break
  7298  		}
  7299  		y := v_1.Args[0]
  7300  		v.reset(OpLOONG64SRL)
  7301  		v.AddArg2(x, y)
  7302  		return true
  7303  	}
  7304  	return false
  7305  }
  7306  func rewriteValueLOONG64_OpLOONG64SRLV(v *Value) bool {
  7307  	v_1 := v.Args[1]
  7308  	v_0 := v.Args[0]
  7309  	// match: (SRLV _ (MOVVconst [c]))
  7310  	// cond: uint64(c)>=64
  7311  	// result: (MOVVconst [0])
  7312  	for {
  7313  		if v_1.Op != OpLOONG64MOVVconst {
  7314  			break
  7315  		}
  7316  		c := auxIntToInt64(v_1.AuxInt)
  7317  		if !(uint64(c) >= 64) {
  7318  			break
  7319  		}
  7320  		v.reset(OpLOONG64MOVVconst)
  7321  		v.AuxInt = int64ToAuxInt(0)
  7322  		return true
  7323  	}
  7324  	// match: (SRLV x (MOVVconst [c]))
  7325  	// result: (SRLVconst x [c])
  7326  	for {
  7327  		x := v_0
  7328  		if v_1.Op != OpLOONG64MOVVconst {
  7329  			break
  7330  		}
  7331  		c := auxIntToInt64(v_1.AuxInt)
  7332  		v.reset(OpLOONG64SRLVconst)
  7333  		v.AuxInt = int64ToAuxInt(c)
  7334  		v.AddArg(x)
  7335  		return true
  7336  	}
  7337  	// match: (SRLV x (ANDconst [63] y))
  7338  	// result: (SRLV x y)
  7339  	for {
  7340  		x := v_0
  7341  		if v_1.Op != OpLOONG64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
  7342  			break
  7343  		}
  7344  		y := v_1.Args[0]
  7345  		v.reset(OpLOONG64SRLV)
  7346  		v.AddArg2(x, y)
  7347  		return true
  7348  	}
  7349  	return false
  7350  }
  7351  func rewriteValueLOONG64_OpLOONG64SRLVconst(v *Value) bool {
  7352  	v_0 := v.Args[0]
  7353  	// match: (SRLVconst [rc] (SLLVconst [lc] x))
  7354  	// cond: lc <= rc
  7355  	// result: (BSTRPICKV [rc-lc + ((64-lc)-1)<<6] x)
  7356  	for {
  7357  		rc := auxIntToInt64(v.AuxInt)
  7358  		if v_0.Op != OpLOONG64SLLVconst {
  7359  			break
  7360  		}
  7361  		lc := auxIntToInt64(v_0.AuxInt)
  7362  		x := v_0.Args[0]
  7363  		if !(lc <= rc) {
  7364  			break
  7365  		}
  7366  		v.reset(OpLOONG64BSTRPICKV)
  7367  		v.AuxInt = int64ToAuxInt(rc - lc + ((64-lc)-1)<<6)
  7368  		v.AddArg(x)
  7369  		return true
  7370  	}
  7371  	// match: (SRLVconst [rc] (MOVWUreg x))
  7372  	// cond: rc < 32
  7373  	// result: (BSTRPICKV [rc + 31<<6] x)
  7374  	for {
  7375  		rc := auxIntToInt64(v.AuxInt)
  7376  		if v_0.Op != OpLOONG64MOVWUreg {
  7377  			break
  7378  		}
  7379  		x := v_0.Args[0]
  7380  		if !(rc < 32) {
  7381  			break
  7382  		}
  7383  		v.reset(OpLOONG64BSTRPICKV)
  7384  		v.AuxInt = int64ToAuxInt(rc + 31<<6)
  7385  		v.AddArg(x)
  7386  		return true
  7387  	}
  7388  	// match: (SRLVconst [rc] (MOVHUreg x))
  7389  	// cond: rc < 16
  7390  	// result: (BSTRPICKV [rc + 15<<6] x)
  7391  	for {
  7392  		rc := auxIntToInt64(v.AuxInt)
  7393  		if v_0.Op != OpLOONG64MOVHUreg {
  7394  			break
  7395  		}
  7396  		x := v_0.Args[0]
  7397  		if !(rc < 16) {
  7398  			break
  7399  		}
  7400  		v.reset(OpLOONG64BSTRPICKV)
  7401  		v.AuxInt = int64ToAuxInt(rc + 15<<6)
  7402  		v.AddArg(x)
  7403  		return true
  7404  	}
  7405  	// match: (SRLVconst [rc] (MOVBUreg x))
  7406  	// cond: rc < 8
  7407  	// result: (BSTRPICKV [rc + 7<<6] x)
  7408  	for {
  7409  		rc := auxIntToInt64(v.AuxInt)
  7410  		if v_0.Op != OpLOONG64MOVBUreg {
  7411  			break
  7412  		}
  7413  		x := v_0.Args[0]
  7414  		if !(rc < 8) {
  7415  			break
  7416  		}
  7417  		v.reset(OpLOONG64BSTRPICKV)
  7418  		v.AuxInt = int64ToAuxInt(rc + 7<<6)
  7419  		v.AddArg(x)
  7420  		return true
  7421  	}
  7422  	// match: (SRLVconst [rc] (MOVWUreg y))
  7423  	// cond: rc >= 0 && rc <= 31
  7424  	// result: (SRLconst [int64(rc)] y)
  7425  	for {
  7426  		rc := auxIntToInt64(v.AuxInt)
  7427  		if v_0.Op != OpLOONG64MOVWUreg {
  7428  			break
  7429  		}
  7430  		y := v_0.Args[0]
  7431  		if !(rc >= 0 && rc <= 31) {
  7432  			break
  7433  		}
  7434  		v.reset(OpLOONG64SRLconst)
  7435  		v.AuxInt = int64ToAuxInt(int64(rc))
  7436  		v.AddArg(y)
  7437  		return true
  7438  	}
  7439  	// match: (SRLVconst [rc] (MOVWUreg x))
  7440  	// cond: rc >= 32
  7441  	// result: (MOVVconst [0])
  7442  	for {
  7443  		rc := auxIntToInt64(v.AuxInt)
  7444  		if v_0.Op != OpLOONG64MOVWUreg {
  7445  			break
  7446  		}
  7447  		if !(rc >= 32) {
  7448  			break
  7449  		}
  7450  		v.reset(OpLOONG64MOVVconst)
  7451  		v.AuxInt = int64ToAuxInt(0)
  7452  		return true
  7453  	}
  7454  	// match: (SRLVconst [rc] (MOVHUreg x))
  7455  	// cond: rc >= 16
  7456  	// result: (MOVVconst [0])
  7457  	for {
  7458  		rc := auxIntToInt64(v.AuxInt)
  7459  		if v_0.Op != OpLOONG64MOVHUreg {
  7460  			break
  7461  		}
  7462  		if !(rc >= 16) {
  7463  			break
  7464  		}
  7465  		v.reset(OpLOONG64MOVVconst)
  7466  		v.AuxInt = int64ToAuxInt(0)
  7467  		return true
  7468  	}
  7469  	// match: (SRLVconst [rc] (MOVBUreg x))
  7470  	// cond: rc >= 8
  7471  	// result: (MOVVconst [0])
  7472  	for {
  7473  		rc := auxIntToInt64(v.AuxInt)
  7474  		if v_0.Op != OpLOONG64MOVBUreg {
  7475  			break
  7476  		}
  7477  		if !(rc >= 8) {
  7478  			break
  7479  		}
  7480  		v.reset(OpLOONG64MOVVconst)
  7481  		v.AuxInt = int64ToAuxInt(0)
  7482  		return true
  7483  	}
  7484  	// match: (SRLVconst [c] (MOVVconst [d]))
  7485  	// result: (MOVVconst [int64(uint64(d)>>uint64(c))])
  7486  	for {
  7487  		c := auxIntToInt64(v.AuxInt)
  7488  		if v_0.Op != OpLOONG64MOVVconst {
  7489  			break
  7490  		}
  7491  		d := auxIntToInt64(v_0.AuxInt)
  7492  		v.reset(OpLOONG64MOVVconst)
  7493  		v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
  7494  		return true
  7495  	}
  7496  	return false
  7497  }
  7498  func rewriteValueLOONG64_OpLOONG64SUBD(v *Value) bool {
  7499  	v_1 := v.Args[1]
  7500  	v_0 := v.Args[0]
  7501  	// match: (SUBD (MULD x y) z)
  7502  	// cond: z.Block.Func.useFMA(v)
  7503  	// result: (FMSUBD x y z)
  7504  	for {
  7505  		if v_0.Op != OpLOONG64MULD {
  7506  			break
  7507  		}
  7508  		y := v_0.Args[1]
  7509  		x := v_0.Args[0]
  7510  		z := v_1
  7511  		if !(z.Block.Func.useFMA(v)) {
  7512  			break
  7513  		}
  7514  		v.reset(OpLOONG64FMSUBD)
  7515  		v.AddArg3(x, y, z)
  7516  		return true
  7517  	}
  7518  	// match: (SUBD z (MULD x y))
  7519  	// cond: z.Block.Func.useFMA(v)
  7520  	// result: (FNMSUBD x y z)
  7521  	for {
  7522  		z := v_0
  7523  		if v_1.Op != OpLOONG64MULD {
  7524  			break
  7525  		}
  7526  		y := v_1.Args[1]
  7527  		x := v_1.Args[0]
  7528  		if !(z.Block.Func.useFMA(v)) {
  7529  			break
  7530  		}
  7531  		v.reset(OpLOONG64FNMSUBD)
  7532  		v.AddArg3(x, y, z)
  7533  		return true
  7534  	}
  7535  	// match: (SUBD z (NEGD (MULD x y)))
  7536  	// cond: z.Block.Func.useFMA(v)
  7537  	// result: (FMADDD x y z)
  7538  	for {
  7539  		z := v_0
  7540  		if v_1.Op != OpLOONG64NEGD {
  7541  			break
  7542  		}
  7543  		v_1_0 := v_1.Args[0]
  7544  		if v_1_0.Op != OpLOONG64MULD {
  7545  			break
  7546  		}
  7547  		y := v_1_0.Args[1]
  7548  		x := v_1_0.Args[0]
  7549  		if !(z.Block.Func.useFMA(v)) {
  7550  			break
  7551  		}
  7552  		v.reset(OpLOONG64FMADDD)
  7553  		v.AddArg3(x, y, z)
  7554  		return true
  7555  	}
  7556  	// match: (SUBD (NEGD (MULD x y)) z)
  7557  	// cond: z.Block.Func.useFMA(v)
  7558  	// result: (FNMADDD x y z)
  7559  	for {
  7560  		if v_0.Op != OpLOONG64NEGD {
  7561  			break
  7562  		}
  7563  		v_0_0 := v_0.Args[0]
  7564  		if v_0_0.Op != OpLOONG64MULD {
  7565  			break
  7566  		}
  7567  		y := v_0_0.Args[1]
  7568  		x := v_0_0.Args[0]
  7569  		z := v_1
  7570  		if !(z.Block.Func.useFMA(v)) {
  7571  			break
  7572  		}
  7573  		v.reset(OpLOONG64FNMADDD)
  7574  		v.AddArg3(x, y, z)
  7575  		return true
  7576  	}
  7577  	return false
  7578  }
  7579  func rewriteValueLOONG64_OpLOONG64SUBF(v *Value) bool {
  7580  	v_1 := v.Args[1]
  7581  	v_0 := v.Args[0]
  7582  	// match: (SUBF (MULF x y) z)
  7583  	// cond: z.Block.Func.useFMA(v)
  7584  	// result: (FMSUBF x y z)
  7585  	for {
  7586  		if v_0.Op != OpLOONG64MULF {
  7587  			break
  7588  		}
  7589  		y := v_0.Args[1]
  7590  		x := v_0.Args[0]
  7591  		z := v_1
  7592  		if !(z.Block.Func.useFMA(v)) {
  7593  			break
  7594  		}
  7595  		v.reset(OpLOONG64FMSUBF)
  7596  		v.AddArg3(x, y, z)
  7597  		return true
  7598  	}
  7599  	// match: (SUBF z (MULF x y))
  7600  	// cond: z.Block.Func.useFMA(v)
  7601  	// result: (FNMSUBF x y z)
  7602  	for {
  7603  		z := v_0
  7604  		if v_1.Op != OpLOONG64MULF {
  7605  			break
  7606  		}
  7607  		y := v_1.Args[1]
  7608  		x := v_1.Args[0]
  7609  		if !(z.Block.Func.useFMA(v)) {
  7610  			break
  7611  		}
  7612  		v.reset(OpLOONG64FNMSUBF)
  7613  		v.AddArg3(x, y, z)
  7614  		return true
  7615  	}
  7616  	// match: (SUBF z (NEGF (MULF x y)))
  7617  	// cond: z.Block.Func.useFMA(v)
  7618  	// result: (FMADDF x y z)
  7619  	for {
  7620  		z := v_0
  7621  		if v_1.Op != OpLOONG64NEGF {
  7622  			break
  7623  		}
  7624  		v_1_0 := v_1.Args[0]
  7625  		if v_1_0.Op != OpLOONG64MULF {
  7626  			break
  7627  		}
  7628  		y := v_1_0.Args[1]
  7629  		x := v_1_0.Args[0]
  7630  		if !(z.Block.Func.useFMA(v)) {
  7631  			break
  7632  		}
  7633  		v.reset(OpLOONG64FMADDF)
  7634  		v.AddArg3(x, y, z)
  7635  		return true
  7636  	}
  7637  	// match: (SUBF (NEGF (MULF x y)) z)
  7638  	// cond: z.Block.Func.useFMA(v)
  7639  	// result: (FNMADDF x y z)
  7640  	for {
  7641  		if v_0.Op != OpLOONG64NEGF {
  7642  			break
  7643  		}
  7644  		v_0_0 := v_0.Args[0]
  7645  		if v_0_0.Op != OpLOONG64MULF {
  7646  			break
  7647  		}
  7648  		y := v_0_0.Args[1]
  7649  		x := v_0_0.Args[0]
  7650  		z := v_1
  7651  		if !(z.Block.Func.useFMA(v)) {
  7652  			break
  7653  		}
  7654  		v.reset(OpLOONG64FNMADDF)
  7655  		v.AddArg3(x, y, z)
  7656  		return true
  7657  	}
  7658  	return false
  7659  }
  7660  func rewriteValueLOONG64_OpLOONG64SUBV(v *Value) bool {
  7661  	v_1 := v.Args[1]
  7662  	v_0 := v.Args[0]
  7663  	// match: (SUBV x (MOVVconst [c]))
  7664  	// cond: is32Bit(c)
  7665  	// result: (SUBVconst [c] x)
  7666  	for {
  7667  		x := v_0
  7668  		if v_1.Op != OpLOONG64MOVVconst {
  7669  			break
  7670  		}
  7671  		c := auxIntToInt64(v_1.AuxInt)
  7672  		if !(is32Bit(c)) {
  7673  			break
  7674  		}
  7675  		v.reset(OpLOONG64SUBVconst)
  7676  		v.AuxInt = int64ToAuxInt(c)
  7677  		v.AddArg(x)
  7678  		return true
  7679  	}
  7680  	// match: (SUBV x (NEGV y))
  7681  	// result: (ADDV x y)
  7682  	for {
  7683  		x := v_0
  7684  		if v_1.Op != OpLOONG64NEGV {
  7685  			break
  7686  		}
  7687  		y := v_1.Args[0]
  7688  		v.reset(OpLOONG64ADDV)
  7689  		v.AddArg2(x, y)
  7690  		return true
  7691  	}
  7692  	// match: (SUBV x x)
  7693  	// result: (MOVVconst [0])
  7694  	for {
  7695  		x := v_0
  7696  		if x != v_1 {
  7697  			break
  7698  		}
  7699  		v.reset(OpLOONG64MOVVconst)
  7700  		v.AuxInt = int64ToAuxInt(0)
  7701  		return true
  7702  	}
  7703  	// match: (SUBV (MOVVconst [0]) x)
  7704  	// result: (NEGV x)
  7705  	for {
  7706  		if v_0.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7707  			break
  7708  		}
  7709  		x := v_1
  7710  		v.reset(OpLOONG64NEGV)
  7711  		v.AddArg(x)
  7712  		return true
  7713  	}
  7714  	// match: (SUBV (MOVVconst [c]) (NEGV (SUBVconst [d] x)))
  7715  	// result: (ADDVconst [c-d] x)
  7716  	for {
  7717  		if v_0.Op != OpLOONG64MOVVconst {
  7718  			break
  7719  		}
  7720  		c := auxIntToInt64(v_0.AuxInt)
  7721  		if v_1.Op != OpLOONG64NEGV {
  7722  			break
  7723  		}
  7724  		v_1_0 := v_1.Args[0]
  7725  		if v_1_0.Op != OpLOONG64SUBVconst {
  7726  			break
  7727  		}
  7728  		d := auxIntToInt64(v_1_0.AuxInt)
  7729  		x := v_1_0.Args[0]
  7730  		v.reset(OpLOONG64ADDVconst)
  7731  		v.AuxInt = int64ToAuxInt(c - d)
  7732  		v.AddArg(x)
  7733  		return true
  7734  	}
  7735  	return false
  7736  }
  7737  func rewriteValueLOONG64_OpLOONG64SUBVconst(v *Value) bool {
  7738  	v_0 := v.Args[0]
  7739  	// match: (SUBVconst [0] x)
  7740  	// result: x
  7741  	for {
  7742  		if auxIntToInt64(v.AuxInt) != 0 {
  7743  			break
  7744  		}
  7745  		x := v_0
  7746  		v.copyOf(x)
  7747  		return true
  7748  	}
  7749  	// match: (SUBVconst [c] (MOVVconst [d]))
  7750  	// result: (MOVVconst [d-c])
  7751  	for {
  7752  		c := auxIntToInt64(v.AuxInt)
  7753  		if v_0.Op != OpLOONG64MOVVconst {
  7754  			break
  7755  		}
  7756  		d := auxIntToInt64(v_0.AuxInt)
  7757  		v.reset(OpLOONG64MOVVconst)
  7758  		v.AuxInt = int64ToAuxInt(d - c)
  7759  		return true
  7760  	}
  7761  	// match: (SUBVconst [c] (SUBVconst [d] x))
  7762  	// cond: is32Bit(-c-d)
  7763  	// result: (ADDVconst [-c-d] x)
  7764  	for {
  7765  		c := auxIntToInt64(v.AuxInt)
  7766  		if v_0.Op != OpLOONG64SUBVconst {
  7767  			break
  7768  		}
  7769  		d := auxIntToInt64(v_0.AuxInt)
  7770  		x := v_0.Args[0]
  7771  		if !(is32Bit(-c - d)) {
  7772  			break
  7773  		}
  7774  		v.reset(OpLOONG64ADDVconst)
  7775  		v.AuxInt = int64ToAuxInt(-c - d)
  7776  		v.AddArg(x)
  7777  		return true
  7778  	}
  7779  	// match: (SUBVconst [c] (ADDVconst [d] x))
  7780  	// cond: is32Bit(-c+d)
  7781  	// result: (ADDVconst [-c+d] x)
  7782  	for {
  7783  		c := auxIntToInt64(v.AuxInt)
  7784  		if v_0.Op != OpLOONG64ADDVconst {
  7785  			break
  7786  		}
  7787  		d := auxIntToInt64(v_0.AuxInt)
  7788  		x := v_0.Args[0]
  7789  		if !(is32Bit(-c + d)) {
  7790  			break
  7791  		}
  7792  		v.reset(OpLOONG64ADDVconst)
  7793  		v.AuxInt = int64ToAuxInt(-c + d)
  7794  		v.AddArg(x)
  7795  		return true
  7796  	}
  7797  	return false
  7798  }
  7799  func rewriteValueLOONG64_OpLOONG64XOR(v *Value) bool {
  7800  	v_1 := v.Args[1]
  7801  	v_0 := v.Args[0]
  7802  	b := v.Block
  7803  	typ := &b.Func.Config.Types
  7804  	// match: (XOR <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  7805  	// result: (REVB2H x)
  7806  	for {
  7807  		if v.Type != typ.UInt16 {
  7808  			break
  7809  		}
  7810  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7811  			if v_0.Op != OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || auxIntToInt64(v_0.AuxInt) != 8 {
  7812  				continue
  7813  			}
  7814  			x := v_0.Args[0]
  7815  			if v_1.Op != OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || auxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  7816  				continue
  7817  			}
  7818  			v.reset(OpLOONG64REVB2H)
  7819  			v.AddArg(x)
  7820  			return true
  7821  		}
  7822  		break
  7823  	}
  7824  	// match: (XOR (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  7825  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  7826  	// result: (REVB2H x)
  7827  	for {
  7828  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7829  			if v_0.Op != OpLOONG64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  7830  				continue
  7831  			}
  7832  			v_0_0 := v_0.Args[0]
  7833  			if v_0_0.Op != OpLOONG64ANDconst {
  7834  				continue
  7835  			}
  7836  			c1 := auxIntToInt64(v_0_0.AuxInt)
  7837  			x := v_0_0.Args[0]
  7838  			if v_1.Op != OpLOONG64SLLconst || auxIntToInt64(v_1.AuxInt) != 8 {
  7839  				continue
  7840  			}
  7841  			v_1_0 := v_1.Args[0]
  7842  			if v_1_0.Op != OpLOONG64ANDconst {
  7843  				continue
  7844  			}
  7845  			c2 := auxIntToInt64(v_1_0.AuxInt)
  7846  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  7847  				continue
  7848  			}
  7849  			v.reset(OpLOONG64REVB2H)
  7850  			v.AddArg(x)
  7851  			return true
  7852  		}
  7853  		break
  7854  	}
  7855  	// match: (XOR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  7856  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  7857  	// result: (REVB4H x)
  7858  	for {
  7859  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7860  			if v_0.Op != OpLOONG64SRLVconst || auxIntToInt64(v_0.AuxInt) != 8 {
  7861  				continue
  7862  			}
  7863  			v_0_0 := v_0.Args[0]
  7864  			if v_0_0.Op != OpLOONG64AND {
  7865  				continue
  7866  			}
  7867  			_ = v_0_0.Args[1]
  7868  			v_0_0_0 := v_0_0.Args[0]
  7869  			v_0_0_1 := v_0_0.Args[1]
  7870  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  7871  				if v_0_0_0.Op != OpLOONG64MOVVconst {
  7872  					continue
  7873  				}
  7874  				c1 := auxIntToInt64(v_0_0_0.AuxInt)
  7875  				x := v_0_0_1
  7876  				if v_1.Op != OpLOONG64SLLVconst || auxIntToInt64(v_1.AuxInt) != 8 {
  7877  					continue
  7878  				}
  7879  				v_1_0 := v_1.Args[0]
  7880  				if v_1_0.Op != OpLOONG64AND {
  7881  					continue
  7882  				}
  7883  				_ = v_1_0.Args[1]
  7884  				v_1_0_0 := v_1_0.Args[0]
  7885  				v_1_0_1 := v_1_0.Args[1]
  7886  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  7887  					if v_1_0_0.Op != OpLOONG64MOVVconst {
  7888  						continue
  7889  					}
  7890  					c2 := auxIntToInt64(v_1_0_0.AuxInt)
  7891  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  7892  						continue
  7893  					}
  7894  					v.reset(OpLOONG64REVB4H)
  7895  					v.AddArg(x)
  7896  					return true
  7897  				}
  7898  			}
  7899  		}
  7900  		break
  7901  	}
  7902  	// match: (XOR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  7903  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  7904  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  7905  	for {
  7906  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7907  			if v_0.Op != OpLOONG64SRLVconst || auxIntToInt64(v_0.AuxInt) != 8 {
  7908  				continue
  7909  			}
  7910  			v_0_0 := v_0.Args[0]
  7911  			if v_0_0.Op != OpLOONG64AND {
  7912  				continue
  7913  			}
  7914  			_ = v_0_0.Args[1]
  7915  			v_0_0_0 := v_0_0.Args[0]
  7916  			v_0_0_1 := v_0_0.Args[1]
  7917  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  7918  				if v_0_0_0.Op != OpLOONG64MOVVconst {
  7919  					continue
  7920  				}
  7921  				c1 := auxIntToInt64(v_0_0_0.AuxInt)
  7922  				x := v_0_0_1
  7923  				if v_1.Op != OpLOONG64SLLVconst || auxIntToInt64(v_1.AuxInt) != 8 {
  7924  					continue
  7925  				}
  7926  				v_1_0 := v_1.Args[0]
  7927  				if v_1_0.Op != OpLOONG64ANDconst {
  7928  					continue
  7929  				}
  7930  				c2 := auxIntToInt64(v_1_0.AuxInt)
  7931  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  7932  					continue
  7933  				}
  7934  				v.reset(OpLOONG64REVB4H)
  7935  				v0 := b.NewValue0(v.Pos, OpLOONG64ANDconst, x.Type)
  7936  				v0.AuxInt = int64ToAuxInt(0xffffffff)
  7937  				v0.AddArg(x)
  7938  				v.AddArg(v0)
  7939  				return true
  7940  			}
  7941  		}
  7942  		break
  7943  	}
  7944  	// match: (XOR x (MOVVconst [c]))
  7945  	// cond: is32Bit(c)
  7946  	// result: (XORconst [c] x)
  7947  	for {
  7948  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7949  			x := v_0
  7950  			if v_1.Op != OpLOONG64MOVVconst {
  7951  				continue
  7952  			}
  7953  			c := auxIntToInt64(v_1.AuxInt)
  7954  			if !(is32Bit(c)) {
  7955  				continue
  7956  			}
  7957  			v.reset(OpLOONG64XORconst)
  7958  			v.AuxInt = int64ToAuxInt(c)
  7959  			v.AddArg(x)
  7960  			return true
  7961  		}
  7962  		break
  7963  	}
  7964  	// match: (XOR x x)
  7965  	// result: (MOVVconst [0])
  7966  	for {
  7967  		x := v_0
  7968  		if x != v_1 {
  7969  			break
  7970  		}
  7971  		v.reset(OpLOONG64MOVVconst)
  7972  		v.AuxInt = int64ToAuxInt(0)
  7973  		return true
  7974  	}
  7975  	return false
  7976  }
  7977  func rewriteValueLOONG64_OpLOONG64XORconst(v *Value) bool {
  7978  	v_0 := v.Args[0]
  7979  	// match: (XORconst [0] x)
  7980  	// result: x
  7981  	for {
  7982  		if auxIntToInt64(v.AuxInt) != 0 {
  7983  			break
  7984  		}
  7985  		x := v_0
  7986  		v.copyOf(x)
  7987  		return true
  7988  	}
  7989  	// match: (XORconst [-1] x)
  7990  	// result: (NORconst [0] x)
  7991  	for {
  7992  		if auxIntToInt64(v.AuxInt) != -1 {
  7993  			break
  7994  		}
  7995  		x := v_0
  7996  		v.reset(OpLOONG64NORconst)
  7997  		v.AuxInt = int64ToAuxInt(0)
  7998  		v.AddArg(x)
  7999  		return true
  8000  	}
  8001  	// match: (XORconst [c] (MOVVconst [d]))
  8002  	// result: (MOVVconst [c^d])
  8003  	for {
  8004  		c := auxIntToInt64(v.AuxInt)
  8005  		if v_0.Op != OpLOONG64MOVVconst {
  8006  			break
  8007  		}
  8008  		d := auxIntToInt64(v_0.AuxInt)
  8009  		v.reset(OpLOONG64MOVVconst)
  8010  		v.AuxInt = int64ToAuxInt(c ^ d)
  8011  		return true
  8012  	}
  8013  	// match: (XORconst [c] (XORconst [d] x))
  8014  	// cond: is32Bit(c^d)
  8015  	// result: (XORconst [c^d] x)
  8016  	for {
  8017  		c := auxIntToInt64(v.AuxInt)
  8018  		if v_0.Op != OpLOONG64XORconst {
  8019  			break
  8020  		}
  8021  		d := auxIntToInt64(v_0.AuxInt)
  8022  		x := v_0.Args[0]
  8023  		if !(is32Bit(c ^ d)) {
  8024  			break
  8025  		}
  8026  		v.reset(OpLOONG64XORconst)
  8027  		v.AuxInt = int64ToAuxInt(c ^ d)
  8028  		v.AddArg(x)
  8029  		return true
  8030  	}
  8031  	return false
  8032  }
  8033  func rewriteValueLOONG64_OpLeq16(v *Value) bool {
  8034  	v_1 := v.Args[1]
  8035  	v_0 := v.Args[0]
  8036  	b := v.Block
  8037  	typ := &b.Func.Config.Types
  8038  	// match: (Leq16 x y)
  8039  	// result: (XOR (MOVVconst [1]) (SGT (SignExt16to64 x) (SignExt16to64 y)))
  8040  	for {
  8041  		x := v_0
  8042  		y := v_1
  8043  		v.reset(OpLOONG64XOR)
  8044  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8045  		v0.AuxInt = int64ToAuxInt(1)
  8046  		v1 := b.NewValue0(v.Pos, OpLOONG64SGT, typ.Bool)
  8047  		v2 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  8048  		v2.AddArg(x)
  8049  		v3 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  8050  		v3.AddArg(y)
  8051  		v1.AddArg2(v2, v3)
  8052  		v.AddArg2(v0, v1)
  8053  		return true
  8054  	}
  8055  }
  8056  func rewriteValueLOONG64_OpLeq16U(v *Value) bool {
  8057  	v_1 := v.Args[1]
  8058  	v_0 := v.Args[0]
  8059  	b := v.Block
  8060  	typ := &b.Func.Config.Types
  8061  	// match: (Leq16U x y)
  8062  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt16to64 x) (ZeroExt16to64 y)))
  8063  	for {
  8064  		x := v_0
  8065  		y := v_1
  8066  		v.reset(OpLOONG64XOR)
  8067  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8068  		v0.AuxInt = int64ToAuxInt(1)
  8069  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8070  		v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8071  		v2.AddArg(x)
  8072  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8073  		v3.AddArg(y)
  8074  		v1.AddArg2(v2, v3)
  8075  		v.AddArg2(v0, v1)
  8076  		return true
  8077  	}
  8078  }
  8079  func rewriteValueLOONG64_OpLeq32(v *Value) bool {
  8080  	v_1 := v.Args[1]
  8081  	v_0 := v.Args[0]
  8082  	b := v.Block
  8083  	typ := &b.Func.Config.Types
  8084  	// match: (Leq32 x y)
  8085  	// result: (XOR (MOVVconst [1]) (SGT (SignExt32to64 x) (SignExt32to64 y)))
  8086  	for {
  8087  		x := v_0
  8088  		y := v_1
  8089  		v.reset(OpLOONG64XOR)
  8090  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8091  		v0.AuxInt = int64ToAuxInt(1)
  8092  		v1 := b.NewValue0(v.Pos, OpLOONG64SGT, typ.Bool)
  8093  		v2 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  8094  		v2.AddArg(x)
  8095  		v3 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  8096  		v3.AddArg(y)
  8097  		v1.AddArg2(v2, v3)
  8098  		v.AddArg2(v0, v1)
  8099  		return true
  8100  	}
  8101  }
  8102  func rewriteValueLOONG64_OpLeq32F(v *Value) bool {
  8103  	v_1 := v.Args[1]
  8104  	v_0 := v.Args[0]
  8105  	b := v.Block
  8106  	// match: (Leq32F x y)
  8107  	// result: (FPFlagTrue (CMPGEF y x))
  8108  	for {
  8109  		x := v_0
  8110  		y := v_1
  8111  		v.reset(OpLOONG64FPFlagTrue)
  8112  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPGEF, types.TypeFlags)
  8113  		v0.AddArg2(y, x)
  8114  		v.AddArg(v0)
  8115  		return true
  8116  	}
  8117  }
  8118  func rewriteValueLOONG64_OpLeq32U(v *Value) bool {
  8119  	v_1 := v.Args[1]
  8120  	v_0 := v.Args[0]
  8121  	b := v.Block
  8122  	typ := &b.Func.Config.Types
  8123  	// match: (Leq32U x y)
  8124  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt32to64 x) (ZeroExt32to64 y)))
  8125  	for {
  8126  		x := v_0
  8127  		y := v_1
  8128  		v.reset(OpLOONG64XOR)
  8129  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8130  		v0.AuxInt = int64ToAuxInt(1)
  8131  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8132  		v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8133  		v2.AddArg(x)
  8134  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8135  		v3.AddArg(y)
  8136  		v1.AddArg2(v2, v3)
  8137  		v.AddArg2(v0, v1)
  8138  		return true
  8139  	}
  8140  }
  8141  func rewriteValueLOONG64_OpLeq64(v *Value) bool {
  8142  	v_1 := v.Args[1]
  8143  	v_0 := v.Args[0]
  8144  	b := v.Block
  8145  	typ := &b.Func.Config.Types
  8146  	// match: (Leq64 x y)
  8147  	// result: (XOR (MOVVconst [1]) (SGT x y))
  8148  	for {
  8149  		x := v_0
  8150  		y := v_1
  8151  		v.reset(OpLOONG64XOR)
  8152  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8153  		v0.AuxInt = int64ToAuxInt(1)
  8154  		v1 := b.NewValue0(v.Pos, OpLOONG64SGT, typ.Bool)
  8155  		v1.AddArg2(x, y)
  8156  		v.AddArg2(v0, v1)
  8157  		return true
  8158  	}
  8159  }
  8160  func rewriteValueLOONG64_OpLeq64F(v *Value) bool {
  8161  	v_1 := v.Args[1]
  8162  	v_0 := v.Args[0]
  8163  	b := v.Block
  8164  	// match: (Leq64F x y)
  8165  	// result: (FPFlagTrue (CMPGED y x))
  8166  	for {
  8167  		x := v_0
  8168  		y := v_1
  8169  		v.reset(OpLOONG64FPFlagTrue)
  8170  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPGED, types.TypeFlags)
  8171  		v0.AddArg2(y, x)
  8172  		v.AddArg(v0)
  8173  		return true
  8174  	}
  8175  }
  8176  func rewriteValueLOONG64_OpLeq64U(v *Value) bool {
  8177  	v_1 := v.Args[1]
  8178  	v_0 := v.Args[0]
  8179  	b := v.Block
  8180  	typ := &b.Func.Config.Types
  8181  	// match: (Leq64U x y)
  8182  	// result: (XOR (MOVVconst [1]) (SGTU x y))
  8183  	for {
  8184  		x := v_0
  8185  		y := v_1
  8186  		v.reset(OpLOONG64XOR)
  8187  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8188  		v0.AuxInt = int64ToAuxInt(1)
  8189  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8190  		v1.AddArg2(x, y)
  8191  		v.AddArg2(v0, v1)
  8192  		return true
  8193  	}
  8194  }
  8195  func rewriteValueLOONG64_OpLeq8(v *Value) bool {
  8196  	v_1 := v.Args[1]
  8197  	v_0 := v.Args[0]
  8198  	b := v.Block
  8199  	typ := &b.Func.Config.Types
  8200  	// match: (Leq8 x y)
  8201  	// result: (XOR (MOVVconst [1]) (SGT (SignExt8to64 x) (SignExt8to64 y)))
  8202  	for {
  8203  		x := v_0
  8204  		y := v_1
  8205  		v.reset(OpLOONG64XOR)
  8206  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8207  		v0.AuxInt = int64ToAuxInt(1)
  8208  		v1 := b.NewValue0(v.Pos, OpLOONG64SGT, typ.Bool)
  8209  		v2 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  8210  		v2.AddArg(x)
  8211  		v3 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  8212  		v3.AddArg(y)
  8213  		v1.AddArg2(v2, v3)
  8214  		v.AddArg2(v0, v1)
  8215  		return true
  8216  	}
  8217  }
  8218  func rewriteValueLOONG64_OpLeq8U(v *Value) bool {
  8219  	v_1 := v.Args[1]
  8220  	v_0 := v.Args[0]
  8221  	b := v.Block
  8222  	typ := &b.Func.Config.Types
  8223  	// match: (Leq8U x y)
  8224  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt8to64 x) (ZeroExt8to64 y)))
  8225  	for {
  8226  		x := v_0
  8227  		y := v_1
  8228  		v.reset(OpLOONG64XOR)
  8229  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8230  		v0.AuxInt = int64ToAuxInt(1)
  8231  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8232  		v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8233  		v2.AddArg(x)
  8234  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8235  		v3.AddArg(y)
  8236  		v1.AddArg2(v2, v3)
  8237  		v.AddArg2(v0, v1)
  8238  		return true
  8239  	}
  8240  }
  8241  func rewriteValueLOONG64_OpLess16(v *Value) bool {
  8242  	v_1 := v.Args[1]
  8243  	v_0 := v.Args[0]
  8244  	b := v.Block
  8245  	typ := &b.Func.Config.Types
  8246  	// match: (Less16 x y)
  8247  	// result: (SGT (SignExt16to64 y) (SignExt16to64 x))
  8248  	for {
  8249  		x := v_0
  8250  		y := v_1
  8251  		v.reset(OpLOONG64SGT)
  8252  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  8253  		v0.AddArg(y)
  8254  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  8255  		v1.AddArg(x)
  8256  		v.AddArg2(v0, v1)
  8257  		return true
  8258  	}
  8259  }
  8260  func rewriteValueLOONG64_OpLess16U(v *Value) bool {
  8261  	v_1 := v.Args[1]
  8262  	v_0 := v.Args[0]
  8263  	b := v.Block
  8264  	typ := &b.Func.Config.Types
  8265  	// match: (Less16U x y)
  8266  	// result: (SGTU (ZeroExt16to64 y) (ZeroExt16to64 x))
  8267  	for {
  8268  		x := v_0
  8269  		y := v_1
  8270  		v.reset(OpLOONG64SGTU)
  8271  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8272  		v0.AddArg(y)
  8273  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8274  		v1.AddArg(x)
  8275  		v.AddArg2(v0, v1)
  8276  		return true
  8277  	}
  8278  }
  8279  func rewriteValueLOONG64_OpLess32(v *Value) bool {
  8280  	v_1 := v.Args[1]
  8281  	v_0 := v.Args[0]
  8282  	b := v.Block
  8283  	typ := &b.Func.Config.Types
  8284  	// match: (Less32 x y)
  8285  	// result: (SGT (SignExt32to64 y) (SignExt32to64 x))
  8286  	for {
  8287  		x := v_0
  8288  		y := v_1
  8289  		v.reset(OpLOONG64SGT)
  8290  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  8291  		v0.AddArg(y)
  8292  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  8293  		v1.AddArg(x)
  8294  		v.AddArg2(v0, v1)
  8295  		return true
  8296  	}
  8297  }
  8298  func rewriteValueLOONG64_OpLess32F(v *Value) bool {
  8299  	v_1 := v.Args[1]
  8300  	v_0 := v.Args[0]
  8301  	b := v.Block
  8302  	// match: (Less32F x y)
  8303  	// result: (FPFlagTrue (CMPGTF y x))
  8304  	for {
  8305  		x := v_0
  8306  		y := v_1
  8307  		v.reset(OpLOONG64FPFlagTrue)
  8308  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPGTF, types.TypeFlags)
  8309  		v0.AddArg2(y, x)
  8310  		v.AddArg(v0)
  8311  		return true
  8312  	}
  8313  }
  8314  func rewriteValueLOONG64_OpLess32U(v *Value) bool {
  8315  	v_1 := v.Args[1]
  8316  	v_0 := v.Args[0]
  8317  	b := v.Block
  8318  	typ := &b.Func.Config.Types
  8319  	// match: (Less32U x y)
  8320  	// result: (SGTU (ZeroExt32to64 y) (ZeroExt32to64 x))
  8321  	for {
  8322  		x := v_0
  8323  		y := v_1
  8324  		v.reset(OpLOONG64SGTU)
  8325  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8326  		v0.AddArg(y)
  8327  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8328  		v1.AddArg(x)
  8329  		v.AddArg2(v0, v1)
  8330  		return true
  8331  	}
  8332  }
  8333  func rewriteValueLOONG64_OpLess64(v *Value) bool {
  8334  	v_1 := v.Args[1]
  8335  	v_0 := v.Args[0]
  8336  	// match: (Less64 x y)
  8337  	// result: (SGT y x)
  8338  	for {
  8339  		x := v_0
  8340  		y := v_1
  8341  		v.reset(OpLOONG64SGT)
  8342  		v.AddArg2(y, x)
  8343  		return true
  8344  	}
  8345  }
  8346  func rewriteValueLOONG64_OpLess64F(v *Value) bool {
  8347  	v_1 := v.Args[1]
  8348  	v_0 := v.Args[0]
  8349  	b := v.Block
  8350  	// match: (Less64F x y)
  8351  	// result: (FPFlagTrue (CMPGTD y x))
  8352  	for {
  8353  		x := v_0
  8354  		y := v_1
  8355  		v.reset(OpLOONG64FPFlagTrue)
  8356  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPGTD, types.TypeFlags)
  8357  		v0.AddArg2(y, x)
  8358  		v.AddArg(v0)
  8359  		return true
  8360  	}
  8361  }
  8362  func rewriteValueLOONG64_OpLess64U(v *Value) bool {
  8363  	v_1 := v.Args[1]
  8364  	v_0 := v.Args[0]
  8365  	// match: (Less64U x y)
  8366  	// result: (SGTU y x)
  8367  	for {
  8368  		x := v_0
  8369  		y := v_1
  8370  		v.reset(OpLOONG64SGTU)
  8371  		v.AddArg2(y, x)
  8372  		return true
  8373  	}
  8374  }
  8375  func rewriteValueLOONG64_OpLess8(v *Value) bool {
  8376  	v_1 := v.Args[1]
  8377  	v_0 := v.Args[0]
  8378  	b := v.Block
  8379  	typ := &b.Func.Config.Types
  8380  	// match: (Less8 x y)
  8381  	// result: (SGT (SignExt8to64 y) (SignExt8to64 x))
  8382  	for {
  8383  		x := v_0
  8384  		y := v_1
  8385  		v.reset(OpLOONG64SGT)
  8386  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  8387  		v0.AddArg(y)
  8388  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  8389  		v1.AddArg(x)
  8390  		v.AddArg2(v0, v1)
  8391  		return true
  8392  	}
  8393  }
  8394  func rewriteValueLOONG64_OpLess8U(v *Value) bool {
  8395  	v_1 := v.Args[1]
  8396  	v_0 := v.Args[0]
  8397  	b := v.Block
  8398  	typ := &b.Func.Config.Types
  8399  	// match: (Less8U x y)
  8400  	// result: (SGTU (ZeroExt8to64 y) (ZeroExt8to64 x))
  8401  	for {
  8402  		x := v_0
  8403  		y := v_1
  8404  		v.reset(OpLOONG64SGTU)
  8405  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8406  		v0.AddArg(y)
  8407  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8408  		v1.AddArg(x)
  8409  		v.AddArg2(v0, v1)
  8410  		return true
  8411  	}
  8412  }
  8413  func rewriteValueLOONG64_OpLoad(v *Value) bool {
  8414  	v_1 := v.Args[1]
  8415  	v_0 := v.Args[0]
  8416  	// match: (Load <t> ptr mem)
  8417  	// cond: t.IsBoolean()
  8418  	// result: (MOVBUload ptr mem)
  8419  	for {
  8420  		t := v.Type
  8421  		ptr := v_0
  8422  		mem := v_1
  8423  		if !(t.IsBoolean()) {
  8424  			break
  8425  		}
  8426  		v.reset(OpLOONG64MOVBUload)
  8427  		v.AddArg2(ptr, mem)
  8428  		return true
  8429  	}
  8430  	// match: (Load <t> ptr mem)
  8431  	// cond: (is8BitInt(t) && t.IsSigned())
  8432  	// result: (MOVBload ptr mem)
  8433  	for {
  8434  		t := v.Type
  8435  		ptr := v_0
  8436  		mem := v_1
  8437  		if !(is8BitInt(t) && t.IsSigned()) {
  8438  			break
  8439  		}
  8440  		v.reset(OpLOONG64MOVBload)
  8441  		v.AddArg2(ptr, mem)
  8442  		return true
  8443  	}
  8444  	// match: (Load <t> ptr mem)
  8445  	// cond: (is8BitInt(t) && !t.IsSigned())
  8446  	// result: (MOVBUload ptr mem)
  8447  	for {
  8448  		t := v.Type
  8449  		ptr := v_0
  8450  		mem := v_1
  8451  		if !(is8BitInt(t) && !t.IsSigned()) {
  8452  			break
  8453  		}
  8454  		v.reset(OpLOONG64MOVBUload)
  8455  		v.AddArg2(ptr, mem)
  8456  		return true
  8457  	}
  8458  	// match: (Load <t> ptr mem)
  8459  	// cond: (is16BitInt(t) && t.IsSigned())
  8460  	// result: (MOVHload ptr mem)
  8461  	for {
  8462  		t := v.Type
  8463  		ptr := v_0
  8464  		mem := v_1
  8465  		if !(is16BitInt(t) && t.IsSigned()) {
  8466  			break
  8467  		}
  8468  		v.reset(OpLOONG64MOVHload)
  8469  		v.AddArg2(ptr, mem)
  8470  		return true
  8471  	}
  8472  	// match: (Load <t> ptr mem)
  8473  	// cond: (is16BitInt(t) && !t.IsSigned())
  8474  	// result: (MOVHUload ptr mem)
  8475  	for {
  8476  		t := v.Type
  8477  		ptr := v_0
  8478  		mem := v_1
  8479  		if !(is16BitInt(t) && !t.IsSigned()) {
  8480  			break
  8481  		}
  8482  		v.reset(OpLOONG64MOVHUload)
  8483  		v.AddArg2(ptr, mem)
  8484  		return true
  8485  	}
  8486  	// match: (Load <t> ptr mem)
  8487  	// cond: (is32BitInt(t) && t.IsSigned())
  8488  	// result: (MOVWload ptr mem)
  8489  	for {
  8490  		t := v.Type
  8491  		ptr := v_0
  8492  		mem := v_1
  8493  		if !(is32BitInt(t) && t.IsSigned()) {
  8494  			break
  8495  		}
  8496  		v.reset(OpLOONG64MOVWload)
  8497  		v.AddArg2(ptr, mem)
  8498  		return true
  8499  	}
  8500  	// match: (Load <t> ptr mem)
  8501  	// cond: (is32BitInt(t) && !t.IsSigned())
  8502  	// result: (MOVWUload ptr mem)
  8503  	for {
  8504  		t := v.Type
  8505  		ptr := v_0
  8506  		mem := v_1
  8507  		if !(is32BitInt(t) && !t.IsSigned()) {
  8508  			break
  8509  		}
  8510  		v.reset(OpLOONG64MOVWUload)
  8511  		v.AddArg2(ptr, mem)
  8512  		return true
  8513  	}
  8514  	// match: (Load <t> ptr mem)
  8515  	// cond: (is64BitInt(t) || isPtr(t))
  8516  	// result: (MOVVload ptr mem)
  8517  	for {
  8518  		t := v.Type
  8519  		ptr := v_0
  8520  		mem := v_1
  8521  		if !(is64BitInt(t) || isPtr(t)) {
  8522  			break
  8523  		}
  8524  		v.reset(OpLOONG64MOVVload)
  8525  		v.AddArg2(ptr, mem)
  8526  		return true
  8527  	}
  8528  	// match: (Load <t> ptr mem)
  8529  	// cond: is32BitFloat(t)
  8530  	// result: (MOVFload ptr mem)
  8531  	for {
  8532  		t := v.Type
  8533  		ptr := v_0
  8534  		mem := v_1
  8535  		if !(is32BitFloat(t)) {
  8536  			break
  8537  		}
  8538  		v.reset(OpLOONG64MOVFload)
  8539  		v.AddArg2(ptr, mem)
  8540  		return true
  8541  	}
  8542  	// match: (Load <t> ptr mem)
  8543  	// cond: is64BitFloat(t)
  8544  	// result: (MOVDload ptr mem)
  8545  	for {
  8546  		t := v.Type
  8547  		ptr := v_0
  8548  		mem := v_1
  8549  		if !(is64BitFloat(t)) {
  8550  			break
  8551  		}
  8552  		v.reset(OpLOONG64MOVDload)
  8553  		v.AddArg2(ptr, mem)
  8554  		return true
  8555  	}
  8556  	return false
  8557  }
  8558  func rewriteValueLOONG64_OpLocalAddr(v *Value) bool {
  8559  	v_1 := v.Args[1]
  8560  	v_0 := v.Args[0]
  8561  	b := v.Block
  8562  	typ := &b.Func.Config.Types
  8563  	// match: (LocalAddr <t> {sym} base mem)
  8564  	// cond: t.Elem().HasPointers()
  8565  	// result: (MOVVaddr {sym} (SPanchored base mem))
  8566  	for {
  8567  		t := v.Type
  8568  		sym := auxToSym(v.Aux)
  8569  		base := v_0
  8570  		mem := v_1
  8571  		if !(t.Elem().HasPointers()) {
  8572  			break
  8573  		}
  8574  		v.reset(OpLOONG64MOVVaddr)
  8575  		v.Aux = symToAux(sym)
  8576  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
  8577  		v0.AddArg2(base, mem)
  8578  		v.AddArg(v0)
  8579  		return true
  8580  	}
  8581  	// match: (LocalAddr <t> {sym} base _)
  8582  	// cond: !t.Elem().HasPointers()
  8583  	// result: (MOVVaddr {sym} base)
  8584  	for {
  8585  		t := v.Type
  8586  		sym := auxToSym(v.Aux)
  8587  		base := v_0
  8588  		if !(!t.Elem().HasPointers()) {
  8589  			break
  8590  		}
  8591  		v.reset(OpLOONG64MOVVaddr)
  8592  		v.Aux = symToAux(sym)
  8593  		v.AddArg(base)
  8594  		return true
  8595  	}
  8596  	return false
  8597  }
  8598  func rewriteValueLOONG64_OpLsh16x16(v *Value) bool {
  8599  	v_1 := v.Args[1]
  8600  	v_0 := v.Args[0]
  8601  	b := v.Block
  8602  	typ := &b.Func.Config.Types
  8603  	// match: (Lsh16x16 x y)
  8604  	// cond: shiftIsBounded(v)
  8605  	// result: (SLLV x y)
  8606  	for {
  8607  		x := v_0
  8608  		y := v_1
  8609  		if !(shiftIsBounded(v)) {
  8610  			break
  8611  		}
  8612  		v.reset(OpLOONG64SLLV)
  8613  		v.AddArg2(x, y)
  8614  		return true
  8615  	}
  8616  	// match: (Lsh16x16 <t> x y)
  8617  	// cond: !shiftIsBounded(v)
  8618  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  8619  	for {
  8620  		t := v.Type
  8621  		x := v_0
  8622  		y := v_1
  8623  		if !(!shiftIsBounded(v)) {
  8624  			break
  8625  		}
  8626  		v.reset(OpLOONG64MASKEQZ)
  8627  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8628  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8629  		v1.AddArg(y)
  8630  		v0.AddArg2(x, v1)
  8631  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8632  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8633  		v3.AuxInt = int64ToAuxInt(64)
  8634  		v2.AddArg2(v3, v1)
  8635  		v.AddArg2(v0, v2)
  8636  		return true
  8637  	}
  8638  	return false
  8639  }
  8640  func rewriteValueLOONG64_OpLsh16x32(v *Value) bool {
  8641  	v_1 := v.Args[1]
  8642  	v_0 := v.Args[0]
  8643  	b := v.Block
  8644  	typ := &b.Func.Config.Types
  8645  	// match: (Lsh16x32 x y)
  8646  	// cond: shiftIsBounded(v)
  8647  	// result: (SLLV x y)
  8648  	for {
  8649  		x := v_0
  8650  		y := v_1
  8651  		if !(shiftIsBounded(v)) {
  8652  			break
  8653  		}
  8654  		v.reset(OpLOONG64SLLV)
  8655  		v.AddArg2(x, y)
  8656  		return true
  8657  	}
  8658  	// match: (Lsh16x32 <t> x y)
  8659  	// cond: !shiftIsBounded(v)
  8660  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  8661  	for {
  8662  		t := v.Type
  8663  		x := v_0
  8664  		y := v_1
  8665  		if !(!shiftIsBounded(v)) {
  8666  			break
  8667  		}
  8668  		v.reset(OpLOONG64MASKEQZ)
  8669  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8670  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8671  		v1.AddArg(y)
  8672  		v0.AddArg2(x, v1)
  8673  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8674  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8675  		v3.AuxInt = int64ToAuxInt(64)
  8676  		v2.AddArg2(v3, v1)
  8677  		v.AddArg2(v0, v2)
  8678  		return true
  8679  	}
  8680  	return false
  8681  }
  8682  func rewriteValueLOONG64_OpLsh16x64(v *Value) bool {
  8683  	v_1 := v.Args[1]
  8684  	v_0 := v.Args[0]
  8685  	b := v.Block
  8686  	typ := &b.Func.Config.Types
  8687  	// match: (Lsh16x64 x y)
  8688  	// cond: shiftIsBounded(v)
  8689  	// result: (SLLV x y)
  8690  	for {
  8691  		x := v_0
  8692  		y := v_1
  8693  		if !(shiftIsBounded(v)) {
  8694  			break
  8695  		}
  8696  		v.reset(OpLOONG64SLLV)
  8697  		v.AddArg2(x, y)
  8698  		return true
  8699  	}
  8700  	// match: (Lsh16x64 <t> x y)
  8701  	// cond: !shiftIsBounded(v)
  8702  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  8703  	for {
  8704  		t := v.Type
  8705  		x := v_0
  8706  		y := v_1
  8707  		if !(!shiftIsBounded(v)) {
  8708  			break
  8709  		}
  8710  		v.reset(OpLOONG64MASKEQZ)
  8711  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8712  		v0.AddArg2(x, y)
  8713  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8714  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8715  		v2.AuxInt = int64ToAuxInt(64)
  8716  		v1.AddArg2(v2, y)
  8717  		v.AddArg2(v0, v1)
  8718  		return true
  8719  	}
  8720  	return false
  8721  }
  8722  func rewriteValueLOONG64_OpLsh16x8(v *Value) bool {
  8723  	v_1 := v.Args[1]
  8724  	v_0 := v.Args[0]
  8725  	b := v.Block
  8726  	typ := &b.Func.Config.Types
  8727  	// match: (Lsh16x8 x y)
  8728  	// cond: shiftIsBounded(v)
  8729  	// result: (SLLV x y)
  8730  	for {
  8731  		x := v_0
  8732  		y := v_1
  8733  		if !(shiftIsBounded(v)) {
  8734  			break
  8735  		}
  8736  		v.reset(OpLOONG64SLLV)
  8737  		v.AddArg2(x, y)
  8738  		return true
  8739  	}
  8740  	// match: (Lsh16x8 <t> x y)
  8741  	// cond: !shiftIsBounded(v)
  8742  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  8743  	for {
  8744  		t := v.Type
  8745  		x := v_0
  8746  		y := v_1
  8747  		if !(!shiftIsBounded(v)) {
  8748  			break
  8749  		}
  8750  		v.reset(OpLOONG64MASKEQZ)
  8751  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8752  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8753  		v1.AddArg(y)
  8754  		v0.AddArg2(x, v1)
  8755  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8756  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8757  		v3.AuxInt = int64ToAuxInt(64)
  8758  		v2.AddArg2(v3, v1)
  8759  		v.AddArg2(v0, v2)
  8760  		return true
  8761  	}
  8762  	return false
  8763  }
  8764  func rewriteValueLOONG64_OpLsh32x16(v *Value) bool {
  8765  	v_1 := v.Args[1]
  8766  	v_0 := v.Args[0]
  8767  	b := v.Block
  8768  	typ := &b.Func.Config.Types
  8769  	// match: (Lsh32x16 x y)
  8770  	// cond: shiftIsBounded(v)
  8771  	// result: (SLL x y)
  8772  	for {
  8773  		x := v_0
  8774  		y := v_1
  8775  		if !(shiftIsBounded(v)) {
  8776  			break
  8777  		}
  8778  		v.reset(OpLOONG64SLL)
  8779  		v.AddArg2(x, y)
  8780  		return true
  8781  	}
  8782  	// match: (Lsh32x16 <t> x y)
  8783  	// cond: !shiftIsBounded(v)
  8784  	// result: (MASKEQZ (SLL <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt16to64 y)))
  8785  	for {
  8786  		t := v.Type
  8787  		x := v_0
  8788  		y := v_1
  8789  		if !(!shiftIsBounded(v)) {
  8790  			break
  8791  		}
  8792  		v.reset(OpLOONG64MASKEQZ)
  8793  		v0 := b.NewValue0(v.Pos, OpLOONG64SLL, t)
  8794  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8795  		v1.AddArg(y)
  8796  		v0.AddArg2(x, v1)
  8797  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8798  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8799  		v3.AuxInt = int64ToAuxInt(32)
  8800  		v2.AddArg2(v3, v1)
  8801  		v.AddArg2(v0, v2)
  8802  		return true
  8803  	}
  8804  	return false
  8805  }
  8806  func rewriteValueLOONG64_OpLsh32x32(v *Value) bool {
  8807  	v_1 := v.Args[1]
  8808  	v_0 := v.Args[0]
  8809  	b := v.Block
  8810  	typ := &b.Func.Config.Types
  8811  	// match: (Lsh32x32 x y)
  8812  	// cond: shiftIsBounded(v)
  8813  	// result: (SLL x y)
  8814  	for {
  8815  		x := v_0
  8816  		y := v_1
  8817  		if !(shiftIsBounded(v)) {
  8818  			break
  8819  		}
  8820  		v.reset(OpLOONG64SLL)
  8821  		v.AddArg2(x, y)
  8822  		return true
  8823  	}
  8824  	// match: (Lsh32x32 <t> x y)
  8825  	// cond: !shiftIsBounded(v)
  8826  	// result: (MASKEQZ (SLL <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt32to64 y)))
  8827  	for {
  8828  		t := v.Type
  8829  		x := v_0
  8830  		y := v_1
  8831  		if !(!shiftIsBounded(v)) {
  8832  			break
  8833  		}
  8834  		v.reset(OpLOONG64MASKEQZ)
  8835  		v0 := b.NewValue0(v.Pos, OpLOONG64SLL, t)
  8836  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  8837  		v1.AddArg(y)
  8838  		v0.AddArg2(x, v1)
  8839  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8840  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8841  		v3.AuxInt = int64ToAuxInt(32)
  8842  		v2.AddArg2(v3, v1)
  8843  		v.AddArg2(v0, v2)
  8844  		return true
  8845  	}
  8846  	return false
  8847  }
  8848  func rewriteValueLOONG64_OpLsh32x64(v *Value) bool {
  8849  	v_1 := v.Args[1]
  8850  	v_0 := v.Args[0]
  8851  	b := v.Block
  8852  	typ := &b.Func.Config.Types
  8853  	// match: (Lsh32x64 x y)
  8854  	// cond: shiftIsBounded(v)
  8855  	// result: (SLL x y)
  8856  	for {
  8857  		x := v_0
  8858  		y := v_1
  8859  		if !(shiftIsBounded(v)) {
  8860  			break
  8861  		}
  8862  		v.reset(OpLOONG64SLL)
  8863  		v.AddArg2(x, y)
  8864  		return true
  8865  	}
  8866  	// match: (Lsh32x64 <t> x y)
  8867  	// cond: !shiftIsBounded(v)
  8868  	// result: (MASKEQZ (SLL <t> x y) (SGTU (MOVVconst <typ.UInt64> [32]) y))
  8869  	for {
  8870  		t := v.Type
  8871  		x := v_0
  8872  		y := v_1
  8873  		if !(!shiftIsBounded(v)) {
  8874  			break
  8875  		}
  8876  		v.reset(OpLOONG64MASKEQZ)
  8877  		v0 := b.NewValue0(v.Pos, OpLOONG64SLL, t)
  8878  		v0.AddArg2(x, y)
  8879  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8880  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8881  		v2.AuxInt = int64ToAuxInt(32)
  8882  		v1.AddArg2(v2, y)
  8883  		v.AddArg2(v0, v1)
  8884  		return true
  8885  	}
  8886  	return false
  8887  }
  8888  func rewriteValueLOONG64_OpLsh32x8(v *Value) bool {
  8889  	v_1 := v.Args[1]
  8890  	v_0 := v.Args[0]
  8891  	b := v.Block
  8892  	typ := &b.Func.Config.Types
  8893  	// match: (Lsh32x8 x y)
  8894  	// cond: shiftIsBounded(v)
  8895  	// result: (SLL x y)
  8896  	for {
  8897  		x := v_0
  8898  		y := v_1
  8899  		if !(shiftIsBounded(v)) {
  8900  			break
  8901  		}
  8902  		v.reset(OpLOONG64SLL)
  8903  		v.AddArg2(x, y)
  8904  		return true
  8905  	}
  8906  	// match: (Lsh32x8 <t> x y)
  8907  	// cond: !shiftIsBounded(v)
  8908  	// result: (MASKEQZ (SLL <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt8to64 y)))
  8909  	for {
  8910  		t := v.Type
  8911  		x := v_0
  8912  		y := v_1
  8913  		if !(!shiftIsBounded(v)) {
  8914  			break
  8915  		}
  8916  		v.reset(OpLOONG64MASKEQZ)
  8917  		v0 := b.NewValue0(v.Pos, OpLOONG64SLL, t)
  8918  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  8919  		v1.AddArg(y)
  8920  		v0.AddArg2(x, v1)
  8921  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8922  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8923  		v3.AuxInt = int64ToAuxInt(32)
  8924  		v2.AddArg2(v3, v1)
  8925  		v.AddArg2(v0, v2)
  8926  		return true
  8927  	}
  8928  	return false
  8929  }
  8930  func rewriteValueLOONG64_OpLsh64x16(v *Value) bool {
  8931  	v_1 := v.Args[1]
  8932  	v_0 := v.Args[0]
  8933  	b := v.Block
  8934  	typ := &b.Func.Config.Types
  8935  	// match: (Lsh64x16 x y)
  8936  	// cond: shiftIsBounded(v)
  8937  	// result: (SLLV x y)
  8938  	for {
  8939  		x := v_0
  8940  		y := v_1
  8941  		if !(shiftIsBounded(v)) {
  8942  			break
  8943  		}
  8944  		v.reset(OpLOONG64SLLV)
  8945  		v.AddArg2(x, y)
  8946  		return true
  8947  	}
  8948  	// match: (Lsh64x16 <t> x y)
  8949  	// cond: !shiftIsBounded(v)
  8950  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  8951  	for {
  8952  		t := v.Type
  8953  		x := v_0
  8954  		y := v_1
  8955  		if !(!shiftIsBounded(v)) {
  8956  			break
  8957  		}
  8958  		v.reset(OpLOONG64MASKEQZ)
  8959  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  8960  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  8961  		v1.AddArg(y)
  8962  		v0.AddArg2(x, v1)
  8963  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  8964  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  8965  		v3.AuxInt = int64ToAuxInt(64)
  8966  		v2.AddArg2(v3, v1)
  8967  		v.AddArg2(v0, v2)
  8968  		return true
  8969  	}
  8970  	return false
  8971  }
  8972  func rewriteValueLOONG64_OpLsh64x32(v *Value) bool {
  8973  	v_1 := v.Args[1]
  8974  	v_0 := v.Args[0]
  8975  	b := v.Block
  8976  	typ := &b.Func.Config.Types
  8977  	// match: (Lsh64x32 x y)
  8978  	// cond: shiftIsBounded(v)
  8979  	// result: (SLLV x y)
  8980  	for {
  8981  		x := v_0
  8982  		y := v_1
  8983  		if !(shiftIsBounded(v)) {
  8984  			break
  8985  		}
  8986  		v.reset(OpLOONG64SLLV)
  8987  		v.AddArg2(x, y)
  8988  		return true
  8989  	}
  8990  	// match: (Lsh64x32 <t> x y)
  8991  	// cond: !shiftIsBounded(v)
  8992  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  8993  	for {
  8994  		t := v.Type
  8995  		x := v_0
  8996  		y := v_1
  8997  		if !(!shiftIsBounded(v)) {
  8998  			break
  8999  		}
  9000  		v.reset(OpLOONG64MASKEQZ)
  9001  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9002  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  9003  		v1.AddArg(y)
  9004  		v0.AddArg2(x, v1)
  9005  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9006  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9007  		v3.AuxInt = int64ToAuxInt(64)
  9008  		v2.AddArg2(v3, v1)
  9009  		v.AddArg2(v0, v2)
  9010  		return true
  9011  	}
  9012  	return false
  9013  }
  9014  func rewriteValueLOONG64_OpLsh64x64(v *Value) bool {
  9015  	v_1 := v.Args[1]
  9016  	v_0 := v.Args[0]
  9017  	b := v.Block
  9018  	typ := &b.Func.Config.Types
  9019  	// match: (Lsh64x64 x y)
  9020  	// cond: shiftIsBounded(v)
  9021  	// result: (SLLV x y)
  9022  	for {
  9023  		x := v_0
  9024  		y := v_1
  9025  		if !(shiftIsBounded(v)) {
  9026  			break
  9027  		}
  9028  		v.reset(OpLOONG64SLLV)
  9029  		v.AddArg2(x, y)
  9030  		return true
  9031  	}
  9032  	// match: (Lsh64x64 <t> x y)
  9033  	// cond: !shiftIsBounded(v)
  9034  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  9035  	for {
  9036  		t := v.Type
  9037  		x := v_0
  9038  		y := v_1
  9039  		if !(!shiftIsBounded(v)) {
  9040  			break
  9041  		}
  9042  		v.reset(OpLOONG64MASKEQZ)
  9043  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9044  		v0.AddArg2(x, y)
  9045  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9046  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9047  		v2.AuxInt = int64ToAuxInt(64)
  9048  		v1.AddArg2(v2, y)
  9049  		v.AddArg2(v0, v1)
  9050  		return true
  9051  	}
  9052  	return false
  9053  }
  9054  func rewriteValueLOONG64_OpLsh64x8(v *Value) bool {
  9055  	v_1 := v.Args[1]
  9056  	v_0 := v.Args[0]
  9057  	b := v.Block
  9058  	typ := &b.Func.Config.Types
  9059  	// match: (Lsh64x8 x y)
  9060  	// cond: shiftIsBounded(v)
  9061  	// result: (SLLV x y)
  9062  	for {
  9063  		x := v_0
  9064  		y := v_1
  9065  		if !(shiftIsBounded(v)) {
  9066  			break
  9067  		}
  9068  		v.reset(OpLOONG64SLLV)
  9069  		v.AddArg2(x, y)
  9070  		return true
  9071  	}
  9072  	// match: (Lsh64x8 <t> x y)
  9073  	// cond: !shiftIsBounded(v)
  9074  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  9075  	for {
  9076  		t := v.Type
  9077  		x := v_0
  9078  		y := v_1
  9079  		if !(!shiftIsBounded(v)) {
  9080  			break
  9081  		}
  9082  		v.reset(OpLOONG64MASKEQZ)
  9083  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9084  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9085  		v1.AddArg(y)
  9086  		v0.AddArg2(x, v1)
  9087  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9088  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9089  		v3.AuxInt = int64ToAuxInt(64)
  9090  		v2.AddArg2(v3, v1)
  9091  		v.AddArg2(v0, v2)
  9092  		return true
  9093  	}
  9094  	return false
  9095  }
  9096  func rewriteValueLOONG64_OpLsh8x16(v *Value) bool {
  9097  	v_1 := v.Args[1]
  9098  	v_0 := v.Args[0]
  9099  	b := v.Block
  9100  	typ := &b.Func.Config.Types
  9101  	// match: (Lsh8x16 x y)
  9102  	// cond: shiftIsBounded(v)
  9103  	// result: (SLLV x y)
  9104  	for {
  9105  		x := v_0
  9106  		y := v_1
  9107  		if !(shiftIsBounded(v)) {
  9108  			break
  9109  		}
  9110  		v.reset(OpLOONG64SLLV)
  9111  		v.AddArg2(x, y)
  9112  		return true
  9113  	}
  9114  	// match: (Lsh8x16 <t> x y)
  9115  	// cond: !shiftIsBounded(v)
  9116  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  9117  	for {
  9118  		t := v.Type
  9119  		x := v_0
  9120  		y := v_1
  9121  		if !(!shiftIsBounded(v)) {
  9122  			break
  9123  		}
  9124  		v.reset(OpLOONG64MASKEQZ)
  9125  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9126  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  9127  		v1.AddArg(y)
  9128  		v0.AddArg2(x, v1)
  9129  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9130  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9131  		v3.AuxInt = int64ToAuxInt(64)
  9132  		v2.AddArg2(v3, v1)
  9133  		v.AddArg2(v0, v2)
  9134  		return true
  9135  	}
  9136  	return false
  9137  }
  9138  func rewriteValueLOONG64_OpLsh8x32(v *Value) bool {
  9139  	v_1 := v.Args[1]
  9140  	v_0 := v.Args[0]
  9141  	b := v.Block
  9142  	typ := &b.Func.Config.Types
  9143  	// match: (Lsh8x32 x y)
  9144  	// cond: shiftIsBounded(v)
  9145  	// result: (SLLV x y)
  9146  	for {
  9147  		x := v_0
  9148  		y := v_1
  9149  		if !(shiftIsBounded(v)) {
  9150  			break
  9151  		}
  9152  		v.reset(OpLOONG64SLLV)
  9153  		v.AddArg2(x, y)
  9154  		return true
  9155  	}
  9156  	// match: (Lsh8x32 <t> x y)
  9157  	// cond: !shiftIsBounded(v)
  9158  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  9159  	for {
  9160  		t := v.Type
  9161  		x := v_0
  9162  		y := v_1
  9163  		if !(!shiftIsBounded(v)) {
  9164  			break
  9165  		}
  9166  		v.reset(OpLOONG64MASKEQZ)
  9167  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9168  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  9169  		v1.AddArg(y)
  9170  		v0.AddArg2(x, v1)
  9171  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9172  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9173  		v3.AuxInt = int64ToAuxInt(64)
  9174  		v2.AddArg2(v3, v1)
  9175  		v.AddArg2(v0, v2)
  9176  		return true
  9177  	}
  9178  	return false
  9179  }
  9180  func rewriteValueLOONG64_OpLsh8x64(v *Value) bool {
  9181  	v_1 := v.Args[1]
  9182  	v_0 := v.Args[0]
  9183  	b := v.Block
  9184  	typ := &b.Func.Config.Types
  9185  	// match: (Lsh8x64 x y)
  9186  	// cond: shiftIsBounded(v)
  9187  	// result: (SLLV x y)
  9188  	for {
  9189  		x := v_0
  9190  		y := v_1
  9191  		if !(shiftIsBounded(v)) {
  9192  			break
  9193  		}
  9194  		v.reset(OpLOONG64SLLV)
  9195  		v.AddArg2(x, y)
  9196  		return true
  9197  	}
  9198  	// match: (Lsh8x64 <t> x y)
  9199  	// cond: !shiftIsBounded(v)
  9200  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  9201  	for {
  9202  		t := v.Type
  9203  		x := v_0
  9204  		y := v_1
  9205  		if !(!shiftIsBounded(v)) {
  9206  			break
  9207  		}
  9208  		v.reset(OpLOONG64MASKEQZ)
  9209  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9210  		v0.AddArg2(x, y)
  9211  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9212  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9213  		v2.AuxInt = int64ToAuxInt(64)
  9214  		v1.AddArg2(v2, y)
  9215  		v.AddArg2(v0, v1)
  9216  		return true
  9217  	}
  9218  	return false
  9219  }
  9220  func rewriteValueLOONG64_OpLsh8x8(v *Value) bool {
  9221  	v_1 := v.Args[1]
  9222  	v_0 := v.Args[0]
  9223  	b := v.Block
  9224  	typ := &b.Func.Config.Types
  9225  	// match: (Lsh8x8 x y)
  9226  	// cond: shiftIsBounded(v)
  9227  	// result: (SLLV x y)
  9228  	for {
  9229  		x := v_0
  9230  		y := v_1
  9231  		if !(shiftIsBounded(v)) {
  9232  			break
  9233  		}
  9234  		v.reset(OpLOONG64SLLV)
  9235  		v.AddArg2(x, y)
  9236  		return true
  9237  	}
  9238  	// match: (Lsh8x8 <t> x y)
  9239  	// cond: !shiftIsBounded(v)
  9240  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  9241  	for {
  9242  		t := v.Type
  9243  		x := v_0
  9244  		y := v_1
  9245  		if !(!shiftIsBounded(v)) {
  9246  			break
  9247  		}
  9248  		v.reset(OpLOONG64MASKEQZ)
  9249  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
  9250  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9251  		v1.AddArg(y)
  9252  		v0.AddArg2(x, v1)
  9253  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
  9254  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9255  		v3.AuxInt = int64ToAuxInt(64)
  9256  		v2.AddArg2(v3, v1)
  9257  		v.AddArg2(v0, v2)
  9258  		return true
  9259  	}
  9260  	return false
  9261  }
  9262  func rewriteValueLOONG64_OpMod16(v *Value) bool {
  9263  	v_1 := v.Args[1]
  9264  	v_0 := v.Args[0]
  9265  	b := v.Block
  9266  	typ := &b.Func.Config.Types
  9267  	// match: (Mod16 x y)
  9268  	// result: (REMV (SignExt16to64 x) (SignExt16to64 y))
  9269  	for {
  9270  		x := v_0
  9271  		y := v_1
  9272  		v.reset(OpLOONG64REMV)
  9273  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  9274  		v0.AddArg(x)
  9275  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  9276  		v1.AddArg(y)
  9277  		v.AddArg2(v0, v1)
  9278  		return true
  9279  	}
  9280  }
  9281  func rewriteValueLOONG64_OpMod16u(v *Value) bool {
  9282  	v_1 := v.Args[1]
  9283  	v_0 := v.Args[0]
  9284  	b := v.Block
  9285  	typ := &b.Func.Config.Types
  9286  	// match: (Mod16u x y)
  9287  	// result: (REMVU (ZeroExt16to64 x) (ZeroExt16to64 y))
  9288  	for {
  9289  		x := v_0
  9290  		y := v_1
  9291  		v.reset(OpLOONG64REMVU)
  9292  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  9293  		v0.AddArg(x)
  9294  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  9295  		v1.AddArg(y)
  9296  		v.AddArg2(v0, v1)
  9297  		return true
  9298  	}
  9299  }
  9300  func rewriteValueLOONG64_OpMod32(v *Value) bool {
  9301  	v_1 := v.Args[1]
  9302  	v_0 := v.Args[0]
  9303  	b := v.Block
  9304  	typ := &b.Func.Config.Types
  9305  	// match: (Mod32 x y)
  9306  	// result: (REMV (SignExt32to64 x) (SignExt32to64 y))
  9307  	for {
  9308  		x := v_0
  9309  		y := v_1
  9310  		v.reset(OpLOONG64REMV)
  9311  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  9312  		v0.AddArg(x)
  9313  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  9314  		v1.AddArg(y)
  9315  		v.AddArg2(v0, v1)
  9316  		return true
  9317  	}
  9318  }
  9319  func rewriteValueLOONG64_OpMod32u(v *Value) bool {
  9320  	v_1 := v.Args[1]
  9321  	v_0 := v.Args[0]
  9322  	b := v.Block
  9323  	typ := &b.Func.Config.Types
  9324  	// match: (Mod32u x y)
  9325  	// result: (REMVU (ZeroExt32to64 x) (ZeroExt32to64 y))
  9326  	for {
  9327  		x := v_0
  9328  		y := v_1
  9329  		v.reset(OpLOONG64REMVU)
  9330  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  9331  		v0.AddArg(x)
  9332  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  9333  		v1.AddArg(y)
  9334  		v.AddArg2(v0, v1)
  9335  		return true
  9336  	}
  9337  }
  9338  func rewriteValueLOONG64_OpMod64(v *Value) bool {
  9339  	v_1 := v.Args[1]
  9340  	v_0 := v.Args[0]
  9341  	// match: (Mod64 x y)
  9342  	// result: (REMV x y)
  9343  	for {
  9344  		x := v_0
  9345  		y := v_1
  9346  		v.reset(OpLOONG64REMV)
  9347  		v.AddArg2(x, y)
  9348  		return true
  9349  	}
  9350  }
  9351  func rewriteValueLOONG64_OpMod8(v *Value) bool {
  9352  	v_1 := v.Args[1]
  9353  	v_0 := v.Args[0]
  9354  	b := v.Block
  9355  	typ := &b.Func.Config.Types
  9356  	// match: (Mod8 x y)
  9357  	// result: (REMV (SignExt8to64 x) (SignExt8to64 y))
  9358  	for {
  9359  		x := v_0
  9360  		y := v_1
  9361  		v.reset(OpLOONG64REMV)
  9362  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  9363  		v0.AddArg(x)
  9364  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  9365  		v1.AddArg(y)
  9366  		v.AddArg2(v0, v1)
  9367  		return true
  9368  	}
  9369  }
  9370  func rewriteValueLOONG64_OpMod8u(v *Value) bool {
  9371  	v_1 := v.Args[1]
  9372  	v_0 := v.Args[0]
  9373  	b := v.Block
  9374  	typ := &b.Func.Config.Types
  9375  	// match: (Mod8u x y)
  9376  	// result: (REMVU (ZeroExt8to64 x) (ZeroExt8to64 y))
  9377  	for {
  9378  		x := v_0
  9379  		y := v_1
  9380  		v.reset(OpLOONG64REMVU)
  9381  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9382  		v0.AddArg(x)
  9383  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9384  		v1.AddArg(y)
  9385  		v.AddArg2(v0, v1)
  9386  		return true
  9387  	}
  9388  }
  9389  func rewriteValueLOONG64_OpMove(v *Value) bool {
  9390  	v_2 := v.Args[2]
  9391  	v_1 := v.Args[1]
  9392  	v_0 := v.Args[0]
  9393  	b := v.Block
  9394  	typ := &b.Func.Config.Types
  9395  	// match: (Move [0] _ _ mem)
  9396  	// result: mem
  9397  	for {
  9398  		if auxIntToInt64(v.AuxInt) != 0 {
  9399  			break
  9400  		}
  9401  		mem := v_2
  9402  		v.copyOf(mem)
  9403  		return true
  9404  	}
  9405  	// match: (Move [1] dst src mem)
  9406  	// result: (MOVBstore dst (MOVBUload src mem) mem)
  9407  	for {
  9408  		if auxIntToInt64(v.AuxInt) != 1 {
  9409  			break
  9410  		}
  9411  		dst := v_0
  9412  		src := v_1
  9413  		mem := v_2
  9414  		v.reset(OpLOONG64MOVBstore)
  9415  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVBUload, typ.UInt8)
  9416  		v0.AddArg2(src, mem)
  9417  		v.AddArg3(dst, v0, mem)
  9418  		return true
  9419  	}
  9420  	// match: (Move [2] dst src mem)
  9421  	// result: (MOVHstore dst (MOVHUload src mem) mem)
  9422  	for {
  9423  		if auxIntToInt64(v.AuxInt) != 2 {
  9424  			break
  9425  		}
  9426  		dst := v_0
  9427  		src := v_1
  9428  		mem := v_2
  9429  		v.reset(OpLOONG64MOVHstore)
  9430  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVHUload, typ.UInt16)
  9431  		v0.AddArg2(src, mem)
  9432  		v.AddArg3(dst, v0, mem)
  9433  		return true
  9434  	}
  9435  	// match: (Move [3] dst src mem)
  9436  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
  9437  	for {
  9438  		if auxIntToInt64(v.AuxInt) != 3 {
  9439  			break
  9440  		}
  9441  		dst := v_0
  9442  		src := v_1
  9443  		mem := v_2
  9444  		v.reset(OpLOONG64MOVBstore)
  9445  		v.AuxInt = int32ToAuxInt(2)
  9446  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVBUload, typ.UInt8)
  9447  		v0.AuxInt = int32ToAuxInt(2)
  9448  		v0.AddArg2(src, mem)
  9449  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVHstore, types.TypeMem)
  9450  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVHUload, typ.UInt16)
  9451  		v2.AddArg2(src, mem)
  9452  		v1.AddArg3(dst, v2, mem)
  9453  		v.AddArg3(dst, v0, v1)
  9454  		return true
  9455  	}
  9456  	// match: (Move [4] dst src mem)
  9457  	// result: (MOVWstore dst (MOVWUload src mem) mem)
  9458  	for {
  9459  		if auxIntToInt64(v.AuxInt) != 4 {
  9460  			break
  9461  		}
  9462  		dst := v_0
  9463  		src := v_1
  9464  		mem := v_2
  9465  		v.reset(OpLOONG64MOVWstore)
  9466  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9467  		v0.AddArg2(src, mem)
  9468  		v.AddArg3(dst, v0, mem)
  9469  		return true
  9470  	}
  9471  	// match: (Move [5] dst src mem)
  9472  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9473  	for {
  9474  		if auxIntToInt64(v.AuxInt) != 5 {
  9475  			break
  9476  		}
  9477  		dst := v_0
  9478  		src := v_1
  9479  		mem := v_2
  9480  		v.reset(OpLOONG64MOVBstore)
  9481  		v.AuxInt = int32ToAuxInt(4)
  9482  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVBUload, typ.UInt8)
  9483  		v0.AuxInt = int32ToAuxInt(4)
  9484  		v0.AddArg2(src, mem)
  9485  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
  9486  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9487  		v2.AddArg2(src, mem)
  9488  		v1.AddArg3(dst, v2, mem)
  9489  		v.AddArg3(dst, v0, v1)
  9490  		return true
  9491  	}
  9492  	// match: (Move [6] dst src mem)
  9493  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9494  	for {
  9495  		if auxIntToInt64(v.AuxInt) != 6 {
  9496  			break
  9497  		}
  9498  		dst := v_0
  9499  		src := v_1
  9500  		mem := v_2
  9501  		v.reset(OpLOONG64MOVHstore)
  9502  		v.AuxInt = int32ToAuxInt(4)
  9503  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVHUload, typ.UInt16)
  9504  		v0.AuxInt = int32ToAuxInt(4)
  9505  		v0.AddArg2(src, mem)
  9506  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
  9507  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9508  		v2.AddArg2(src, mem)
  9509  		v1.AddArg3(dst, v2, mem)
  9510  		v.AddArg3(dst, v0, v1)
  9511  		return true
  9512  	}
  9513  	// match: (Move [7] dst src mem)
  9514  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9515  	for {
  9516  		if auxIntToInt64(v.AuxInt) != 7 {
  9517  			break
  9518  		}
  9519  		dst := v_0
  9520  		src := v_1
  9521  		mem := v_2
  9522  		v.reset(OpLOONG64MOVWstore)
  9523  		v.AuxInt = int32ToAuxInt(3)
  9524  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9525  		v0.AuxInt = int32ToAuxInt(3)
  9526  		v0.AddArg2(src, mem)
  9527  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
  9528  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9529  		v2.AddArg2(src, mem)
  9530  		v1.AddArg3(dst, v2, mem)
  9531  		v.AddArg3(dst, v0, v1)
  9532  		return true
  9533  	}
  9534  	// match: (Move [8] dst src mem)
  9535  	// result: (MOVVstore dst (MOVVload src mem) mem)
  9536  	for {
  9537  		if auxIntToInt64(v.AuxInt) != 8 {
  9538  			break
  9539  		}
  9540  		dst := v_0
  9541  		src := v_1
  9542  		mem := v_2
  9543  		v.reset(OpLOONG64MOVVstore)
  9544  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9545  		v0.AddArg2(src, mem)
  9546  		v.AddArg3(dst, v0, mem)
  9547  		return true
  9548  	}
  9549  	// match: (Move [9] dst src mem)
  9550  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9551  	for {
  9552  		if auxIntToInt64(v.AuxInt) != 9 {
  9553  			break
  9554  		}
  9555  		dst := v_0
  9556  		src := v_1
  9557  		mem := v_2
  9558  		v.reset(OpLOONG64MOVBstore)
  9559  		v.AuxInt = int32ToAuxInt(8)
  9560  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVBUload, typ.UInt8)
  9561  		v0.AuxInt = int32ToAuxInt(8)
  9562  		v0.AddArg2(src, mem)
  9563  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9564  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9565  		v2.AddArg2(src, mem)
  9566  		v1.AddArg3(dst, v2, mem)
  9567  		v.AddArg3(dst, v0, v1)
  9568  		return true
  9569  	}
  9570  	// match: (Move [10] dst src mem)
  9571  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9572  	for {
  9573  		if auxIntToInt64(v.AuxInt) != 10 {
  9574  			break
  9575  		}
  9576  		dst := v_0
  9577  		src := v_1
  9578  		mem := v_2
  9579  		v.reset(OpLOONG64MOVHstore)
  9580  		v.AuxInt = int32ToAuxInt(8)
  9581  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVHUload, typ.UInt16)
  9582  		v0.AuxInt = int32ToAuxInt(8)
  9583  		v0.AddArg2(src, mem)
  9584  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9585  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9586  		v2.AddArg2(src, mem)
  9587  		v1.AddArg3(dst, v2, mem)
  9588  		v.AddArg3(dst, v0, v1)
  9589  		return true
  9590  	}
  9591  	// match: (Move [11] dst src mem)
  9592  	// result: (MOVWstore [7] dst (MOVWload [7] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9593  	for {
  9594  		if auxIntToInt64(v.AuxInt) != 11 {
  9595  			break
  9596  		}
  9597  		dst := v_0
  9598  		src := v_1
  9599  		mem := v_2
  9600  		v.reset(OpLOONG64MOVWstore)
  9601  		v.AuxInt = int32ToAuxInt(7)
  9602  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVWload, typ.Int32)
  9603  		v0.AuxInt = int32ToAuxInt(7)
  9604  		v0.AddArg2(src, mem)
  9605  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9606  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9607  		v2.AddArg2(src, mem)
  9608  		v1.AddArg3(dst, v2, mem)
  9609  		v.AddArg3(dst, v0, v1)
  9610  		return true
  9611  	}
  9612  	// match: (Move [12] dst src mem)
  9613  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9614  	for {
  9615  		if auxIntToInt64(v.AuxInt) != 12 {
  9616  			break
  9617  		}
  9618  		dst := v_0
  9619  		src := v_1
  9620  		mem := v_2
  9621  		v.reset(OpLOONG64MOVWstore)
  9622  		v.AuxInt = int32ToAuxInt(8)
  9623  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVWUload, typ.UInt32)
  9624  		v0.AuxInt = int32ToAuxInt(8)
  9625  		v0.AddArg2(src, mem)
  9626  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9627  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9628  		v2.AddArg2(src, mem)
  9629  		v1.AddArg3(dst, v2, mem)
  9630  		v.AddArg3(dst, v0, v1)
  9631  		return true
  9632  	}
  9633  	// match: (Move [13] dst src mem)
  9634  	// result: (MOVVstore [5] dst (MOVVload [5] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9635  	for {
  9636  		if auxIntToInt64(v.AuxInt) != 13 {
  9637  			break
  9638  		}
  9639  		dst := v_0
  9640  		src := v_1
  9641  		mem := v_2
  9642  		v.reset(OpLOONG64MOVVstore)
  9643  		v.AuxInt = int32ToAuxInt(5)
  9644  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9645  		v0.AuxInt = int32ToAuxInt(5)
  9646  		v0.AddArg2(src, mem)
  9647  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9648  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9649  		v2.AddArg2(src, mem)
  9650  		v1.AddArg3(dst, v2, mem)
  9651  		v.AddArg3(dst, v0, v1)
  9652  		return true
  9653  	}
  9654  	// match: (Move [14] dst src mem)
  9655  	// result: (MOVVstore [6] dst (MOVVload [6] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9656  	for {
  9657  		if auxIntToInt64(v.AuxInt) != 14 {
  9658  			break
  9659  		}
  9660  		dst := v_0
  9661  		src := v_1
  9662  		mem := v_2
  9663  		v.reset(OpLOONG64MOVVstore)
  9664  		v.AuxInt = int32ToAuxInt(6)
  9665  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9666  		v0.AuxInt = int32ToAuxInt(6)
  9667  		v0.AddArg2(src, mem)
  9668  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9669  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9670  		v2.AddArg2(src, mem)
  9671  		v1.AddArg3(dst, v2, mem)
  9672  		v.AddArg3(dst, v0, v1)
  9673  		return true
  9674  	}
  9675  	// match: (Move [15] dst src mem)
  9676  	// result: (MOVVstore [7] dst (MOVVload [7] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9677  	for {
  9678  		if auxIntToInt64(v.AuxInt) != 15 {
  9679  			break
  9680  		}
  9681  		dst := v_0
  9682  		src := v_1
  9683  		mem := v_2
  9684  		v.reset(OpLOONG64MOVVstore)
  9685  		v.AuxInt = int32ToAuxInt(7)
  9686  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9687  		v0.AuxInt = int32ToAuxInt(7)
  9688  		v0.AddArg2(src, mem)
  9689  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9690  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9691  		v2.AddArg2(src, mem)
  9692  		v1.AddArg3(dst, v2, mem)
  9693  		v.AddArg3(dst, v0, v1)
  9694  		return true
  9695  	}
  9696  	// match: (Move [16] dst src mem)
  9697  	// result: (MOVVstore [8] dst (MOVVload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9698  	for {
  9699  		if auxIntToInt64(v.AuxInt) != 16 {
  9700  			break
  9701  		}
  9702  		dst := v_0
  9703  		src := v_1
  9704  		mem := v_2
  9705  		v.reset(OpLOONG64MOVVstore)
  9706  		v.AuxInt = int32ToAuxInt(8)
  9707  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9708  		v0.AuxInt = int32ToAuxInt(8)
  9709  		v0.AddArg2(src, mem)
  9710  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
  9711  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVload, typ.UInt64)
  9712  		v2.AddArg2(src, mem)
  9713  		v1.AddArg3(dst, v2, mem)
  9714  		v.AddArg3(dst, v0, v1)
  9715  		return true
  9716  	}
  9717  	// match: (Move [s] dst src mem)
  9718  	// cond: s > 16 && s < 192 && logLargeCopy(v, s)
  9719  	// result: (LoweredMove [s] dst src mem)
  9720  	for {
  9721  		s := auxIntToInt64(v.AuxInt)
  9722  		dst := v_0
  9723  		src := v_1
  9724  		mem := v_2
  9725  		if !(s > 16 && s < 192 && logLargeCopy(v, s)) {
  9726  			break
  9727  		}
  9728  		v.reset(OpLOONG64LoweredMove)
  9729  		v.AuxInt = int64ToAuxInt(s)
  9730  		v.AddArg3(dst, src, mem)
  9731  		return true
  9732  	}
  9733  	// match: (Move [s] dst src mem)
  9734  	// cond: s >= 192 && logLargeCopy(v, s)
  9735  	// result: (LoweredMoveLoop [s] dst src mem)
  9736  	for {
  9737  		s := auxIntToInt64(v.AuxInt)
  9738  		dst := v_0
  9739  		src := v_1
  9740  		mem := v_2
  9741  		if !(s >= 192 && logLargeCopy(v, s)) {
  9742  			break
  9743  		}
  9744  		v.reset(OpLOONG64LoweredMoveLoop)
  9745  		v.AuxInt = int64ToAuxInt(s)
  9746  		v.AddArg3(dst, src, mem)
  9747  		return true
  9748  	}
  9749  	return false
  9750  }
  9751  func rewriteValueLOONG64_OpNeq16(v *Value) bool {
  9752  	v_1 := v.Args[1]
  9753  	v_0 := v.Args[0]
  9754  	b := v.Block
  9755  	typ := &b.Func.Config.Types
  9756  	// match: (Neq16 x y)
  9757  	// result: (SGTU (XOR (ZeroExt16to32 x) (ZeroExt16to64 y)) (MOVVconst [0]))
  9758  	for {
  9759  		x := v_0
  9760  		y := v_1
  9761  		v.reset(OpLOONG64SGTU)
  9762  		v0 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  9763  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  9764  		v1.AddArg(x)
  9765  		v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  9766  		v2.AddArg(y)
  9767  		v0.AddArg2(v1, v2)
  9768  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9769  		v3.AuxInt = int64ToAuxInt(0)
  9770  		v.AddArg2(v0, v3)
  9771  		return true
  9772  	}
  9773  }
  9774  func rewriteValueLOONG64_OpNeq32(v *Value) bool {
  9775  	v_1 := v.Args[1]
  9776  	v_0 := v.Args[0]
  9777  	b := v.Block
  9778  	typ := &b.Func.Config.Types
  9779  	// match: (Neq32 x y)
  9780  	// result: (SGTU (XOR (ZeroExt32to64 x) (ZeroExt32to64 y)) (MOVVconst [0]))
  9781  	for {
  9782  		x := v_0
  9783  		y := v_1
  9784  		v.reset(OpLOONG64SGTU)
  9785  		v0 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  9786  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  9787  		v1.AddArg(x)
  9788  		v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  9789  		v2.AddArg(y)
  9790  		v0.AddArg2(v1, v2)
  9791  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9792  		v3.AuxInt = int64ToAuxInt(0)
  9793  		v.AddArg2(v0, v3)
  9794  		return true
  9795  	}
  9796  }
  9797  func rewriteValueLOONG64_OpNeq32F(v *Value) bool {
  9798  	v_1 := v.Args[1]
  9799  	v_0 := v.Args[0]
  9800  	b := v.Block
  9801  	// match: (Neq32F x y)
  9802  	// result: (FPFlagFalse (CMPEQF x y))
  9803  	for {
  9804  		x := v_0
  9805  		y := v_1
  9806  		v.reset(OpLOONG64FPFlagFalse)
  9807  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPEQF, types.TypeFlags)
  9808  		v0.AddArg2(x, y)
  9809  		v.AddArg(v0)
  9810  		return true
  9811  	}
  9812  }
  9813  func rewriteValueLOONG64_OpNeq64(v *Value) bool {
  9814  	v_1 := v.Args[1]
  9815  	v_0 := v.Args[0]
  9816  	b := v.Block
  9817  	typ := &b.Func.Config.Types
  9818  	// match: (Neq64 x y)
  9819  	// result: (SGTU (XOR x y) (MOVVconst [0]))
  9820  	for {
  9821  		x := v_0
  9822  		y := v_1
  9823  		v.reset(OpLOONG64SGTU)
  9824  		v0 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  9825  		v0.AddArg2(x, y)
  9826  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9827  		v1.AuxInt = int64ToAuxInt(0)
  9828  		v.AddArg2(v0, v1)
  9829  		return true
  9830  	}
  9831  }
  9832  func rewriteValueLOONG64_OpNeq64F(v *Value) bool {
  9833  	v_1 := v.Args[1]
  9834  	v_0 := v.Args[0]
  9835  	b := v.Block
  9836  	// match: (Neq64F x y)
  9837  	// result: (FPFlagFalse (CMPEQD x y))
  9838  	for {
  9839  		x := v_0
  9840  		y := v_1
  9841  		v.reset(OpLOONG64FPFlagFalse)
  9842  		v0 := b.NewValue0(v.Pos, OpLOONG64CMPEQD, types.TypeFlags)
  9843  		v0.AddArg2(x, y)
  9844  		v.AddArg(v0)
  9845  		return true
  9846  	}
  9847  }
  9848  func rewriteValueLOONG64_OpNeq8(v *Value) bool {
  9849  	v_1 := v.Args[1]
  9850  	v_0 := v.Args[0]
  9851  	b := v.Block
  9852  	typ := &b.Func.Config.Types
  9853  	// match: (Neq8 x y)
  9854  	// result: (SGTU (XOR (ZeroExt8to64 x) (ZeroExt8to64 y)) (MOVVconst [0]))
  9855  	for {
  9856  		x := v_0
  9857  		y := v_1
  9858  		v.reset(OpLOONG64SGTU)
  9859  		v0 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  9860  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9861  		v1.AddArg(x)
  9862  		v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  9863  		v2.AddArg(y)
  9864  		v0.AddArg2(v1, v2)
  9865  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9866  		v3.AuxInt = int64ToAuxInt(0)
  9867  		v.AddArg2(v0, v3)
  9868  		return true
  9869  	}
  9870  }
  9871  func rewriteValueLOONG64_OpNeqPtr(v *Value) bool {
  9872  	v_1 := v.Args[1]
  9873  	v_0 := v.Args[0]
  9874  	b := v.Block
  9875  	typ := &b.Func.Config.Types
  9876  	// match: (NeqPtr x y)
  9877  	// result: (SGTU (XOR x y) (MOVVconst [0]))
  9878  	for {
  9879  		x := v_0
  9880  		y := v_1
  9881  		v.reset(OpLOONG64SGTU)
  9882  		v0 := b.NewValue0(v.Pos, OpLOONG64XOR, typ.UInt64)
  9883  		v0.AddArg2(x, y)
  9884  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
  9885  		v1.AuxInt = int64ToAuxInt(0)
  9886  		v.AddArg2(v0, v1)
  9887  		return true
  9888  	}
  9889  }
  9890  func rewriteValueLOONG64_OpNot(v *Value) bool {
  9891  	v_0 := v.Args[0]
  9892  	// match: (Not x)
  9893  	// result: (XORconst [1] x)
  9894  	for {
  9895  		x := v_0
  9896  		v.reset(OpLOONG64XORconst)
  9897  		v.AuxInt = int64ToAuxInt(1)
  9898  		v.AddArg(x)
  9899  		return true
  9900  	}
  9901  }
  9902  func rewriteValueLOONG64_OpOffPtr(v *Value) bool {
  9903  	v_0 := v.Args[0]
  9904  	// match: (OffPtr [off] ptr:(SP))
  9905  	// result: (MOVVaddr [int32(off)] ptr)
  9906  	for {
  9907  		off := auxIntToInt64(v.AuxInt)
  9908  		ptr := v_0
  9909  		if ptr.Op != OpSP {
  9910  			break
  9911  		}
  9912  		v.reset(OpLOONG64MOVVaddr)
  9913  		v.AuxInt = int32ToAuxInt(int32(off))
  9914  		v.AddArg(ptr)
  9915  		return true
  9916  	}
  9917  	// match: (OffPtr [off] ptr)
  9918  	// result: (ADDVconst [off] ptr)
  9919  	for {
  9920  		off := auxIntToInt64(v.AuxInt)
  9921  		ptr := v_0
  9922  		v.reset(OpLOONG64ADDVconst)
  9923  		v.AuxInt = int64ToAuxInt(off)
  9924  		v.AddArg(ptr)
  9925  		return true
  9926  	}
  9927  }
  9928  func rewriteValueLOONG64_OpPopCount16(v *Value) bool {
  9929  	v_0 := v.Args[0]
  9930  	b := v.Block
  9931  	typ := &b.Func.Config.Types
  9932  	// match: (PopCount16 <t> x)
  9933  	// result: (MOVWfpgp <t> (VPCNT16 <typ.Float32> (MOVWgpfp <typ.Float32> (ZeroExt16to32 x))))
  9934  	for {
  9935  		t := v.Type
  9936  		x := v_0
  9937  		v.reset(OpLOONG64MOVWfpgp)
  9938  		v.Type = t
  9939  		v0 := b.NewValue0(v.Pos, OpLOONG64VPCNT16, typ.Float32)
  9940  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWgpfp, typ.Float32)
  9941  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  9942  		v2.AddArg(x)
  9943  		v1.AddArg(v2)
  9944  		v0.AddArg(v1)
  9945  		v.AddArg(v0)
  9946  		return true
  9947  	}
  9948  }
  9949  func rewriteValueLOONG64_OpPopCount32(v *Value) bool {
  9950  	v_0 := v.Args[0]
  9951  	b := v.Block
  9952  	typ := &b.Func.Config.Types
  9953  	// match: (PopCount32 <t> x)
  9954  	// result: (MOVWfpgp <t> (VPCNT32 <typ.Float32> (MOVWgpfp <typ.Float32> x)))
  9955  	for {
  9956  		t := v.Type
  9957  		x := v_0
  9958  		v.reset(OpLOONG64MOVWfpgp)
  9959  		v.Type = t
  9960  		v0 := b.NewValue0(v.Pos, OpLOONG64VPCNT32, typ.Float32)
  9961  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWgpfp, typ.Float32)
  9962  		v1.AddArg(x)
  9963  		v0.AddArg(v1)
  9964  		v.AddArg(v0)
  9965  		return true
  9966  	}
  9967  }
  9968  func rewriteValueLOONG64_OpPopCount64(v *Value) bool {
  9969  	v_0 := v.Args[0]
  9970  	b := v.Block
  9971  	typ := &b.Func.Config.Types
  9972  	// match: (PopCount64 <t> x)
  9973  	// result: (MOVVfpgp <t> (VPCNT64 <typ.Float64> (MOVVgpfp <typ.Float64> x)))
  9974  	for {
  9975  		t := v.Type
  9976  		x := v_0
  9977  		v.reset(OpLOONG64MOVVfpgp)
  9978  		v.Type = t
  9979  		v0 := b.NewValue0(v.Pos, OpLOONG64VPCNT64, typ.Float64)
  9980  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVgpfp, typ.Float64)
  9981  		v1.AddArg(x)
  9982  		v0.AddArg(v1)
  9983  		v.AddArg(v0)
  9984  		return true
  9985  	}
  9986  }
  9987  func rewriteValueLOONG64_OpPrefetchCache(v *Value) bool {
  9988  	v_1 := v.Args[1]
  9989  	v_0 := v.Args[0]
  9990  	// match: (PrefetchCache addr mem)
  9991  	// result: (PRELD addr mem [0])
  9992  	for {
  9993  		addr := v_0
  9994  		mem := v_1
  9995  		v.reset(OpLOONG64PRELD)
  9996  		v.AuxInt = int64ToAuxInt(0)
  9997  		v.AddArg2(addr, mem)
  9998  		return true
  9999  	}
 10000  }
 10001  func rewriteValueLOONG64_OpPrefetchCacheStreamed(v *Value) bool {
 10002  	v_1 := v.Args[1]
 10003  	v_0 := v.Args[0]
 10004  	// match: (PrefetchCacheStreamed addr mem)
 10005  	// result: (PRELDX addr mem [(((512 << 1) + (1 << 12)) << 5) + 2])
 10006  	for {
 10007  		addr := v_0
 10008  		mem := v_1
 10009  		v.reset(OpLOONG64PRELDX)
 10010  		v.AuxInt = int64ToAuxInt((((512 << 1) + (1 << 12)) << 5) + 2)
 10011  		v.AddArg2(addr, mem)
 10012  		return true
 10013  	}
 10014  }
 10015  func rewriteValueLOONG64_OpRotateLeft16(v *Value) bool {
 10016  	v_1 := v.Args[1]
 10017  	v_0 := v.Args[0]
 10018  	b := v.Block
 10019  	typ := &b.Func.Config.Types
 10020  	// match: (RotateLeft16 <t> x (MOVVconst [c]))
 10021  	// result: (Or16 (Lsh16x64 <t> x (MOVVconst [c&15])) (Rsh16Ux64 <t> x (MOVVconst [-c&15])))
 10022  	for {
 10023  		t := v.Type
 10024  		x := v_0
 10025  		if v_1.Op != OpLOONG64MOVVconst {
 10026  			break
 10027  		}
 10028  		c := auxIntToInt64(v_1.AuxInt)
 10029  		v.reset(OpOr16)
 10030  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
 10031  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10032  		v1.AuxInt = int64ToAuxInt(c & 15)
 10033  		v0.AddArg2(x, v1)
 10034  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
 10035  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10036  		v3.AuxInt = int64ToAuxInt(-c & 15)
 10037  		v2.AddArg2(x, v3)
 10038  		v.AddArg2(v0, v2)
 10039  		return true
 10040  	}
 10041  	// match: (RotateLeft16 <t> x y)
 10042  	// result: (ROTR <t> (OR <typ.UInt32> (ZeroExt16to32 x) (SLLVconst <t> (ZeroExt16to32 x) [16])) (NEGV <typ.Int64> y))
 10043  	for {
 10044  		t := v.Type
 10045  		x := v_0
 10046  		y := v_1
 10047  		v.reset(OpLOONG64ROTR)
 10048  		v.Type = t
 10049  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, typ.UInt32)
 10050  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 10051  		v1.AddArg(x)
 10052  		v2 := b.NewValue0(v.Pos, OpLOONG64SLLVconst, t)
 10053  		v2.AuxInt = int64ToAuxInt(16)
 10054  		v2.AddArg(v1)
 10055  		v0.AddArg2(v1, v2)
 10056  		v3 := b.NewValue0(v.Pos, OpLOONG64NEGV, typ.Int64)
 10057  		v3.AddArg(y)
 10058  		v.AddArg2(v0, v3)
 10059  		return true
 10060  	}
 10061  }
 10062  func rewriteValueLOONG64_OpRotateLeft32(v *Value) bool {
 10063  	v_1 := v.Args[1]
 10064  	v_0 := v.Args[0]
 10065  	b := v.Block
 10066  	// match: (RotateLeft32 x y)
 10067  	// result: (ROTR x (NEGV <y.Type> y))
 10068  	for {
 10069  		x := v_0
 10070  		y := v_1
 10071  		v.reset(OpLOONG64ROTR)
 10072  		v0 := b.NewValue0(v.Pos, OpLOONG64NEGV, y.Type)
 10073  		v0.AddArg(y)
 10074  		v.AddArg2(x, v0)
 10075  		return true
 10076  	}
 10077  }
 10078  func rewriteValueLOONG64_OpRotateLeft64(v *Value) bool {
 10079  	v_1 := v.Args[1]
 10080  	v_0 := v.Args[0]
 10081  	b := v.Block
 10082  	// match: (RotateLeft64 x y)
 10083  	// result: (ROTRV x (NEGV <y.Type> y))
 10084  	for {
 10085  		x := v_0
 10086  		y := v_1
 10087  		v.reset(OpLOONG64ROTRV)
 10088  		v0 := b.NewValue0(v.Pos, OpLOONG64NEGV, y.Type)
 10089  		v0.AddArg(y)
 10090  		v.AddArg2(x, v0)
 10091  		return true
 10092  	}
 10093  }
 10094  func rewriteValueLOONG64_OpRotateLeft8(v *Value) bool {
 10095  	v_1 := v.Args[1]
 10096  	v_0 := v.Args[0]
 10097  	b := v.Block
 10098  	typ := &b.Func.Config.Types
 10099  	// match: (RotateLeft8 <t> x (MOVVconst [c]))
 10100  	// result: (Or8 (Lsh8x64 <t> x (MOVVconst [c&7])) (Rsh8Ux64 <t> x (MOVVconst [-c&7])))
 10101  	for {
 10102  		t := v.Type
 10103  		x := v_0
 10104  		if v_1.Op != OpLOONG64MOVVconst {
 10105  			break
 10106  		}
 10107  		c := auxIntToInt64(v_1.AuxInt)
 10108  		v.reset(OpOr8)
 10109  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
 10110  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10111  		v1.AuxInt = int64ToAuxInt(c & 7)
 10112  		v0.AddArg2(x, v1)
 10113  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
 10114  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10115  		v3.AuxInt = int64ToAuxInt(-c & 7)
 10116  		v2.AddArg2(x, v3)
 10117  		v.AddArg2(v0, v2)
 10118  		return true
 10119  	}
 10120  	// match: (RotateLeft8 <t> x y)
 10121  	// result: (OR <t> (SLLV <t> x (ANDconst <typ.Int64> [7] y)) (SRLV <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEGV <typ.Int64> y))))
 10122  	for {
 10123  		t := v.Type
 10124  		x := v_0
 10125  		y := v_1
 10126  		v.reset(OpLOONG64OR)
 10127  		v.Type = t
 10128  		v0 := b.NewValue0(v.Pos, OpLOONG64SLLV, t)
 10129  		v1 := b.NewValue0(v.Pos, OpLOONG64ANDconst, typ.Int64)
 10130  		v1.AuxInt = int64ToAuxInt(7)
 10131  		v1.AddArg(y)
 10132  		v0.AddArg2(x, v1)
 10133  		v2 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10134  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 10135  		v3.AddArg(x)
 10136  		v4 := b.NewValue0(v.Pos, OpLOONG64ANDconst, typ.Int64)
 10137  		v4.AuxInt = int64ToAuxInt(7)
 10138  		v5 := b.NewValue0(v.Pos, OpLOONG64NEGV, typ.Int64)
 10139  		v5.AddArg(y)
 10140  		v4.AddArg(v5)
 10141  		v2.AddArg2(v3, v4)
 10142  		v.AddArg2(v0, v2)
 10143  		return true
 10144  	}
 10145  }
 10146  func rewriteValueLOONG64_OpRsh16Ux16(v *Value) bool {
 10147  	v_1 := v.Args[1]
 10148  	v_0 := v.Args[0]
 10149  	b := v.Block
 10150  	typ := &b.Func.Config.Types
 10151  	// match: (Rsh16Ux16 x y)
 10152  	// cond: shiftIsBounded(v)
 10153  	// result: (SRLV (ZeroExt16to64 x) y)
 10154  	for {
 10155  		x := v_0
 10156  		y := v_1
 10157  		if !(shiftIsBounded(v)) {
 10158  			break
 10159  		}
 10160  		v.reset(OpLOONG64SRLV)
 10161  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10162  		v0.AddArg(x)
 10163  		v.AddArg2(v0, y)
 10164  		return true
 10165  	}
 10166  	// match: (Rsh16Ux16 <t> x y)
 10167  	// cond: !shiftIsBounded(v)
 10168  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 10169  	for {
 10170  		t := v.Type
 10171  		x := v_0
 10172  		y := v_1
 10173  		if !(!shiftIsBounded(v)) {
 10174  			break
 10175  		}
 10176  		v.reset(OpLOONG64MASKEQZ)
 10177  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10178  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10179  		v1.AddArg(x)
 10180  		v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10181  		v2.AddArg(y)
 10182  		v0.AddArg2(v1, v2)
 10183  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10184  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10185  		v4.AuxInt = int64ToAuxInt(64)
 10186  		v3.AddArg2(v4, v2)
 10187  		v.AddArg2(v0, v3)
 10188  		return true
 10189  	}
 10190  	return false
 10191  }
 10192  func rewriteValueLOONG64_OpRsh16Ux32(v *Value) bool {
 10193  	v_1 := v.Args[1]
 10194  	v_0 := v.Args[0]
 10195  	b := v.Block
 10196  	typ := &b.Func.Config.Types
 10197  	// match: (Rsh16Ux32 x y)
 10198  	// cond: shiftIsBounded(v)
 10199  	// result: (SRLV (ZeroExt16to64 x) y)
 10200  	for {
 10201  		x := v_0
 10202  		y := v_1
 10203  		if !(shiftIsBounded(v)) {
 10204  			break
 10205  		}
 10206  		v.reset(OpLOONG64SRLV)
 10207  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10208  		v0.AddArg(x)
 10209  		v.AddArg2(v0, y)
 10210  		return true
 10211  	}
 10212  	// match: (Rsh16Ux32 <t> x y)
 10213  	// cond: !shiftIsBounded(v)
 10214  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 10215  	for {
 10216  		t := v.Type
 10217  		x := v_0
 10218  		y := v_1
 10219  		if !(!shiftIsBounded(v)) {
 10220  			break
 10221  		}
 10222  		v.reset(OpLOONG64MASKEQZ)
 10223  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10224  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10225  		v1.AddArg(x)
 10226  		v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 10227  		v2.AddArg(y)
 10228  		v0.AddArg2(v1, v2)
 10229  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10230  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10231  		v4.AuxInt = int64ToAuxInt(64)
 10232  		v3.AddArg2(v4, v2)
 10233  		v.AddArg2(v0, v3)
 10234  		return true
 10235  	}
 10236  	return false
 10237  }
 10238  func rewriteValueLOONG64_OpRsh16Ux64(v *Value) bool {
 10239  	v_1 := v.Args[1]
 10240  	v_0 := v.Args[0]
 10241  	b := v.Block
 10242  	typ := &b.Func.Config.Types
 10243  	// match: (Rsh16Ux64 x y)
 10244  	// cond: shiftIsBounded(v)
 10245  	// result: (SRLV (ZeroExt16to64 x) y)
 10246  	for {
 10247  		x := v_0
 10248  		y := v_1
 10249  		if !(shiftIsBounded(v)) {
 10250  			break
 10251  		}
 10252  		v.reset(OpLOONG64SRLV)
 10253  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10254  		v0.AddArg(x)
 10255  		v.AddArg2(v0, y)
 10256  		return true
 10257  	}
 10258  	// match: (Rsh16Ux64 <t> x y)
 10259  	// cond: !shiftIsBounded(v)
 10260  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 10261  	for {
 10262  		t := v.Type
 10263  		x := v_0
 10264  		y := v_1
 10265  		if !(!shiftIsBounded(v)) {
 10266  			break
 10267  		}
 10268  		v.reset(OpLOONG64MASKEQZ)
 10269  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10270  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10271  		v1.AddArg(x)
 10272  		v0.AddArg2(v1, y)
 10273  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10274  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10275  		v3.AuxInt = int64ToAuxInt(64)
 10276  		v2.AddArg2(v3, y)
 10277  		v.AddArg2(v0, v2)
 10278  		return true
 10279  	}
 10280  	return false
 10281  }
 10282  func rewriteValueLOONG64_OpRsh16Ux8(v *Value) bool {
 10283  	v_1 := v.Args[1]
 10284  	v_0 := v.Args[0]
 10285  	b := v.Block
 10286  	typ := &b.Func.Config.Types
 10287  	// match: (Rsh16Ux8 x y)
 10288  	// cond: shiftIsBounded(v)
 10289  	// result: (SRLV (ZeroExt16to64 x) y)
 10290  	for {
 10291  		x := v_0
 10292  		y := v_1
 10293  		if !(shiftIsBounded(v)) {
 10294  			break
 10295  		}
 10296  		v.reset(OpLOONG64SRLV)
 10297  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10298  		v0.AddArg(x)
 10299  		v.AddArg2(v0, y)
 10300  		return true
 10301  	}
 10302  	// match: (Rsh16Ux8 <t> x y)
 10303  	// cond: !shiftIsBounded(v)
 10304  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 10305  	for {
 10306  		t := v.Type
 10307  		x := v_0
 10308  		y := v_1
 10309  		if !(!shiftIsBounded(v)) {
 10310  			break
 10311  		}
 10312  		v.reset(OpLOONG64MASKEQZ)
 10313  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10314  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10315  		v1.AddArg(x)
 10316  		v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 10317  		v2.AddArg(y)
 10318  		v0.AddArg2(v1, v2)
 10319  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10320  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10321  		v4.AuxInt = int64ToAuxInt(64)
 10322  		v3.AddArg2(v4, v2)
 10323  		v.AddArg2(v0, v3)
 10324  		return true
 10325  	}
 10326  	return false
 10327  }
 10328  func rewriteValueLOONG64_OpRsh16x16(v *Value) bool {
 10329  	v_1 := v.Args[1]
 10330  	v_0 := v.Args[0]
 10331  	b := v.Block
 10332  	typ := &b.Func.Config.Types
 10333  	// match: (Rsh16x16 x y)
 10334  	// cond: shiftIsBounded(v)
 10335  	// result: (SRAV (SignExt16to64 x) y)
 10336  	for {
 10337  		x := v_0
 10338  		y := v_1
 10339  		if !(shiftIsBounded(v)) {
 10340  			break
 10341  		}
 10342  		v.reset(OpLOONG64SRAV)
 10343  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10344  		v0.AddArg(x)
 10345  		v.AddArg2(v0, y)
 10346  		return true
 10347  	}
 10348  	// match: (Rsh16x16 <t> x y)
 10349  	// cond: !shiftIsBounded(v)
 10350  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 10351  	for {
 10352  		t := v.Type
 10353  		x := v_0
 10354  		y := v_1
 10355  		if !(!shiftIsBounded(v)) {
 10356  			break
 10357  		}
 10358  		v.reset(OpLOONG64SRAV)
 10359  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10360  		v0.AddArg(x)
 10361  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10362  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10363  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10364  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10365  		v4.AddArg(y)
 10366  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10367  		v5.AuxInt = int64ToAuxInt(63)
 10368  		v3.AddArg2(v4, v5)
 10369  		v2.AddArg(v3)
 10370  		v1.AddArg2(v2, v4)
 10371  		v.AddArg2(v0, v1)
 10372  		return true
 10373  	}
 10374  	return false
 10375  }
 10376  func rewriteValueLOONG64_OpRsh16x32(v *Value) bool {
 10377  	v_1 := v.Args[1]
 10378  	v_0 := v.Args[0]
 10379  	b := v.Block
 10380  	typ := &b.Func.Config.Types
 10381  	// match: (Rsh16x32 x y)
 10382  	// cond: shiftIsBounded(v)
 10383  	// result: (SRAV (SignExt16to64 x) y)
 10384  	for {
 10385  		x := v_0
 10386  		y := v_1
 10387  		if !(shiftIsBounded(v)) {
 10388  			break
 10389  		}
 10390  		v.reset(OpLOONG64SRAV)
 10391  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10392  		v0.AddArg(x)
 10393  		v.AddArg2(v0, y)
 10394  		return true
 10395  	}
 10396  	// match: (Rsh16x32 <t> x y)
 10397  	// cond: !shiftIsBounded(v)
 10398  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 10399  	for {
 10400  		t := v.Type
 10401  		x := v_0
 10402  		y := v_1
 10403  		if !(!shiftIsBounded(v)) {
 10404  			break
 10405  		}
 10406  		v.reset(OpLOONG64SRAV)
 10407  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10408  		v0.AddArg(x)
 10409  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10410  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10411  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10412  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 10413  		v4.AddArg(y)
 10414  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10415  		v5.AuxInt = int64ToAuxInt(63)
 10416  		v3.AddArg2(v4, v5)
 10417  		v2.AddArg(v3)
 10418  		v1.AddArg2(v2, v4)
 10419  		v.AddArg2(v0, v1)
 10420  		return true
 10421  	}
 10422  	return false
 10423  }
 10424  func rewriteValueLOONG64_OpRsh16x64(v *Value) bool {
 10425  	v_1 := v.Args[1]
 10426  	v_0 := v.Args[0]
 10427  	b := v.Block
 10428  	typ := &b.Func.Config.Types
 10429  	// match: (Rsh16x64 x y)
 10430  	// cond: shiftIsBounded(v)
 10431  	// result: (SRAV (SignExt16to64 x) y)
 10432  	for {
 10433  		x := v_0
 10434  		y := v_1
 10435  		if !(shiftIsBounded(v)) {
 10436  			break
 10437  		}
 10438  		v.reset(OpLOONG64SRAV)
 10439  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10440  		v0.AddArg(x)
 10441  		v.AddArg2(v0, y)
 10442  		return true
 10443  	}
 10444  	// match: (Rsh16x64 <t> x y)
 10445  	// cond: !shiftIsBounded(v)
 10446  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 10447  	for {
 10448  		t := v.Type
 10449  		x := v_0
 10450  		y := v_1
 10451  		if !(!shiftIsBounded(v)) {
 10452  			break
 10453  		}
 10454  		v.reset(OpLOONG64SRAV)
 10455  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10456  		v0.AddArg(x)
 10457  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10458  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10459  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10460  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10461  		v4.AuxInt = int64ToAuxInt(63)
 10462  		v3.AddArg2(y, v4)
 10463  		v2.AddArg(v3)
 10464  		v1.AddArg2(v2, y)
 10465  		v.AddArg2(v0, v1)
 10466  		return true
 10467  	}
 10468  	return false
 10469  }
 10470  func rewriteValueLOONG64_OpRsh16x8(v *Value) bool {
 10471  	v_1 := v.Args[1]
 10472  	v_0 := v.Args[0]
 10473  	b := v.Block
 10474  	typ := &b.Func.Config.Types
 10475  	// match: (Rsh16x8 x y)
 10476  	// cond: shiftIsBounded(v)
 10477  	// result: (SRAV (SignExt16to64 x) y)
 10478  	for {
 10479  		x := v_0
 10480  		y := v_1
 10481  		if !(shiftIsBounded(v)) {
 10482  			break
 10483  		}
 10484  		v.reset(OpLOONG64SRAV)
 10485  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10486  		v0.AddArg(x)
 10487  		v.AddArg2(v0, y)
 10488  		return true
 10489  	}
 10490  	// match: (Rsh16x8 <t> x y)
 10491  	// cond: !shiftIsBounded(v)
 10492  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 10493  	for {
 10494  		t := v.Type
 10495  		x := v_0
 10496  		y := v_1
 10497  		if !(!shiftIsBounded(v)) {
 10498  			break
 10499  		}
 10500  		v.reset(OpLOONG64SRAV)
 10501  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 10502  		v0.AddArg(x)
 10503  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10504  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10505  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10506  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 10507  		v4.AddArg(y)
 10508  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10509  		v5.AuxInt = int64ToAuxInt(63)
 10510  		v3.AddArg2(v4, v5)
 10511  		v2.AddArg(v3)
 10512  		v1.AddArg2(v2, v4)
 10513  		v.AddArg2(v0, v1)
 10514  		return true
 10515  	}
 10516  	return false
 10517  }
 10518  func rewriteValueLOONG64_OpRsh32Ux16(v *Value) bool {
 10519  	v_1 := v.Args[1]
 10520  	v_0 := v.Args[0]
 10521  	b := v.Block
 10522  	typ := &b.Func.Config.Types
 10523  	// match: (Rsh32Ux16 x y)
 10524  	// cond: shiftIsBounded(v)
 10525  	// result: (SRL x y)
 10526  	for {
 10527  		x := v_0
 10528  		y := v_1
 10529  		if !(shiftIsBounded(v)) {
 10530  			break
 10531  		}
 10532  		v.reset(OpLOONG64SRL)
 10533  		v.AddArg2(x, y)
 10534  		return true
 10535  	}
 10536  	// match: (Rsh32Ux16 <t> x y)
 10537  	// cond: !shiftIsBounded(v)
 10538  	// result: (MASKEQZ (SRL <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt16to64 y)))
 10539  	for {
 10540  		t := v.Type
 10541  		x := v_0
 10542  		y := v_1
 10543  		if !(!shiftIsBounded(v)) {
 10544  			break
 10545  		}
 10546  		v.reset(OpLOONG64MASKEQZ)
 10547  		v0 := b.NewValue0(v.Pos, OpLOONG64SRL, t)
 10548  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10549  		v1.AddArg(y)
 10550  		v0.AddArg2(x, v1)
 10551  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10552  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10553  		v3.AuxInt = int64ToAuxInt(32)
 10554  		v2.AddArg2(v3, v1)
 10555  		v.AddArg2(v0, v2)
 10556  		return true
 10557  	}
 10558  	return false
 10559  }
 10560  func rewriteValueLOONG64_OpRsh32Ux32(v *Value) bool {
 10561  	v_1 := v.Args[1]
 10562  	v_0 := v.Args[0]
 10563  	b := v.Block
 10564  	typ := &b.Func.Config.Types
 10565  	// match: (Rsh32Ux32 x y)
 10566  	// cond: shiftIsBounded(v)
 10567  	// result: (SRL x y)
 10568  	for {
 10569  		x := v_0
 10570  		y := v_1
 10571  		if !(shiftIsBounded(v)) {
 10572  			break
 10573  		}
 10574  		v.reset(OpLOONG64SRL)
 10575  		v.AddArg2(x, y)
 10576  		return true
 10577  	}
 10578  	// match: (Rsh32Ux32 <t> x y)
 10579  	// cond: !shiftIsBounded(v)
 10580  	// result: (MASKEQZ (SRL <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt32to64 y)))
 10581  	for {
 10582  		t := v.Type
 10583  		x := v_0
 10584  		y := v_1
 10585  		if !(!shiftIsBounded(v)) {
 10586  			break
 10587  		}
 10588  		v.reset(OpLOONG64MASKEQZ)
 10589  		v0 := b.NewValue0(v.Pos, OpLOONG64SRL, t)
 10590  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 10591  		v1.AddArg(y)
 10592  		v0.AddArg2(x, v1)
 10593  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10594  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10595  		v3.AuxInt = int64ToAuxInt(32)
 10596  		v2.AddArg2(v3, v1)
 10597  		v.AddArg2(v0, v2)
 10598  		return true
 10599  	}
 10600  	return false
 10601  }
 10602  func rewriteValueLOONG64_OpRsh32Ux64(v *Value) bool {
 10603  	v_1 := v.Args[1]
 10604  	v_0 := v.Args[0]
 10605  	b := v.Block
 10606  	typ := &b.Func.Config.Types
 10607  	// match: (Rsh32Ux64 x y)
 10608  	// cond: shiftIsBounded(v)
 10609  	// result: (SRL x y)
 10610  	for {
 10611  		x := v_0
 10612  		y := v_1
 10613  		if !(shiftIsBounded(v)) {
 10614  			break
 10615  		}
 10616  		v.reset(OpLOONG64SRL)
 10617  		v.AddArg2(x, y)
 10618  		return true
 10619  	}
 10620  	// match: (Rsh32Ux64 <t> x y)
 10621  	// cond: !shiftIsBounded(v)
 10622  	// result: (MASKEQZ (SRL <t> x y) (SGTU (MOVVconst <typ.UInt64> [32]) y))
 10623  	for {
 10624  		t := v.Type
 10625  		x := v_0
 10626  		y := v_1
 10627  		if !(!shiftIsBounded(v)) {
 10628  			break
 10629  		}
 10630  		v.reset(OpLOONG64MASKEQZ)
 10631  		v0 := b.NewValue0(v.Pos, OpLOONG64SRL, t)
 10632  		v0.AddArg2(x, y)
 10633  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10634  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10635  		v2.AuxInt = int64ToAuxInt(32)
 10636  		v1.AddArg2(v2, y)
 10637  		v.AddArg2(v0, v1)
 10638  		return true
 10639  	}
 10640  	return false
 10641  }
 10642  func rewriteValueLOONG64_OpRsh32Ux8(v *Value) bool {
 10643  	v_1 := v.Args[1]
 10644  	v_0 := v.Args[0]
 10645  	b := v.Block
 10646  	typ := &b.Func.Config.Types
 10647  	// match: (Rsh32Ux8 x y)
 10648  	// cond: shiftIsBounded(v)
 10649  	// result: (SRL x y)
 10650  	for {
 10651  		x := v_0
 10652  		y := v_1
 10653  		if !(shiftIsBounded(v)) {
 10654  			break
 10655  		}
 10656  		v.reset(OpLOONG64SRL)
 10657  		v.AddArg2(x, y)
 10658  		return true
 10659  	}
 10660  	// match: (Rsh32Ux8 <t> x y)
 10661  	// cond: !shiftIsBounded(v)
 10662  	// result: (MASKEQZ (SRL <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt8to64 y)))
 10663  	for {
 10664  		t := v.Type
 10665  		x := v_0
 10666  		y := v_1
 10667  		if !(!shiftIsBounded(v)) {
 10668  			break
 10669  		}
 10670  		v.reset(OpLOONG64MASKEQZ)
 10671  		v0 := b.NewValue0(v.Pos, OpLOONG64SRL, t)
 10672  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 10673  		v1.AddArg(y)
 10674  		v0.AddArg2(x, v1)
 10675  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10676  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10677  		v3.AuxInt = int64ToAuxInt(32)
 10678  		v2.AddArg2(v3, v1)
 10679  		v.AddArg2(v0, v2)
 10680  		return true
 10681  	}
 10682  	return false
 10683  }
 10684  func rewriteValueLOONG64_OpRsh32x16(v *Value) bool {
 10685  	v_1 := v.Args[1]
 10686  	v_0 := v.Args[0]
 10687  	b := v.Block
 10688  	typ := &b.Func.Config.Types
 10689  	// match: (Rsh32x16 x y)
 10690  	// cond: shiftIsBounded(v)
 10691  	// result: (SRA x y)
 10692  	for {
 10693  		x := v_0
 10694  		y := v_1
 10695  		if !(shiftIsBounded(v)) {
 10696  			break
 10697  		}
 10698  		v.reset(OpLOONG64SRA)
 10699  		v.AddArg2(x, y)
 10700  		return true
 10701  	}
 10702  	// match: (Rsh32x16 <t> x y)
 10703  	// cond: !shiftIsBounded(v)
 10704  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt16to64 y)))
 10705  	for {
 10706  		t := v.Type
 10707  		x := v_0
 10708  		y := v_1
 10709  		if !(!shiftIsBounded(v)) {
 10710  			break
 10711  		}
 10712  		v.reset(OpLOONG64SRA)
 10713  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10714  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10715  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10716  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10717  		v3.AddArg(y)
 10718  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10719  		v4.AuxInt = int64ToAuxInt(31)
 10720  		v2.AddArg2(v3, v4)
 10721  		v1.AddArg(v2)
 10722  		v0.AddArg2(v1, v3)
 10723  		v.AddArg2(x, v0)
 10724  		return true
 10725  	}
 10726  	return false
 10727  }
 10728  func rewriteValueLOONG64_OpRsh32x32(v *Value) bool {
 10729  	v_1 := v.Args[1]
 10730  	v_0 := v.Args[0]
 10731  	b := v.Block
 10732  	typ := &b.Func.Config.Types
 10733  	// match: (Rsh32x32 x y)
 10734  	// cond: shiftIsBounded(v)
 10735  	// result: (SRA x y)
 10736  	for {
 10737  		x := v_0
 10738  		y := v_1
 10739  		if !(shiftIsBounded(v)) {
 10740  			break
 10741  		}
 10742  		v.reset(OpLOONG64SRA)
 10743  		v.AddArg2(x, y)
 10744  		return true
 10745  	}
 10746  	// match: (Rsh32x32 <t> x y)
 10747  	// cond: !shiftIsBounded(v)
 10748  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt32to64 y)))
 10749  	for {
 10750  		t := v.Type
 10751  		x := v_0
 10752  		y := v_1
 10753  		if !(!shiftIsBounded(v)) {
 10754  			break
 10755  		}
 10756  		v.reset(OpLOONG64SRA)
 10757  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10758  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10759  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10760  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 10761  		v3.AddArg(y)
 10762  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10763  		v4.AuxInt = int64ToAuxInt(31)
 10764  		v2.AddArg2(v3, v4)
 10765  		v1.AddArg(v2)
 10766  		v0.AddArg2(v1, v3)
 10767  		v.AddArg2(x, v0)
 10768  		return true
 10769  	}
 10770  	return false
 10771  }
 10772  func rewriteValueLOONG64_OpRsh32x64(v *Value) bool {
 10773  	v_1 := v.Args[1]
 10774  	v_0 := v.Args[0]
 10775  	b := v.Block
 10776  	typ := &b.Func.Config.Types
 10777  	// match: (Rsh32x64 x y)
 10778  	// cond: shiftIsBounded(v)
 10779  	// result: (SRA x y)
 10780  	for {
 10781  		x := v_0
 10782  		y := v_1
 10783  		if !(shiftIsBounded(v)) {
 10784  			break
 10785  		}
 10786  		v.reset(OpLOONG64SRA)
 10787  		v.AddArg2(x, y)
 10788  		return true
 10789  	}
 10790  	// match: (Rsh32x64 <t> x y)
 10791  	// cond: !shiftIsBounded(v)
 10792  	// result: (SRA x (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [31]))) y))
 10793  	for {
 10794  		t := v.Type
 10795  		x := v_0
 10796  		y := v_1
 10797  		if !(!shiftIsBounded(v)) {
 10798  			break
 10799  		}
 10800  		v.reset(OpLOONG64SRA)
 10801  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10802  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10803  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10804  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10805  		v3.AuxInt = int64ToAuxInt(31)
 10806  		v2.AddArg2(y, v3)
 10807  		v1.AddArg(v2)
 10808  		v0.AddArg2(v1, y)
 10809  		v.AddArg2(x, v0)
 10810  		return true
 10811  	}
 10812  	return false
 10813  }
 10814  func rewriteValueLOONG64_OpRsh32x8(v *Value) bool {
 10815  	v_1 := v.Args[1]
 10816  	v_0 := v.Args[0]
 10817  	b := v.Block
 10818  	typ := &b.Func.Config.Types
 10819  	// match: (Rsh32x8 x y)
 10820  	// cond: shiftIsBounded(v)
 10821  	// result: (SRA x y)
 10822  	for {
 10823  		x := v_0
 10824  		y := v_1
 10825  		if !(shiftIsBounded(v)) {
 10826  			break
 10827  		}
 10828  		v.reset(OpLOONG64SRA)
 10829  		v.AddArg2(x, y)
 10830  		return true
 10831  	}
 10832  	// match: (Rsh32x8 <t> x y)
 10833  	// cond: !shiftIsBounded(v)
 10834  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt8to64 y)))
 10835  	for {
 10836  		t := v.Type
 10837  		x := v_0
 10838  		y := v_1
 10839  		if !(!shiftIsBounded(v)) {
 10840  			break
 10841  		}
 10842  		v.reset(OpLOONG64SRA)
 10843  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 10844  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 10845  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10846  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 10847  		v3.AddArg(y)
 10848  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10849  		v4.AuxInt = int64ToAuxInt(31)
 10850  		v2.AddArg2(v3, v4)
 10851  		v1.AddArg(v2)
 10852  		v0.AddArg2(v1, v3)
 10853  		v.AddArg2(x, v0)
 10854  		return true
 10855  	}
 10856  	return false
 10857  }
 10858  func rewriteValueLOONG64_OpRsh64Ux16(v *Value) bool {
 10859  	v_1 := v.Args[1]
 10860  	v_0 := v.Args[0]
 10861  	b := v.Block
 10862  	typ := &b.Func.Config.Types
 10863  	// match: (Rsh64Ux16 x y)
 10864  	// cond: shiftIsBounded(v)
 10865  	// result: (SRLV x y)
 10866  	for {
 10867  		x := v_0
 10868  		y := v_1
 10869  		if !(shiftIsBounded(v)) {
 10870  			break
 10871  		}
 10872  		v.reset(OpLOONG64SRLV)
 10873  		v.AddArg2(x, y)
 10874  		return true
 10875  	}
 10876  	// match: (Rsh64Ux16 <t> x y)
 10877  	// cond: !shiftIsBounded(v)
 10878  	// result: (MASKEQZ (SRLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 10879  	for {
 10880  		t := v.Type
 10881  		x := v_0
 10882  		y := v_1
 10883  		if !(!shiftIsBounded(v)) {
 10884  			break
 10885  		}
 10886  		v.reset(OpLOONG64MASKEQZ)
 10887  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10888  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 10889  		v1.AddArg(y)
 10890  		v0.AddArg2(x, v1)
 10891  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10892  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10893  		v3.AuxInt = int64ToAuxInt(64)
 10894  		v2.AddArg2(v3, v1)
 10895  		v.AddArg2(v0, v2)
 10896  		return true
 10897  	}
 10898  	return false
 10899  }
 10900  func rewriteValueLOONG64_OpRsh64Ux32(v *Value) bool {
 10901  	v_1 := v.Args[1]
 10902  	v_0 := v.Args[0]
 10903  	b := v.Block
 10904  	typ := &b.Func.Config.Types
 10905  	// match: (Rsh64Ux32 x y)
 10906  	// cond: shiftIsBounded(v)
 10907  	// result: (SRLV x y)
 10908  	for {
 10909  		x := v_0
 10910  		y := v_1
 10911  		if !(shiftIsBounded(v)) {
 10912  			break
 10913  		}
 10914  		v.reset(OpLOONG64SRLV)
 10915  		v.AddArg2(x, y)
 10916  		return true
 10917  	}
 10918  	// match: (Rsh64Ux32 <t> x y)
 10919  	// cond: !shiftIsBounded(v)
 10920  	// result: (MASKEQZ (SRLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 10921  	for {
 10922  		t := v.Type
 10923  		x := v_0
 10924  		y := v_1
 10925  		if !(!shiftIsBounded(v)) {
 10926  			break
 10927  		}
 10928  		v.reset(OpLOONG64MASKEQZ)
 10929  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10930  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 10931  		v1.AddArg(y)
 10932  		v0.AddArg2(x, v1)
 10933  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10934  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10935  		v3.AuxInt = int64ToAuxInt(64)
 10936  		v2.AddArg2(v3, v1)
 10937  		v.AddArg2(v0, v2)
 10938  		return true
 10939  	}
 10940  	return false
 10941  }
 10942  func rewriteValueLOONG64_OpRsh64Ux64(v *Value) bool {
 10943  	v_1 := v.Args[1]
 10944  	v_0 := v.Args[0]
 10945  	b := v.Block
 10946  	typ := &b.Func.Config.Types
 10947  	// match: (Rsh64Ux64 x y)
 10948  	// cond: shiftIsBounded(v)
 10949  	// result: (SRLV x y)
 10950  	for {
 10951  		x := v_0
 10952  		y := v_1
 10953  		if !(shiftIsBounded(v)) {
 10954  			break
 10955  		}
 10956  		v.reset(OpLOONG64SRLV)
 10957  		v.AddArg2(x, y)
 10958  		return true
 10959  	}
 10960  	// match: (Rsh64Ux64 <t> x y)
 10961  	// cond: !shiftIsBounded(v)
 10962  	// result: (MASKEQZ (SRLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 10963  	for {
 10964  		t := v.Type
 10965  		x := v_0
 10966  		y := v_1
 10967  		if !(!shiftIsBounded(v)) {
 10968  			break
 10969  		}
 10970  		v.reset(OpLOONG64MASKEQZ)
 10971  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 10972  		v0.AddArg2(x, y)
 10973  		v1 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 10974  		v2 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 10975  		v2.AuxInt = int64ToAuxInt(64)
 10976  		v1.AddArg2(v2, y)
 10977  		v.AddArg2(v0, v1)
 10978  		return true
 10979  	}
 10980  	return false
 10981  }
 10982  func rewriteValueLOONG64_OpRsh64Ux8(v *Value) bool {
 10983  	v_1 := v.Args[1]
 10984  	v_0 := v.Args[0]
 10985  	b := v.Block
 10986  	typ := &b.Func.Config.Types
 10987  	// match: (Rsh64Ux8 x y)
 10988  	// cond: shiftIsBounded(v)
 10989  	// result: (SRLV x y)
 10990  	for {
 10991  		x := v_0
 10992  		y := v_1
 10993  		if !(shiftIsBounded(v)) {
 10994  			break
 10995  		}
 10996  		v.reset(OpLOONG64SRLV)
 10997  		v.AddArg2(x, y)
 10998  		return true
 10999  	}
 11000  	// match: (Rsh64Ux8 <t> x y)
 11001  	// cond: !shiftIsBounded(v)
 11002  	// result: (MASKEQZ (SRLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 11003  	for {
 11004  		t := v.Type
 11005  		x := v_0
 11006  		y := v_1
 11007  		if !(!shiftIsBounded(v)) {
 11008  			break
 11009  		}
 11010  		v.reset(OpLOONG64MASKEQZ)
 11011  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 11012  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11013  		v1.AddArg(y)
 11014  		v0.AddArg2(x, v1)
 11015  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11016  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11017  		v3.AuxInt = int64ToAuxInt(64)
 11018  		v2.AddArg2(v3, v1)
 11019  		v.AddArg2(v0, v2)
 11020  		return true
 11021  	}
 11022  	return false
 11023  }
 11024  func rewriteValueLOONG64_OpRsh64x16(v *Value) bool {
 11025  	v_1 := v.Args[1]
 11026  	v_0 := v.Args[0]
 11027  	b := v.Block
 11028  	typ := &b.Func.Config.Types
 11029  	// match: (Rsh64x16 x y)
 11030  	// cond: shiftIsBounded(v)
 11031  	// result: (SRAV x y)
 11032  	for {
 11033  		x := v_0
 11034  		y := v_1
 11035  		if !(shiftIsBounded(v)) {
 11036  			break
 11037  		}
 11038  		v.reset(OpLOONG64SRAV)
 11039  		v.AddArg2(x, y)
 11040  		return true
 11041  	}
 11042  	// match: (Rsh64x16 <t> x y)
 11043  	// cond: !shiftIsBounded(v)
 11044  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 11045  	for {
 11046  		t := v.Type
 11047  		x := v_0
 11048  		y := v_1
 11049  		if !(!shiftIsBounded(v)) {
 11050  			break
 11051  		}
 11052  		v.reset(OpLOONG64SRAV)
 11053  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11054  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11055  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11056  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 11057  		v3.AddArg(y)
 11058  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11059  		v4.AuxInt = int64ToAuxInt(63)
 11060  		v2.AddArg2(v3, v4)
 11061  		v1.AddArg(v2)
 11062  		v0.AddArg2(v1, v3)
 11063  		v.AddArg2(x, v0)
 11064  		return true
 11065  	}
 11066  	return false
 11067  }
 11068  func rewriteValueLOONG64_OpRsh64x32(v *Value) bool {
 11069  	v_1 := v.Args[1]
 11070  	v_0 := v.Args[0]
 11071  	b := v.Block
 11072  	typ := &b.Func.Config.Types
 11073  	// match: (Rsh64x32 x y)
 11074  	// cond: shiftIsBounded(v)
 11075  	// result: (SRAV x y)
 11076  	for {
 11077  		x := v_0
 11078  		y := v_1
 11079  		if !(shiftIsBounded(v)) {
 11080  			break
 11081  		}
 11082  		v.reset(OpLOONG64SRAV)
 11083  		v.AddArg2(x, y)
 11084  		return true
 11085  	}
 11086  	// match: (Rsh64x32 <t> x y)
 11087  	// cond: !shiftIsBounded(v)
 11088  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 11089  	for {
 11090  		t := v.Type
 11091  		x := v_0
 11092  		y := v_1
 11093  		if !(!shiftIsBounded(v)) {
 11094  			break
 11095  		}
 11096  		v.reset(OpLOONG64SRAV)
 11097  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11098  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11099  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11100  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 11101  		v3.AddArg(y)
 11102  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11103  		v4.AuxInt = int64ToAuxInt(63)
 11104  		v2.AddArg2(v3, v4)
 11105  		v1.AddArg(v2)
 11106  		v0.AddArg2(v1, v3)
 11107  		v.AddArg2(x, v0)
 11108  		return true
 11109  	}
 11110  	return false
 11111  }
 11112  func rewriteValueLOONG64_OpRsh64x64(v *Value) bool {
 11113  	v_1 := v.Args[1]
 11114  	v_0 := v.Args[0]
 11115  	b := v.Block
 11116  	typ := &b.Func.Config.Types
 11117  	// match: (Rsh64x64 x y)
 11118  	// cond: shiftIsBounded(v)
 11119  	// result: (SRAV x y)
 11120  	for {
 11121  		x := v_0
 11122  		y := v_1
 11123  		if !(shiftIsBounded(v)) {
 11124  			break
 11125  		}
 11126  		v.reset(OpLOONG64SRAV)
 11127  		v.AddArg2(x, y)
 11128  		return true
 11129  	}
 11130  	// match: (Rsh64x64 <t> x y)
 11131  	// cond: !shiftIsBounded(v)
 11132  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 11133  	for {
 11134  		t := v.Type
 11135  		x := v_0
 11136  		y := v_1
 11137  		if !(!shiftIsBounded(v)) {
 11138  			break
 11139  		}
 11140  		v.reset(OpLOONG64SRAV)
 11141  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11142  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11143  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11144  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11145  		v3.AuxInt = int64ToAuxInt(63)
 11146  		v2.AddArg2(y, v3)
 11147  		v1.AddArg(v2)
 11148  		v0.AddArg2(v1, y)
 11149  		v.AddArg2(x, v0)
 11150  		return true
 11151  	}
 11152  	return false
 11153  }
 11154  func rewriteValueLOONG64_OpRsh64x8(v *Value) bool {
 11155  	v_1 := v.Args[1]
 11156  	v_0 := v.Args[0]
 11157  	b := v.Block
 11158  	typ := &b.Func.Config.Types
 11159  	// match: (Rsh64x8 x y)
 11160  	// cond: shiftIsBounded(v)
 11161  	// result: (SRAV x y)
 11162  	for {
 11163  		x := v_0
 11164  		y := v_1
 11165  		if !(shiftIsBounded(v)) {
 11166  			break
 11167  		}
 11168  		v.reset(OpLOONG64SRAV)
 11169  		v.AddArg2(x, y)
 11170  		return true
 11171  	}
 11172  	// match: (Rsh64x8 <t> x y)
 11173  	// cond: !shiftIsBounded(v)
 11174  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 11175  	for {
 11176  		t := v.Type
 11177  		x := v_0
 11178  		y := v_1
 11179  		if !(!shiftIsBounded(v)) {
 11180  			break
 11181  		}
 11182  		v.reset(OpLOONG64SRAV)
 11183  		v0 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11184  		v1 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11185  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11186  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11187  		v3.AddArg(y)
 11188  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11189  		v4.AuxInt = int64ToAuxInt(63)
 11190  		v2.AddArg2(v3, v4)
 11191  		v1.AddArg(v2)
 11192  		v0.AddArg2(v1, v3)
 11193  		v.AddArg2(x, v0)
 11194  		return true
 11195  	}
 11196  	return false
 11197  }
 11198  func rewriteValueLOONG64_OpRsh8Ux16(v *Value) bool {
 11199  	v_1 := v.Args[1]
 11200  	v_0 := v.Args[0]
 11201  	b := v.Block
 11202  	typ := &b.Func.Config.Types
 11203  	// match: (Rsh8Ux16 x y)
 11204  	// cond: shiftIsBounded(v)
 11205  	// result: (SRLV (ZeroExt8to64 x) y)
 11206  	for {
 11207  		x := v_0
 11208  		y := v_1
 11209  		if !(shiftIsBounded(v)) {
 11210  			break
 11211  		}
 11212  		v.reset(OpLOONG64SRLV)
 11213  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11214  		v0.AddArg(x)
 11215  		v.AddArg2(v0, y)
 11216  		return true
 11217  	}
 11218  	// match: (Rsh8Ux16 <t> x y)
 11219  	// cond: !shiftIsBounded(v)
 11220  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 11221  	for {
 11222  		t := v.Type
 11223  		x := v_0
 11224  		y := v_1
 11225  		if !(!shiftIsBounded(v)) {
 11226  			break
 11227  		}
 11228  		v.reset(OpLOONG64MASKEQZ)
 11229  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 11230  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11231  		v1.AddArg(x)
 11232  		v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 11233  		v2.AddArg(y)
 11234  		v0.AddArg2(v1, v2)
 11235  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11236  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11237  		v4.AuxInt = int64ToAuxInt(64)
 11238  		v3.AddArg2(v4, v2)
 11239  		v.AddArg2(v0, v3)
 11240  		return true
 11241  	}
 11242  	return false
 11243  }
 11244  func rewriteValueLOONG64_OpRsh8Ux32(v *Value) bool {
 11245  	v_1 := v.Args[1]
 11246  	v_0 := v.Args[0]
 11247  	b := v.Block
 11248  	typ := &b.Func.Config.Types
 11249  	// match: (Rsh8Ux32 x y)
 11250  	// cond: shiftIsBounded(v)
 11251  	// result: (SRLV (ZeroExt8to64 x) y)
 11252  	for {
 11253  		x := v_0
 11254  		y := v_1
 11255  		if !(shiftIsBounded(v)) {
 11256  			break
 11257  		}
 11258  		v.reset(OpLOONG64SRLV)
 11259  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11260  		v0.AddArg(x)
 11261  		v.AddArg2(v0, y)
 11262  		return true
 11263  	}
 11264  	// match: (Rsh8Ux32 <t> x y)
 11265  	// cond: !shiftIsBounded(v)
 11266  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 11267  	for {
 11268  		t := v.Type
 11269  		x := v_0
 11270  		y := v_1
 11271  		if !(!shiftIsBounded(v)) {
 11272  			break
 11273  		}
 11274  		v.reset(OpLOONG64MASKEQZ)
 11275  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 11276  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11277  		v1.AddArg(x)
 11278  		v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 11279  		v2.AddArg(y)
 11280  		v0.AddArg2(v1, v2)
 11281  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11282  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11283  		v4.AuxInt = int64ToAuxInt(64)
 11284  		v3.AddArg2(v4, v2)
 11285  		v.AddArg2(v0, v3)
 11286  		return true
 11287  	}
 11288  	return false
 11289  }
 11290  func rewriteValueLOONG64_OpRsh8Ux64(v *Value) bool {
 11291  	v_1 := v.Args[1]
 11292  	v_0 := v.Args[0]
 11293  	b := v.Block
 11294  	typ := &b.Func.Config.Types
 11295  	// match: (Rsh8Ux64 x y)
 11296  	// cond: shiftIsBounded(v)
 11297  	// result: (SRLV (ZeroExt8to64 x) y)
 11298  	for {
 11299  		x := v_0
 11300  		y := v_1
 11301  		if !(shiftIsBounded(v)) {
 11302  			break
 11303  		}
 11304  		v.reset(OpLOONG64SRLV)
 11305  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11306  		v0.AddArg(x)
 11307  		v.AddArg2(v0, y)
 11308  		return true
 11309  	}
 11310  	// match: (Rsh8Ux64 <t> x y)
 11311  	// cond: !shiftIsBounded(v)
 11312  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 11313  	for {
 11314  		t := v.Type
 11315  		x := v_0
 11316  		y := v_1
 11317  		if !(!shiftIsBounded(v)) {
 11318  			break
 11319  		}
 11320  		v.reset(OpLOONG64MASKEQZ)
 11321  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 11322  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11323  		v1.AddArg(x)
 11324  		v0.AddArg2(v1, y)
 11325  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11326  		v3 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11327  		v3.AuxInt = int64ToAuxInt(64)
 11328  		v2.AddArg2(v3, y)
 11329  		v.AddArg2(v0, v2)
 11330  		return true
 11331  	}
 11332  	return false
 11333  }
 11334  func rewriteValueLOONG64_OpRsh8Ux8(v *Value) bool {
 11335  	v_1 := v.Args[1]
 11336  	v_0 := v.Args[0]
 11337  	b := v.Block
 11338  	typ := &b.Func.Config.Types
 11339  	// match: (Rsh8Ux8 x y)
 11340  	// cond: shiftIsBounded(v)
 11341  	// result: (SRLV (ZeroExt8to64 x) y)
 11342  	for {
 11343  		x := v_0
 11344  		y := v_1
 11345  		if !(shiftIsBounded(v)) {
 11346  			break
 11347  		}
 11348  		v.reset(OpLOONG64SRLV)
 11349  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11350  		v0.AddArg(x)
 11351  		v.AddArg2(v0, y)
 11352  		return true
 11353  	}
 11354  	// match: (Rsh8Ux8 <t> x y)
 11355  	// cond: !shiftIsBounded(v)
 11356  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 11357  	for {
 11358  		t := v.Type
 11359  		x := v_0
 11360  		y := v_1
 11361  		if !(!shiftIsBounded(v)) {
 11362  			break
 11363  		}
 11364  		v.reset(OpLOONG64MASKEQZ)
 11365  		v0 := b.NewValue0(v.Pos, OpLOONG64SRLV, t)
 11366  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11367  		v1.AddArg(x)
 11368  		v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11369  		v2.AddArg(y)
 11370  		v0.AddArg2(v1, v2)
 11371  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11372  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11373  		v4.AuxInt = int64ToAuxInt(64)
 11374  		v3.AddArg2(v4, v2)
 11375  		v.AddArg2(v0, v3)
 11376  		return true
 11377  	}
 11378  	return false
 11379  }
 11380  func rewriteValueLOONG64_OpRsh8x16(v *Value) bool {
 11381  	v_1 := v.Args[1]
 11382  	v_0 := v.Args[0]
 11383  	b := v.Block
 11384  	typ := &b.Func.Config.Types
 11385  	// match: (Rsh8x16 x y)
 11386  	// cond: shiftIsBounded(v)
 11387  	// result: (SRAV (SignExt8to64 x) y)
 11388  	for {
 11389  		x := v_0
 11390  		y := v_1
 11391  		if !(shiftIsBounded(v)) {
 11392  			break
 11393  		}
 11394  		v.reset(OpLOONG64SRAV)
 11395  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11396  		v0.AddArg(x)
 11397  		v.AddArg2(v0, y)
 11398  		return true
 11399  	}
 11400  	// match: (Rsh8x16 <t> x y)
 11401  	// cond: !shiftIsBounded(v)
 11402  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 11403  	for {
 11404  		t := v.Type
 11405  		x := v_0
 11406  		y := v_1
 11407  		if !(!shiftIsBounded(v)) {
 11408  			break
 11409  		}
 11410  		v.reset(OpLOONG64SRAV)
 11411  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11412  		v0.AddArg(x)
 11413  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11414  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11415  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11416  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 11417  		v4.AddArg(y)
 11418  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11419  		v5.AuxInt = int64ToAuxInt(63)
 11420  		v3.AddArg2(v4, v5)
 11421  		v2.AddArg(v3)
 11422  		v1.AddArg2(v2, v4)
 11423  		v.AddArg2(v0, v1)
 11424  		return true
 11425  	}
 11426  	return false
 11427  }
 11428  func rewriteValueLOONG64_OpRsh8x32(v *Value) bool {
 11429  	v_1 := v.Args[1]
 11430  	v_0 := v.Args[0]
 11431  	b := v.Block
 11432  	typ := &b.Func.Config.Types
 11433  	// match: (Rsh8x32 x y)
 11434  	// cond: shiftIsBounded(v)
 11435  	// result: (SRAV (SignExt8to64 x) y)
 11436  	for {
 11437  		x := v_0
 11438  		y := v_1
 11439  		if !(shiftIsBounded(v)) {
 11440  			break
 11441  		}
 11442  		v.reset(OpLOONG64SRAV)
 11443  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11444  		v0.AddArg(x)
 11445  		v.AddArg2(v0, y)
 11446  		return true
 11447  	}
 11448  	// match: (Rsh8x32 <t> x y)
 11449  	// cond: !shiftIsBounded(v)
 11450  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 11451  	for {
 11452  		t := v.Type
 11453  		x := v_0
 11454  		y := v_1
 11455  		if !(!shiftIsBounded(v)) {
 11456  			break
 11457  		}
 11458  		v.reset(OpLOONG64SRAV)
 11459  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11460  		v0.AddArg(x)
 11461  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11462  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11463  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11464  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 11465  		v4.AddArg(y)
 11466  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11467  		v5.AuxInt = int64ToAuxInt(63)
 11468  		v3.AddArg2(v4, v5)
 11469  		v2.AddArg(v3)
 11470  		v1.AddArg2(v2, v4)
 11471  		v.AddArg2(v0, v1)
 11472  		return true
 11473  	}
 11474  	return false
 11475  }
 11476  func rewriteValueLOONG64_OpRsh8x64(v *Value) bool {
 11477  	v_1 := v.Args[1]
 11478  	v_0 := v.Args[0]
 11479  	b := v.Block
 11480  	typ := &b.Func.Config.Types
 11481  	// match: (Rsh8x64 x y)
 11482  	// cond: shiftIsBounded(v)
 11483  	// result: (SRAV (SignExt8to64 x) y)
 11484  	for {
 11485  		x := v_0
 11486  		y := v_1
 11487  		if !(shiftIsBounded(v)) {
 11488  			break
 11489  		}
 11490  		v.reset(OpLOONG64SRAV)
 11491  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11492  		v0.AddArg(x)
 11493  		v.AddArg2(v0, y)
 11494  		return true
 11495  	}
 11496  	// match: (Rsh8x64 <t> x y)
 11497  	// cond: !shiftIsBounded(v)
 11498  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 11499  	for {
 11500  		t := v.Type
 11501  		x := v_0
 11502  		y := v_1
 11503  		if !(!shiftIsBounded(v)) {
 11504  			break
 11505  		}
 11506  		v.reset(OpLOONG64SRAV)
 11507  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11508  		v0.AddArg(x)
 11509  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11510  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11511  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11512  		v4 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11513  		v4.AuxInt = int64ToAuxInt(63)
 11514  		v3.AddArg2(y, v4)
 11515  		v2.AddArg(v3)
 11516  		v1.AddArg2(v2, y)
 11517  		v.AddArg2(v0, v1)
 11518  		return true
 11519  	}
 11520  	return false
 11521  }
 11522  func rewriteValueLOONG64_OpRsh8x8(v *Value) bool {
 11523  	v_1 := v.Args[1]
 11524  	v_0 := v.Args[0]
 11525  	b := v.Block
 11526  	typ := &b.Func.Config.Types
 11527  	// match: (Rsh8x8 x y)
 11528  	// cond: shiftIsBounded(v)
 11529  	// result: (SRAV (SignExt8to64 x) y)
 11530  	for {
 11531  		x := v_0
 11532  		y := v_1
 11533  		if !(shiftIsBounded(v)) {
 11534  			break
 11535  		}
 11536  		v.reset(OpLOONG64SRAV)
 11537  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11538  		v0.AddArg(x)
 11539  		v.AddArg2(v0, y)
 11540  		return true
 11541  	}
 11542  	// match: (Rsh8x8 <t> x y)
 11543  	// cond: !shiftIsBounded(v)
 11544  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 11545  	for {
 11546  		t := v.Type
 11547  		x := v_0
 11548  		y := v_1
 11549  		if !(!shiftIsBounded(v)) {
 11550  			break
 11551  		}
 11552  		v.reset(OpLOONG64SRAV)
 11553  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 11554  		v0.AddArg(x)
 11555  		v1 := b.NewValue0(v.Pos, OpLOONG64OR, t)
 11556  		v2 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11557  		v3 := b.NewValue0(v.Pos, OpLOONG64SGTU, typ.Bool)
 11558  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 11559  		v4.AddArg(y)
 11560  		v5 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11561  		v5.AuxInt = int64ToAuxInt(63)
 11562  		v3.AddArg2(v4, v5)
 11563  		v2.AddArg(v3)
 11564  		v1.AddArg2(v2, v4)
 11565  		v.AddArg2(v0, v1)
 11566  		return true
 11567  	}
 11568  	return false
 11569  }
 11570  func rewriteValueLOONG64_OpSelect0(v *Value) bool {
 11571  	v_0 := v.Args[0]
 11572  	b := v.Block
 11573  	// match: (Select0 (Mul64uhilo x y))
 11574  	// result: (MULHVU x y)
 11575  	for {
 11576  		if v_0.Op != OpMul64uhilo {
 11577  			break
 11578  		}
 11579  		y := v_0.Args[1]
 11580  		x := v_0.Args[0]
 11581  		v.reset(OpLOONG64MULHVU)
 11582  		v.AddArg2(x, y)
 11583  		return true
 11584  	}
 11585  	// match: (Select0 (Mul64uover x y))
 11586  	// result: (MULV x y)
 11587  	for {
 11588  		if v_0.Op != OpMul64uover {
 11589  			break
 11590  		}
 11591  		y := v_0.Args[1]
 11592  		x := v_0.Args[0]
 11593  		v.reset(OpLOONG64MULV)
 11594  		v.AddArg2(x, y)
 11595  		return true
 11596  	}
 11597  	// match: (Select0 <t> (Add64carry x y c))
 11598  	// result: (ADDV (ADDV <t> x y) c)
 11599  	for {
 11600  		t := v.Type
 11601  		if v_0.Op != OpAdd64carry {
 11602  			break
 11603  		}
 11604  		c := v_0.Args[2]
 11605  		x := v_0.Args[0]
 11606  		y := v_0.Args[1]
 11607  		v.reset(OpLOONG64ADDV)
 11608  		v0 := b.NewValue0(v.Pos, OpLOONG64ADDV, t)
 11609  		v0.AddArg2(x, y)
 11610  		v.AddArg2(v0, c)
 11611  		return true
 11612  	}
 11613  	// match: (Select0 <t> (Sub64borrow x y c))
 11614  	// result: (SUBV (SUBV <t> x y) c)
 11615  	for {
 11616  		t := v.Type
 11617  		if v_0.Op != OpSub64borrow {
 11618  			break
 11619  		}
 11620  		c := v_0.Args[2]
 11621  		x := v_0.Args[0]
 11622  		y := v_0.Args[1]
 11623  		v.reset(OpLOONG64SUBV)
 11624  		v0 := b.NewValue0(v.Pos, OpLOONG64SUBV, t)
 11625  		v0.AddArg2(x, y)
 11626  		v.AddArg2(v0, c)
 11627  		return true
 11628  	}
 11629  	return false
 11630  }
 11631  func rewriteValueLOONG64_OpSelect1(v *Value) bool {
 11632  	v_0 := v.Args[0]
 11633  	b := v.Block
 11634  	typ := &b.Func.Config.Types
 11635  	// match: (Select1 (Mul64uhilo x y))
 11636  	// result: (MULV x y)
 11637  	for {
 11638  		if v_0.Op != OpMul64uhilo {
 11639  			break
 11640  		}
 11641  		y := v_0.Args[1]
 11642  		x := v_0.Args[0]
 11643  		v.reset(OpLOONG64MULV)
 11644  		v.AddArg2(x, y)
 11645  		return true
 11646  	}
 11647  	// match: (Select1 (Mul64uover x y))
 11648  	// result: (SGTU <typ.Bool> (MULHVU x y) (MOVVconst <typ.UInt64> [0]))
 11649  	for {
 11650  		if v_0.Op != OpMul64uover {
 11651  			break
 11652  		}
 11653  		y := v_0.Args[1]
 11654  		x := v_0.Args[0]
 11655  		v.reset(OpLOONG64SGTU)
 11656  		v.Type = typ.Bool
 11657  		v0 := b.NewValue0(v.Pos, OpLOONG64MULHVU, typ.UInt64)
 11658  		v0.AddArg2(x, y)
 11659  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11660  		v1.AuxInt = int64ToAuxInt(0)
 11661  		v.AddArg2(v0, v1)
 11662  		return true
 11663  	}
 11664  	// match: (Select1 <t> (Add64carry x y c))
 11665  	// result: (OR (SGTU <t> x s:(ADDV <t> x y)) (SGTU <t> s (ADDV <t> s c)))
 11666  	for {
 11667  		t := v.Type
 11668  		if v_0.Op != OpAdd64carry {
 11669  			break
 11670  		}
 11671  		c := v_0.Args[2]
 11672  		x := v_0.Args[0]
 11673  		y := v_0.Args[1]
 11674  		v.reset(OpLOONG64OR)
 11675  		v0 := b.NewValue0(v.Pos, OpLOONG64SGTU, t)
 11676  		s := b.NewValue0(v.Pos, OpLOONG64ADDV, t)
 11677  		s.AddArg2(x, y)
 11678  		v0.AddArg2(x, s)
 11679  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, t)
 11680  		v3 := b.NewValue0(v.Pos, OpLOONG64ADDV, t)
 11681  		v3.AddArg2(s, c)
 11682  		v2.AddArg2(s, v3)
 11683  		v.AddArg2(v0, v2)
 11684  		return true
 11685  	}
 11686  	// match: (Select1 <t> (Sub64borrow x y c))
 11687  	// result: (OR (SGTU <t> s:(SUBV <t> x y) x) (SGTU <t> (SUBV <t> s c) s))
 11688  	for {
 11689  		t := v.Type
 11690  		if v_0.Op != OpSub64borrow {
 11691  			break
 11692  		}
 11693  		c := v_0.Args[2]
 11694  		x := v_0.Args[0]
 11695  		y := v_0.Args[1]
 11696  		v.reset(OpLOONG64OR)
 11697  		v0 := b.NewValue0(v.Pos, OpLOONG64SGTU, t)
 11698  		s := b.NewValue0(v.Pos, OpLOONG64SUBV, t)
 11699  		s.AddArg2(x, y)
 11700  		v0.AddArg2(s, x)
 11701  		v2 := b.NewValue0(v.Pos, OpLOONG64SGTU, t)
 11702  		v3 := b.NewValue0(v.Pos, OpLOONG64SUBV, t)
 11703  		v3.AddArg2(s, c)
 11704  		v2.AddArg2(v3, s)
 11705  		v.AddArg2(v0, v2)
 11706  		return true
 11707  	}
 11708  	return false
 11709  }
 11710  func rewriteValueLOONG64_OpSelectN(v *Value) bool {
 11711  	v_0 := v.Args[0]
 11712  	b := v.Block
 11713  	config := b.Func.Config
 11714  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVVconst [sz]) mem))
 11715  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)
 11716  	// result: (Move [sz] dst src mem)
 11717  	for {
 11718  		if auxIntToInt64(v.AuxInt) != 0 {
 11719  			break
 11720  		}
 11721  		call := v_0
 11722  		if call.Op != OpLOONG64CALLstatic || len(call.Args) != 4 {
 11723  			break
 11724  		}
 11725  		sym := auxToCall(call.Aux)
 11726  		mem := call.Args[3]
 11727  		dst := call.Args[0]
 11728  		src := call.Args[1]
 11729  		call_2 := call.Args[2]
 11730  		if call_2.Op != OpLOONG64MOVVconst {
 11731  			break
 11732  		}
 11733  		sz := auxIntToInt64(call_2.AuxInt)
 11734  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
 11735  			break
 11736  		}
 11737  		v.reset(OpMove)
 11738  		v.AuxInt = int64ToAuxInt(sz)
 11739  		v.AddArg3(dst, src, mem)
 11740  		return true
 11741  	}
 11742  	return false
 11743  }
 11744  func rewriteValueLOONG64_OpSlicemask(v *Value) bool {
 11745  	v_0 := v.Args[0]
 11746  	b := v.Block
 11747  	// match: (Slicemask <t> x)
 11748  	// result: (SRAVconst (NEGV <t> x) [63])
 11749  	for {
 11750  		t := v.Type
 11751  		x := v_0
 11752  		v.reset(OpLOONG64SRAVconst)
 11753  		v.AuxInt = int64ToAuxInt(63)
 11754  		v0 := b.NewValue0(v.Pos, OpLOONG64NEGV, t)
 11755  		v0.AddArg(x)
 11756  		v.AddArg(v0)
 11757  		return true
 11758  	}
 11759  }
 11760  func rewriteValueLOONG64_OpStore(v *Value) bool {
 11761  	v_2 := v.Args[2]
 11762  	v_1 := v.Args[1]
 11763  	v_0 := v.Args[0]
 11764  	// match: (Store {t} ptr val mem)
 11765  	// cond: t.Size() == 1
 11766  	// result: (MOVBstore ptr val mem)
 11767  	for {
 11768  		t := auxToType(v.Aux)
 11769  		ptr := v_0
 11770  		val := v_1
 11771  		mem := v_2
 11772  		if !(t.Size() == 1) {
 11773  			break
 11774  		}
 11775  		v.reset(OpLOONG64MOVBstore)
 11776  		v.AddArg3(ptr, val, mem)
 11777  		return true
 11778  	}
 11779  	// match: (Store {t} ptr val mem)
 11780  	// cond: t.Size() == 2
 11781  	// result: (MOVHstore ptr val mem)
 11782  	for {
 11783  		t := auxToType(v.Aux)
 11784  		ptr := v_0
 11785  		val := v_1
 11786  		mem := v_2
 11787  		if !(t.Size() == 2) {
 11788  			break
 11789  		}
 11790  		v.reset(OpLOONG64MOVHstore)
 11791  		v.AddArg3(ptr, val, mem)
 11792  		return true
 11793  	}
 11794  	// match: (Store {t} ptr val mem)
 11795  	// cond: t.Size() == 4 && !t.IsFloat()
 11796  	// result: (MOVWstore ptr val mem)
 11797  	for {
 11798  		t := auxToType(v.Aux)
 11799  		ptr := v_0
 11800  		val := v_1
 11801  		mem := v_2
 11802  		if !(t.Size() == 4 && !t.IsFloat()) {
 11803  			break
 11804  		}
 11805  		v.reset(OpLOONG64MOVWstore)
 11806  		v.AddArg3(ptr, val, mem)
 11807  		return true
 11808  	}
 11809  	// match: (Store {t} ptr val mem)
 11810  	// cond: t.Size() == 8 && !t.IsFloat()
 11811  	// result: (MOVVstore ptr val mem)
 11812  	for {
 11813  		t := auxToType(v.Aux)
 11814  		ptr := v_0
 11815  		val := v_1
 11816  		mem := v_2
 11817  		if !(t.Size() == 8 && !t.IsFloat()) {
 11818  			break
 11819  		}
 11820  		v.reset(OpLOONG64MOVVstore)
 11821  		v.AddArg3(ptr, val, mem)
 11822  		return true
 11823  	}
 11824  	// match: (Store {t} ptr val mem)
 11825  	// cond: t.Size() == 4 && t.IsFloat()
 11826  	// result: (MOVFstore ptr val mem)
 11827  	for {
 11828  		t := auxToType(v.Aux)
 11829  		ptr := v_0
 11830  		val := v_1
 11831  		mem := v_2
 11832  		if !(t.Size() == 4 && t.IsFloat()) {
 11833  			break
 11834  		}
 11835  		v.reset(OpLOONG64MOVFstore)
 11836  		v.AddArg3(ptr, val, mem)
 11837  		return true
 11838  	}
 11839  	// match: (Store {t} ptr val mem)
 11840  	// cond: t.Size() == 8 && t.IsFloat()
 11841  	// result: (MOVDstore ptr val mem)
 11842  	for {
 11843  		t := auxToType(v.Aux)
 11844  		ptr := v_0
 11845  		val := v_1
 11846  		mem := v_2
 11847  		if !(t.Size() == 8 && t.IsFloat()) {
 11848  			break
 11849  		}
 11850  		v.reset(OpLOONG64MOVDstore)
 11851  		v.AddArg3(ptr, val, mem)
 11852  		return true
 11853  	}
 11854  	return false
 11855  }
 11856  func rewriteValueLOONG64_OpZero(v *Value) bool {
 11857  	v_1 := v.Args[1]
 11858  	v_0 := v.Args[0]
 11859  	b := v.Block
 11860  	typ := &b.Func.Config.Types
 11861  	// match: (Zero [0] _ mem)
 11862  	// result: mem
 11863  	for {
 11864  		if auxIntToInt64(v.AuxInt) != 0 {
 11865  			break
 11866  		}
 11867  		mem := v_1
 11868  		v.copyOf(mem)
 11869  		return true
 11870  	}
 11871  	// match: (Zero [1] ptr mem)
 11872  	// result: (MOVBstore ptr (MOVVconst [0]) mem)
 11873  	for {
 11874  		if auxIntToInt64(v.AuxInt) != 1 {
 11875  			break
 11876  		}
 11877  		ptr := v_0
 11878  		mem := v_1
 11879  		v.reset(OpLOONG64MOVBstore)
 11880  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11881  		v0.AuxInt = int64ToAuxInt(0)
 11882  		v.AddArg3(ptr, v0, mem)
 11883  		return true
 11884  	}
 11885  	// match: (Zero [2] ptr mem)
 11886  	// result: (MOVHstore ptr (MOVVconst [0]) mem)
 11887  	for {
 11888  		if auxIntToInt64(v.AuxInt) != 2 {
 11889  			break
 11890  		}
 11891  		ptr := v_0
 11892  		mem := v_1
 11893  		v.reset(OpLOONG64MOVHstore)
 11894  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11895  		v0.AuxInt = int64ToAuxInt(0)
 11896  		v.AddArg3(ptr, v0, mem)
 11897  		return true
 11898  	}
 11899  	// match: (Zero [3] ptr mem)
 11900  	// result: (MOVBstore [2] ptr (MOVVconst [0]) (MOVHstore ptr (MOVVconst [0]) mem))
 11901  	for {
 11902  		if auxIntToInt64(v.AuxInt) != 3 {
 11903  			break
 11904  		}
 11905  		ptr := v_0
 11906  		mem := v_1
 11907  		v.reset(OpLOONG64MOVBstore)
 11908  		v.AuxInt = int32ToAuxInt(2)
 11909  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11910  		v0.AuxInt = int64ToAuxInt(0)
 11911  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVHstore, types.TypeMem)
 11912  		v1.AddArg3(ptr, v0, mem)
 11913  		v.AddArg3(ptr, v0, v1)
 11914  		return true
 11915  	}
 11916  	// match: (Zero [4] {t} ptr mem)
 11917  	// result: (MOVWstore ptr (MOVVconst [0]) mem)
 11918  	for {
 11919  		if auxIntToInt64(v.AuxInt) != 4 {
 11920  			break
 11921  		}
 11922  		ptr := v_0
 11923  		mem := v_1
 11924  		v.reset(OpLOONG64MOVWstore)
 11925  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11926  		v0.AuxInt = int64ToAuxInt(0)
 11927  		v.AddArg3(ptr, v0, mem)
 11928  		return true
 11929  	}
 11930  	// match: (Zero [5] ptr mem)
 11931  	// result: (MOVBstore [4] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11932  	for {
 11933  		if auxIntToInt64(v.AuxInt) != 5 {
 11934  			break
 11935  		}
 11936  		ptr := v_0
 11937  		mem := v_1
 11938  		v.reset(OpLOONG64MOVBstore)
 11939  		v.AuxInt = int32ToAuxInt(4)
 11940  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11941  		v0.AuxInt = int64ToAuxInt(0)
 11942  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
 11943  		v1.AddArg3(ptr, v0, mem)
 11944  		v.AddArg3(ptr, v0, v1)
 11945  		return true
 11946  	}
 11947  	// match: (Zero [6] ptr mem)
 11948  	// result: (MOVHstore [4] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11949  	for {
 11950  		if auxIntToInt64(v.AuxInt) != 6 {
 11951  			break
 11952  		}
 11953  		ptr := v_0
 11954  		mem := v_1
 11955  		v.reset(OpLOONG64MOVHstore)
 11956  		v.AuxInt = int32ToAuxInt(4)
 11957  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11958  		v0.AuxInt = int64ToAuxInt(0)
 11959  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
 11960  		v1.AddArg3(ptr, v0, mem)
 11961  		v.AddArg3(ptr, v0, v1)
 11962  		return true
 11963  	}
 11964  	// match: (Zero [7] ptr mem)
 11965  	// result: (MOVWstore [3] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11966  	for {
 11967  		if auxIntToInt64(v.AuxInt) != 7 {
 11968  			break
 11969  		}
 11970  		ptr := v_0
 11971  		mem := v_1
 11972  		v.reset(OpLOONG64MOVWstore)
 11973  		v.AuxInt = int32ToAuxInt(3)
 11974  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11975  		v0.AuxInt = int64ToAuxInt(0)
 11976  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVWstore, types.TypeMem)
 11977  		v1.AddArg3(ptr, v0, mem)
 11978  		v.AddArg3(ptr, v0, v1)
 11979  		return true
 11980  	}
 11981  	// match: (Zero [8] {t} ptr mem)
 11982  	// result: (MOVVstore ptr (MOVVconst [0]) mem)
 11983  	for {
 11984  		if auxIntToInt64(v.AuxInt) != 8 {
 11985  			break
 11986  		}
 11987  		ptr := v_0
 11988  		mem := v_1
 11989  		v.reset(OpLOONG64MOVVstore)
 11990  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 11991  		v0.AuxInt = int64ToAuxInt(0)
 11992  		v.AddArg3(ptr, v0, mem)
 11993  		return true
 11994  	}
 11995  	// match: (Zero [9] ptr mem)
 11996  	// result: (MOVBstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11997  	for {
 11998  		if auxIntToInt64(v.AuxInt) != 9 {
 11999  			break
 12000  		}
 12001  		ptr := v_0
 12002  		mem := v_1
 12003  		v.reset(OpLOONG64MOVBstore)
 12004  		v.AuxInt = int32ToAuxInt(8)
 12005  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12006  		v0.AuxInt = int64ToAuxInt(0)
 12007  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12008  		v1.AddArg3(ptr, v0, mem)
 12009  		v.AddArg3(ptr, v0, v1)
 12010  		return true
 12011  	}
 12012  	// match: (Zero [10] ptr mem)
 12013  	// result: (MOVHstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12014  	for {
 12015  		if auxIntToInt64(v.AuxInt) != 10 {
 12016  			break
 12017  		}
 12018  		ptr := v_0
 12019  		mem := v_1
 12020  		v.reset(OpLOONG64MOVHstore)
 12021  		v.AuxInt = int32ToAuxInt(8)
 12022  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12023  		v0.AuxInt = int64ToAuxInt(0)
 12024  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12025  		v1.AddArg3(ptr, v0, mem)
 12026  		v.AddArg3(ptr, v0, v1)
 12027  		return true
 12028  	}
 12029  	// match: (Zero [11] ptr mem)
 12030  	// result: (MOVWstore [7] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12031  	for {
 12032  		if auxIntToInt64(v.AuxInt) != 11 {
 12033  			break
 12034  		}
 12035  		ptr := v_0
 12036  		mem := v_1
 12037  		v.reset(OpLOONG64MOVWstore)
 12038  		v.AuxInt = int32ToAuxInt(7)
 12039  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12040  		v0.AuxInt = int64ToAuxInt(0)
 12041  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12042  		v1.AddArg3(ptr, v0, mem)
 12043  		v.AddArg3(ptr, v0, v1)
 12044  		return true
 12045  	}
 12046  	// match: (Zero [12] ptr mem)
 12047  	// result: (MOVWstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12048  	for {
 12049  		if auxIntToInt64(v.AuxInt) != 12 {
 12050  			break
 12051  		}
 12052  		ptr := v_0
 12053  		mem := v_1
 12054  		v.reset(OpLOONG64MOVWstore)
 12055  		v.AuxInt = int32ToAuxInt(8)
 12056  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12057  		v0.AuxInt = int64ToAuxInt(0)
 12058  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12059  		v1.AddArg3(ptr, v0, mem)
 12060  		v.AddArg3(ptr, v0, v1)
 12061  		return true
 12062  	}
 12063  	// match: (Zero [13] ptr mem)
 12064  	// result: (MOVVstore [5] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12065  	for {
 12066  		if auxIntToInt64(v.AuxInt) != 13 {
 12067  			break
 12068  		}
 12069  		ptr := v_0
 12070  		mem := v_1
 12071  		v.reset(OpLOONG64MOVVstore)
 12072  		v.AuxInt = int32ToAuxInt(5)
 12073  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12074  		v0.AuxInt = int64ToAuxInt(0)
 12075  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12076  		v1.AddArg3(ptr, v0, mem)
 12077  		v.AddArg3(ptr, v0, v1)
 12078  		return true
 12079  	}
 12080  	// match: (Zero [14] ptr mem)
 12081  	// result: (MOVVstore [6] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12082  	for {
 12083  		if auxIntToInt64(v.AuxInt) != 14 {
 12084  			break
 12085  		}
 12086  		ptr := v_0
 12087  		mem := v_1
 12088  		v.reset(OpLOONG64MOVVstore)
 12089  		v.AuxInt = int32ToAuxInt(6)
 12090  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12091  		v0.AuxInt = int64ToAuxInt(0)
 12092  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12093  		v1.AddArg3(ptr, v0, mem)
 12094  		v.AddArg3(ptr, v0, v1)
 12095  		return true
 12096  	}
 12097  	// match: (Zero [15] ptr mem)
 12098  	// result: (MOVVstore [7] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12099  	for {
 12100  		if auxIntToInt64(v.AuxInt) != 15 {
 12101  			break
 12102  		}
 12103  		ptr := v_0
 12104  		mem := v_1
 12105  		v.reset(OpLOONG64MOVVstore)
 12106  		v.AuxInt = int32ToAuxInt(7)
 12107  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12108  		v0.AuxInt = int64ToAuxInt(0)
 12109  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12110  		v1.AddArg3(ptr, v0, mem)
 12111  		v.AddArg3(ptr, v0, v1)
 12112  		return true
 12113  	}
 12114  	// match: (Zero [16] ptr mem)
 12115  	// result: (MOVVstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 12116  	for {
 12117  		if auxIntToInt64(v.AuxInt) != 16 {
 12118  			break
 12119  		}
 12120  		ptr := v_0
 12121  		mem := v_1
 12122  		v.reset(OpLOONG64MOVVstore)
 12123  		v.AuxInt = int32ToAuxInt(8)
 12124  		v0 := b.NewValue0(v.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12125  		v0.AuxInt = int64ToAuxInt(0)
 12126  		v1 := b.NewValue0(v.Pos, OpLOONG64MOVVstore, types.TypeMem)
 12127  		v1.AddArg3(ptr, v0, mem)
 12128  		v.AddArg3(ptr, v0, v1)
 12129  		return true
 12130  	}
 12131  	// match: (Zero [s] ptr mem)
 12132  	// cond: s > 16 && s < 192
 12133  	// result: (LoweredZero [s] ptr mem)
 12134  	for {
 12135  		s := auxIntToInt64(v.AuxInt)
 12136  		ptr := v_0
 12137  		mem := v_1
 12138  		if !(s > 16 && s < 192) {
 12139  			break
 12140  		}
 12141  		v.reset(OpLOONG64LoweredZero)
 12142  		v.AuxInt = int64ToAuxInt(s)
 12143  		v.AddArg2(ptr, mem)
 12144  		return true
 12145  	}
 12146  	// match: (Zero [s] ptr mem)
 12147  	// cond: s >= 192
 12148  	// result: (LoweredZeroLoop [s] ptr mem)
 12149  	for {
 12150  		s := auxIntToInt64(v.AuxInt)
 12151  		ptr := v_0
 12152  		mem := v_1
 12153  		if !(s >= 192) {
 12154  			break
 12155  		}
 12156  		v.reset(OpLOONG64LoweredZeroLoop)
 12157  		v.AuxInt = int64ToAuxInt(s)
 12158  		v.AddArg2(ptr, mem)
 12159  		return true
 12160  	}
 12161  	return false
 12162  }
 12163  func rewriteBlockLOONG64(b *Block) bool {
 12164  	typ := &b.Func.Config.Types
 12165  	switch b.Kind {
 12166  	case BlockLOONG64BEQ:
 12167  		// match: (BEQ (MOVVconst [0]) cond yes no)
 12168  		// result: (EQZ cond yes no)
 12169  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12170  			v_0 := b.Controls[0]
 12171  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12172  				break
 12173  			}
 12174  			cond := b.Controls[1]
 12175  			b.resetWithControl(BlockLOONG64EQZ, cond)
 12176  			return true
 12177  		}
 12178  		// match: (BEQ cond (MOVVconst [0]) yes no)
 12179  		// result: (EQZ cond yes no)
 12180  		for b.Controls[1].Op == OpLOONG64MOVVconst {
 12181  			cond := b.Controls[0]
 12182  			v_1 := b.Controls[1]
 12183  			if auxIntToInt64(v_1.AuxInt) != 0 {
 12184  				break
 12185  			}
 12186  			b.resetWithControl(BlockLOONG64EQZ, cond)
 12187  			return true
 12188  		}
 12189  	case BlockLOONG64BGE:
 12190  		// match: (BGE (MOVVconst [0]) cond yes no)
 12191  		// result: (LEZ cond yes no)
 12192  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12193  			v_0 := b.Controls[0]
 12194  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12195  				break
 12196  			}
 12197  			cond := b.Controls[1]
 12198  			b.resetWithControl(BlockLOONG64LEZ, cond)
 12199  			return true
 12200  		}
 12201  		// match: (BGE cond (MOVVconst [0]) yes no)
 12202  		// result: (GEZ cond yes no)
 12203  		for b.Controls[1].Op == OpLOONG64MOVVconst {
 12204  			cond := b.Controls[0]
 12205  			v_1 := b.Controls[1]
 12206  			if auxIntToInt64(v_1.AuxInt) != 0 {
 12207  				break
 12208  			}
 12209  			b.resetWithControl(BlockLOONG64GEZ, cond)
 12210  			return true
 12211  		}
 12212  	case BlockLOONG64BGEU:
 12213  		// match: (BGEU (MOVVconst [0]) cond yes no)
 12214  		// result: (EQZ cond yes no)
 12215  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12216  			v_0 := b.Controls[0]
 12217  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12218  				break
 12219  			}
 12220  			cond := b.Controls[1]
 12221  			b.resetWithControl(BlockLOONG64EQZ, cond)
 12222  			return true
 12223  		}
 12224  	case BlockLOONG64BLT:
 12225  		// match: (BLT (MOVVconst [0]) cond yes no)
 12226  		// result: (GTZ cond yes no)
 12227  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12228  			v_0 := b.Controls[0]
 12229  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12230  				break
 12231  			}
 12232  			cond := b.Controls[1]
 12233  			b.resetWithControl(BlockLOONG64GTZ, cond)
 12234  			return true
 12235  		}
 12236  		// match: (BLT cond (MOVVconst [0]) yes no)
 12237  		// result: (LTZ cond yes no)
 12238  		for b.Controls[1].Op == OpLOONG64MOVVconst {
 12239  			cond := b.Controls[0]
 12240  			v_1 := b.Controls[1]
 12241  			if auxIntToInt64(v_1.AuxInt) != 0 {
 12242  				break
 12243  			}
 12244  			b.resetWithControl(BlockLOONG64LTZ, cond)
 12245  			return true
 12246  		}
 12247  	case BlockLOONG64BLTU:
 12248  		// match: (BLTU (MOVVconst [0]) cond yes no)
 12249  		// result: (NEZ cond yes no)
 12250  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12251  			v_0 := b.Controls[0]
 12252  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12253  				break
 12254  			}
 12255  			cond := b.Controls[1]
 12256  			b.resetWithControl(BlockLOONG64NEZ, cond)
 12257  			return true
 12258  		}
 12259  	case BlockLOONG64BNE:
 12260  		// match: (BNE (MOVVconst [0]) cond yes no)
 12261  		// result: (NEZ cond yes no)
 12262  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12263  			v_0 := b.Controls[0]
 12264  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12265  				break
 12266  			}
 12267  			cond := b.Controls[1]
 12268  			b.resetWithControl(BlockLOONG64NEZ, cond)
 12269  			return true
 12270  		}
 12271  		// match: (BNE cond (MOVVconst [0]) yes no)
 12272  		// result: (NEZ cond yes no)
 12273  		for b.Controls[1].Op == OpLOONG64MOVVconst {
 12274  			cond := b.Controls[0]
 12275  			v_1 := b.Controls[1]
 12276  			if auxIntToInt64(v_1.AuxInt) != 0 {
 12277  				break
 12278  			}
 12279  			b.resetWithControl(BlockLOONG64NEZ, cond)
 12280  			return true
 12281  		}
 12282  	case BlockLOONG64EQZ:
 12283  		// match: (EQZ (FPFlagTrue cmp) yes no)
 12284  		// result: (FPF cmp yes no)
 12285  		for b.Controls[0].Op == OpLOONG64FPFlagTrue {
 12286  			v_0 := b.Controls[0]
 12287  			cmp := v_0.Args[0]
 12288  			b.resetWithControl(BlockLOONG64FPF, cmp)
 12289  			return true
 12290  		}
 12291  		// match: (EQZ (FPFlagFalse cmp) yes no)
 12292  		// result: (FPT cmp yes no)
 12293  		for b.Controls[0].Op == OpLOONG64FPFlagFalse {
 12294  			v_0 := b.Controls[0]
 12295  			cmp := v_0.Args[0]
 12296  			b.resetWithControl(BlockLOONG64FPT, cmp)
 12297  			return true
 12298  		}
 12299  		// match: (EQZ (XORconst [1] cmp:(SGT _ _)) yes no)
 12300  		// result: (NEZ cmp yes no)
 12301  		for b.Controls[0].Op == OpLOONG64XORconst {
 12302  			v_0 := b.Controls[0]
 12303  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12304  				break
 12305  			}
 12306  			cmp := v_0.Args[0]
 12307  			if cmp.Op != OpLOONG64SGT {
 12308  				break
 12309  			}
 12310  			b.resetWithControl(BlockLOONG64NEZ, cmp)
 12311  			return true
 12312  		}
 12313  		// match: (EQZ (XORconst [1] cmp:(SGTU _ _)) yes no)
 12314  		// result: (NEZ cmp yes no)
 12315  		for b.Controls[0].Op == OpLOONG64XORconst {
 12316  			v_0 := b.Controls[0]
 12317  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12318  				break
 12319  			}
 12320  			cmp := v_0.Args[0]
 12321  			if cmp.Op != OpLOONG64SGTU {
 12322  				break
 12323  			}
 12324  			b.resetWithControl(BlockLOONG64NEZ, cmp)
 12325  			return true
 12326  		}
 12327  		// match: (EQZ (XORconst [1] cmp:(SGTconst _)) yes no)
 12328  		// result: (NEZ cmp yes no)
 12329  		for b.Controls[0].Op == OpLOONG64XORconst {
 12330  			v_0 := b.Controls[0]
 12331  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12332  				break
 12333  			}
 12334  			cmp := v_0.Args[0]
 12335  			if cmp.Op != OpLOONG64SGTconst {
 12336  				break
 12337  			}
 12338  			b.resetWithControl(BlockLOONG64NEZ, cmp)
 12339  			return true
 12340  		}
 12341  		// match: (EQZ (XORconst [1] cmp:(SGTUconst _)) yes no)
 12342  		// result: (NEZ cmp yes no)
 12343  		for b.Controls[0].Op == OpLOONG64XORconst {
 12344  			v_0 := b.Controls[0]
 12345  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12346  				break
 12347  			}
 12348  			cmp := v_0.Args[0]
 12349  			if cmp.Op != OpLOONG64SGTUconst {
 12350  				break
 12351  			}
 12352  			b.resetWithControl(BlockLOONG64NEZ, cmp)
 12353  			return true
 12354  		}
 12355  		// match: (EQZ (SGTUconst [1] x) yes no)
 12356  		// result: (NEZ x yes no)
 12357  		for b.Controls[0].Op == OpLOONG64SGTUconst {
 12358  			v_0 := b.Controls[0]
 12359  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12360  				break
 12361  			}
 12362  			x := v_0.Args[0]
 12363  			b.resetWithControl(BlockLOONG64NEZ, x)
 12364  			return true
 12365  		}
 12366  		// match: (EQZ (SGTU x (MOVVconst [0])) yes no)
 12367  		// result: (EQZ x yes no)
 12368  		for b.Controls[0].Op == OpLOONG64SGTU {
 12369  			v_0 := b.Controls[0]
 12370  			_ = v_0.Args[1]
 12371  			x := v_0.Args[0]
 12372  			v_0_1 := v_0.Args[1]
 12373  			if v_0_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
 12374  				break
 12375  			}
 12376  			b.resetWithControl(BlockLOONG64EQZ, x)
 12377  			return true
 12378  		}
 12379  		// match: (EQZ (SGTconst [0] x) yes no)
 12380  		// result: (GEZ x yes no)
 12381  		for b.Controls[0].Op == OpLOONG64SGTconst {
 12382  			v_0 := b.Controls[0]
 12383  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12384  				break
 12385  			}
 12386  			x := v_0.Args[0]
 12387  			b.resetWithControl(BlockLOONG64GEZ, x)
 12388  			return true
 12389  		}
 12390  		// match: (EQZ (SGT x (MOVVconst [0])) yes no)
 12391  		// result: (LEZ x yes no)
 12392  		for b.Controls[0].Op == OpLOONG64SGT {
 12393  			v_0 := b.Controls[0]
 12394  			_ = v_0.Args[1]
 12395  			x := v_0.Args[0]
 12396  			v_0_1 := v_0.Args[1]
 12397  			if v_0_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
 12398  				break
 12399  			}
 12400  			b.resetWithControl(BlockLOONG64LEZ, x)
 12401  			return true
 12402  		}
 12403  		// match: (EQZ (SGTU (MOVVconst [c]) y) yes no)
 12404  		// cond: c >= -2048 && c <= 2047
 12405  		// result: (EQZ (SGTUconst [c] y) yes no)
 12406  		for b.Controls[0].Op == OpLOONG64SGTU {
 12407  			v_0 := b.Controls[0]
 12408  			y := v_0.Args[1]
 12409  			v_0_0 := v_0.Args[0]
 12410  			if v_0_0.Op != OpLOONG64MOVVconst {
 12411  				break
 12412  			}
 12413  			c := auxIntToInt64(v_0_0.AuxInt)
 12414  			if !(c >= -2048 && c <= 2047) {
 12415  				break
 12416  			}
 12417  			v0 := b.NewValue0(v_0.Pos, OpLOONG64SGTUconst, typ.Bool)
 12418  			v0.AuxInt = int64ToAuxInt(c)
 12419  			v0.AddArg(y)
 12420  			b.resetWithControl(BlockLOONG64EQZ, v0)
 12421  			return true
 12422  		}
 12423  		// match: (EQZ (SUBV x y) yes no)
 12424  		// result: (BEQ x y yes no)
 12425  		for b.Controls[0].Op == OpLOONG64SUBV {
 12426  			v_0 := b.Controls[0]
 12427  			y := v_0.Args[1]
 12428  			x := v_0.Args[0]
 12429  			b.resetWithControl2(BlockLOONG64BEQ, x, y)
 12430  			return true
 12431  		}
 12432  		// match: (EQZ (SGT x y) yes no)
 12433  		// result: (BGE y x yes no)
 12434  		for b.Controls[0].Op == OpLOONG64SGT {
 12435  			v_0 := b.Controls[0]
 12436  			y := v_0.Args[1]
 12437  			x := v_0.Args[0]
 12438  			b.resetWithControl2(BlockLOONG64BGE, y, x)
 12439  			return true
 12440  		}
 12441  		// match: (EQZ (SGTU x y) yes no)
 12442  		// result: (BGEU y x yes no)
 12443  		for b.Controls[0].Op == OpLOONG64SGTU {
 12444  			v_0 := b.Controls[0]
 12445  			y := v_0.Args[1]
 12446  			x := v_0.Args[0]
 12447  			b.resetWithControl2(BlockLOONG64BGEU, y, x)
 12448  			return true
 12449  		}
 12450  		// match: (EQZ (SGTconst [c] y) yes no)
 12451  		// result: (BGE y (MOVVconst [c]) yes no)
 12452  		for b.Controls[0].Op == OpLOONG64SGTconst {
 12453  			v_0 := b.Controls[0]
 12454  			c := auxIntToInt64(v_0.AuxInt)
 12455  			y := v_0.Args[0]
 12456  			v0 := b.NewValue0(b.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12457  			v0.AuxInt = int64ToAuxInt(c)
 12458  			b.resetWithControl2(BlockLOONG64BGE, y, v0)
 12459  			return true
 12460  		}
 12461  		// match: (EQZ (SGTUconst [c] y) yes no)
 12462  		// result: (BGEU y (MOVVconst [c]) yes no)
 12463  		for b.Controls[0].Op == OpLOONG64SGTUconst {
 12464  			v_0 := b.Controls[0]
 12465  			c := auxIntToInt64(v_0.AuxInt)
 12466  			y := v_0.Args[0]
 12467  			v0 := b.NewValue0(b.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12468  			v0.AuxInt = int64ToAuxInt(c)
 12469  			b.resetWithControl2(BlockLOONG64BGEU, y, v0)
 12470  			return true
 12471  		}
 12472  		// match: (EQZ (MOVVconst [0]) yes no)
 12473  		// result: (First yes no)
 12474  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12475  			v_0 := b.Controls[0]
 12476  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12477  				break
 12478  			}
 12479  			b.Reset(BlockFirst)
 12480  			return true
 12481  		}
 12482  		// match: (EQZ (MOVVconst [c]) yes no)
 12483  		// cond: c != 0
 12484  		// result: (First no yes)
 12485  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12486  			v_0 := b.Controls[0]
 12487  			c := auxIntToInt64(v_0.AuxInt)
 12488  			if !(c != 0) {
 12489  				break
 12490  			}
 12491  			b.Reset(BlockFirst)
 12492  			b.swapSuccessors()
 12493  			return true
 12494  		}
 12495  		// match: (EQZ (NEGV x) yes no)
 12496  		// result: (EQZ x yes no)
 12497  		for b.Controls[0].Op == OpLOONG64NEGV {
 12498  			v_0 := b.Controls[0]
 12499  			x := v_0.Args[0]
 12500  			b.resetWithControl(BlockLOONG64EQZ, x)
 12501  			return true
 12502  		}
 12503  	case BlockLOONG64GEZ:
 12504  		// match: (GEZ (MOVVconst [c]) yes no)
 12505  		// cond: c >= 0
 12506  		// result: (First yes no)
 12507  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12508  			v_0 := b.Controls[0]
 12509  			c := auxIntToInt64(v_0.AuxInt)
 12510  			if !(c >= 0) {
 12511  				break
 12512  			}
 12513  			b.Reset(BlockFirst)
 12514  			return true
 12515  		}
 12516  		// match: (GEZ (MOVVconst [c]) yes no)
 12517  		// cond: c < 0
 12518  		// result: (First no yes)
 12519  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12520  			v_0 := b.Controls[0]
 12521  			c := auxIntToInt64(v_0.AuxInt)
 12522  			if !(c < 0) {
 12523  				break
 12524  			}
 12525  			b.Reset(BlockFirst)
 12526  			b.swapSuccessors()
 12527  			return true
 12528  		}
 12529  	case BlockLOONG64GTZ:
 12530  		// match: (GTZ (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: (GTZ (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 BlockIf:
 12556  		// match: (If cond yes no)
 12557  		// result: (NEZ (MOVBUreg <typ.UInt64> cond) yes no)
 12558  		for {
 12559  			cond := b.Controls[0]
 12560  			v0 := b.NewValue0(cond.Pos, OpLOONG64MOVBUreg, typ.UInt64)
 12561  			v0.AddArg(cond)
 12562  			b.resetWithControl(BlockLOONG64NEZ, v0)
 12563  			return true
 12564  		}
 12565  	case BlockJumpTable:
 12566  		// match: (JumpTable idx)
 12567  		// result: (JUMPTABLE {makeJumpTableSym(b)} idx (MOVVaddr <typ.Uintptr> {makeJumpTableSym(b)} (SB)))
 12568  		for {
 12569  			idx := b.Controls[0]
 12570  			v0 := b.NewValue0(b.Pos, OpLOONG64MOVVaddr, typ.Uintptr)
 12571  			v0.Aux = symToAux(makeJumpTableSym(b))
 12572  			v1 := b.NewValue0(b.Pos, OpSB, typ.Uintptr)
 12573  			v0.AddArg(v1)
 12574  			b.resetWithControl2(BlockLOONG64JUMPTABLE, idx, v0)
 12575  			b.Aux = symToAux(makeJumpTableSym(b))
 12576  			return true
 12577  		}
 12578  	case BlockLOONG64LEZ:
 12579  		// match: (LEZ (MOVVconst [c]) yes no)
 12580  		// cond: c <= 0
 12581  		// result: (First yes no)
 12582  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12583  			v_0 := b.Controls[0]
 12584  			c := auxIntToInt64(v_0.AuxInt)
 12585  			if !(c <= 0) {
 12586  				break
 12587  			}
 12588  			b.Reset(BlockFirst)
 12589  			return true
 12590  		}
 12591  		// match: (LEZ (MOVVconst [c]) yes no)
 12592  		// cond: c > 0
 12593  		// result: (First no yes)
 12594  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12595  			v_0 := b.Controls[0]
 12596  			c := auxIntToInt64(v_0.AuxInt)
 12597  			if !(c > 0) {
 12598  				break
 12599  			}
 12600  			b.Reset(BlockFirst)
 12601  			b.swapSuccessors()
 12602  			return true
 12603  		}
 12604  	case BlockLOONG64LTZ:
 12605  		// match: (LTZ (MOVVconst [c]) yes no)
 12606  		// cond: c < 0
 12607  		// result: (First yes no)
 12608  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12609  			v_0 := b.Controls[0]
 12610  			c := auxIntToInt64(v_0.AuxInt)
 12611  			if !(c < 0) {
 12612  				break
 12613  			}
 12614  			b.Reset(BlockFirst)
 12615  			return true
 12616  		}
 12617  		// match: (LTZ (MOVVconst [c]) yes no)
 12618  		// cond: c >= 0
 12619  		// result: (First no yes)
 12620  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12621  			v_0 := b.Controls[0]
 12622  			c := auxIntToInt64(v_0.AuxInt)
 12623  			if !(c >= 0) {
 12624  				break
 12625  			}
 12626  			b.Reset(BlockFirst)
 12627  			b.swapSuccessors()
 12628  			return true
 12629  		}
 12630  	case BlockLOONG64NEZ:
 12631  		// match: (NEZ (FPFlagTrue cmp) yes no)
 12632  		// result: (FPT cmp yes no)
 12633  		for b.Controls[0].Op == OpLOONG64FPFlagTrue {
 12634  			v_0 := b.Controls[0]
 12635  			cmp := v_0.Args[0]
 12636  			b.resetWithControl(BlockLOONG64FPT, cmp)
 12637  			return true
 12638  		}
 12639  		// match: (NEZ (FPFlagFalse cmp) yes no)
 12640  		// result: (FPF cmp yes no)
 12641  		for b.Controls[0].Op == OpLOONG64FPFlagFalse {
 12642  			v_0 := b.Controls[0]
 12643  			cmp := v_0.Args[0]
 12644  			b.resetWithControl(BlockLOONG64FPF, cmp)
 12645  			return true
 12646  		}
 12647  		// match: (NEZ (XORconst [1] cmp:(SGT _ _)) yes no)
 12648  		// result: (EQZ cmp yes no)
 12649  		for b.Controls[0].Op == OpLOONG64XORconst {
 12650  			v_0 := b.Controls[0]
 12651  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12652  				break
 12653  			}
 12654  			cmp := v_0.Args[0]
 12655  			if cmp.Op != OpLOONG64SGT {
 12656  				break
 12657  			}
 12658  			b.resetWithControl(BlockLOONG64EQZ, cmp)
 12659  			return true
 12660  		}
 12661  		// match: (NEZ (XORconst [1] cmp:(SGTU _ _)) yes no)
 12662  		// result: (EQZ cmp yes no)
 12663  		for b.Controls[0].Op == OpLOONG64XORconst {
 12664  			v_0 := b.Controls[0]
 12665  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12666  				break
 12667  			}
 12668  			cmp := v_0.Args[0]
 12669  			if cmp.Op != OpLOONG64SGTU {
 12670  				break
 12671  			}
 12672  			b.resetWithControl(BlockLOONG64EQZ, cmp)
 12673  			return true
 12674  		}
 12675  		// match: (NEZ (XORconst [1] cmp:(SGTconst _)) yes no)
 12676  		// result: (EQZ cmp yes no)
 12677  		for b.Controls[0].Op == OpLOONG64XORconst {
 12678  			v_0 := b.Controls[0]
 12679  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12680  				break
 12681  			}
 12682  			cmp := v_0.Args[0]
 12683  			if cmp.Op != OpLOONG64SGTconst {
 12684  				break
 12685  			}
 12686  			b.resetWithControl(BlockLOONG64EQZ, cmp)
 12687  			return true
 12688  		}
 12689  		// match: (NEZ (XORconst [1] cmp:(SGTUconst _)) yes no)
 12690  		// result: (EQZ cmp yes no)
 12691  		for b.Controls[0].Op == OpLOONG64XORconst {
 12692  			v_0 := b.Controls[0]
 12693  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12694  				break
 12695  			}
 12696  			cmp := v_0.Args[0]
 12697  			if cmp.Op != OpLOONG64SGTUconst {
 12698  				break
 12699  			}
 12700  			b.resetWithControl(BlockLOONG64EQZ, cmp)
 12701  			return true
 12702  		}
 12703  		// match: (NEZ (SGTUconst [1] x) yes no)
 12704  		// result: (EQZ x yes no)
 12705  		for b.Controls[0].Op == OpLOONG64SGTUconst {
 12706  			v_0 := b.Controls[0]
 12707  			if auxIntToInt64(v_0.AuxInt) != 1 {
 12708  				break
 12709  			}
 12710  			x := v_0.Args[0]
 12711  			b.resetWithControl(BlockLOONG64EQZ, x)
 12712  			return true
 12713  		}
 12714  		// match: (NEZ (SGTU x (MOVVconst [0])) yes no)
 12715  		// result: (NEZ x yes no)
 12716  		for b.Controls[0].Op == OpLOONG64SGTU {
 12717  			v_0 := b.Controls[0]
 12718  			_ = v_0.Args[1]
 12719  			x := v_0.Args[0]
 12720  			v_0_1 := v_0.Args[1]
 12721  			if v_0_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
 12722  				break
 12723  			}
 12724  			b.resetWithControl(BlockLOONG64NEZ, x)
 12725  			return true
 12726  		}
 12727  		// match: (NEZ (SGTconst [0] x) yes no)
 12728  		// result: (LTZ x yes no)
 12729  		for b.Controls[0].Op == OpLOONG64SGTconst {
 12730  			v_0 := b.Controls[0]
 12731  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12732  				break
 12733  			}
 12734  			x := v_0.Args[0]
 12735  			b.resetWithControl(BlockLOONG64LTZ, x)
 12736  			return true
 12737  		}
 12738  		// match: (NEZ (SGT x (MOVVconst [0])) yes no)
 12739  		// result: (GTZ x yes no)
 12740  		for b.Controls[0].Op == OpLOONG64SGT {
 12741  			v_0 := b.Controls[0]
 12742  			_ = v_0.Args[1]
 12743  			x := v_0.Args[0]
 12744  			v_0_1 := v_0.Args[1]
 12745  			if v_0_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
 12746  				break
 12747  			}
 12748  			b.resetWithControl(BlockLOONG64GTZ, x)
 12749  			return true
 12750  		}
 12751  		// match: (NEZ (SGTU (MOVVconst [c]) y) yes no)
 12752  		// cond: c >= -2048 && c <= 2047
 12753  		// result: (NEZ (SGTUconst [c] y) yes no)
 12754  		for b.Controls[0].Op == OpLOONG64SGTU {
 12755  			v_0 := b.Controls[0]
 12756  			y := v_0.Args[1]
 12757  			v_0_0 := v_0.Args[0]
 12758  			if v_0_0.Op != OpLOONG64MOVVconst {
 12759  				break
 12760  			}
 12761  			c := auxIntToInt64(v_0_0.AuxInt)
 12762  			if !(c >= -2048 && c <= 2047) {
 12763  				break
 12764  			}
 12765  			v0 := b.NewValue0(v_0.Pos, OpLOONG64SGTUconst, typ.Bool)
 12766  			v0.AuxInt = int64ToAuxInt(c)
 12767  			v0.AddArg(y)
 12768  			b.resetWithControl(BlockLOONG64NEZ, v0)
 12769  			return true
 12770  		}
 12771  		// match: (NEZ (SUBV x y) yes no)
 12772  		// result: (BNE x y yes no)
 12773  		for b.Controls[0].Op == OpLOONG64SUBV {
 12774  			v_0 := b.Controls[0]
 12775  			y := v_0.Args[1]
 12776  			x := v_0.Args[0]
 12777  			b.resetWithControl2(BlockLOONG64BNE, x, y)
 12778  			return true
 12779  		}
 12780  		// match: (NEZ (SGT x y) yes no)
 12781  		// result: (BLT y x yes no)
 12782  		for b.Controls[0].Op == OpLOONG64SGT {
 12783  			v_0 := b.Controls[0]
 12784  			y := v_0.Args[1]
 12785  			x := v_0.Args[0]
 12786  			b.resetWithControl2(BlockLOONG64BLT, y, x)
 12787  			return true
 12788  		}
 12789  		// match: (NEZ (SGTU x y) yes no)
 12790  		// result: (BLTU y x yes no)
 12791  		for b.Controls[0].Op == OpLOONG64SGTU {
 12792  			v_0 := b.Controls[0]
 12793  			y := v_0.Args[1]
 12794  			x := v_0.Args[0]
 12795  			b.resetWithControl2(BlockLOONG64BLTU, y, x)
 12796  			return true
 12797  		}
 12798  		// match: (NEZ (SGTconst [c] y) yes no)
 12799  		// result: (BLT y (MOVVconst [c]) yes no)
 12800  		for b.Controls[0].Op == OpLOONG64SGTconst {
 12801  			v_0 := b.Controls[0]
 12802  			c := auxIntToInt64(v_0.AuxInt)
 12803  			y := v_0.Args[0]
 12804  			v0 := b.NewValue0(b.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12805  			v0.AuxInt = int64ToAuxInt(c)
 12806  			b.resetWithControl2(BlockLOONG64BLT, y, v0)
 12807  			return true
 12808  		}
 12809  		// match: (NEZ (SGTUconst [c] y) yes no)
 12810  		// result: (BLTU y (MOVVconst [c]) yes no)
 12811  		for b.Controls[0].Op == OpLOONG64SGTUconst {
 12812  			v_0 := b.Controls[0]
 12813  			c := auxIntToInt64(v_0.AuxInt)
 12814  			y := v_0.Args[0]
 12815  			v0 := b.NewValue0(b.Pos, OpLOONG64MOVVconst, typ.UInt64)
 12816  			v0.AuxInt = int64ToAuxInt(c)
 12817  			b.resetWithControl2(BlockLOONG64BLTU, y, v0)
 12818  			return true
 12819  		}
 12820  		// match: (NEZ (MOVVconst [0]) yes no)
 12821  		// result: (First no yes)
 12822  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12823  			v_0 := b.Controls[0]
 12824  			if auxIntToInt64(v_0.AuxInt) != 0 {
 12825  				break
 12826  			}
 12827  			b.Reset(BlockFirst)
 12828  			b.swapSuccessors()
 12829  			return true
 12830  		}
 12831  		// match: (NEZ (MOVVconst [c]) yes no)
 12832  		// cond: c != 0
 12833  		// result: (First yes no)
 12834  		for b.Controls[0].Op == OpLOONG64MOVVconst {
 12835  			v_0 := b.Controls[0]
 12836  			c := auxIntToInt64(v_0.AuxInt)
 12837  			if !(c != 0) {
 12838  				break
 12839  			}
 12840  			b.Reset(BlockFirst)
 12841  			return true
 12842  		}
 12843  		// match: (NEZ (NEGV x) yes no)
 12844  		// result: (NEZ x yes no)
 12845  		for b.Controls[0].Op == OpLOONG64NEGV {
 12846  			v_0 := b.Controls[0]
 12847  			x := v_0.Args[0]
 12848  			b.resetWithControl(BlockLOONG64NEZ, x)
 12849  			return true
 12850  		}
 12851  	}
 12852  	return false
 12853  }
 12854  

View as plain text