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

View as plain text