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

     1  // Code generated from _gen/LOONG64.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package rewriteloong64
     4  
     5  import "cmd/compile/internal/types"
     6  import "cmd/compile/internal/ssa/block"
     7  import "cmd/compile/internal/ssa/ssaop"
     8  import "cmd/compile/internal/ssa"
     9  
    10  func RewriteValue(v *ssa.Value) bool {
    11  	switch v.Op {
    12  	case ssaop.OpAbs:
    13  		v.Op = ssaop.OpLOONG64ABSD
    14  		return true
    15  	case ssaop.OpAdd16:
    16  		v.Op = ssaop.OpLOONG64ADDV
    17  		return true
    18  	case ssaop.OpAdd32:
    19  		v.Op = ssaop.OpLOONG64ADDV
    20  		return true
    21  	case ssaop.OpAdd32F:
    22  		v.Op = ssaop.OpLOONG64ADDF
    23  		return true
    24  	case ssaop.OpAdd64:
    25  		v.Op = ssaop.OpLOONG64ADDV
    26  		return true
    27  	case ssaop.OpAdd64F:
    28  		v.Op = ssaop.OpLOONG64ADDD
    29  		return true
    30  	case ssaop.OpAdd8:
    31  		v.Op = ssaop.OpLOONG64ADDV
    32  		return true
    33  	case ssaop.OpAddPtr:
    34  		v.Op = ssaop.OpLOONG64ADDV
    35  		return true
    36  	case ssaop.OpAddr:
    37  		return rewriteValue_OpAddr(v)
    38  	case ssaop.OpAnd16:
    39  		v.Op = ssaop.OpLOONG64AND
    40  		return true
    41  	case ssaop.OpAnd32:
    42  		v.Op = ssaop.OpLOONG64AND
    43  		return true
    44  	case ssaop.OpAnd64:
    45  		v.Op = ssaop.OpLOONG64AND
    46  		return true
    47  	case ssaop.OpAnd8:
    48  		v.Op = ssaop.OpLOONG64AND
    49  		return true
    50  	case ssaop.OpAndB:
    51  		v.Op = ssaop.OpLOONG64AND
    52  		return true
    53  	case ssaop.OpAtomicAdd32:
    54  		v.Op = ssaop.OpLOONG64LoweredAtomicAdd32
    55  		return true
    56  	case ssaop.OpAtomicAdd64:
    57  		v.Op = ssaop.OpLOONG64LoweredAtomicAdd64
    58  		return true
    59  	case ssaop.OpAtomicAnd32:
    60  		v.Op = ssaop.OpLOONG64LoweredAtomicAnd32
    61  		return true
    62  	case ssaop.OpAtomicAnd32value:
    63  		v.Op = ssaop.OpLOONG64LoweredAtomicAnd32value
    64  		return true
    65  	case ssaop.OpAtomicAnd64value:
    66  		v.Op = ssaop.OpLOONG64LoweredAtomicAnd64value
    67  		return true
    68  	case ssaop.OpAtomicAnd8:
    69  		return rewriteValue_OpAtomicAnd8(v)
    70  	case ssaop.OpAtomicCompareAndSwap32:
    71  		return rewriteValue_OpAtomicCompareAndSwap32(v)
    72  	case ssaop.OpAtomicCompareAndSwap32Variant:
    73  		return rewriteValue_OpAtomicCompareAndSwap32Variant(v)
    74  	case ssaop.OpAtomicCompareAndSwap64:
    75  		v.Op = ssaop.OpLOONG64LoweredAtomicCas64
    76  		return true
    77  	case ssaop.OpAtomicCompareAndSwap64Variant:
    78  		v.Op = ssaop.OpLOONG64LoweredAtomicCas64Variant
    79  		return true
    80  	case ssaop.OpAtomicExchange32:
    81  		v.Op = ssaop.OpLOONG64LoweredAtomicExchange32
    82  		return true
    83  	case ssaop.OpAtomicExchange64:
    84  		v.Op = ssaop.OpLOONG64LoweredAtomicExchange64
    85  		return true
    86  	case ssaop.OpAtomicExchange8Variant:
    87  		v.Op = ssaop.OpLOONG64LoweredAtomicExchange8Variant
    88  		return true
    89  	case ssaop.OpAtomicLoad32:
    90  		v.Op = ssaop.OpLOONG64LoweredAtomicLoad32
    91  		return true
    92  	case ssaop.OpAtomicLoad64:
    93  		v.Op = ssaop.OpLOONG64LoweredAtomicLoad64
    94  		return true
    95  	case ssaop.OpAtomicLoad8:
    96  		v.Op = ssaop.OpLOONG64LoweredAtomicLoad8
    97  		return true
    98  	case ssaop.OpAtomicLoadPtr:
    99  		v.Op = ssaop.OpLOONG64LoweredAtomicLoad64
   100  		return true
   101  	case ssaop.OpAtomicOr32:
   102  		v.Op = ssaop.OpLOONG64LoweredAtomicOr32
   103  		return true
   104  	case ssaop.OpAtomicOr32value:
   105  		v.Op = ssaop.OpLOONG64LoweredAtomicOr32value
   106  		return true
   107  	case ssaop.OpAtomicOr64value:
   108  		v.Op = ssaop.OpLOONG64LoweredAtomicOr64value
   109  		return true
   110  	case ssaop.OpAtomicOr8:
   111  		return rewriteValue_OpAtomicOr8(v)
   112  	case ssaop.OpAtomicStore32:
   113  		v.Op = ssaop.OpLOONG64LoweredAtomicStore32
   114  		return true
   115  	case ssaop.OpAtomicStore32Variant:
   116  		v.Op = ssaop.OpLOONG64LoweredAtomicStore32Variant
   117  		return true
   118  	case ssaop.OpAtomicStore64:
   119  		v.Op = ssaop.OpLOONG64LoweredAtomicStore64
   120  		return true
   121  	case ssaop.OpAtomicStore64Variant:
   122  		v.Op = ssaop.OpLOONG64LoweredAtomicStore64Variant
   123  		return true
   124  	case ssaop.OpAtomicStore8:
   125  		v.Op = ssaop.OpLOONG64LoweredAtomicStore8
   126  		return true
   127  	case ssaop.OpAtomicStore8Variant:
   128  		v.Op = ssaop.OpLOONG64LoweredAtomicStore8Variant
   129  		return true
   130  	case ssaop.OpAtomicStorePtrNoWB:
   131  		v.Op = ssaop.OpLOONG64LoweredAtomicStore64
   132  		return true
   133  	case ssaop.OpAvg64u:
   134  		return rewriteValue_OpAvg64u(v)
   135  	case ssaop.OpBitLen16:
   136  		return rewriteValue_OpBitLen16(v)
   137  	case ssaop.OpBitLen32:
   138  		return rewriteValue_OpBitLen32(v)
   139  	case ssaop.OpBitLen64:
   140  		return rewriteValue_OpBitLen64(v)
   141  	case ssaop.OpBitLen8:
   142  		return rewriteValue_OpBitLen8(v)
   143  	case ssaop.OpBitRev16:
   144  		return rewriteValue_OpBitRev16(v)
   145  	case ssaop.OpBitRev32:
   146  		v.Op = ssaop.OpLOONG64BITREVW
   147  		return true
   148  	case ssaop.OpBitRev64:
   149  		v.Op = ssaop.OpLOONG64BITREVV
   150  		return true
   151  	case ssaop.OpBitRev8:
   152  		v.Op = ssaop.OpLOONG64BITREV4B
   153  		return true
   154  	case ssaop.OpBswap16:
   155  		v.Op = ssaop.OpLOONG64REVB2H
   156  		return true
   157  	case ssaop.OpBswap32:
   158  		v.Op = ssaop.OpLOONG64REVB2W
   159  		return true
   160  	case ssaop.OpBswap64:
   161  		v.Op = ssaop.OpLOONG64REVBV
   162  		return true
   163  	case ssaop.OpCeil:
   164  		v.Op = ssaop.OpLOONG64FRINTPD
   165  		return true
   166  	case ssaop.OpClosureCall:
   167  		v.Op = ssaop.OpLOONG64CALLclosure
   168  		return true
   169  	case ssaop.OpCom16:
   170  		return rewriteValue_OpCom16(v)
   171  	case ssaop.OpCom32:
   172  		return rewriteValue_OpCom32(v)
   173  	case ssaop.OpCom64:
   174  		return rewriteValue_OpCom64(v)
   175  	case ssaop.OpCom8:
   176  		return rewriteValue_OpCom8(v)
   177  	case ssaop.OpCondSelect:
   178  		return rewriteValue_OpCondSelect(v)
   179  	case ssaop.OpConst16:
   180  		return rewriteValue_OpConst16(v)
   181  	case ssaop.OpConst32:
   182  		return rewriteValue_OpConst32(v)
   183  	case ssaop.OpConst32F:
   184  		return rewriteValue_OpConst32F(v)
   185  	case ssaop.OpConst64:
   186  		return rewriteValue_OpConst64(v)
   187  	case ssaop.OpConst64F:
   188  		return rewriteValue_OpConst64F(v)
   189  	case ssaop.OpConst8:
   190  		return rewriteValue_OpConst8(v)
   191  	case ssaop.OpConstBool:
   192  		return rewriteValue_OpConstBool(v)
   193  	case ssaop.OpConstNil:
   194  		return rewriteValue_OpConstNil(v)
   195  	case ssaop.OpCopysign:
   196  		v.Op = ssaop.OpLOONG64FCOPYSGD
   197  		return true
   198  	case ssaop.OpCtz16:
   199  		return rewriteValue_OpCtz16(v)
   200  	case ssaop.OpCtz16NonZero:
   201  		v.Op = ssaop.OpCtz64
   202  		return true
   203  	case ssaop.OpCtz32:
   204  		v.Op = ssaop.OpLOONG64CTZW
   205  		return true
   206  	case ssaop.OpCtz32NonZero:
   207  		v.Op = ssaop.OpCtz64
   208  		return true
   209  	case ssaop.OpCtz64:
   210  		v.Op = ssaop.OpLOONG64CTZV
   211  		return true
   212  	case ssaop.OpCtz64NonZero:
   213  		v.Op = ssaop.OpCtz64
   214  		return true
   215  	case ssaop.OpCtz8:
   216  		return rewriteValue_OpCtz8(v)
   217  	case ssaop.OpCtz8NonZero:
   218  		v.Op = ssaop.OpCtz64
   219  		return true
   220  	case ssaop.OpCvt32Fto32:
   221  		v.Op = ssaop.OpLOONG64TRUNCFW
   222  		return true
   223  	case ssaop.OpCvt32Fto64:
   224  		v.Op = ssaop.OpLOONG64TRUNCFV
   225  		return true
   226  	case ssaop.OpCvt32Fto64F:
   227  		v.Op = ssaop.OpLOONG64MOVFD
   228  		return true
   229  	case ssaop.OpCvt32to32F:
   230  		v.Op = ssaop.OpLOONG64MOVWF
   231  		return true
   232  	case ssaop.OpCvt32to64F:
   233  		v.Op = ssaop.OpLOONG64MOVWD
   234  		return true
   235  	case ssaop.OpCvt64Fto32:
   236  		v.Op = ssaop.OpLOONG64TRUNCDW
   237  		return true
   238  	case ssaop.OpCvt64Fto32F:
   239  		v.Op = ssaop.OpLOONG64MOVDF
   240  		return true
   241  	case ssaop.OpCvt64Fto64:
   242  		v.Op = ssaop.OpLOONG64TRUNCDV
   243  		return true
   244  	case ssaop.OpCvt64to32F:
   245  		v.Op = ssaop.OpLOONG64MOVVF
   246  		return true
   247  	case ssaop.OpCvt64to64F:
   248  		v.Op = ssaop.OpLOONG64MOVVD
   249  		return true
   250  	case ssaop.OpCvtBoolToUint8:
   251  		v.Op = ssaop.OpCopy
   252  		return true
   253  	case ssaop.OpDiv16:
   254  		return rewriteValue_OpDiv16(v)
   255  	case ssaop.OpDiv16u:
   256  		return rewriteValue_OpDiv16u(v)
   257  	case ssaop.OpDiv32:
   258  		return rewriteValue_OpDiv32(v)
   259  	case ssaop.OpDiv32F:
   260  		v.Op = ssaop.OpLOONG64DIVF
   261  		return true
   262  	case ssaop.OpDiv32u:
   263  		return rewriteValue_OpDiv32u(v)
   264  	case ssaop.OpDiv64:
   265  		return rewriteValue_OpDiv64(v)
   266  	case ssaop.OpDiv64F:
   267  		v.Op = ssaop.OpLOONG64DIVD
   268  		return true
   269  	case ssaop.OpDiv64u:
   270  		v.Op = ssaop.OpLOONG64DIVVU
   271  		return true
   272  	case ssaop.OpDiv8:
   273  		return rewriteValue_OpDiv8(v)
   274  	case ssaop.OpDiv8u:
   275  		return rewriteValue_OpDiv8u(v)
   276  	case ssaop.OpEq16:
   277  		return rewriteValue_OpEq16(v)
   278  	case ssaop.OpEq32:
   279  		return rewriteValue_OpEq32(v)
   280  	case ssaop.OpEq32F:
   281  		return rewriteValue_OpEq32F(v)
   282  	case ssaop.OpEq64:
   283  		return rewriteValue_OpEq64(v)
   284  	case ssaop.OpEq64F:
   285  		return rewriteValue_OpEq64F(v)
   286  	case ssaop.OpEq8:
   287  		return rewriteValue_OpEq8(v)
   288  	case ssaop.OpEqB:
   289  		return rewriteValue_OpEqB(v)
   290  	case ssaop.OpEqPtr:
   291  		return rewriteValue_OpEqPtr(v)
   292  	case ssaop.OpFMA:
   293  		v.Op = ssaop.OpLOONG64FMADDD
   294  		return true
   295  	case ssaop.OpFloor:
   296  		v.Op = ssaop.OpLOONG64FRINTMD
   297  		return true
   298  	case ssaop.OpGetCallerPC:
   299  		v.Op = ssaop.OpLOONG64LoweredGetCallerPC
   300  		return true
   301  	case ssaop.OpGetCallerSP:
   302  		v.Op = ssaop.OpLOONG64LoweredGetCallerSP
   303  		return true
   304  	case ssaop.OpGetClosurePtr:
   305  		v.Op = ssaop.OpLOONG64LoweredGetClosurePtr
   306  		return true
   307  	case ssaop.OpHmul32:
   308  		v.Op = ssaop.OpLOONG64MULH
   309  		return true
   310  	case ssaop.OpHmul32u:
   311  		v.Op = ssaop.OpLOONG64MULHU
   312  		return true
   313  	case ssaop.OpHmul64:
   314  		v.Op = ssaop.OpLOONG64MULHV
   315  		return true
   316  	case ssaop.OpHmul64u:
   317  		v.Op = ssaop.OpLOONG64MULHVU
   318  		return true
   319  	case ssaop.OpInterCall:
   320  		v.Op = ssaop.OpLOONG64CALLinter
   321  		return true
   322  	case ssaop.OpIsInBounds:
   323  		return rewriteValue_OpIsInBounds(v)
   324  	case ssaop.OpIsNonNil:
   325  		return rewriteValue_OpIsNonNil(v)
   326  	case ssaop.OpIsSliceInBounds:
   327  		return rewriteValue_OpIsSliceInBounds(v)
   328  	case ssaop.OpLOONG64ADDD:
   329  		return rewriteValue_OpLOONG64ADDD(v)
   330  	case ssaop.OpLOONG64ADDF:
   331  		return rewriteValue_OpLOONG64ADDF(v)
   332  	case ssaop.OpLOONG64ADDV:
   333  		return rewriteValue_OpLOONG64ADDV(v)
   334  	case ssaop.OpLOONG64ADDVconst:
   335  		return rewriteValue_OpLOONG64ADDVconst(v)
   336  	case ssaop.OpLOONG64ADDshiftLLV:
   337  		return rewriteValue_OpLOONG64ADDshiftLLV(v)
   338  	case ssaop.OpLOONG64AND:
   339  		return rewriteValue_OpLOONG64AND(v)
   340  	case ssaop.OpLOONG64ANDconst:
   341  		return rewriteValue_OpLOONG64ANDconst(v)
   342  	case ssaop.OpLOONG64DIVV:
   343  		return rewriteValue_OpLOONG64DIVV(v)
   344  	case ssaop.OpLOONG64DIVVU:
   345  		return rewriteValue_OpLOONG64DIVVU(v)
   346  	case ssaop.OpLOONG64LoweredPanicBoundsCR:
   347  		return rewriteValue_OpLOONG64LoweredPanicBoundsCR(v)
   348  	case ssaop.OpLOONG64LoweredPanicBoundsRC:
   349  		return rewriteValue_OpLOONG64LoweredPanicBoundsRC(v)
   350  	case ssaop.OpLOONG64LoweredPanicBoundsRR:
   351  		return rewriteValue_OpLOONG64LoweredPanicBoundsRR(v)
   352  	case ssaop.OpLOONG64MASKEQZ:
   353  		return rewriteValue_OpLOONG64MASKEQZ(v)
   354  	case ssaop.OpLOONG64MASKNEZ:
   355  		return rewriteValue_OpLOONG64MASKNEZ(v)
   356  	case ssaop.OpLOONG64MOVBUload:
   357  		return rewriteValue_OpLOONG64MOVBUload(v)
   358  	case ssaop.OpLOONG64MOVBUloadidx:
   359  		return rewriteValue_OpLOONG64MOVBUloadidx(v)
   360  	case ssaop.OpLOONG64MOVBUreg:
   361  		return rewriteValue_OpLOONG64MOVBUreg(v)
   362  	case ssaop.OpLOONG64MOVBload:
   363  		return rewriteValue_OpLOONG64MOVBload(v)
   364  	case ssaop.OpLOONG64MOVBloadidx:
   365  		return rewriteValue_OpLOONG64MOVBloadidx(v)
   366  	case ssaop.OpLOONG64MOVBreg:
   367  		return rewriteValue_OpLOONG64MOVBreg(v)
   368  	case ssaop.OpLOONG64MOVBstore:
   369  		return rewriteValue_OpLOONG64MOVBstore(v)
   370  	case ssaop.OpLOONG64MOVBstoreidx:
   371  		return rewriteValue_OpLOONG64MOVBstoreidx(v)
   372  	case ssaop.OpLOONG64MOVDF:
   373  		return rewriteValue_OpLOONG64MOVDF(v)
   374  	case ssaop.OpLOONG64MOVDload:
   375  		return rewriteValue_OpLOONG64MOVDload(v)
   376  	case ssaop.OpLOONG64MOVDloadidx:
   377  		return rewriteValue_OpLOONG64MOVDloadidx(v)
   378  	case ssaop.OpLOONG64MOVDstore:
   379  		return rewriteValue_OpLOONG64MOVDstore(v)
   380  	case ssaop.OpLOONG64MOVDstoreidx:
   381  		return rewriteValue_OpLOONG64MOVDstoreidx(v)
   382  	case ssaop.OpLOONG64MOVFload:
   383  		return rewriteValue_OpLOONG64MOVFload(v)
   384  	case ssaop.OpLOONG64MOVFloadidx:
   385  		return rewriteValue_OpLOONG64MOVFloadidx(v)
   386  	case ssaop.OpLOONG64MOVFstore:
   387  		return rewriteValue_OpLOONG64MOVFstore(v)
   388  	case ssaop.OpLOONG64MOVFstoreidx:
   389  		return rewriteValue_OpLOONG64MOVFstoreidx(v)
   390  	case ssaop.OpLOONG64MOVHUload:
   391  		return rewriteValue_OpLOONG64MOVHUload(v)
   392  	case ssaop.OpLOONG64MOVHUloadidx:
   393  		return rewriteValue_OpLOONG64MOVHUloadidx(v)
   394  	case ssaop.OpLOONG64MOVHUreg:
   395  		return rewriteValue_OpLOONG64MOVHUreg(v)
   396  	case ssaop.OpLOONG64MOVHload:
   397  		return rewriteValue_OpLOONG64MOVHload(v)
   398  	case ssaop.OpLOONG64MOVHloadidx:
   399  		return rewriteValue_OpLOONG64MOVHloadidx(v)
   400  	case ssaop.OpLOONG64MOVHreg:
   401  		return rewriteValue_OpLOONG64MOVHreg(v)
   402  	case ssaop.OpLOONG64MOVHstore:
   403  		return rewriteValue_OpLOONG64MOVHstore(v)
   404  	case ssaop.OpLOONG64MOVHstoreidx:
   405  		return rewriteValue_OpLOONG64MOVHstoreidx(v)
   406  	case ssaop.OpLOONG64MOVVload:
   407  		return rewriteValue_OpLOONG64MOVVload(v)
   408  	case ssaop.OpLOONG64MOVVloadidx:
   409  		return rewriteValue_OpLOONG64MOVVloadidx(v)
   410  	case ssaop.OpLOONG64MOVVreg:
   411  		return rewriteValue_OpLOONG64MOVVreg(v)
   412  	case ssaop.OpLOONG64MOVVstore:
   413  		return rewriteValue_OpLOONG64MOVVstore(v)
   414  	case ssaop.OpLOONG64MOVVstoreidx:
   415  		return rewriteValue_OpLOONG64MOVVstoreidx(v)
   416  	case ssaop.OpLOONG64MOVWUload:
   417  		return rewriteValue_OpLOONG64MOVWUload(v)
   418  	case ssaop.OpLOONG64MOVWUloadidx:
   419  		return rewriteValue_OpLOONG64MOVWUloadidx(v)
   420  	case ssaop.OpLOONG64MOVWUreg:
   421  		return rewriteValue_OpLOONG64MOVWUreg(v)
   422  	case ssaop.OpLOONG64MOVWload:
   423  		return rewriteValue_OpLOONG64MOVWload(v)
   424  	case ssaop.OpLOONG64MOVWloadidx:
   425  		return rewriteValue_OpLOONG64MOVWloadidx(v)
   426  	case ssaop.OpLOONG64MOVWreg:
   427  		return rewriteValue_OpLOONG64MOVWreg(v)
   428  	case ssaop.OpLOONG64MOVWstore:
   429  		return rewriteValue_OpLOONG64MOVWstore(v)
   430  	case ssaop.OpLOONG64MOVWstoreidx:
   431  		return rewriteValue_OpLOONG64MOVWstoreidx(v)
   432  	case ssaop.OpLOONG64MULV:
   433  		return rewriteValue_OpLOONG64MULV(v)
   434  	case ssaop.OpLOONG64NEGV:
   435  		return rewriteValue_OpLOONG64NEGV(v)
   436  	case ssaop.OpLOONG64NOR:
   437  		return rewriteValue_OpLOONG64NOR(v)
   438  	case ssaop.OpLOONG64NORconst:
   439  		return rewriteValue_OpLOONG64NORconst(v)
   440  	case ssaop.OpLOONG64OR:
   441  		return rewriteValue_OpLOONG64OR(v)
   442  	case ssaop.OpLOONG64ORN:
   443  		return rewriteValue_OpLOONG64ORN(v)
   444  	case ssaop.OpLOONG64ORconst:
   445  		return rewriteValue_OpLOONG64ORconst(v)
   446  	case ssaop.OpLOONG64REMV:
   447  		return rewriteValue_OpLOONG64REMV(v)
   448  	case ssaop.OpLOONG64REMVU:
   449  		return rewriteValue_OpLOONG64REMVU(v)
   450  	case ssaop.OpLOONG64ROTR:
   451  		return rewriteValue_OpLOONG64ROTR(v)
   452  	case ssaop.OpLOONG64ROTRV:
   453  		return rewriteValue_OpLOONG64ROTRV(v)
   454  	case ssaop.OpLOONG64SGT:
   455  		return rewriteValue_OpLOONG64SGT(v)
   456  	case ssaop.OpLOONG64SGTU:
   457  		return rewriteValue_OpLOONG64SGTU(v)
   458  	case ssaop.OpLOONG64SGTUconst:
   459  		return rewriteValue_OpLOONG64SGTUconst(v)
   460  	case ssaop.OpLOONG64SGTconst:
   461  		return rewriteValue_OpLOONG64SGTconst(v)
   462  	case ssaop.OpLOONG64SLL:
   463  		return rewriteValue_OpLOONG64SLL(v)
   464  	case ssaop.OpLOONG64SLLV:
   465  		return rewriteValue_OpLOONG64SLLV(v)
   466  	case ssaop.OpLOONG64SLLVconst:
   467  		return rewriteValue_OpLOONG64SLLVconst(v)
   468  	case ssaop.OpLOONG64SLLconst:
   469  		return rewriteValue_OpLOONG64SLLconst(v)
   470  	case ssaop.OpLOONG64SRA:
   471  		return rewriteValue_OpLOONG64SRA(v)
   472  	case ssaop.OpLOONG64SRAV:
   473  		return rewriteValue_OpLOONG64SRAV(v)
   474  	case ssaop.OpLOONG64SRAVconst:
   475  		return rewriteValue_OpLOONG64SRAVconst(v)
   476  	case ssaop.OpLOONG64SRL:
   477  		return rewriteValue_OpLOONG64SRL(v)
   478  	case ssaop.OpLOONG64SRLV:
   479  		return rewriteValue_OpLOONG64SRLV(v)
   480  	case ssaop.OpLOONG64SRLVconst:
   481  		return rewriteValue_OpLOONG64SRLVconst(v)
   482  	case ssaop.OpLOONG64SUBD:
   483  		return rewriteValue_OpLOONG64SUBD(v)
   484  	case ssaop.OpLOONG64SUBF:
   485  		return rewriteValue_OpLOONG64SUBF(v)
   486  	case ssaop.OpLOONG64SUBV:
   487  		return rewriteValue_OpLOONG64SUBV(v)
   488  	case ssaop.OpLOONG64SUBVconst:
   489  		return rewriteValue_OpLOONG64SUBVconst(v)
   490  	case ssaop.OpLOONG64XOR:
   491  		return rewriteValue_OpLOONG64XOR(v)
   492  	case ssaop.OpLOONG64XORconst:
   493  		return rewriteValue_OpLOONG64XORconst(v)
   494  	case ssaop.OpLeq16:
   495  		return rewriteValue_OpLeq16(v)
   496  	case ssaop.OpLeq16U:
   497  		return rewriteValue_OpLeq16U(v)
   498  	case ssaop.OpLeq32:
   499  		return rewriteValue_OpLeq32(v)
   500  	case ssaop.OpLeq32F:
   501  		return rewriteValue_OpLeq32F(v)
   502  	case ssaop.OpLeq32U:
   503  		return rewriteValue_OpLeq32U(v)
   504  	case ssaop.OpLeq64:
   505  		return rewriteValue_OpLeq64(v)
   506  	case ssaop.OpLeq64F:
   507  		return rewriteValue_OpLeq64F(v)
   508  	case ssaop.OpLeq64U:
   509  		return rewriteValue_OpLeq64U(v)
   510  	case ssaop.OpLeq8:
   511  		return rewriteValue_OpLeq8(v)
   512  	case ssaop.OpLeq8U:
   513  		return rewriteValue_OpLeq8U(v)
   514  	case ssaop.OpLess16:
   515  		return rewriteValue_OpLess16(v)
   516  	case ssaop.OpLess16U:
   517  		return rewriteValue_OpLess16U(v)
   518  	case ssaop.OpLess32:
   519  		return rewriteValue_OpLess32(v)
   520  	case ssaop.OpLess32F:
   521  		return rewriteValue_OpLess32F(v)
   522  	case ssaop.OpLess32U:
   523  		return rewriteValue_OpLess32U(v)
   524  	case ssaop.OpLess64:
   525  		return rewriteValue_OpLess64(v)
   526  	case ssaop.OpLess64F:
   527  		return rewriteValue_OpLess64F(v)
   528  	case ssaop.OpLess64U:
   529  		return rewriteValue_OpLess64U(v)
   530  	case ssaop.OpLess8:
   531  		return rewriteValue_OpLess8(v)
   532  	case ssaop.OpLess8U:
   533  		return rewriteValue_OpLess8U(v)
   534  	case ssaop.OpLoad:
   535  		return rewriteValue_OpLoad(v)
   536  	case ssaop.OpLocalAddr:
   537  		return rewriteValue_OpLocalAddr(v)
   538  	case ssaop.OpLsh16x16:
   539  		return rewriteValue_OpLsh16x16(v)
   540  	case ssaop.OpLsh16x32:
   541  		return rewriteValue_OpLsh16x32(v)
   542  	case ssaop.OpLsh16x64:
   543  		return rewriteValue_OpLsh16x64(v)
   544  	case ssaop.OpLsh16x8:
   545  		return rewriteValue_OpLsh16x8(v)
   546  	case ssaop.OpLsh32x16:
   547  		return rewriteValue_OpLsh32x16(v)
   548  	case ssaop.OpLsh32x32:
   549  		return rewriteValue_OpLsh32x32(v)
   550  	case ssaop.OpLsh32x64:
   551  		return rewriteValue_OpLsh32x64(v)
   552  	case ssaop.OpLsh32x8:
   553  		return rewriteValue_OpLsh32x8(v)
   554  	case ssaop.OpLsh64x16:
   555  		return rewriteValue_OpLsh64x16(v)
   556  	case ssaop.OpLsh64x32:
   557  		return rewriteValue_OpLsh64x32(v)
   558  	case ssaop.OpLsh64x64:
   559  		return rewriteValue_OpLsh64x64(v)
   560  	case ssaop.OpLsh64x8:
   561  		return rewriteValue_OpLsh64x8(v)
   562  	case ssaop.OpLsh8x16:
   563  		return rewriteValue_OpLsh8x16(v)
   564  	case ssaop.OpLsh8x32:
   565  		return rewriteValue_OpLsh8x32(v)
   566  	case ssaop.OpLsh8x64:
   567  		return rewriteValue_OpLsh8x64(v)
   568  	case ssaop.OpLsh8x8:
   569  		return rewriteValue_OpLsh8x8(v)
   570  	case ssaop.OpMax32F:
   571  		v.Op = ssaop.OpLOONG64FMAXF
   572  		return true
   573  	case ssaop.OpMax64F:
   574  		v.Op = ssaop.OpLOONG64FMAXD
   575  		return true
   576  	case ssaop.OpMin32F:
   577  		v.Op = ssaop.OpLOONG64FMINF
   578  		return true
   579  	case ssaop.OpMin64F:
   580  		v.Op = ssaop.OpLOONG64FMIND
   581  		return true
   582  	case ssaop.OpMod16:
   583  		return rewriteValue_OpMod16(v)
   584  	case ssaop.OpMod16u:
   585  		return rewriteValue_OpMod16u(v)
   586  	case ssaop.OpMod32:
   587  		return rewriteValue_OpMod32(v)
   588  	case ssaop.OpMod32u:
   589  		return rewriteValue_OpMod32u(v)
   590  	case ssaop.OpMod64:
   591  		return rewriteValue_OpMod64(v)
   592  	case ssaop.OpMod64u:
   593  		v.Op = ssaop.OpLOONG64REMVU
   594  		return true
   595  	case ssaop.OpMod8:
   596  		return rewriteValue_OpMod8(v)
   597  	case ssaop.OpMod8u:
   598  		return rewriteValue_OpMod8u(v)
   599  	case ssaop.OpMove:
   600  		return rewriteValue_OpMove(v)
   601  	case ssaop.OpMul16:
   602  		v.Op = ssaop.OpLOONG64MULV
   603  		return true
   604  	case ssaop.OpMul32:
   605  		v.Op = ssaop.OpLOONG64MULV
   606  		return true
   607  	case ssaop.OpMul32F:
   608  		v.Op = ssaop.OpLOONG64MULF
   609  		return true
   610  	case ssaop.OpMul64:
   611  		v.Op = ssaop.OpLOONG64MULV
   612  		return true
   613  	case ssaop.OpMul64F:
   614  		v.Op = ssaop.OpLOONG64MULD
   615  		return true
   616  	case ssaop.OpMul8:
   617  		v.Op = ssaop.OpLOONG64MULV
   618  		return true
   619  	case ssaop.OpNeg16:
   620  		v.Op = ssaop.OpLOONG64NEGV
   621  		return true
   622  	case ssaop.OpNeg32:
   623  		v.Op = ssaop.OpLOONG64NEGV
   624  		return true
   625  	case ssaop.OpNeg32F:
   626  		v.Op = ssaop.OpLOONG64NEGF
   627  		return true
   628  	case ssaop.OpNeg64:
   629  		v.Op = ssaop.OpLOONG64NEGV
   630  		return true
   631  	case ssaop.OpNeg64F:
   632  		v.Op = ssaop.OpLOONG64NEGD
   633  		return true
   634  	case ssaop.OpNeg8:
   635  		v.Op = ssaop.OpLOONG64NEGV
   636  		return true
   637  	case ssaop.OpNeq16:
   638  		return rewriteValue_OpNeq16(v)
   639  	case ssaop.OpNeq32:
   640  		return rewriteValue_OpNeq32(v)
   641  	case ssaop.OpNeq32F:
   642  		return rewriteValue_OpNeq32F(v)
   643  	case ssaop.OpNeq64:
   644  		return rewriteValue_OpNeq64(v)
   645  	case ssaop.OpNeq64F:
   646  		return rewriteValue_OpNeq64F(v)
   647  	case ssaop.OpNeq8:
   648  		return rewriteValue_OpNeq8(v)
   649  	case ssaop.OpNeqB:
   650  		v.Op = ssaop.OpLOONG64XOR
   651  		return true
   652  	case ssaop.OpNeqPtr:
   653  		return rewriteValue_OpNeqPtr(v)
   654  	case ssaop.OpNilCheck:
   655  		v.Op = ssaop.OpLOONG64LoweredNilCheck
   656  		return true
   657  	case ssaop.OpNot:
   658  		return rewriteValue_OpNot(v)
   659  	case ssaop.OpOffPtr:
   660  		return rewriteValue_OpOffPtr(v)
   661  	case ssaop.OpOr16:
   662  		v.Op = ssaop.OpLOONG64OR
   663  		return true
   664  	case ssaop.OpOr32:
   665  		v.Op = ssaop.OpLOONG64OR
   666  		return true
   667  	case ssaop.OpOr64:
   668  		v.Op = ssaop.OpLOONG64OR
   669  		return true
   670  	case ssaop.OpOr8:
   671  		v.Op = ssaop.OpLOONG64OR
   672  		return true
   673  	case ssaop.OpOrB:
   674  		v.Op = ssaop.OpLOONG64OR
   675  		return true
   676  	case ssaop.OpPanicBounds:
   677  		v.Op = ssaop.OpLOONG64LoweredPanicBoundsRR
   678  		return true
   679  	case ssaop.OpPopCount16:
   680  		return rewriteValue_OpPopCount16(v)
   681  	case ssaop.OpPopCount32:
   682  		return rewriteValue_OpPopCount32(v)
   683  	case ssaop.OpPopCount64:
   684  		return rewriteValue_OpPopCount64(v)
   685  	case ssaop.OpPrefetchCache:
   686  		return rewriteValue_OpPrefetchCache(v)
   687  	case ssaop.OpPrefetchCacheStreamed:
   688  		return rewriteValue_OpPrefetchCacheStreamed(v)
   689  	case ssaop.OpPubBarrier:
   690  		v.Op = ssaop.OpLOONG64LoweredPubBarrier
   691  		return true
   692  	case ssaop.OpRotateLeft16:
   693  		return rewriteValue_OpRotateLeft16(v)
   694  	case ssaop.OpRotateLeft32:
   695  		return rewriteValue_OpRotateLeft32(v)
   696  	case ssaop.OpRotateLeft64:
   697  		return rewriteValue_OpRotateLeft64(v)
   698  	case ssaop.OpRotateLeft8:
   699  		return rewriteValue_OpRotateLeft8(v)
   700  	case ssaop.OpRound32F:
   701  		v.Op = ssaop.OpLOONG64LoweredRound32F
   702  		return true
   703  	case ssaop.OpRound64F:
   704  		v.Op = ssaop.OpLOONG64LoweredRound64F
   705  		return true
   706  	case ssaop.OpRoundToEven:
   707  		v.Op = ssaop.OpLOONG64FRINTND
   708  		return true
   709  	case ssaop.OpRsh16Ux16:
   710  		return rewriteValue_OpRsh16Ux16(v)
   711  	case ssaop.OpRsh16Ux32:
   712  		return rewriteValue_OpRsh16Ux32(v)
   713  	case ssaop.OpRsh16Ux64:
   714  		return rewriteValue_OpRsh16Ux64(v)
   715  	case ssaop.OpRsh16Ux8:
   716  		return rewriteValue_OpRsh16Ux8(v)
   717  	case ssaop.OpRsh16x16:
   718  		return rewriteValue_OpRsh16x16(v)
   719  	case ssaop.OpRsh16x32:
   720  		return rewriteValue_OpRsh16x32(v)
   721  	case ssaop.OpRsh16x64:
   722  		return rewriteValue_OpRsh16x64(v)
   723  	case ssaop.OpRsh16x8:
   724  		return rewriteValue_OpRsh16x8(v)
   725  	case ssaop.OpRsh32Ux16:
   726  		return rewriteValue_OpRsh32Ux16(v)
   727  	case ssaop.OpRsh32Ux32:
   728  		return rewriteValue_OpRsh32Ux32(v)
   729  	case ssaop.OpRsh32Ux64:
   730  		return rewriteValue_OpRsh32Ux64(v)
   731  	case ssaop.OpRsh32Ux8:
   732  		return rewriteValue_OpRsh32Ux8(v)
   733  	case ssaop.OpRsh32x16:
   734  		return rewriteValue_OpRsh32x16(v)
   735  	case ssaop.OpRsh32x32:
   736  		return rewriteValue_OpRsh32x32(v)
   737  	case ssaop.OpRsh32x64:
   738  		return rewriteValue_OpRsh32x64(v)
   739  	case ssaop.OpRsh32x8:
   740  		return rewriteValue_OpRsh32x8(v)
   741  	case ssaop.OpRsh64Ux16:
   742  		return rewriteValue_OpRsh64Ux16(v)
   743  	case ssaop.OpRsh64Ux32:
   744  		return rewriteValue_OpRsh64Ux32(v)
   745  	case ssaop.OpRsh64Ux64:
   746  		return rewriteValue_OpRsh64Ux64(v)
   747  	case ssaop.OpRsh64Ux8:
   748  		return rewriteValue_OpRsh64Ux8(v)
   749  	case ssaop.OpRsh64x16:
   750  		return rewriteValue_OpRsh64x16(v)
   751  	case ssaop.OpRsh64x32:
   752  		return rewriteValue_OpRsh64x32(v)
   753  	case ssaop.OpRsh64x64:
   754  		return rewriteValue_OpRsh64x64(v)
   755  	case ssaop.OpRsh64x8:
   756  		return rewriteValue_OpRsh64x8(v)
   757  	case ssaop.OpRsh8Ux16:
   758  		return rewriteValue_OpRsh8Ux16(v)
   759  	case ssaop.OpRsh8Ux32:
   760  		return rewriteValue_OpRsh8Ux32(v)
   761  	case ssaop.OpRsh8Ux64:
   762  		return rewriteValue_OpRsh8Ux64(v)
   763  	case ssaop.OpRsh8Ux8:
   764  		return rewriteValue_OpRsh8Ux8(v)
   765  	case ssaop.OpRsh8x16:
   766  		return rewriteValue_OpRsh8x16(v)
   767  	case ssaop.OpRsh8x32:
   768  		return rewriteValue_OpRsh8x32(v)
   769  	case ssaop.OpRsh8x64:
   770  		return rewriteValue_OpRsh8x64(v)
   771  	case ssaop.OpRsh8x8:
   772  		return rewriteValue_OpRsh8x8(v)
   773  	case ssaop.OpSelect0:
   774  		return rewriteValue_OpSelect0(v)
   775  	case ssaop.OpSelect1:
   776  		return rewriteValue_OpSelect1(v)
   777  	case ssaop.OpSelectN:
   778  		return rewriteValue_OpSelectN(v)
   779  	case ssaop.OpSignExt16to32:
   780  		v.Op = ssaop.OpLOONG64MOVHreg
   781  		return true
   782  	case ssaop.OpSignExt16to64:
   783  		v.Op = ssaop.OpLOONG64MOVHreg
   784  		return true
   785  	case ssaop.OpSignExt32to64:
   786  		v.Op = ssaop.OpLOONG64MOVWreg
   787  		return true
   788  	case ssaop.OpSignExt8to16:
   789  		v.Op = ssaop.OpLOONG64MOVBreg
   790  		return true
   791  	case ssaop.OpSignExt8to32:
   792  		v.Op = ssaop.OpLOONG64MOVBreg
   793  		return true
   794  	case ssaop.OpSignExt8to64:
   795  		v.Op = ssaop.OpLOONG64MOVBreg
   796  		return true
   797  	case ssaop.OpSlicemask:
   798  		return rewriteValue_OpSlicemask(v)
   799  	case ssaop.OpSqrt:
   800  		v.Op = ssaop.OpLOONG64SQRTD
   801  		return true
   802  	case ssaop.OpSqrt32:
   803  		v.Op = ssaop.OpLOONG64SQRTF
   804  		return true
   805  	case ssaop.OpStaticCall:
   806  		v.Op = ssaop.OpLOONG64CALLstatic
   807  		return true
   808  	case ssaop.OpStore:
   809  		return rewriteValue_OpStore(v)
   810  	case ssaop.OpSub16:
   811  		v.Op = ssaop.OpLOONG64SUBV
   812  		return true
   813  	case ssaop.OpSub32:
   814  		v.Op = ssaop.OpLOONG64SUBV
   815  		return true
   816  	case ssaop.OpSub32F:
   817  		v.Op = ssaop.OpLOONG64SUBF
   818  		return true
   819  	case ssaop.OpSub64:
   820  		v.Op = ssaop.OpLOONG64SUBV
   821  		return true
   822  	case ssaop.OpSub64F:
   823  		v.Op = ssaop.OpLOONG64SUBD
   824  		return true
   825  	case ssaop.OpSub8:
   826  		v.Op = ssaop.OpLOONG64SUBV
   827  		return true
   828  	case ssaop.OpSubPtr:
   829  		v.Op = ssaop.OpLOONG64SUBV
   830  		return true
   831  	case ssaop.OpTailCall:
   832  		v.Op = ssaop.OpLOONG64CALLtail
   833  		return true
   834  	case ssaop.OpTailCallInter:
   835  		v.Op = ssaop.OpLOONG64CALLtailinter
   836  		return true
   837  	case ssaop.OpTrunc:
   838  		v.Op = ssaop.OpLOONG64FRINTZD
   839  		return true
   840  	case ssaop.OpTrunc16to8:
   841  		v.Op = ssaop.OpCopy
   842  		return true
   843  	case ssaop.OpTrunc32to16:
   844  		v.Op = ssaop.OpCopy
   845  		return true
   846  	case ssaop.OpTrunc32to8:
   847  		v.Op = ssaop.OpCopy
   848  		return true
   849  	case ssaop.OpTrunc64to16:
   850  		v.Op = ssaop.OpCopy
   851  		return true
   852  	case ssaop.OpTrunc64to32:
   853  		v.Op = ssaop.OpCopy
   854  		return true
   855  	case ssaop.OpTrunc64to8:
   856  		v.Op = ssaop.OpCopy
   857  		return true
   858  	case ssaop.OpWB:
   859  		v.Op = ssaop.OpLOONG64LoweredWB
   860  		return true
   861  	case ssaop.OpXor16:
   862  		v.Op = ssaop.OpLOONG64XOR
   863  		return true
   864  	case ssaop.OpXor32:
   865  		v.Op = ssaop.OpLOONG64XOR
   866  		return true
   867  	case ssaop.OpXor64:
   868  		v.Op = ssaop.OpLOONG64XOR
   869  		return true
   870  	case ssaop.OpXor8:
   871  		v.Op = ssaop.OpLOONG64XOR
   872  		return true
   873  	case ssaop.OpZero:
   874  		return rewriteValue_OpZero(v)
   875  	case ssaop.OpZeroExt16to32:
   876  		v.Op = ssaop.OpLOONG64MOVHUreg
   877  		return true
   878  	case ssaop.OpZeroExt16to64:
   879  		v.Op = ssaop.OpLOONG64MOVHUreg
   880  		return true
   881  	case ssaop.OpZeroExt32to64:
   882  		v.Op = ssaop.OpLOONG64MOVWUreg
   883  		return true
   884  	case ssaop.OpZeroExt8to16:
   885  		v.Op = ssaop.OpLOONG64MOVBUreg
   886  		return true
   887  	case ssaop.OpZeroExt8to32:
   888  		v.Op = ssaop.OpLOONG64MOVBUreg
   889  		return true
   890  	case ssaop.OpZeroExt8to64:
   891  		v.Op = ssaop.OpLOONG64MOVBUreg
   892  		return true
   893  	}
   894  	return false
   895  }
   896  func rewriteValue_OpAddr(v *ssa.Value) bool {
   897  	v_0 := v.Args[0]
   898  	// match: (Addr {sym} base)
   899  	// result: (MOVVaddr {sym} base)
   900  	for {
   901  		sym := ssa.AuxToSym(v.Aux)
   902  		base := v_0
   903  		v.Reset(ssaop.OpLOONG64MOVVaddr)
   904  		v.Aux = ssa.SymToAux(sym)
   905  		v.AddArg(base)
   906  		return true
   907  	}
   908  }
   909  func rewriteValue_OpAtomicAnd8(v *ssa.Value) bool {
   910  	v_2 := v.Args[2]
   911  	v_1 := v.Args[1]
   912  	v_0 := v.Args[0]
   913  	b := v.Block
   914  	typ := &b.Func.Config.Types
   915  	// match: (AtomicAnd8 ptr val mem)
   916  	// 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)
   917  	for {
   918  		ptr := v_0
   919  		val := v_1
   920  		mem := v_2
   921  		v.Reset(ssaop.OpLOONG64LoweredAtomicAnd32)
   922  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64AND, typ.Uintptr)
   923  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
   924  		v1.AuxInt = ssa.Int64ToAuxInt(^3)
   925  		v0.AddArg2(v1, ptr)
   926  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NORconst, typ.UInt32)
   927  		v2.AuxInt = ssa.Int64ToAuxInt(0)
   928  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, typ.UInt32)
   929  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64XORconst, typ.UInt32)
   930  		v4.AuxInt = ssa.Int64ToAuxInt(0xff)
   931  		v5 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
   932  		v5.AddArg(val)
   933  		v4.AddArg(v5)
   934  		v6 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.UInt64)
   935  		v6.AuxInt = ssa.Int64ToAuxInt(3)
   936  		v7 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.UInt64)
   937  		v7.AuxInt = ssa.Int64ToAuxInt(3)
   938  		v7.AddArg(ptr)
   939  		v6.AddArg(v7)
   940  		v3.AddArg2(v4, v6)
   941  		v2.AddArg(v3)
   942  		v.AddArg3(v0, v2, mem)
   943  		return true
   944  	}
   945  }
   946  func rewriteValue_OpAtomicCompareAndSwap32(v *ssa.Value) bool {
   947  	v_3 := v.Args[3]
   948  	v_2 := v.Args[2]
   949  	v_1 := v.Args[1]
   950  	v_0 := v.Args[0]
   951  	b := v.Block
   952  	typ := &b.Func.Config.Types
   953  	// match: (AtomicCompareAndSwap32 ptr old new mem)
   954  	// result: (LoweredAtomicCas32 ptr (SignExt32to64 old) new mem)
   955  	for {
   956  		ptr := v_0
   957  		old := v_1
   958  		new := v_2
   959  		mem := v_3
   960  		v.Reset(ssaop.OpLOONG64LoweredAtomicCas32)
   961  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
   962  		v0.AddArg(old)
   963  		v.AddArg4(ptr, v0, new, mem)
   964  		return true
   965  	}
   966  }
   967  func rewriteValue_OpAtomicCompareAndSwap32Variant(v *ssa.Value) bool {
   968  	v_3 := v.Args[3]
   969  	v_2 := v.Args[2]
   970  	v_1 := v.Args[1]
   971  	v_0 := v.Args[0]
   972  	b := v.Block
   973  	typ := &b.Func.Config.Types
   974  	// match: (AtomicCompareAndSwap32Variant ptr old new mem)
   975  	// result: (LoweredAtomicCas32Variant ptr (SignExt32to64 old) new mem)
   976  	for {
   977  		ptr := v_0
   978  		old := v_1
   979  		new := v_2
   980  		mem := v_3
   981  		v.Reset(ssaop.OpLOONG64LoweredAtomicCas32Variant)
   982  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
   983  		v0.AddArg(old)
   984  		v.AddArg4(ptr, v0, new, mem)
   985  		return true
   986  	}
   987  }
   988  func rewriteValue_OpAtomicOr8(v *ssa.Value) bool {
   989  	v_2 := v.Args[2]
   990  	v_1 := v.Args[1]
   991  	v_0 := v.Args[0]
   992  	b := v.Block
   993  	typ := &b.Func.Config.Types
   994  	// match: (AtomicOr8 ptr val mem)
   995  	// result: (LoweredAtomicOr32 (AND <typ.Uintptr> (MOVVconst [^3]) ptr) (SLLV <typ.UInt32> (ZeroExt8to32 val) (SLLVconst <typ.UInt64> [3] (ANDconst <typ.UInt64> [3] ptr))) mem)
   996  	for {
   997  		ptr := v_0
   998  		val := v_1
   999  		mem := v_2
  1000  		v.Reset(ssaop.OpLOONG64LoweredAtomicOr32)
  1001  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64AND, typ.Uintptr)
  1002  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1003  		v1.AuxInt = ssa.Int64ToAuxInt(^3)
  1004  		v0.AddArg2(v1, ptr)
  1005  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, typ.UInt32)
  1006  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  1007  		v3.AddArg(val)
  1008  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.UInt64)
  1009  		v4.AuxInt = ssa.Int64ToAuxInt(3)
  1010  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.UInt64)
  1011  		v5.AuxInt = ssa.Int64ToAuxInt(3)
  1012  		v5.AddArg(ptr)
  1013  		v4.AddArg(v5)
  1014  		v2.AddArg2(v3, v4)
  1015  		v.AddArg3(v0, v2, mem)
  1016  		return true
  1017  	}
  1018  }
  1019  func rewriteValue_OpAvg64u(v *ssa.Value) bool {
  1020  	v_1 := v.Args[1]
  1021  	v_0 := v.Args[0]
  1022  	b := v.Block
  1023  	// match: (Avg64u <t> x y)
  1024  	// result: (ADDV (SRLVconst <t> (SUBV <t> x y) [1]) y)
  1025  	for {
  1026  		t := v.Type
  1027  		x := v_0
  1028  		y := v_1
  1029  		v.Reset(ssaop.OpLOONG64ADDV)
  1030  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLVconst, t)
  1031  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1032  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
  1033  		v1.AddArg2(x, y)
  1034  		v0.AddArg(v1)
  1035  		v.AddArg2(v0, y)
  1036  		return true
  1037  	}
  1038  }
  1039  func rewriteValue_OpBitLen16(v *ssa.Value) bool {
  1040  	v_0 := v.Args[0]
  1041  	b := v.Block
  1042  	typ := &b.Func.Config.Types
  1043  	// match: (BitLen16 x)
  1044  	// result: (BitLen64 (ZeroExt16to64 x))
  1045  	for {
  1046  		x := v_0
  1047  		v.Reset(ssaop.OpBitLen64)
  1048  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1049  		v0.AddArg(x)
  1050  		v.AddArg(v0)
  1051  		return true
  1052  	}
  1053  }
  1054  func rewriteValue_OpBitLen32(v *ssa.Value) bool {
  1055  	v_0 := v.Args[0]
  1056  	b := v.Block
  1057  	// match: (BitLen32 <t> x)
  1058  	// result: (NEGV <t> (SUBVconst <t> [32] (CLZW <t> x)))
  1059  	for {
  1060  		t := v.Type
  1061  		x := v_0
  1062  		v.Reset(ssaop.OpLOONG64NEGV)
  1063  		v.Type = t
  1064  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBVconst, t)
  1065  		v0.AuxInt = ssa.Int64ToAuxInt(32)
  1066  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64CLZW, t)
  1067  		v1.AddArg(x)
  1068  		v0.AddArg(v1)
  1069  		v.AddArg(v0)
  1070  		return true
  1071  	}
  1072  }
  1073  func rewriteValue_OpBitLen64(v *ssa.Value) bool {
  1074  	v_0 := v.Args[0]
  1075  	b := v.Block
  1076  	// match: (BitLen64 <t> x)
  1077  	// result: (NEGV <t> (SUBVconst <t> [64] (CLZV <t> x)))
  1078  	for {
  1079  		t := v.Type
  1080  		x := v_0
  1081  		v.Reset(ssaop.OpLOONG64NEGV)
  1082  		v.Type = t
  1083  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBVconst, t)
  1084  		v0.AuxInt = ssa.Int64ToAuxInt(64)
  1085  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64CLZV, t)
  1086  		v1.AddArg(x)
  1087  		v0.AddArg(v1)
  1088  		v.AddArg(v0)
  1089  		return true
  1090  	}
  1091  }
  1092  func rewriteValue_OpBitLen8(v *ssa.Value) bool {
  1093  	v_0 := v.Args[0]
  1094  	b := v.Block
  1095  	typ := &b.Func.Config.Types
  1096  	// match: (BitLen8 x)
  1097  	// result: (BitLen64 (ZeroExt8to64 x))
  1098  	for {
  1099  		x := v_0
  1100  		v.Reset(ssaop.OpBitLen64)
  1101  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1102  		v0.AddArg(x)
  1103  		v.AddArg(v0)
  1104  		return true
  1105  	}
  1106  }
  1107  func rewriteValue_OpBitRev16(v *ssa.Value) bool {
  1108  	v_0 := v.Args[0]
  1109  	b := v.Block
  1110  	// match: (BitRev16 <t> x)
  1111  	// result: (REVB2H (BITREV4B <t> x))
  1112  	for {
  1113  		t := v.Type
  1114  		x := v_0
  1115  		v.Reset(ssaop.OpLOONG64REVB2H)
  1116  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64BITREV4B, t)
  1117  		v0.AddArg(x)
  1118  		v.AddArg(v0)
  1119  		return true
  1120  	}
  1121  }
  1122  func rewriteValue_OpCom16(v *ssa.Value) bool {
  1123  	v_0 := v.Args[0]
  1124  	b := v.Block
  1125  	typ := &b.Func.Config.Types
  1126  	// match: (Com16 x)
  1127  	// result: (NOR (MOVVconst [0]) x)
  1128  	for {
  1129  		x := v_0
  1130  		v.Reset(ssaop.OpLOONG64NOR)
  1131  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1132  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1133  		v.AddArg2(v0, x)
  1134  		return true
  1135  	}
  1136  }
  1137  func rewriteValue_OpCom32(v *ssa.Value) bool {
  1138  	v_0 := v.Args[0]
  1139  	b := v.Block
  1140  	typ := &b.Func.Config.Types
  1141  	// match: (Com32 x)
  1142  	// result: (NOR (MOVVconst [0]) x)
  1143  	for {
  1144  		x := v_0
  1145  		v.Reset(ssaop.OpLOONG64NOR)
  1146  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1147  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1148  		v.AddArg2(v0, x)
  1149  		return true
  1150  	}
  1151  }
  1152  func rewriteValue_OpCom64(v *ssa.Value) bool {
  1153  	v_0 := v.Args[0]
  1154  	b := v.Block
  1155  	typ := &b.Func.Config.Types
  1156  	// match: (Com64 x)
  1157  	// result: (NOR (MOVVconst [0]) x)
  1158  	for {
  1159  		x := v_0
  1160  		v.Reset(ssaop.OpLOONG64NOR)
  1161  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1162  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1163  		v.AddArg2(v0, x)
  1164  		return true
  1165  	}
  1166  }
  1167  func rewriteValue_OpCom8(v *ssa.Value) bool {
  1168  	v_0 := v.Args[0]
  1169  	b := v.Block
  1170  	typ := &b.Func.Config.Types
  1171  	// match: (Com8 x)
  1172  	// result: (NOR (MOVVconst [0]) x)
  1173  	for {
  1174  		x := v_0
  1175  		v.Reset(ssaop.OpLOONG64NOR)
  1176  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1177  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1178  		v.AddArg2(v0, x)
  1179  		return true
  1180  	}
  1181  }
  1182  func rewriteValue_OpCondSelect(v *ssa.Value) bool {
  1183  	v_2 := v.Args[2]
  1184  	v_1 := v.Args[1]
  1185  	v_0 := v.Args[0]
  1186  	b := v.Block
  1187  	// match: (CondSelect <t> x y cond)
  1188  	// result: (OR (MASKEQZ <t> x cond) (MASKNEZ <t> y cond))
  1189  	for {
  1190  		t := v.Type
  1191  		x := v_0
  1192  		y := v_1
  1193  		cond := v_2
  1194  		v.Reset(ssaop.OpLOONG64OR)
  1195  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MASKEQZ, t)
  1196  		v0.AddArg2(x, cond)
  1197  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MASKNEZ, t)
  1198  		v1.AddArg2(y, cond)
  1199  		v.AddArg2(v0, v1)
  1200  		return true
  1201  	}
  1202  }
  1203  func rewriteValue_OpConst16(v *ssa.Value) bool {
  1204  	// match: (Const16 [val])
  1205  	// result: (MOVVconst [int64(val)])
  1206  	for {
  1207  		val := ssa.AuxIntToInt16(v.AuxInt)
  1208  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1209  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1210  		return true
  1211  	}
  1212  }
  1213  func rewriteValue_OpConst32(v *ssa.Value) bool {
  1214  	// match: (Const32 [val])
  1215  	// result: (MOVVconst [int64(val)])
  1216  	for {
  1217  		val := ssa.AuxIntToInt32(v.AuxInt)
  1218  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1219  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1220  		return true
  1221  	}
  1222  }
  1223  func rewriteValue_OpConst32F(v *ssa.Value) bool {
  1224  	// match: (Const32F [val])
  1225  	// result: (MOVFconst [float64(val)])
  1226  	for {
  1227  		val := ssa.AuxIntToFloat32(v.AuxInt)
  1228  		v.Reset(ssaop.OpLOONG64MOVFconst)
  1229  		v.AuxInt = ssa.Float64ToAuxInt(float64(val))
  1230  		return true
  1231  	}
  1232  }
  1233  func rewriteValue_OpConst64(v *ssa.Value) bool {
  1234  	// match: (Const64 [val])
  1235  	// result: (MOVVconst [int64(val)])
  1236  	for {
  1237  		val := ssa.AuxIntToInt64(v.AuxInt)
  1238  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1239  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1240  		return true
  1241  	}
  1242  }
  1243  func rewriteValue_OpConst64F(v *ssa.Value) bool {
  1244  	// match: (Const64F [val])
  1245  	// result: (MOVDconst [float64(val)])
  1246  	for {
  1247  		val := ssa.AuxIntToFloat64(v.AuxInt)
  1248  		v.Reset(ssaop.OpLOONG64MOVDconst)
  1249  		v.AuxInt = ssa.Float64ToAuxInt(float64(val))
  1250  		return true
  1251  	}
  1252  }
  1253  func rewriteValue_OpConst8(v *ssa.Value) bool {
  1254  	// match: (Const8 [val])
  1255  	// result: (MOVVconst [int64(val)])
  1256  	for {
  1257  		val := ssa.AuxIntToInt8(v.AuxInt)
  1258  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1259  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1260  		return true
  1261  	}
  1262  }
  1263  func rewriteValue_OpConstBool(v *ssa.Value) bool {
  1264  	// match: (ConstBool [t])
  1265  	// result: (MOVVconst [int64(ssa.B2i(t))])
  1266  	for {
  1267  		t := ssa.AuxIntToBool(v.AuxInt)
  1268  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1269  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.B2i(t)))
  1270  		return true
  1271  	}
  1272  }
  1273  func rewriteValue_OpConstNil(v *ssa.Value) bool {
  1274  	// match: (ConstNil)
  1275  	// result: (MOVVconst [0])
  1276  	for {
  1277  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1278  		v.AuxInt = ssa.Int64ToAuxInt(0)
  1279  		return true
  1280  	}
  1281  }
  1282  func rewriteValue_OpCtz16(v *ssa.Value) bool {
  1283  	v_0 := v.Args[0]
  1284  	b := v.Block
  1285  	typ := &b.Func.Config.Types
  1286  	// match: (Ctz16 x)
  1287  	// result: (CTZV (OR <typ.UInt64> x (MOVVconst [1<<16])))
  1288  	for {
  1289  		x := v_0
  1290  		v.Reset(ssaop.OpLOONG64CTZV)
  1291  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, typ.UInt64)
  1292  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1293  		v1.AuxInt = ssa.Int64ToAuxInt(1 << 16)
  1294  		v0.AddArg2(x, v1)
  1295  		v.AddArg(v0)
  1296  		return true
  1297  	}
  1298  }
  1299  func rewriteValue_OpCtz8(v *ssa.Value) bool {
  1300  	v_0 := v.Args[0]
  1301  	b := v.Block
  1302  	typ := &b.Func.Config.Types
  1303  	// match: (Ctz8 x)
  1304  	// result: (CTZV (OR <typ.UInt64> x (MOVVconst [1<<8])))
  1305  	for {
  1306  		x := v_0
  1307  		v.Reset(ssaop.OpLOONG64CTZV)
  1308  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, typ.UInt64)
  1309  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1310  		v1.AuxInt = ssa.Int64ToAuxInt(1 << 8)
  1311  		v0.AddArg2(x, v1)
  1312  		v.AddArg(v0)
  1313  		return true
  1314  	}
  1315  }
  1316  func rewriteValue_OpDiv16(v *ssa.Value) bool {
  1317  	v_1 := v.Args[1]
  1318  	v_0 := v.Args[0]
  1319  	b := v.Block
  1320  	typ := &b.Func.Config.Types
  1321  	// match: (Div16 x y)
  1322  	// result: (DIVV (SignExt16to64 x) (SignExt16to64 y))
  1323  	for {
  1324  		x := v_0
  1325  		y := v_1
  1326  		v.Reset(ssaop.OpLOONG64DIVV)
  1327  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  1328  		v0.AddArg(x)
  1329  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  1330  		v1.AddArg(y)
  1331  		v.AddArg2(v0, v1)
  1332  		return true
  1333  	}
  1334  }
  1335  func rewriteValue_OpDiv16u(v *ssa.Value) bool {
  1336  	v_1 := v.Args[1]
  1337  	v_0 := v.Args[0]
  1338  	b := v.Block
  1339  	typ := &b.Func.Config.Types
  1340  	// match: (Div16u x y)
  1341  	// result: (DIVVU (ZeroExt16to64 x) (ZeroExt16to64 y))
  1342  	for {
  1343  		x := v_0
  1344  		y := v_1
  1345  		v.Reset(ssaop.OpLOONG64DIVVU)
  1346  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1347  		v0.AddArg(x)
  1348  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1349  		v1.AddArg(y)
  1350  		v.AddArg2(v0, v1)
  1351  		return true
  1352  	}
  1353  }
  1354  func rewriteValue_OpDiv32(v *ssa.Value) bool {
  1355  	v_1 := v.Args[1]
  1356  	v_0 := v.Args[0]
  1357  	b := v.Block
  1358  	typ := &b.Func.Config.Types
  1359  	// match: (Div32 x y)
  1360  	// result: (DIVV (SignExt32to64 x) (SignExt32to64 y))
  1361  	for {
  1362  		x := v_0
  1363  		y := v_1
  1364  		v.Reset(ssaop.OpLOONG64DIVV)
  1365  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1366  		v0.AddArg(x)
  1367  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1368  		v1.AddArg(y)
  1369  		v.AddArg2(v0, v1)
  1370  		return true
  1371  	}
  1372  }
  1373  func rewriteValue_OpDiv32u(v *ssa.Value) bool {
  1374  	v_1 := v.Args[1]
  1375  	v_0 := v.Args[0]
  1376  	b := v.Block
  1377  	typ := &b.Func.Config.Types
  1378  	// match: (Div32u x y)
  1379  	// result: (DIVVU (ZeroExt32to64 x) (ZeroExt32to64 y))
  1380  	for {
  1381  		x := v_0
  1382  		y := v_1
  1383  		v.Reset(ssaop.OpLOONG64DIVVU)
  1384  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1385  		v0.AddArg(x)
  1386  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1387  		v1.AddArg(y)
  1388  		v.AddArg2(v0, v1)
  1389  		return true
  1390  	}
  1391  }
  1392  func rewriteValue_OpDiv64(v *ssa.Value) bool {
  1393  	v_1 := v.Args[1]
  1394  	v_0 := v.Args[0]
  1395  	// match: (Div64 x y)
  1396  	// result: (DIVV x y)
  1397  	for {
  1398  		x := v_0
  1399  		y := v_1
  1400  		v.Reset(ssaop.OpLOONG64DIVV)
  1401  		v.AddArg2(x, y)
  1402  		return true
  1403  	}
  1404  }
  1405  func rewriteValue_OpDiv8(v *ssa.Value) bool {
  1406  	v_1 := v.Args[1]
  1407  	v_0 := v.Args[0]
  1408  	b := v.Block
  1409  	typ := &b.Func.Config.Types
  1410  	// match: (Div8 x y)
  1411  	// result: (DIVV (SignExt8to64 x) (SignExt8to64 y))
  1412  	for {
  1413  		x := v_0
  1414  		y := v_1
  1415  		v.Reset(ssaop.OpLOONG64DIVV)
  1416  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  1417  		v0.AddArg(x)
  1418  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  1419  		v1.AddArg(y)
  1420  		v.AddArg2(v0, v1)
  1421  		return true
  1422  	}
  1423  }
  1424  func rewriteValue_OpDiv8u(v *ssa.Value) bool {
  1425  	v_1 := v.Args[1]
  1426  	v_0 := v.Args[0]
  1427  	b := v.Block
  1428  	typ := &b.Func.Config.Types
  1429  	// match: (Div8u x y)
  1430  	// result: (DIVVU (ZeroExt8to64 x) (ZeroExt8to64 y))
  1431  	for {
  1432  		x := v_0
  1433  		y := v_1
  1434  		v.Reset(ssaop.OpLOONG64DIVVU)
  1435  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1436  		v0.AddArg(x)
  1437  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1438  		v1.AddArg(y)
  1439  		v.AddArg2(v0, v1)
  1440  		return true
  1441  	}
  1442  }
  1443  func rewriteValue_OpEq16(v *ssa.Value) bool {
  1444  	v_1 := v.Args[1]
  1445  	v_0 := v.Args[0]
  1446  	b := v.Block
  1447  	typ := &b.Func.Config.Types
  1448  	// match: (Eq16 x y)
  1449  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt16to64 x) (ZeroExt16to64 y)))
  1450  	for {
  1451  		x := v_0
  1452  		y := v_1
  1453  		v.Reset(ssaop.OpLOONG64SGTU)
  1454  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1455  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1456  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1457  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1458  		v2.AddArg(x)
  1459  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1460  		v3.AddArg(y)
  1461  		v1.AddArg2(v2, v3)
  1462  		v.AddArg2(v0, v1)
  1463  		return true
  1464  	}
  1465  }
  1466  func rewriteValue_OpEq32(v *ssa.Value) bool {
  1467  	v_1 := v.Args[1]
  1468  	v_0 := v.Args[0]
  1469  	b := v.Block
  1470  	typ := &b.Func.Config.Types
  1471  	// match: (Eq32 x y)
  1472  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt32to64 x) (ZeroExt32to64 y)))
  1473  	for {
  1474  		x := v_0
  1475  		y := v_1
  1476  		v.Reset(ssaop.OpLOONG64SGTU)
  1477  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1478  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1479  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1480  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1481  		v2.AddArg(x)
  1482  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1483  		v3.AddArg(y)
  1484  		v1.AddArg2(v2, v3)
  1485  		v.AddArg2(v0, v1)
  1486  		return true
  1487  	}
  1488  }
  1489  func rewriteValue_OpEq32F(v *ssa.Value) bool {
  1490  	v_1 := v.Args[1]
  1491  	v_0 := v.Args[0]
  1492  	b := v.Block
  1493  	// match: (Eq32F x y)
  1494  	// result: (FPFlagTrue (CMPEQF x y))
  1495  	for {
  1496  		x := v_0
  1497  		y := v_1
  1498  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  1499  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQF, types.TypeFlags)
  1500  		v0.AddArg2(x, y)
  1501  		v.AddArg(v0)
  1502  		return true
  1503  	}
  1504  }
  1505  func rewriteValue_OpEq64(v *ssa.Value) bool {
  1506  	v_1 := v.Args[1]
  1507  	v_0 := v.Args[0]
  1508  	b := v.Block
  1509  	typ := &b.Func.Config.Types
  1510  	// match: (Eq64 x y)
  1511  	// result: (SGTU (MOVVconst [1]) (XOR x y))
  1512  	for {
  1513  		x := v_0
  1514  		y := v_1
  1515  		v.Reset(ssaop.OpLOONG64SGTU)
  1516  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1517  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1518  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1519  		v1.AddArg2(x, y)
  1520  		v.AddArg2(v0, v1)
  1521  		return true
  1522  	}
  1523  }
  1524  func rewriteValue_OpEq64F(v *ssa.Value) bool {
  1525  	v_1 := v.Args[1]
  1526  	v_0 := v.Args[0]
  1527  	b := v.Block
  1528  	// match: (Eq64F x y)
  1529  	// result: (FPFlagTrue (CMPEQD x y))
  1530  	for {
  1531  		x := v_0
  1532  		y := v_1
  1533  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  1534  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQD, types.TypeFlags)
  1535  		v0.AddArg2(x, y)
  1536  		v.AddArg(v0)
  1537  		return true
  1538  	}
  1539  }
  1540  func rewriteValue_OpEq8(v *ssa.Value) bool {
  1541  	v_1 := v.Args[1]
  1542  	v_0 := v.Args[0]
  1543  	b := v.Block
  1544  	typ := &b.Func.Config.Types
  1545  	// match: (Eq8 x y)
  1546  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt8to64 x) (ZeroExt8to64 y)))
  1547  	for {
  1548  		x := v_0
  1549  		y := v_1
  1550  		v.Reset(ssaop.OpLOONG64SGTU)
  1551  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1552  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1553  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1554  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1555  		v2.AddArg(x)
  1556  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1557  		v3.AddArg(y)
  1558  		v1.AddArg2(v2, v3)
  1559  		v.AddArg2(v0, v1)
  1560  		return true
  1561  	}
  1562  }
  1563  func rewriteValue_OpEqB(v *ssa.Value) bool {
  1564  	v_1 := v.Args[1]
  1565  	v_0 := v.Args[0]
  1566  	b := v.Block
  1567  	typ := &b.Func.Config.Types
  1568  	// match: (EqB x y)
  1569  	// result: (XOR (MOVVconst [1]) (XOR <typ.Bool> x y))
  1570  	for {
  1571  		x := v_0
  1572  		y := v_1
  1573  		v.Reset(ssaop.OpLOONG64XOR)
  1574  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1575  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1576  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.Bool)
  1577  		v1.AddArg2(x, y)
  1578  		v.AddArg2(v0, v1)
  1579  		return true
  1580  	}
  1581  }
  1582  func rewriteValue_OpEqPtr(v *ssa.Value) bool {
  1583  	v_1 := v.Args[1]
  1584  	v_0 := v.Args[0]
  1585  	b := v.Block
  1586  	typ := &b.Func.Config.Types
  1587  	// match: (EqPtr x y)
  1588  	// result: (SGTU (MOVVconst [1]) (XOR x y))
  1589  	for {
  1590  		x := v_0
  1591  		y := v_1
  1592  		v.Reset(ssaop.OpLOONG64SGTU)
  1593  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1594  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1595  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1596  		v1.AddArg2(x, y)
  1597  		v.AddArg2(v0, v1)
  1598  		return true
  1599  	}
  1600  }
  1601  func rewriteValue_OpIsInBounds(v *ssa.Value) bool {
  1602  	v_1 := v.Args[1]
  1603  	v_0 := v.Args[0]
  1604  	// match: (IsInBounds idx len)
  1605  	// result: (SGTU len idx)
  1606  	for {
  1607  		idx := v_0
  1608  		len := v_1
  1609  		v.Reset(ssaop.OpLOONG64SGTU)
  1610  		v.AddArg2(len, idx)
  1611  		return true
  1612  	}
  1613  }
  1614  func rewriteValue_OpIsNonNil(v *ssa.Value) bool {
  1615  	v_0 := v.Args[0]
  1616  	b := v.Block
  1617  	typ := &b.Func.Config.Types
  1618  	// match: (IsNonNil ptr)
  1619  	// result: (SGTU ptr (MOVVconst [0]))
  1620  	for {
  1621  		ptr := v_0
  1622  		v.Reset(ssaop.OpLOONG64SGTU)
  1623  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1624  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1625  		v.AddArg2(ptr, v0)
  1626  		return true
  1627  	}
  1628  }
  1629  func rewriteValue_OpIsSliceInBounds(v *ssa.Value) bool {
  1630  	v_1 := v.Args[1]
  1631  	v_0 := v.Args[0]
  1632  	b := v.Block
  1633  	typ := &b.Func.Config.Types
  1634  	// match: (IsSliceInBounds idx len)
  1635  	// result: (XOR (MOVVconst [1]) (SGTU idx len))
  1636  	for {
  1637  		idx := v_0
  1638  		len := v_1
  1639  		v.Reset(ssaop.OpLOONG64XOR)
  1640  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1641  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1642  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  1643  		v1.AddArg2(idx, len)
  1644  		v.AddArg2(v0, v1)
  1645  		return true
  1646  	}
  1647  }
  1648  func rewriteValue_OpLOONG64ADDD(v *ssa.Value) bool {
  1649  	v_1 := v.Args[1]
  1650  	v_0 := v.Args[0]
  1651  	// match: (ADDD (MULD x y) z)
  1652  	// cond: z.Block.Func.UseFMA(v)
  1653  	// result: (FMADDD x y z)
  1654  	for {
  1655  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1656  			if v_0.Op != ssaop.OpLOONG64MULD {
  1657  				continue
  1658  			}
  1659  			y := v_0.Args[1]
  1660  			x := v_0.Args[0]
  1661  			z := v_1
  1662  			if !(z.Block.Func.UseFMA(v)) {
  1663  				continue
  1664  			}
  1665  			v.Reset(ssaop.OpLOONG64FMADDD)
  1666  			v.AddArg3(x, y, z)
  1667  			return true
  1668  		}
  1669  		break
  1670  	}
  1671  	// match: (ADDD z (NEGD (MULD x y)))
  1672  	// cond: z.Block.Func.UseFMA(v)
  1673  	// result: (FNMSUBD x y z)
  1674  	for {
  1675  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1676  			z := v_0
  1677  			if v_1.Op != ssaop.OpLOONG64NEGD {
  1678  				continue
  1679  			}
  1680  			v_1_0 := v_1.Args[0]
  1681  			if v_1_0.Op != ssaop.OpLOONG64MULD {
  1682  				continue
  1683  			}
  1684  			y := v_1_0.Args[1]
  1685  			x := v_1_0.Args[0]
  1686  			if !(z.Block.Func.UseFMA(v)) {
  1687  				continue
  1688  			}
  1689  			v.Reset(ssaop.OpLOONG64FNMSUBD)
  1690  			v.AddArg3(x, y, z)
  1691  			return true
  1692  		}
  1693  		break
  1694  	}
  1695  	return false
  1696  }
  1697  func rewriteValue_OpLOONG64ADDF(v *ssa.Value) bool {
  1698  	v_1 := v.Args[1]
  1699  	v_0 := v.Args[0]
  1700  	// match: (ADDF (MULF x y) z)
  1701  	// cond: z.Block.Func.UseFMA(v)
  1702  	// result: (FMADDF x y z)
  1703  	for {
  1704  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1705  			if v_0.Op != ssaop.OpLOONG64MULF {
  1706  				continue
  1707  			}
  1708  			y := v_0.Args[1]
  1709  			x := v_0.Args[0]
  1710  			z := v_1
  1711  			if !(z.Block.Func.UseFMA(v)) {
  1712  				continue
  1713  			}
  1714  			v.Reset(ssaop.OpLOONG64FMADDF)
  1715  			v.AddArg3(x, y, z)
  1716  			return true
  1717  		}
  1718  		break
  1719  	}
  1720  	// match: (ADDF z (NEGF (MULF x y)))
  1721  	// cond: z.Block.Func.UseFMA(v)
  1722  	// result: (FNMSUBF x y z)
  1723  	for {
  1724  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1725  			z := v_0
  1726  			if v_1.Op != ssaop.OpLOONG64NEGF {
  1727  				continue
  1728  			}
  1729  			v_1_0 := v_1.Args[0]
  1730  			if v_1_0.Op != ssaop.OpLOONG64MULF {
  1731  				continue
  1732  			}
  1733  			y := v_1_0.Args[1]
  1734  			x := v_1_0.Args[0]
  1735  			if !(z.Block.Func.UseFMA(v)) {
  1736  				continue
  1737  			}
  1738  			v.Reset(ssaop.OpLOONG64FNMSUBF)
  1739  			v.AddArg3(x, y, z)
  1740  			return true
  1741  		}
  1742  		break
  1743  	}
  1744  	return false
  1745  }
  1746  func rewriteValue_OpLOONG64ADDV(v *ssa.Value) bool {
  1747  	v_1 := v.Args[1]
  1748  	v_0 := v.Args[0]
  1749  	b := v.Block
  1750  	typ := &b.Func.Config.Types
  1751  	// match: (ADDV <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  1752  	// result: (REVB2H x)
  1753  	for {
  1754  		if v.Type != typ.UInt16 {
  1755  			break
  1756  		}
  1757  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1758  			if v_0.Op != ssaop.OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1759  				continue
  1760  			}
  1761  			x := v_0.Args[0]
  1762  			if v_1.Op != ssaop.OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || ssa.AuxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  1763  				continue
  1764  			}
  1765  			v.Reset(ssaop.OpLOONG64REVB2H)
  1766  			v.AddArg(x)
  1767  			return true
  1768  		}
  1769  		break
  1770  	}
  1771  	// match: (ADDV (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  1772  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  1773  	// result: (REVB2H x)
  1774  	for {
  1775  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1776  			if v_0.Op != ssaop.OpLOONG64SRLconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1777  				continue
  1778  			}
  1779  			v_0_0 := v_0.Args[0]
  1780  			if v_0_0.Op != ssaop.OpLOONG64ANDconst {
  1781  				continue
  1782  			}
  1783  			c1 := ssa.AuxIntToInt64(v_0_0.AuxInt)
  1784  			x := v_0_0.Args[0]
  1785  			if v_1.Op != ssaop.OpLOONG64SLLconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  1786  				continue
  1787  			}
  1788  			v_1_0 := v_1.Args[0]
  1789  			if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  1790  				continue
  1791  			}
  1792  			c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  1793  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  1794  				continue
  1795  			}
  1796  			v.Reset(ssaop.OpLOONG64REVB2H)
  1797  			v.AddArg(x)
  1798  			return true
  1799  		}
  1800  		break
  1801  	}
  1802  	// match: (ADDV (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  1803  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  1804  	// result: (REVB4H x)
  1805  	for {
  1806  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1807  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1808  				continue
  1809  			}
  1810  			v_0_0 := v_0.Args[0]
  1811  			if v_0_0.Op != ssaop.OpLOONG64AND {
  1812  				continue
  1813  			}
  1814  			_ = v_0_0.Args[1]
  1815  			v_0_0_0 := v_0_0.Args[0]
  1816  			v_0_0_1 := v_0_0.Args[1]
  1817  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  1818  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  1819  					continue
  1820  				}
  1821  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  1822  				x := v_0_0_1
  1823  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  1824  					continue
  1825  				}
  1826  				v_1_0 := v_1.Args[0]
  1827  				if v_1_0.Op != ssaop.OpLOONG64AND {
  1828  					continue
  1829  				}
  1830  				_ = v_1_0.Args[1]
  1831  				v_1_0_0 := v_1_0.Args[0]
  1832  				v_1_0_1 := v_1_0.Args[1]
  1833  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  1834  					if v_1_0_0.Op != ssaop.OpLOONG64MOVVconst {
  1835  						continue
  1836  					}
  1837  					c2 := ssa.AuxIntToInt64(v_1_0_0.AuxInt)
  1838  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  1839  						continue
  1840  					}
  1841  					v.Reset(ssaop.OpLOONG64REVB4H)
  1842  					v.AddArg(x)
  1843  					return true
  1844  				}
  1845  			}
  1846  		}
  1847  		break
  1848  	}
  1849  	// match: (ADDV (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  1850  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  1851  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  1852  	for {
  1853  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1854  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1855  				continue
  1856  			}
  1857  			v_0_0 := v_0.Args[0]
  1858  			if v_0_0.Op != ssaop.OpLOONG64AND {
  1859  				continue
  1860  			}
  1861  			_ = v_0_0.Args[1]
  1862  			v_0_0_0 := v_0_0.Args[0]
  1863  			v_0_0_1 := v_0_0.Args[1]
  1864  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  1865  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  1866  					continue
  1867  				}
  1868  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  1869  				x := v_0_0_1
  1870  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  1871  					continue
  1872  				}
  1873  				v_1_0 := v_1.Args[0]
  1874  				if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  1875  					continue
  1876  				}
  1877  				c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  1878  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  1879  					continue
  1880  				}
  1881  				v.Reset(ssaop.OpLOONG64REVB4H)
  1882  				v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, x.Type)
  1883  				v0.AuxInt = ssa.Int64ToAuxInt(0xffffffff)
  1884  				v0.AddArg(x)
  1885  				v.AddArg(v0)
  1886  				return true
  1887  			}
  1888  		}
  1889  		break
  1890  	}
  1891  	// match: (ADDV x (MOVVconst <t> [c]))
  1892  	// cond: ssa.Is32Bit(c) && !t.IsPtr()
  1893  	// result: (ADDVconst [c] x)
  1894  	for {
  1895  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1896  			x := v_0
  1897  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  1898  				continue
  1899  			}
  1900  			t := v_1.Type
  1901  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  1902  			if !(ssa.Is32Bit(c) && !t.IsPtr()) {
  1903  				continue
  1904  			}
  1905  			v.Reset(ssaop.OpLOONG64ADDVconst)
  1906  			v.AuxInt = ssa.Int64ToAuxInt(c)
  1907  			v.AddArg(x)
  1908  			return true
  1909  		}
  1910  		break
  1911  	}
  1912  	// match: (ADDV x0 x1:(SLLVconst [c] y))
  1913  	// cond: x1.Uses == 1 && c > 0 && c <= 4
  1914  	// result: (ADDshiftLLV x0 y [c])
  1915  	for {
  1916  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1917  			x0 := v_0
  1918  			x1 := v_1
  1919  			if x1.Op != ssaop.OpLOONG64SLLVconst {
  1920  				continue
  1921  			}
  1922  			c := ssa.AuxIntToInt64(x1.AuxInt)
  1923  			y := x1.Args[0]
  1924  			if !(x1.Uses == 1 && c > 0 && c <= 4) {
  1925  				continue
  1926  			}
  1927  			v.Reset(ssaop.OpLOONG64ADDshiftLLV)
  1928  			v.AuxInt = ssa.Int64ToAuxInt(c)
  1929  			v.AddArg2(x0, y)
  1930  			return true
  1931  		}
  1932  		break
  1933  	}
  1934  	// match: (ADDV x (NEGV y))
  1935  	// result: (SUBV x y)
  1936  	for {
  1937  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1938  			x := v_0
  1939  			if v_1.Op != ssaop.OpLOONG64NEGV {
  1940  				continue
  1941  			}
  1942  			y := v_1.Args[0]
  1943  			v.Reset(ssaop.OpLOONG64SUBV)
  1944  			v.AddArg2(x, y)
  1945  			return true
  1946  		}
  1947  		break
  1948  	}
  1949  	return false
  1950  }
  1951  func rewriteValue_OpLOONG64ADDVconst(v *ssa.Value) bool {
  1952  	v_0 := v.Args[0]
  1953  	// match: (ADDVconst [off1] (MOVVaddr [off2] {sym} ptr))
  1954  	// cond: ssa.Is32Bit(off1+int64(off2))
  1955  	// result: (MOVVaddr [int32(off1)+int32(off2)] {sym} ptr)
  1956  	for {
  1957  		off1 := ssa.AuxIntToInt64(v.AuxInt)
  1958  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  1959  			break
  1960  		}
  1961  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  1962  		sym := ssa.AuxToSym(v_0.Aux)
  1963  		ptr := v_0.Args[0]
  1964  		if !(ssa.Is32Bit(off1 + int64(off2))) {
  1965  			break
  1966  		}
  1967  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  1968  		v.AuxInt = ssa.Int32ToAuxInt(int32(off1) + int32(off2))
  1969  		v.Aux = ssa.SymToAux(sym)
  1970  		v.AddArg(ptr)
  1971  		return true
  1972  	}
  1973  	// match: (ADDVconst [0] x)
  1974  	// result: x
  1975  	for {
  1976  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  1977  			break
  1978  		}
  1979  		x := v_0
  1980  		v.CopyOf(x)
  1981  		return true
  1982  	}
  1983  	// match: (ADDVconst [c] (MOVVconst [d]))
  1984  	// result: (MOVVconst [c+d])
  1985  	for {
  1986  		c := ssa.AuxIntToInt64(v.AuxInt)
  1987  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  1988  			break
  1989  		}
  1990  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  1991  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1992  		v.AuxInt = ssa.Int64ToAuxInt(c + d)
  1993  		return true
  1994  	}
  1995  	// match: (ADDVconst [c] (ADDVconst [d] x))
  1996  	// cond: ssa.Is32Bit(c+d)
  1997  	// result: (ADDVconst [c+d] x)
  1998  	for {
  1999  		c := ssa.AuxIntToInt64(v.AuxInt)
  2000  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  2001  			break
  2002  		}
  2003  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2004  		x := v_0.Args[0]
  2005  		if !(ssa.Is32Bit(c + d)) {
  2006  			break
  2007  		}
  2008  		v.Reset(ssaop.OpLOONG64ADDVconst)
  2009  		v.AuxInt = ssa.Int64ToAuxInt(c + d)
  2010  		v.AddArg(x)
  2011  		return true
  2012  	}
  2013  	// match: (ADDVconst [c] (SUBVconst [d] x))
  2014  	// cond: ssa.Is32Bit(c-d)
  2015  	// result: (ADDVconst [c-d] x)
  2016  	for {
  2017  		c := ssa.AuxIntToInt64(v.AuxInt)
  2018  		if v_0.Op != ssaop.OpLOONG64SUBVconst {
  2019  			break
  2020  		}
  2021  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2022  		x := v_0.Args[0]
  2023  		if !(ssa.Is32Bit(c - d)) {
  2024  			break
  2025  		}
  2026  		v.Reset(ssaop.OpLOONG64ADDVconst)
  2027  		v.AuxInt = ssa.Int64ToAuxInt(c - d)
  2028  		v.AddArg(x)
  2029  		return true
  2030  	}
  2031  	// match: (ADDVconst [c] x)
  2032  	// cond: ssa.Is32Bit(c) && c&0xffff == 0 && c != 0
  2033  	// result: (ADDV16const [c] x)
  2034  	for {
  2035  		c := ssa.AuxIntToInt64(v.AuxInt)
  2036  		x := v_0
  2037  		if !(ssa.Is32Bit(c) && c&0xffff == 0 && c != 0) {
  2038  			break
  2039  		}
  2040  		v.Reset(ssaop.OpLOONG64ADDV16const)
  2041  		v.AuxInt = ssa.Int64ToAuxInt(c)
  2042  		v.AddArg(x)
  2043  		return true
  2044  	}
  2045  	return false
  2046  }
  2047  func rewriteValue_OpLOONG64ADDshiftLLV(v *ssa.Value) bool {
  2048  	v_1 := v.Args[1]
  2049  	v_0 := v.Args[0]
  2050  	// match: (ADDshiftLLV x (MOVVconst [c]) [d])
  2051  	// cond: ssa.Is12Bit(c<<d)
  2052  	// result: (ADDVconst x [c<<d])
  2053  	for {
  2054  		d := ssa.AuxIntToInt64(v.AuxInt)
  2055  		x := v_0
  2056  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2057  			break
  2058  		}
  2059  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2060  		if !(ssa.Is12Bit(c << d)) {
  2061  			break
  2062  		}
  2063  		v.Reset(ssaop.OpLOONG64ADDVconst)
  2064  		v.AuxInt = ssa.Int64ToAuxInt(c << d)
  2065  		v.AddArg(x)
  2066  		return true
  2067  	}
  2068  	return false
  2069  }
  2070  func rewriteValue_OpLOONG64AND(v *ssa.Value) bool {
  2071  	v_1 := v.Args[1]
  2072  	v_0 := v.Args[0]
  2073  	// match: (AND x (MOVVconst [c]))
  2074  	// cond: ssa.Is32Bit(c)
  2075  	// result: (ANDconst [c] x)
  2076  	for {
  2077  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2078  			x := v_0
  2079  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2080  				continue
  2081  			}
  2082  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  2083  			if !(ssa.Is32Bit(c)) {
  2084  				continue
  2085  			}
  2086  			v.Reset(ssaop.OpLOONG64ANDconst)
  2087  			v.AuxInt = ssa.Int64ToAuxInt(c)
  2088  			v.AddArg(x)
  2089  			return true
  2090  		}
  2091  		break
  2092  	}
  2093  	// match: (AND x x)
  2094  	// result: x
  2095  	for {
  2096  		x := v_0
  2097  		if x != v_1 {
  2098  			break
  2099  		}
  2100  		v.CopyOf(x)
  2101  		return true
  2102  	}
  2103  	// match: (AND x (NORconst [0] y))
  2104  	// result: (ANDN x y)
  2105  	for {
  2106  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2107  			x := v_0
  2108  			if v_1.Op != ssaop.OpLOONG64NORconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  2109  				continue
  2110  			}
  2111  			y := v_1.Args[0]
  2112  			v.Reset(ssaop.OpLOONG64ANDN)
  2113  			v.AddArg2(x, y)
  2114  			return true
  2115  		}
  2116  		break
  2117  	}
  2118  	return false
  2119  }
  2120  func rewriteValue_OpLOONG64ANDconst(v *ssa.Value) bool {
  2121  	v_0 := v.Args[0]
  2122  	// match: (ANDconst [0] _)
  2123  	// result: (MOVVconst [0])
  2124  	for {
  2125  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  2126  			break
  2127  		}
  2128  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2129  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2130  		return true
  2131  	}
  2132  	// match: (ANDconst [-1] x)
  2133  	// result: x
  2134  	for {
  2135  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
  2136  			break
  2137  		}
  2138  		x := v_0
  2139  		v.CopyOf(x)
  2140  		return true
  2141  	}
  2142  	// match: (ANDconst [0xffff] x)
  2143  	// result: (MOVHUreg x)
  2144  	for {
  2145  		if ssa.AuxIntToInt64(v.AuxInt) != 0xffff {
  2146  			break
  2147  		}
  2148  		x := v_0
  2149  		v.Reset(ssaop.OpLOONG64MOVHUreg)
  2150  		v.AddArg(x)
  2151  		return true
  2152  	}
  2153  	// match: (ANDconst [0xffffffff] x)
  2154  	// result: (MOVWUreg x)
  2155  	for {
  2156  		if ssa.AuxIntToInt64(v.AuxInt) != 0xffffffff {
  2157  			break
  2158  		}
  2159  		x := v_0
  2160  		v.Reset(ssaop.OpLOONG64MOVWUreg)
  2161  		v.AddArg(x)
  2162  		return true
  2163  	}
  2164  	// match: (ANDconst [c] (MOVVconst [d]))
  2165  	// result: (MOVVconst [c&d])
  2166  	for {
  2167  		c := ssa.AuxIntToInt64(v.AuxInt)
  2168  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2169  			break
  2170  		}
  2171  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2172  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2173  		v.AuxInt = ssa.Int64ToAuxInt(c & d)
  2174  		return true
  2175  	}
  2176  	// match: (ANDconst [c] (ANDconst [d] x))
  2177  	// result: (ANDconst [c&d] x)
  2178  	for {
  2179  		c := ssa.AuxIntToInt64(v.AuxInt)
  2180  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  2181  			break
  2182  		}
  2183  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2184  		x := v_0.Args[0]
  2185  		v.Reset(ssaop.OpLOONG64ANDconst)
  2186  		v.AuxInt = ssa.Int64ToAuxInt(c & d)
  2187  		v.AddArg(x)
  2188  		return true
  2189  	}
  2190  	return false
  2191  }
  2192  func rewriteValue_OpLOONG64DIVV(v *ssa.Value) bool {
  2193  	v_1 := v.Args[1]
  2194  	v_0 := v.Args[0]
  2195  	// match: (DIVV (MOVVconst [c]) (MOVVconst [d]))
  2196  	// cond: d != 0
  2197  	// result: (MOVVconst [c/d])
  2198  	for {
  2199  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2200  			break
  2201  		}
  2202  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2203  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2204  			break
  2205  		}
  2206  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  2207  		if !(d != 0) {
  2208  			break
  2209  		}
  2210  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2211  		v.AuxInt = ssa.Int64ToAuxInt(c / d)
  2212  		return true
  2213  	}
  2214  	return false
  2215  }
  2216  func rewriteValue_OpLOONG64DIVVU(v *ssa.Value) bool {
  2217  	v_1 := v.Args[1]
  2218  	v_0 := v.Args[0]
  2219  	// match: (DIVVU x (MOVVconst [1]))
  2220  	// result: x
  2221  	for {
  2222  		x := v_0
  2223  		if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 1 {
  2224  			break
  2225  		}
  2226  		v.CopyOf(x)
  2227  		return true
  2228  	}
  2229  	// match: (DIVVU x (MOVVconst [c]))
  2230  	// cond: ssa.IsPowerOfTwo(c)
  2231  	// result: (SRLVconst [ssa.Log64(c)] x)
  2232  	for {
  2233  		x := v_0
  2234  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2235  			break
  2236  		}
  2237  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2238  		if !(ssa.IsPowerOfTwo(c)) {
  2239  			break
  2240  		}
  2241  		v.Reset(ssaop.OpLOONG64SRLVconst)
  2242  		v.AuxInt = ssa.Int64ToAuxInt(ssa.Log64(c))
  2243  		v.AddArg(x)
  2244  		return true
  2245  	}
  2246  	// match: (DIVVU (MOVVconst [c]) (MOVVconst [d]))
  2247  	// cond: d != 0
  2248  	// result: (MOVVconst [int64(uint64(c)/uint64(d))])
  2249  	for {
  2250  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2251  			break
  2252  		}
  2253  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2254  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2255  			break
  2256  		}
  2257  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  2258  		if !(d != 0) {
  2259  			break
  2260  		}
  2261  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2262  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint64(c) / uint64(d)))
  2263  		return true
  2264  	}
  2265  	return false
  2266  }
  2267  func rewriteValue_OpLOONG64LoweredPanicBoundsCR(v *ssa.Value) bool {
  2268  	v_1 := v.Args[1]
  2269  	v_0 := v.Args[0]
  2270  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVVconst [c]) mem)
  2271  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  2272  	for {
  2273  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2274  		p := ssa.AuxToPanicBoundsC(v.Aux)
  2275  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2276  			break
  2277  		}
  2278  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2279  		mem := v_1
  2280  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsCC)
  2281  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2282  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: p.C, Cy: c})
  2283  		v.AddArg(mem)
  2284  		return true
  2285  	}
  2286  	return false
  2287  }
  2288  func rewriteValue_OpLOONG64LoweredPanicBoundsRC(v *ssa.Value) bool {
  2289  	v_1 := v.Args[1]
  2290  	v_0 := v.Args[0]
  2291  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVVconst [c]) mem)
  2292  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  2293  	for {
  2294  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2295  		p := ssa.AuxToPanicBoundsC(v.Aux)
  2296  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2297  			break
  2298  		}
  2299  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2300  		mem := v_1
  2301  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsCC)
  2302  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2303  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: c, Cy: p.C})
  2304  		v.AddArg(mem)
  2305  		return true
  2306  	}
  2307  	return false
  2308  }
  2309  func rewriteValue_OpLOONG64LoweredPanicBoundsRR(v *ssa.Value) bool {
  2310  	v_2 := v.Args[2]
  2311  	v_1 := v.Args[1]
  2312  	v_0 := v.Args[0]
  2313  	// match: (LoweredPanicBoundsRR [kind] x (MOVVconst [c]) mem)
  2314  	// result: (LoweredPanicBoundsRC [kind] x {ssa.PanicBoundsC{C:c}} mem)
  2315  	for {
  2316  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2317  		x := v_0
  2318  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2319  			break
  2320  		}
  2321  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2322  		mem := v_2
  2323  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsRC)
  2324  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2325  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: c})
  2326  		v.AddArg2(x, mem)
  2327  		return true
  2328  	}
  2329  	// match: (LoweredPanicBoundsRR [kind] (MOVVconst [c]) y mem)
  2330  	// result: (LoweredPanicBoundsCR [kind] {ssa.PanicBoundsC{C:c}} y mem)
  2331  	for {
  2332  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2333  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2334  			break
  2335  		}
  2336  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2337  		y := v_1
  2338  		mem := v_2
  2339  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsCR)
  2340  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2341  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: c})
  2342  		v.AddArg2(y, mem)
  2343  		return true
  2344  	}
  2345  	return false
  2346  }
  2347  func rewriteValue_OpLOONG64MASKEQZ(v *ssa.Value) bool {
  2348  	v_1 := v.Args[1]
  2349  	v_0 := v.Args[0]
  2350  	// match: (MASKEQZ (MOVVconst [0]) cond)
  2351  	// result: (MOVVconst [0])
  2352  	for {
  2353  		if v_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
  2354  			break
  2355  		}
  2356  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2357  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2358  		return true
  2359  	}
  2360  	// match: (MASKEQZ x (MOVVconst [c]))
  2361  	// cond: c == 0
  2362  	// result: (MOVVconst [0])
  2363  	for {
  2364  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2365  			break
  2366  		}
  2367  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2368  		if !(c == 0) {
  2369  			break
  2370  		}
  2371  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2372  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2373  		return true
  2374  	}
  2375  	// match: (MASKEQZ x (MOVVconst [c]))
  2376  	// cond: c != 0
  2377  	// result: x
  2378  	for {
  2379  		x := v_0
  2380  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2381  			break
  2382  		}
  2383  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2384  		if !(c != 0) {
  2385  			break
  2386  		}
  2387  		v.CopyOf(x)
  2388  		return true
  2389  	}
  2390  	return false
  2391  }
  2392  func rewriteValue_OpLOONG64MASKNEZ(v *ssa.Value) bool {
  2393  	v_0 := v.Args[0]
  2394  	// match: (MASKNEZ (MOVVconst [0]) cond)
  2395  	// result: (MOVVconst [0])
  2396  	for {
  2397  		if v_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
  2398  			break
  2399  		}
  2400  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2401  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2402  		return true
  2403  	}
  2404  	return false
  2405  }
  2406  func rewriteValue_OpLOONG64MOVBUload(v *ssa.Value) bool {
  2407  	v_1 := v.Args[1]
  2408  	v_0 := v.Args[0]
  2409  	b := v.Block
  2410  	config := b.Func.Config
  2411  	typ := &b.Func.Config.Types
  2412  	// match: (MOVBUload [off] {sym} ptr (MOVBstore [off] {sym} ptr x _))
  2413  	// result: (MOVBUreg x)
  2414  	for {
  2415  		off := ssa.AuxIntToInt32(v.AuxInt)
  2416  		sym := ssa.AuxToSym(v.Aux)
  2417  		ptr := v_0
  2418  		if v_1.Op != ssaop.OpLOONG64MOVBstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  2419  			break
  2420  		}
  2421  		x := v_1.Args[1]
  2422  		if ptr != v_1.Args[0] {
  2423  			break
  2424  		}
  2425  		v.Reset(ssaop.OpLOONG64MOVBUreg)
  2426  		v.AddArg(x)
  2427  		return true
  2428  	}
  2429  	// match: (MOVBUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  2430  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2431  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
  2432  	for {
  2433  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2434  		sym := ssa.AuxToSym(v.Aux)
  2435  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  2436  			break
  2437  		}
  2438  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  2439  		ptr := v_0.Args[0]
  2440  		mem := v_1
  2441  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2442  			break
  2443  		}
  2444  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2445  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2446  		v.Aux = ssa.SymToAux(sym)
  2447  		v.AddArg2(ptr, mem)
  2448  		return true
  2449  	}
  2450  	// match: (MOVBUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  2451  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2452  	// result: (MOVBUload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  2453  	for {
  2454  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2455  		sym1 := ssa.AuxToSym(v.Aux)
  2456  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  2457  			break
  2458  		}
  2459  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2460  		sym2 := ssa.AuxToSym(v_0.Aux)
  2461  		ptr := v_0.Args[0]
  2462  		mem := v_1
  2463  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2464  			break
  2465  		}
  2466  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2467  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2468  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2469  		v.AddArg2(ptr, mem)
  2470  		return true
  2471  	}
  2472  	// match: (MOVBUload [off] {sym} (ADDV ptr idx) mem)
  2473  	// cond: off == 0 && sym == nil
  2474  	// result: (MOVBUloadidx ptr idx mem)
  2475  	for {
  2476  		off := ssa.AuxIntToInt32(v.AuxInt)
  2477  		sym := ssa.AuxToSym(v.Aux)
  2478  		if v_0.Op != ssaop.OpLOONG64ADDV {
  2479  			break
  2480  		}
  2481  		idx := v_0.Args[1]
  2482  		ptr := v_0.Args[0]
  2483  		mem := v_1
  2484  		if !(off == 0 && sym == nil) {
  2485  			break
  2486  		}
  2487  		v.Reset(ssaop.OpLOONG64MOVBUloadidx)
  2488  		v.AddArg3(ptr, idx, mem)
  2489  		return true
  2490  	}
  2491  	// match: (MOVBUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  2492  	// cond: off == 0 && sym == nil
  2493  	// result: (MOVBUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  2494  	for {
  2495  		off := ssa.AuxIntToInt32(v.AuxInt)
  2496  		sym := ssa.AuxToSym(v.Aux)
  2497  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  2498  			break
  2499  		}
  2500  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  2501  		idx := v_0.Args[1]
  2502  		ptr := v_0.Args[0]
  2503  		mem := v_1
  2504  		if !(off == 0 && sym == nil) {
  2505  			break
  2506  		}
  2507  		v.Reset(ssaop.OpLOONG64MOVBUloadidx)
  2508  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  2509  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  2510  		v0.AddArg(idx)
  2511  		v.AddArg3(ptr, v0, mem)
  2512  		return true
  2513  	}
  2514  	// match: (MOVBUload [off] {sym} (SB) _)
  2515  	// cond: ssa.SymIsRO(sym)
  2516  	// result: (MOVVconst [int64(ssa.Read8(sym, int64(off)))])
  2517  	for {
  2518  		off := ssa.AuxIntToInt32(v.AuxInt)
  2519  		sym := ssa.AuxToSym(v.Aux)
  2520  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  2521  			break
  2522  		}
  2523  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2524  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read8(sym, int64(off))))
  2525  		return true
  2526  	}
  2527  	return false
  2528  }
  2529  func rewriteValue_OpLOONG64MOVBUloadidx(v *ssa.Value) bool {
  2530  	v_2 := v.Args[2]
  2531  	v_1 := v.Args[1]
  2532  	v_0 := v.Args[0]
  2533  	// match: (MOVBUloadidx ptr (MOVVconst [c]) mem)
  2534  	// cond: ssa.Is32Bit(c)
  2535  	// result: (MOVBUload [int32(c)] ptr mem)
  2536  	for {
  2537  		ptr := v_0
  2538  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2539  			break
  2540  		}
  2541  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2542  		mem := v_2
  2543  		if !(ssa.Is32Bit(c)) {
  2544  			break
  2545  		}
  2546  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2547  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  2548  		v.AddArg2(ptr, mem)
  2549  		return true
  2550  	}
  2551  	// match: (MOVBUloadidx (MOVVconst [c]) ptr mem)
  2552  	// cond: ssa.Is32Bit(c)
  2553  	// result: (MOVBUload [int32(c)] ptr mem)
  2554  	for {
  2555  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2556  			break
  2557  		}
  2558  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2559  		ptr := v_1
  2560  		mem := v_2
  2561  		if !(ssa.Is32Bit(c)) {
  2562  			break
  2563  		}
  2564  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2565  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  2566  		v.AddArg2(ptr, mem)
  2567  		return true
  2568  	}
  2569  	return false
  2570  }
  2571  func rewriteValue_OpLOONG64MOVBUreg(v *ssa.Value) bool {
  2572  	v_0 := v.Args[0]
  2573  	// match: (MOVBUreg (SRLVconst [rc] x))
  2574  	// cond: rc < 8
  2575  	// result: (BSTRPICKV [rc + (7+rc)<<6] x)
  2576  	for {
  2577  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  2578  			break
  2579  		}
  2580  		rc := ssa.AuxIntToInt64(v_0.AuxInt)
  2581  		x := v_0.Args[0]
  2582  		if !(rc < 8) {
  2583  			break
  2584  		}
  2585  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  2586  		v.AuxInt = ssa.Int64ToAuxInt(rc + (7+rc)<<6)
  2587  		v.AddArg(x)
  2588  		return true
  2589  	}
  2590  	// match: (MOVBUreg x:(SGT _ _))
  2591  	// result: x
  2592  	for {
  2593  		x := v_0
  2594  		if x.Op != ssaop.OpLOONG64SGT {
  2595  			break
  2596  		}
  2597  		v.CopyOf(x)
  2598  		return true
  2599  	}
  2600  	// match: (MOVBUreg x:(SGTU _ _))
  2601  	// result: x
  2602  	for {
  2603  		x := v_0
  2604  		if x.Op != ssaop.OpLOONG64SGTU {
  2605  			break
  2606  		}
  2607  		v.CopyOf(x)
  2608  		return true
  2609  	}
  2610  	// match: (MOVBUreg x:(XOR (MOVVconst [1]) (SGT _ _)))
  2611  	// result: x
  2612  	for {
  2613  		x := v_0
  2614  		if x.Op != ssaop.OpLOONG64XOR {
  2615  			break
  2616  		}
  2617  		_ = x.Args[1]
  2618  		x_0 := x.Args[0]
  2619  		x_1 := x.Args[1]
  2620  		for _i0 := 0; _i0 <= 1; _i0, x_0, x_1 = _i0+1, x_1, x_0 {
  2621  			if x_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(x_0.AuxInt) != 1 || x_1.Op != ssaop.OpLOONG64SGT {
  2622  				continue
  2623  			}
  2624  			v.CopyOf(x)
  2625  			return true
  2626  		}
  2627  		break
  2628  	}
  2629  	// match: (MOVBUreg x:(XOR (MOVVconst [1]) (SGTU _ _)))
  2630  	// result: x
  2631  	for {
  2632  		x := v_0
  2633  		if x.Op != ssaop.OpLOONG64XOR {
  2634  			break
  2635  		}
  2636  		_ = x.Args[1]
  2637  		x_0 := x.Args[0]
  2638  		x_1 := x.Args[1]
  2639  		for _i0 := 0; _i0 <= 1; _i0, x_0, x_1 = _i0+1, x_1, x_0 {
  2640  			if x_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(x_0.AuxInt) != 1 || x_1.Op != ssaop.OpLOONG64SGTU {
  2641  				continue
  2642  			}
  2643  			v.CopyOf(x)
  2644  			return true
  2645  		}
  2646  		break
  2647  	}
  2648  	// match: (MOVBUreg (SLLVconst [lc] x))
  2649  	// cond: lc >= 8
  2650  	// result: (MOVVconst [0])
  2651  	for {
  2652  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  2653  			break
  2654  		}
  2655  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  2656  		if !(lc >= 8) {
  2657  			break
  2658  		}
  2659  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2660  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2661  		return true
  2662  	}
  2663  	// match: (MOVBUreg (MOVVconst [c]))
  2664  	// result: (MOVVconst [int64(uint8(c))])
  2665  	for {
  2666  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2667  			break
  2668  		}
  2669  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2670  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2671  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint8(c)))
  2672  		return true
  2673  	}
  2674  	// match: (MOVBUreg (ANDconst [c] x))
  2675  	// result: (ANDconst [c&0xff] x)
  2676  	for {
  2677  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  2678  			break
  2679  		}
  2680  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2681  		x := v_0.Args[0]
  2682  		v.Reset(ssaop.OpLOONG64ANDconst)
  2683  		v.AuxInt = ssa.Int64ToAuxInt(c & 0xff)
  2684  		v.AddArg(x)
  2685  		return true
  2686  	}
  2687  	// match: (MOVBUreg x:(SRLconst [c] y))
  2688  	// cond: c >= 24
  2689  	// result: x
  2690  	for {
  2691  		x := v_0
  2692  		if x.Op != ssaop.OpLOONG64SRLconst {
  2693  			break
  2694  		}
  2695  		c := ssa.AuxIntToInt64(x.AuxInt)
  2696  		if !(c >= 24) {
  2697  			break
  2698  		}
  2699  		v.CopyOf(x)
  2700  		return true
  2701  	}
  2702  	// match: (MOVBUreg x:(ANDconst [c] y))
  2703  	// cond: c >= 0 && int64(uint8(c)) == c
  2704  	// result: x
  2705  	for {
  2706  		x := v_0
  2707  		if x.Op != ssaop.OpLOONG64ANDconst {
  2708  			break
  2709  		}
  2710  		c := ssa.AuxIntToInt64(x.AuxInt)
  2711  		if !(c >= 0 && int64(uint8(c)) == c) {
  2712  			break
  2713  		}
  2714  		v.CopyOf(x)
  2715  		return true
  2716  	}
  2717  	return false
  2718  }
  2719  func rewriteValue_OpLOONG64MOVBload(v *ssa.Value) bool {
  2720  	v_1 := v.Args[1]
  2721  	v_0 := v.Args[0]
  2722  	b := v.Block
  2723  	config := b.Func.Config
  2724  	typ := &b.Func.Config.Types
  2725  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off] {sym} ptr x _))
  2726  	// result: (MOVBreg x)
  2727  	for {
  2728  		off := ssa.AuxIntToInt32(v.AuxInt)
  2729  		sym := ssa.AuxToSym(v.Aux)
  2730  		ptr := v_0
  2731  		if v_1.Op != ssaop.OpLOONG64MOVBstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  2732  			break
  2733  		}
  2734  		x := v_1.Args[1]
  2735  		if ptr != v_1.Args[0] {
  2736  			break
  2737  		}
  2738  		v.Reset(ssaop.OpLOONG64MOVBreg)
  2739  		v.AddArg(x)
  2740  		return true
  2741  	}
  2742  	// match: (MOVBload [off1] {sym} (ADDVconst [off2] ptr) mem)
  2743  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2744  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
  2745  	for {
  2746  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2747  		sym := ssa.AuxToSym(v.Aux)
  2748  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  2749  			break
  2750  		}
  2751  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  2752  		ptr := v_0.Args[0]
  2753  		mem := v_1
  2754  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2755  			break
  2756  		}
  2757  		v.Reset(ssaop.OpLOONG64MOVBload)
  2758  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2759  		v.Aux = ssa.SymToAux(sym)
  2760  		v.AddArg2(ptr, mem)
  2761  		return true
  2762  	}
  2763  	// match: (MOVBload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  2764  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2765  	// result: (MOVBload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  2766  	for {
  2767  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2768  		sym1 := ssa.AuxToSym(v.Aux)
  2769  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  2770  			break
  2771  		}
  2772  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2773  		sym2 := ssa.AuxToSym(v_0.Aux)
  2774  		ptr := v_0.Args[0]
  2775  		mem := v_1
  2776  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2777  			break
  2778  		}
  2779  		v.Reset(ssaop.OpLOONG64MOVBload)
  2780  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2781  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2782  		v.AddArg2(ptr, mem)
  2783  		return true
  2784  	}
  2785  	// match: (MOVBload [off] {sym} (ADDV ptr idx) mem)
  2786  	// cond: off == 0 && sym == nil
  2787  	// result: (MOVBloadidx ptr idx mem)
  2788  	for {
  2789  		off := ssa.AuxIntToInt32(v.AuxInt)
  2790  		sym := ssa.AuxToSym(v.Aux)
  2791  		if v_0.Op != ssaop.OpLOONG64ADDV {
  2792  			break
  2793  		}
  2794  		idx := v_0.Args[1]
  2795  		ptr := v_0.Args[0]
  2796  		mem := v_1
  2797  		if !(off == 0 && sym == nil) {
  2798  			break
  2799  		}
  2800  		v.Reset(ssaop.OpLOONG64MOVBloadidx)
  2801  		v.AddArg3(ptr, idx, mem)
  2802  		return true
  2803  	}
  2804  	// match: (MOVBload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  2805  	// cond: off == 0 && sym == nil
  2806  	// result: (MOVBloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  2807  	for {
  2808  		off := ssa.AuxIntToInt32(v.AuxInt)
  2809  		sym := ssa.AuxToSym(v.Aux)
  2810  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  2811  			break
  2812  		}
  2813  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  2814  		idx := v_0.Args[1]
  2815  		ptr := v_0.Args[0]
  2816  		mem := v_1
  2817  		if !(off == 0 && sym == nil) {
  2818  			break
  2819  		}
  2820  		v.Reset(ssaop.OpLOONG64MOVBloadidx)
  2821  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  2822  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  2823  		v0.AddArg(idx)
  2824  		v.AddArg3(ptr, v0, mem)
  2825  		return true
  2826  	}
  2827  	// match: (MOVBload [off] {sym} (SB) _)
  2828  	// cond: ssa.SymIsRO(sym)
  2829  	// result: (MOVVconst [int64(int8(ssa.Read8(sym, int64(off))))])
  2830  	for {
  2831  		off := ssa.AuxIntToInt32(v.AuxInt)
  2832  		sym := ssa.AuxToSym(v.Aux)
  2833  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  2834  			break
  2835  		}
  2836  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2837  		v.AuxInt = ssa.Int64ToAuxInt(int64(int8(ssa.Read8(sym, int64(off)))))
  2838  		return true
  2839  	}
  2840  	return false
  2841  }
  2842  func rewriteValue_OpLOONG64MOVBloadidx(v *ssa.Value) bool {
  2843  	v_2 := v.Args[2]
  2844  	v_1 := v.Args[1]
  2845  	v_0 := v.Args[0]
  2846  	// match: (MOVBloadidx ptr (MOVVconst [c]) mem)
  2847  	// cond: ssa.Is32Bit(c)
  2848  	// result: (MOVBload [int32(c)] ptr mem)
  2849  	for {
  2850  		ptr := v_0
  2851  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2852  			break
  2853  		}
  2854  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2855  		mem := v_2
  2856  		if !(ssa.Is32Bit(c)) {
  2857  			break
  2858  		}
  2859  		v.Reset(ssaop.OpLOONG64MOVBload)
  2860  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  2861  		v.AddArg2(ptr, mem)
  2862  		return true
  2863  	}
  2864  	// match: (MOVBloadidx (MOVVconst [c]) ptr mem)
  2865  	// cond: ssa.Is32Bit(c)
  2866  	// result: (MOVBload [int32(c)] ptr mem)
  2867  	for {
  2868  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2869  			break
  2870  		}
  2871  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2872  		ptr := v_1
  2873  		mem := v_2
  2874  		if !(ssa.Is32Bit(c)) {
  2875  			break
  2876  		}
  2877  		v.Reset(ssaop.OpLOONG64MOVBload)
  2878  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  2879  		v.AddArg2(ptr, mem)
  2880  		return true
  2881  	}
  2882  	return false
  2883  }
  2884  func rewriteValue_OpLOONG64MOVBreg(v *ssa.Value) bool {
  2885  	v_0 := v.Args[0]
  2886  	// match: (MOVBreg (MOVVconst [c]))
  2887  	// result: (MOVVconst [int64(int8(c))])
  2888  	for {
  2889  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2890  			break
  2891  		}
  2892  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2893  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2894  		v.AuxInt = ssa.Int64ToAuxInt(int64(int8(c)))
  2895  		return true
  2896  	}
  2897  	// match: (MOVBreg x:(ANDconst [c] y))
  2898  	// cond: c >= 0 && int64(int8(c)) == c
  2899  	// result: x
  2900  	for {
  2901  		x := v_0
  2902  		if x.Op != ssaop.OpLOONG64ANDconst {
  2903  			break
  2904  		}
  2905  		c := ssa.AuxIntToInt64(x.AuxInt)
  2906  		if !(c >= 0 && int64(int8(c)) == c) {
  2907  			break
  2908  		}
  2909  		v.CopyOf(x)
  2910  		return true
  2911  	}
  2912  	return false
  2913  }
  2914  func rewriteValue_OpLOONG64MOVBstore(v *ssa.Value) bool {
  2915  	v_2 := v.Args[2]
  2916  	v_1 := v.Args[1]
  2917  	v_0 := v.Args[0]
  2918  	b := v.Block
  2919  	config := b.Func.Config
  2920  	typ := &b.Func.Config.Types
  2921  	// match: (MOVBstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  2922  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2923  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
  2924  	for {
  2925  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2926  		sym := ssa.AuxToSym(v.Aux)
  2927  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  2928  			break
  2929  		}
  2930  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  2931  		ptr := v_0.Args[0]
  2932  		val := v_1
  2933  		mem := v_2
  2934  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2935  			break
  2936  		}
  2937  		v.Reset(ssaop.OpLOONG64MOVBstore)
  2938  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2939  		v.Aux = ssa.SymToAux(sym)
  2940  		v.AddArg3(ptr, val, mem)
  2941  		return true
  2942  	}
  2943  	// match: (MOVBstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  2944  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2945  	// result: (MOVBstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  2946  	for {
  2947  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2948  		sym1 := ssa.AuxToSym(v.Aux)
  2949  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  2950  			break
  2951  		}
  2952  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2953  		sym2 := ssa.AuxToSym(v_0.Aux)
  2954  		ptr := v_0.Args[0]
  2955  		val := v_1
  2956  		mem := v_2
  2957  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2958  			break
  2959  		}
  2960  		v.Reset(ssaop.OpLOONG64MOVBstore)
  2961  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2962  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2963  		v.AddArg3(ptr, val, mem)
  2964  		return true
  2965  	}
  2966  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  2967  	// result: (MOVBstore [off] {sym} ptr x mem)
  2968  	for {
  2969  		off := ssa.AuxIntToInt32(v.AuxInt)
  2970  		sym := ssa.AuxToSym(v.Aux)
  2971  		ptr := v_0
  2972  		if v_1.Op != ssaop.OpLOONG64MOVBreg {
  2973  			break
  2974  		}
  2975  		x := v_1.Args[0]
  2976  		mem := v_2
  2977  		v.Reset(ssaop.OpLOONG64MOVBstore)
  2978  		v.AuxInt = ssa.Int32ToAuxInt(off)
  2979  		v.Aux = ssa.SymToAux(sym)
  2980  		v.AddArg3(ptr, x, mem)
  2981  		return true
  2982  	}
  2983  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  2984  	// result: (MOVBstore [off] {sym} ptr x mem)
  2985  	for {
  2986  		off := ssa.AuxIntToInt32(v.AuxInt)
  2987  		sym := ssa.AuxToSym(v.Aux)
  2988  		ptr := v_0
  2989  		if v_1.Op != ssaop.OpLOONG64MOVBUreg {
  2990  			break
  2991  		}
  2992  		x := v_1.Args[0]
  2993  		mem := v_2
  2994  		v.Reset(ssaop.OpLOONG64MOVBstore)
  2995  		v.AuxInt = ssa.Int32ToAuxInt(off)
  2996  		v.Aux = ssa.SymToAux(sym)
  2997  		v.AddArg3(ptr, x, mem)
  2998  		return true
  2999  	}
  3000  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  3001  	// result: (MOVBstore [off] {sym} ptr x mem)
  3002  	for {
  3003  		off := ssa.AuxIntToInt32(v.AuxInt)
  3004  		sym := ssa.AuxToSym(v.Aux)
  3005  		ptr := v_0
  3006  		if v_1.Op != ssaop.OpLOONG64MOVHreg {
  3007  			break
  3008  		}
  3009  		x := v_1.Args[0]
  3010  		mem := v_2
  3011  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3012  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3013  		v.Aux = ssa.SymToAux(sym)
  3014  		v.AddArg3(ptr, x, mem)
  3015  		return true
  3016  	}
  3017  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  3018  	// result: (MOVBstore [off] {sym} ptr x mem)
  3019  	for {
  3020  		off := ssa.AuxIntToInt32(v.AuxInt)
  3021  		sym := ssa.AuxToSym(v.Aux)
  3022  		ptr := v_0
  3023  		if v_1.Op != ssaop.OpLOONG64MOVHUreg {
  3024  			break
  3025  		}
  3026  		x := v_1.Args[0]
  3027  		mem := v_2
  3028  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3029  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3030  		v.Aux = ssa.SymToAux(sym)
  3031  		v.AddArg3(ptr, x, mem)
  3032  		return true
  3033  	}
  3034  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  3035  	// result: (MOVBstore [off] {sym} ptr x mem)
  3036  	for {
  3037  		off := ssa.AuxIntToInt32(v.AuxInt)
  3038  		sym := ssa.AuxToSym(v.Aux)
  3039  		ptr := v_0
  3040  		if v_1.Op != ssaop.OpLOONG64MOVWreg {
  3041  			break
  3042  		}
  3043  		x := v_1.Args[0]
  3044  		mem := v_2
  3045  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3046  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3047  		v.Aux = ssa.SymToAux(sym)
  3048  		v.AddArg3(ptr, x, mem)
  3049  		return true
  3050  	}
  3051  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
  3052  	// result: (MOVBstore [off] {sym} ptr x mem)
  3053  	for {
  3054  		off := ssa.AuxIntToInt32(v.AuxInt)
  3055  		sym := ssa.AuxToSym(v.Aux)
  3056  		ptr := v_0
  3057  		if v_1.Op != ssaop.OpLOONG64MOVWUreg {
  3058  			break
  3059  		}
  3060  		x := v_1.Args[0]
  3061  		mem := v_2
  3062  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3063  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3064  		v.Aux = ssa.SymToAux(sym)
  3065  		v.AddArg3(ptr, x, mem)
  3066  		return true
  3067  	}
  3068  	// match: (MOVBstore [off] {sym} (ADDV ptr idx) val mem)
  3069  	// cond: off == 0 && sym == nil
  3070  	// result: (MOVBstoreidx ptr idx val mem)
  3071  	for {
  3072  		off := ssa.AuxIntToInt32(v.AuxInt)
  3073  		sym := ssa.AuxToSym(v.Aux)
  3074  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3075  			break
  3076  		}
  3077  		idx := v_0.Args[1]
  3078  		ptr := v_0.Args[0]
  3079  		val := v_1
  3080  		mem := v_2
  3081  		if !(off == 0 && sym == nil) {
  3082  			break
  3083  		}
  3084  		v.Reset(ssaop.OpLOONG64MOVBstoreidx)
  3085  		v.AddArg4(ptr, idx, val, mem)
  3086  		return true
  3087  	}
  3088  	// match: (MOVBstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3089  	// cond: off == 0 && sym == nil
  3090  	// result: (MOVBstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3091  	for {
  3092  		off := ssa.AuxIntToInt32(v.AuxInt)
  3093  		sym := ssa.AuxToSym(v.Aux)
  3094  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3095  			break
  3096  		}
  3097  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3098  		idx := v_0.Args[1]
  3099  		ptr := v_0.Args[0]
  3100  		val := v_1
  3101  		mem := v_2
  3102  		if !(off == 0 && sym == nil) {
  3103  			break
  3104  		}
  3105  		v.Reset(ssaop.OpLOONG64MOVBstoreidx)
  3106  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3107  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3108  		v0.AddArg(idx)
  3109  		v.AddArg4(ptr, v0, val, mem)
  3110  		return true
  3111  	}
  3112  	return false
  3113  }
  3114  func rewriteValue_OpLOONG64MOVBstoreidx(v *ssa.Value) bool {
  3115  	v_3 := v.Args[3]
  3116  	v_2 := v.Args[2]
  3117  	v_1 := v.Args[1]
  3118  	v_0 := v.Args[0]
  3119  	// match: (MOVBstoreidx ptr (MOVVconst [c]) val mem)
  3120  	// cond: ssa.Is32Bit(c)
  3121  	// result: (MOVBstore [int32(c)] ptr val mem)
  3122  	for {
  3123  		ptr := v_0
  3124  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3125  			break
  3126  		}
  3127  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3128  		val := v_2
  3129  		mem := v_3
  3130  		if !(ssa.Is32Bit(c)) {
  3131  			break
  3132  		}
  3133  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3134  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3135  		v.AddArg3(ptr, val, mem)
  3136  		return true
  3137  	}
  3138  	// match: (MOVBstoreidx (MOVVconst [c]) idx val mem)
  3139  	// cond: ssa.Is32Bit(c)
  3140  	// result: (MOVBstore [int32(c)] idx val mem)
  3141  	for {
  3142  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3143  			break
  3144  		}
  3145  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3146  		idx := v_1
  3147  		val := v_2
  3148  		mem := v_3
  3149  		if !(ssa.Is32Bit(c)) {
  3150  			break
  3151  		}
  3152  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3153  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3154  		v.AddArg3(idx, val, mem)
  3155  		return true
  3156  	}
  3157  	return false
  3158  }
  3159  func rewriteValue_OpLOONG64MOVDF(v *ssa.Value) bool {
  3160  	v_0 := v.Args[0]
  3161  	// match: (MOVDF (ABSD (MOVFD x)))
  3162  	// result: (ABSF x)
  3163  	for {
  3164  		if v_0.Op != ssaop.OpLOONG64ABSD {
  3165  			break
  3166  		}
  3167  		v_0_0 := v_0.Args[0]
  3168  		if v_0_0.Op != ssaop.OpLOONG64MOVFD {
  3169  			break
  3170  		}
  3171  		x := v_0_0.Args[0]
  3172  		v.Reset(ssaop.OpLOONG64ABSF)
  3173  		v.AddArg(x)
  3174  		return true
  3175  	}
  3176  	// match: (MOVDF (SQRTD (MOVFD x)))
  3177  	// result: (SQRTF x)
  3178  	for {
  3179  		if v_0.Op != ssaop.OpLOONG64SQRTD {
  3180  			break
  3181  		}
  3182  		v_0_0 := v_0.Args[0]
  3183  		if v_0_0.Op != ssaop.OpLOONG64MOVFD {
  3184  			break
  3185  		}
  3186  		x := v_0_0.Args[0]
  3187  		v.Reset(ssaop.OpLOONG64SQRTF)
  3188  		v.AddArg(x)
  3189  		return true
  3190  	}
  3191  	return false
  3192  }
  3193  func rewriteValue_OpLOONG64MOVDload(v *ssa.Value) bool {
  3194  	v_1 := v.Args[1]
  3195  	v_0 := v.Args[0]
  3196  	b := v.Block
  3197  	config := b.Func.Config
  3198  	typ := &b.Func.Config.Types
  3199  	// match: (MOVDload [off] {sym} ptr (MOVVstore [off] {sym} ptr val _))
  3200  	// result: (MOVVgpfp val)
  3201  	for {
  3202  		off := ssa.AuxIntToInt32(v.AuxInt)
  3203  		sym := ssa.AuxToSym(v.Aux)
  3204  		ptr := v_0
  3205  		if v_1.Op != ssaop.OpLOONG64MOVVstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  3206  			break
  3207  		}
  3208  		val := v_1.Args[1]
  3209  		if ptr != v_1.Args[0] {
  3210  			break
  3211  		}
  3212  		v.Reset(ssaop.OpLOONG64MOVVgpfp)
  3213  		v.AddArg(val)
  3214  		return true
  3215  	}
  3216  	// match: (MOVDload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3217  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3218  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
  3219  	for {
  3220  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3221  		sym := ssa.AuxToSym(v.Aux)
  3222  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3223  			break
  3224  		}
  3225  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3226  		ptr := v_0.Args[0]
  3227  		mem := v_1
  3228  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3229  			break
  3230  		}
  3231  		v.Reset(ssaop.OpLOONG64MOVDload)
  3232  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3233  		v.Aux = ssa.SymToAux(sym)
  3234  		v.AddArg2(ptr, mem)
  3235  		return true
  3236  	}
  3237  	// match: (MOVDload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3238  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3239  	// result: (MOVDload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  3240  	for {
  3241  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3242  		sym1 := ssa.AuxToSym(v.Aux)
  3243  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3244  			break
  3245  		}
  3246  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3247  		sym2 := ssa.AuxToSym(v_0.Aux)
  3248  		ptr := v_0.Args[0]
  3249  		mem := v_1
  3250  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3251  			break
  3252  		}
  3253  		v.Reset(ssaop.OpLOONG64MOVDload)
  3254  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3255  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3256  		v.AddArg2(ptr, mem)
  3257  		return true
  3258  	}
  3259  	// match: (MOVDload [off] {sym} (ADDV ptr idx) mem)
  3260  	// cond: off == 0 && sym == nil
  3261  	// result: (MOVDloadidx ptr idx mem)
  3262  	for {
  3263  		off := ssa.AuxIntToInt32(v.AuxInt)
  3264  		sym := ssa.AuxToSym(v.Aux)
  3265  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3266  			break
  3267  		}
  3268  		idx := v_0.Args[1]
  3269  		ptr := v_0.Args[0]
  3270  		mem := v_1
  3271  		if !(off == 0 && sym == nil) {
  3272  			break
  3273  		}
  3274  		v.Reset(ssaop.OpLOONG64MOVDloadidx)
  3275  		v.AddArg3(ptr, idx, mem)
  3276  		return true
  3277  	}
  3278  	// match: (MOVDload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3279  	// cond: off == 0 && sym == nil
  3280  	// result: (MOVDloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3281  	for {
  3282  		off := ssa.AuxIntToInt32(v.AuxInt)
  3283  		sym := ssa.AuxToSym(v.Aux)
  3284  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3285  			break
  3286  		}
  3287  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3288  		idx := v_0.Args[1]
  3289  		ptr := v_0.Args[0]
  3290  		mem := v_1
  3291  		if !(off == 0 && sym == nil) {
  3292  			break
  3293  		}
  3294  		v.Reset(ssaop.OpLOONG64MOVDloadidx)
  3295  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3296  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3297  		v0.AddArg(idx)
  3298  		v.AddArg3(ptr, v0, mem)
  3299  		return true
  3300  	}
  3301  	return false
  3302  }
  3303  func rewriteValue_OpLOONG64MOVDloadidx(v *ssa.Value) bool {
  3304  	v_2 := v.Args[2]
  3305  	v_1 := v.Args[1]
  3306  	v_0 := v.Args[0]
  3307  	// match: (MOVDloadidx ptr (MOVVconst [c]) mem)
  3308  	// cond: ssa.Is32Bit(c)
  3309  	// result: (MOVDload [int32(c)] ptr mem)
  3310  	for {
  3311  		ptr := v_0
  3312  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3313  			break
  3314  		}
  3315  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3316  		mem := v_2
  3317  		if !(ssa.Is32Bit(c)) {
  3318  			break
  3319  		}
  3320  		v.Reset(ssaop.OpLOONG64MOVDload)
  3321  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3322  		v.AddArg2(ptr, mem)
  3323  		return true
  3324  	}
  3325  	// match: (MOVDloadidx (MOVVconst [c]) ptr mem)
  3326  	// cond: ssa.Is32Bit(c)
  3327  	// result: (MOVDload [int32(c)] ptr mem)
  3328  	for {
  3329  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3330  			break
  3331  		}
  3332  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3333  		ptr := v_1
  3334  		mem := v_2
  3335  		if !(ssa.Is32Bit(c)) {
  3336  			break
  3337  		}
  3338  		v.Reset(ssaop.OpLOONG64MOVDload)
  3339  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3340  		v.AddArg2(ptr, mem)
  3341  		return true
  3342  	}
  3343  	return false
  3344  }
  3345  func rewriteValue_OpLOONG64MOVDstore(v *ssa.Value) bool {
  3346  	v_2 := v.Args[2]
  3347  	v_1 := v.Args[1]
  3348  	v_0 := v.Args[0]
  3349  	b := v.Block
  3350  	config := b.Func.Config
  3351  	typ := &b.Func.Config.Types
  3352  	// match: (MOVDstore [off] {sym} ptr (MOVVgpfp val) mem)
  3353  	// result: (MOVVstore [off] {sym} ptr val mem)
  3354  	for {
  3355  		off := ssa.AuxIntToInt32(v.AuxInt)
  3356  		sym := ssa.AuxToSym(v.Aux)
  3357  		ptr := v_0
  3358  		if v_1.Op != ssaop.OpLOONG64MOVVgpfp {
  3359  			break
  3360  		}
  3361  		val := v_1.Args[0]
  3362  		mem := v_2
  3363  		v.Reset(ssaop.OpLOONG64MOVVstore)
  3364  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3365  		v.Aux = ssa.SymToAux(sym)
  3366  		v.AddArg3(ptr, val, mem)
  3367  		return true
  3368  	}
  3369  	// match: (MOVDstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  3370  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3371  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
  3372  	for {
  3373  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3374  		sym := ssa.AuxToSym(v.Aux)
  3375  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3376  			break
  3377  		}
  3378  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3379  		ptr := v_0.Args[0]
  3380  		val := v_1
  3381  		mem := v_2
  3382  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3383  			break
  3384  		}
  3385  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3386  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3387  		v.Aux = ssa.SymToAux(sym)
  3388  		v.AddArg3(ptr, val, mem)
  3389  		return true
  3390  	}
  3391  	// match: (MOVDstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  3392  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3393  	// result: (MOVDstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  3394  	for {
  3395  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3396  		sym1 := ssa.AuxToSym(v.Aux)
  3397  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3398  			break
  3399  		}
  3400  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3401  		sym2 := ssa.AuxToSym(v_0.Aux)
  3402  		ptr := v_0.Args[0]
  3403  		val := v_1
  3404  		mem := v_2
  3405  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3406  			break
  3407  		}
  3408  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3409  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3410  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3411  		v.AddArg3(ptr, val, mem)
  3412  		return true
  3413  	}
  3414  	// match: (MOVDstore [off] {sym} (ADDV ptr idx) val mem)
  3415  	// cond: off == 0 && sym == nil
  3416  	// result: (MOVDstoreidx ptr idx val mem)
  3417  	for {
  3418  		off := ssa.AuxIntToInt32(v.AuxInt)
  3419  		sym := ssa.AuxToSym(v.Aux)
  3420  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3421  			break
  3422  		}
  3423  		idx := v_0.Args[1]
  3424  		ptr := v_0.Args[0]
  3425  		val := v_1
  3426  		mem := v_2
  3427  		if !(off == 0 && sym == nil) {
  3428  			break
  3429  		}
  3430  		v.Reset(ssaop.OpLOONG64MOVDstoreidx)
  3431  		v.AddArg4(ptr, idx, val, mem)
  3432  		return true
  3433  	}
  3434  	// match: (MOVDstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3435  	// cond: off == 0 && sym == nil
  3436  	// result: (MOVDstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3437  	for {
  3438  		off := ssa.AuxIntToInt32(v.AuxInt)
  3439  		sym := ssa.AuxToSym(v.Aux)
  3440  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3441  			break
  3442  		}
  3443  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3444  		idx := v_0.Args[1]
  3445  		ptr := v_0.Args[0]
  3446  		val := v_1
  3447  		mem := v_2
  3448  		if !(off == 0 && sym == nil) {
  3449  			break
  3450  		}
  3451  		v.Reset(ssaop.OpLOONG64MOVDstoreidx)
  3452  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3453  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3454  		v0.AddArg(idx)
  3455  		v.AddArg4(ptr, v0, val, mem)
  3456  		return true
  3457  	}
  3458  	return false
  3459  }
  3460  func rewriteValue_OpLOONG64MOVDstoreidx(v *ssa.Value) bool {
  3461  	v_3 := v.Args[3]
  3462  	v_2 := v.Args[2]
  3463  	v_1 := v.Args[1]
  3464  	v_0 := v.Args[0]
  3465  	// match: (MOVDstoreidx ptr (MOVVconst [c]) val mem)
  3466  	// cond: ssa.Is32Bit(c)
  3467  	// result: (MOVDstore [int32(c)] ptr val mem)
  3468  	for {
  3469  		ptr := v_0
  3470  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3471  			break
  3472  		}
  3473  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3474  		val := v_2
  3475  		mem := v_3
  3476  		if !(ssa.Is32Bit(c)) {
  3477  			break
  3478  		}
  3479  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3480  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3481  		v.AddArg3(ptr, val, mem)
  3482  		return true
  3483  	}
  3484  	// match: (MOVDstoreidx (MOVVconst [c]) idx val mem)
  3485  	// cond: ssa.Is32Bit(c)
  3486  	// result: (MOVDstore [int32(c)] idx val mem)
  3487  	for {
  3488  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3489  			break
  3490  		}
  3491  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3492  		idx := v_1
  3493  		val := v_2
  3494  		mem := v_3
  3495  		if !(ssa.Is32Bit(c)) {
  3496  			break
  3497  		}
  3498  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3499  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3500  		v.AddArg3(idx, val, mem)
  3501  		return true
  3502  	}
  3503  	return false
  3504  }
  3505  func rewriteValue_OpLOONG64MOVFload(v *ssa.Value) bool {
  3506  	v_1 := v.Args[1]
  3507  	v_0 := v.Args[0]
  3508  	b := v.Block
  3509  	config := b.Func.Config
  3510  	typ := &b.Func.Config.Types
  3511  	// match: (MOVFload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  3512  	// result: (MOVWgpfp val)
  3513  	for {
  3514  		off := ssa.AuxIntToInt32(v.AuxInt)
  3515  		sym := ssa.AuxToSym(v.Aux)
  3516  		ptr := v_0
  3517  		if v_1.Op != ssaop.OpLOONG64MOVWstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  3518  			break
  3519  		}
  3520  		val := v_1.Args[1]
  3521  		if ptr != v_1.Args[0] {
  3522  			break
  3523  		}
  3524  		v.Reset(ssaop.OpLOONG64MOVWgpfp)
  3525  		v.AddArg(val)
  3526  		return true
  3527  	}
  3528  	// match: (MOVFload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3529  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3530  	// result: (MOVFload [off1+int32(off2)] {sym} ptr mem)
  3531  	for {
  3532  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3533  		sym := ssa.AuxToSym(v.Aux)
  3534  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3535  			break
  3536  		}
  3537  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3538  		ptr := v_0.Args[0]
  3539  		mem := v_1
  3540  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3541  			break
  3542  		}
  3543  		v.Reset(ssaop.OpLOONG64MOVFload)
  3544  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3545  		v.Aux = ssa.SymToAux(sym)
  3546  		v.AddArg2(ptr, mem)
  3547  		return true
  3548  	}
  3549  	// match: (MOVFload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3550  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3551  	// result: (MOVFload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  3552  	for {
  3553  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3554  		sym1 := ssa.AuxToSym(v.Aux)
  3555  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3556  			break
  3557  		}
  3558  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3559  		sym2 := ssa.AuxToSym(v_0.Aux)
  3560  		ptr := v_0.Args[0]
  3561  		mem := v_1
  3562  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3563  			break
  3564  		}
  3565  		v.Reset(ssaop.OpLOONG64MOVFload)
  3566  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3567  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3568  		v.AddArg2(ptr, mem)
  3569  		return true
  3570  	}
  3571  	// match: (MOVFload [off] {sym} (ADDV ptr idx) mem)
  3572  	// cond: off == 0 && sym == nil
  3573  	// result: (MOVFloadidx ptr idx mem)
  3574  	for {
  3575  		off := ssa.AuxIntToInt32(v.AuxInt)
  3576  		sym := ssa.AuxToSym(v.Aux)
  3577  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3578  			break
  3579  		}
  3580  		idx := v_0.Args[1]
  3581  		ptr := v_0.Args[0]
  3582  		mem := v_1
  3583  		if !(off == 0 && sym == nil) {
  3584  			break
  3585  		}
  3586  		v.Reset(ssaop.OpLOONG64MOVFloadidx)
  3587  		v.AddArg3(ptr, idx, mem)
  3588  		return true
  3589  	}
  3590  	// match: (MOVFload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3591  	// cond: off == 0 && sym == nil
  3592  	// result: (MOVFloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3593  	for {
  3594  		off := ssa.AuxIntToInt32(v.AuxInt)
  3595  		sym := ssa.AuxToSym(v.Aux)
  3596  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3597  			break
  3598  		}
  3599  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3600  		idx := v_0.Args[1]
  3601  		ptr := v_0.Args[0]
  3602  		mem := v_1
  3603  		if !(off == 0 && sym == nil) {
  3604  			break
  3605  		}
  3606  		v.Reset(ssaop.OpLOONG64MOVFloadidx)
  3607  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3608  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3609  		v0.AddArg(idx)
  3610  		v.AddArg3(ptr, v0, mem)
  3611  		return true
  3612  	}
  3613  	return false
  3614  }
  3615  func rewriteValue_OpLOONG64MOVFloadidx(v *ssa.Value) bool {
  3616  	v_2 := v.Args[2]
  3617  	v_1 := v.Args[1]
  3618  	v_0 := v.Args[0]
  3619  	// match: (MOVFloadidx ptr (MOVVconst [c]) mem)
  3620  	// cond: ssa.Is32Bit(c)
  3621  	// result: (MOVFload [int32(c)] ptr mem)
  3622  	for {
  3623  		ptr := v_0
  3624  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3625  			break
  3626  		}
  3627  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3628  		mem := v_2
  3629  		if !(ssa.Is32Bit(c)) {
  3630  			break
  3631  		}
  3632  		v.Reset(ssaop.OpLOONG64MOVFload)
  3633  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3634  		v.AddArg2(ptr, mem)
  3635  		return true
  3636  	}
  3637  	// match: (MOVFloadidx (MOVVconst [c]) ptr mem)
  3638  	// cond: ssa.Is32Bit(c)
  3639  	// result: (MOVFload [int32(c)] ptr mem)
  3640  	for {
  3641  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3642  			break
  3643  		}
  3644  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3645  		ptr := v_1
  3646  		mem := v_2
  3647  		if !(ssa.Is32Bit(c)) {
  3648  			break
  3649  		}
  3650  		v.Reset(ssaop.OpLOONG64MOVFload)
  3651  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3652  		v.AddArg2(ptr, mem)
  3653  		return true
  3654  	}
  3655  	return false
  3656  }
  3657  func rewriteValue_OpLOONG64MOVFstore(v *ssa.Value) bool {
  3658  	v_2 := v.Args[2]
  3659  	v_1 := v.Args[1]
  3660  	v_0 := v.Args[0]
  3661  	b := v.Block
  3662  	config := b.Func.Config
  3663  	typ := &b.Func.Config.Types
  3664  	// match: (MOVFstore [off] {sym} ptr (MOVWgpfp val) mem)
  3665  	// result: (MOVWstore [off] {sym} ptr val mem)
  3666  	for {
  3667  		off := ssa.AuxIntToInt32(v.AuxInt)
  3668  		sym := ssa.AuxToSym(v.Aux)
  3669  		ptr := v_0
  3670  		if v_1.Op != ssaop.OpLOONG64MOVWgpfp {
  3671  			break
  3672  		}
  3673  		val := v_1.Args[0]
  3674  		mem := v_2
  3675  		v.Reset(ssaop.OpLOONG64MOVWstore)
  3676  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3677  		v.Aux = ssa.SymToAux(sym)
  3678  		v.AddArg3(ptr, val, mem)
  3679  		return true
  3680  	}
  3681  	// match: (MOVFstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  3682  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3683  	// result: (MOVFstore [off1+int32(off2)] {sym} ptr val mem)
  3684  	for {
  3685  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3686  		sym := ssa.AuxToSym(v.Aux)
  3687  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3688  			break
  3689  		}
  3690  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3691  		ptr := v_0.Args[0]
  3692  		val := v_1
  3693  		mem := v_2
  3694  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3695  			break
  3696  		}
  3697  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3698  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3699  		v.Aux = ssa.SymToAux(sym)
  3700  		v.AddArg3(ptr, val, mem)
  3701  		return true
  3702  	}
  3703  	// match: (MOVFstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  3704  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3705  	// result: (MOVFstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  3706  	for {
  3707  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3708  		sym1 := ssa.AuxToSym(v.Aux)
  3709  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3710  			break
  3711  		}
  3712  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3713  		sym2 := ssa.AuxToSym(v_0.Aux)
  3714  		ptr := v_0.Args[0]
  3715  		val := v_1
  3716  		mem := v_2
  3717  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3718  			break
  3719  		}
  3720  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3721  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3722  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3723  		v.AddArg3(ptr, val, mem)
  3724  		return true
  3725  	}
  3726  	// match: (MOVFstore [off] {sym} (ADDV ptr idx) val mem)
  3727  	// cond: off == 0 && sym == nil
  3728  	// result: (MOVFstoreidx ptr idx val mem)
  3729  	for {
  3730  		off := ssa.AuxIntToInt32(v.AuxInt)
  3731  		sym := ssa.AuxToSym(v.Aux)
  3732  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3733  			break
  3734  		}
  3735  		idx := v_0.Args[1]
  3736  		ptr := v_0.Args[0]
  3737  		val := v_1
  3738  		mem := v_2
  3739  		if !(off == 0 && sym == nil) {
  3740  			break
  3741  		}
  3742  		v.Reset(ssaop.OpLOONG64MOVFstoreidx)
  3743  		v.AddArg4(ptr, idx, val, mem)
  3744  		return true
  3745  	}
  3746  	// match: (MOVFstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3747  	// cond: off == 0 && sym == nil
  3748  	// result: (MOVFstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3749  	for {
  3750  		off := ssa.AuxIntToInt32(v.AuxInt)
  3751  		sym := ssa.AuxToSym(v.Aux)
  3752  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3753  			break
  3754  		}
  3755  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3756  		idx := v_0.Args[1]
  3757  		ptr := v_0.Args[0]
  3758  		val := v_1
  3759  		mem := v_2
  3760  		if !(off == 0 && sym == nil) {
  3761  			break
  3762  		}
  3763  		v.Reset(ssaop.OpLOONG64MOVFstoreidx)
  3764  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3765  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3766  		v0.AddArg(idx)
  3767  		v.AddArg4(ptr, v0, val, mem)
  3768  		return true
  3769  	}
  3770  	return false
  3771  }
  3772  func rewriteValue_OpLOONG64MOVFstoreidx(v *ssa.Value) bool {
  3773  	v_3 := v.Args[3]
  3774  	v_2 := v.Args[2]
  3775  	v_1 := v.Args[1]
  3776  	v_0 := v.Args[0]
  3777  	// match: (MOVFstoreidx ptr (MOVVconst [c]) val mem)
  3778  	// cond: ssa.Is32Bit(c)
  3779  	// result: (MOVFstore [int32(c)] ptr val mem)
  3780  	for {
  3781  		ptr := v_0
  3782  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3783  			break
  3784  		}
  3785  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3786  		val := v_2
  3787  		mem := v_3
  3788  		if !(ssa.Is32Bit(c)) {
  3789  			break
  3790  		}
  3791  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3792  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3793  		v.AddArg3(ptr, val, mem)
  3794  		return true
  3795  	}
  3796  	// match: (MOVFstoreidx (MOVVconst [c]) idx val mem)
  3797  	// cond: ssa.Is32Bit(c)
  3798  	// result: (MOVFstore [int32(c)] idx val mem)
  3799  	for {
  3800  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3801  			break
  3802  		}
  3803  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3804  		idx := v_1
  3805  		val := v_2
  3806  		mem := v_3
  3807  		if !(ssa.Is32Bit(c)) {
  3808  			break
  3809  		}
  3810  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3811  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3812  		v.AddArg3(idx, val, mem)
  3813  		return true
  3814  	}
  3815  	return false
  3816  }
  3817  func rewriteValue_OpLOONG64MOVHUload(v *ssa.Value) bool {
  3818  	v_1 := v.Args[1]
  3819  	v_0 := v.Args[0]
  3820  	b := v.Block
  3821  	config := b.Func.Config
  3822  	typ := &b.Func.Config.Types
  3823  	// match: (MOVHUload [off] {sym} ptr (MOVHstore [off] {sym} ptr x _))
  3824  	// result: (MOVHUreg x)
  3825  	for {
  3826  		off := ssa.AuxIntToInt32(v.AuxInt)
  3827  		sym := ssa.AuxToSym(v.Aux)
  3828  		ptr := v_0
  3829  		if v_1.Op != ssaop.OpLOONG64MOVHstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  3830  			break
  3831  		}
  3832  		x := v_1.Args[1]
  3833  		if ptr != v_1.Args[0] {
  3834  			break
  3835  		}
  3836  		v.Reset(ssaop.OpLOONG64MOVHUreg)
  3837  		v.AddArg(x)
  3838  		return true
  3839  	}
  3840  	// match: (MOVHUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3841  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3842  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
  3843  	for {
  3844  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3845  		sym := ssa.AuxToSym(v.Aux)
  3846  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3847  			break
  3848  		}
  3849  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3850  		ptr := v_0.Args[0]
  3851  		mem := v_1
  3852  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3853  			break
  3854  		}
  3855  		v.Reset(ssaop.OpLOONG64MOVHUload)
  3856  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3857  		v.Aux = ssa.SymToAux(sym)
  3858  		v.AddArg2(ptr, mem)
  3859  		return true
  3860  	}
  3861  	// match: (MOVHUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3862  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3863  	// result: (MOVHUload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  3864  	for {
  3865  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3866  		sym1 := ssa.AuxToSym(v.Aux)
  3867  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3868  			break
  3869  		}
  3870  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3871  		sym2 := ssa.AuxToSym(v_0.Aux)
  3872  		ptr := v_0.Args[0]
  3873  		mem := v_1
  3874  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3875  			break
  3876  		}
  3877  		v.Reset(ssaop.OpLOONG64MOVHUload)
  3878  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3879  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3880  		v.AddArg2(ptr, mem)
  3881  		return true
  3882  	}
  3883  	// match: (MOVHUload [off] {sym} (ADDV ptr idx) mem)
  3884  	// cond: off == 0 && sym == nil
  3885  	// result: (MOVHUloadidx ptr idx mem)
  3886  	for {
  3887  		off := ssa.AuxIntToInt32(v.AuxInt)
  3888  		sym := ssa.AuxToSym(v.Aux)
  3889  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3890  			break
  3891  		}
  3892  		idx := v_0.Args[1]
  3893  		ptr := v_0.Args[0]
  3894  		mem := v_1
  3895  		if !(off == 0 && sym == nil) {
  3896  			break
  3897  		}
  3898  		v.Reset(ssaop.OpLOONG64MOVHUloadidx)
  3899  		v.AddArg3(ptr, idx, mem)
  3900  		return true
  3901  	}
  3902  	// match: (MOVHUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3903  	// cond: off == 0 && sym == nil
  3904  	// result: (MOVHUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3905  	for {
  3906  		off := ssa.AuxIntToInt32(v.AuxInt)
  3907  		sym := ssa.AuxToSym(v.Aux)
  3908  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3909  			break
  3910  		}
  3911  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3912  		idx := v_0.Args[1]
  3913  		ptr := v_0.Args[0]
  3914  		mem := v_1
  3915  		if !(off == 0 && sym == nil) {
  3916  			break
  3917  		}
  3918  		v.Reset(ssaop.OpLOONG64MOVHUloadidx)
  3919  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3920  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3921  		v0.AddArg(idx)
  3922  		v.AddArg3(ptr, v0, mem)
  3923  		return true
  3924  	}
  3925  	// match: (MOVHUload [off] {sym} (SB) _)
  3926  	// cond: ssa.SymIsRO(sym)
  3927  	// result: (MOVVconst [int64(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder))])
  3928  	for {
  3929  		off := ssa.AuxIntToInt32(v.AuxInt)
  3930  		sym := ssa.AuxToSym(v.Aux)
  3931  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  3932  			break
  3933  		}
  3934  		v.Reset(ssaop.OpLOONG64MOVVconst)
  3935  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder)))
  3936  		return true
  3937  	}
  3938  	return false
  3939  }
  3940  func rewriteValue_OpLOONG64MOVHUloadidx(v *ssa.Value) bool {
  3941  	v_2 := v.Args[2]
  3942  	v_1 := v.Args[1]
  3943  	v_0 := v.Args[0]
  3944  	// match: (MOVHUloadidx ptr (MOVVconst [c]) mem)
  3945  	// cond: ssa.Is32Bit(c)
  3946  	// result: (MOVHUload [int32(c)] ptr mem)
  3947  	for {
  3948  		ptr := v_0
  3949  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3950  			break
  3951  		}
  3952  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3953  		mem := v_2
  3954  		if !(ssa.Is32Bit(c)) {
  3955  			break
  3956  		}
  3957  		v.Reset(ssaop.OpLOONG64MOVHUload)
  3958  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3959  		v.AddArg2(ptr, mem)
  3960  		return true
  3961  	}
  3962  	// match: (MOVHUloadidx (MOVVconst [c]) ptr mem)
  3963  	// cond: ssa.Is32Bit(c)
  3964  	// result: (MOVHUload [int32(c)] ptr mem)
  3965  	for {
  3966  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3967  			break
  3968  		}
  3969  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3970  		ptr := v_1
  3971  		mem := v_2
  3972  		if !(ssa.Is32Bit(c)) {
  3973  			break
  3974  		}
  3975  		v.Reset(ssaop.OpLOONG64MOVHUload)
  3976  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3977  		v.AddArg2(ptr, mem)
  3978  		return true
  3979  	}
  3980  	return false
  3981  }
  3982  func rewriteValue_OpLOONG64MOVHUreg(v *ssa.Value) bool {
  3983  	v_0 := v.Args[0]
  3984  	// match: (MOVHUreg (SRLVconst [rc] x))
  3985  	// cond: rc < 16
  3986  	// result: (BSTRPICKV [rc + (15+rc)<<6] x)
  3987  	for {
  3988  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  3989  			break
  3990  		}
  3991  		rc := ssa.AuxIntToInt64(v_0.AuxInt)
  3992  		x := v_0.Args[0]
  3993  		if !(rc < 16) {
  3994  			break
  3995  		}
  3996  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  3997  		v.AuxInt = ssa.Int64ToAuxInt(rc + (15+rc)<<6)
  3998  		v.AddArg(x)
  3999  		return true
  4000  	}
  4001  	// match: (MOVHUreg (SLLVconst [lc] x))
  4002  	// cond: lc >= 16
  4003  	// result: (MOVVconst [0])
  4004  	for {
  4005  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  4006  			break
  4007  		}
  4008  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  4009  		if !(lc >= 16) {
  4010  			break
  4011  		}
  4012  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4013  		v.AuxInt = ssa.Int64ToAuxInt(0)
  4014  		return true
  4015  	}
  4016  	// match: (MOVHUreg (MOVVconst [c]))
  4017  	// result: (MOVVconst [int64(uint16(c))])
  4018  	for {
  4019  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4020  			break
  4021  		}
  4022  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4023  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4024  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint16(c)))
  4025  		return true
  4026  	}
  4027  	// match: (MOVHUreg x:(SRLconst [c] y))
  4028  	// cond: c >= 16
  4029  	// result: x
  4030  	for {
  4031  		x := v_0
  4032  		if x.Op != ssaop.OpLOONG64SRLconst {
  4033  			break
  4034  		}
  4035  		c := ssa.AuxIntToInt64(x.AuxInt)
  4036  		if !(c >= 16) {
  4037  			break
  4038  		}
  4039  		v.CopyOf(x)
  4040  		return true
  4041  	}
  4042  	// match: (MOVHUreg x:(ANDconst [c] y))
  4043  	// cond: c >= 0 && int64(uint16(c)) == c
  4044  	// result: x
  4045  	for {
  4046  		x := v_0
  4047  		if x.Op != ssaop.OpLOONG64ANDconst {
  4048  			break
  4049  		}
  4050  		c := ssa.AuxIntToInt64(x.AuxInt)
  4051  		if !(c >= 0 && int64(uint16(c)) == c) {
  4052  			break
  4053  		}
  4054  		v.CopyOf(x)
  4055  		return true
  4056  	}
  4057  	return false
  4058  }
  4059  func rewriteValue_OpLOONG64MOVHload(v *ssa.Value) bool {
  4060  	v_1 := v.Args[1]
  4061  	v_0 := v.Args[0]
  4062  	b := v.Block
  4063  	config := b.Func.Config
  4064  	typ := &b.Func.Config.Types
  4065  	// match: (MOVHload [off] {sym} ptr (MOVHstore [off] {sym} ptr x _))
  4066  	// result: (MOVHreg x)
  4067  	for {
  4068  		off := ssa.AuxIntToInt32(v.AuxInt)
  4069  		sym := ssa.AuxToSym(v.Aux)
  4070  		ptr := v_0
  4071  		if v_1.Op != ssaop.OpLOONG64MOVHstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4072  			break
  4073  		}
  4074  		x := v_1.Args[1]
  4075  		if ptr != v_1.Args[0] {
  4076  			break
  4077  		}
  4078  		v.Reset(ssaop.OpLOONG64MOVHreg)
  4079  		v.AddArg(x)
  4080  		return true
  4081  	}
  4082  	// match: (MOVHload [off1] {sym} (ADDVconst [off2] ptr) mem)
  4083  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4084  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
  4085  	for {
  4086  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4087  		sym := ssa.AuxToSym(v.Aux)
  4088  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4089  			break
  4090  		}
  4091  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4092  		ptr := v_0.Args[0]
  4093  		mem := v_1
  4094  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4095  			break
  4096  		}
  4097  		v.Reset(ssaop.OpLOONG64MOVHload)
  4098  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4099  		v.Aux = ssa.SymToAux(sym)
  4100  		v.AddArg2(ptr, mem)
  4101  		return true
  4102  	}
  4103  	// match: (MOVHload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  4104  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4105  	// result: (MOVHload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  4106  	for {
  4107  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4108  		sym1 := ssa.AuxToSym(v.Aux)
  4109  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4110  			break
  4111  		}
  4112  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4113  		sym2 := ssa.AuxToSym(v_0.Aux)
  4114  		ptr := v_0.Args[0]
  4115  		mem := v_1
  4116  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4117  			break
  4118  		}
  4119  		v.Reset(ssaop.OpLOONG64MOVHload)
  4120  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4121  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4122  		v.AddArg2(ptr, mem)
  4123  		return true
  4124  	}
  4125  	// match: (MOVHload [off] {sym} (ADDV ptr idx) mem)
  4126  	// cond: off == 0 && sym == nil
  4127  	// result: (MOVHloadidx ptr idx mem)
  4128  	for {
  4129  		off := ssa.AuxIntToInt32(v.AuxInt)
  4130  		sym := ssa.AuxToSym(v.Aux)
  4131  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4132  			break
  4133  		}
  4134  		idx := v_0.Args[1]
  4135  		ptr := v_0.Args[0]
  4136  		mem := v_1
  4137  		if !(off == 0 && sym == nil) {
  4138  			break
  4139  		}
  4140  		v.Reset(ssaop.OpLOONG64MOVHloadidx)
  4141  		v.AddArg3(ptr, idx, mem)
  4142  		return true
  4143  	}
  4144  	// match: (MOVHload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4145  	// cond: off == 0 && sym == nil
  4146  	// result: (MOVHloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4147  	for {
  4148  		off := ssa.AuxIntToInt32(v.AuxInt)
  4149  		sym := ssa.AuxToSym(v.Aux)
  4150  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4151  			break
  4152  		}
  4153  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4154  		idx := v_0.Args[1]
  4155  		ptr := v_0.Args[0]
  4156  		mem := v_1
  4157  		if !(off == 0 && sym == nil) {
  4158  			break
  4159  		}
  4160  		v.Reset(ssaop.OpLOONG64MOVHloadidx)
  4161  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4162  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4163  		v0.AddArg(idx)
  4164  		v.AddArg3(ptr, v0, mem)
  4165  		return true
  4166  	}
  4167  	// match: (MOVHload [off] {sym} (SB) _)
  4168  	// cond: ssa.SymIsRO(sym)
  4169  	// result: (MOVVconst [int64(int16(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder)))])
  4170  	for {
  4171  		off := ssa.AuxIntToInt32(v.AuxInt)
  4172  		sym := ssa.AuxToSym(v.Aux)
  4173  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  4174  			break
  4175  		}
  4176  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4177  		v.AuxInt = ssa.Int64ToAuxInt(int64(int16(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder))))
  4178  		return true
  4179  	}
  4180  	return false
  4181  }
  4182  func rewriteValue_OpLOONG64MOVHloadidx(v *ssa.Value) bool {
  4183  	v_2 := v.Args[2]
  4184  	v_1 := v.Args[1]
  4185  	v_0 := v.Args[0]
  4186  	// match: (MOVHloadidx ptr (MOVVconst [c]) mem)
  4187  	// cond: ssa.Is32Bit(c)
  4188  	// result: (MOVHload [int32(c)] ptr mem)
  4189  	for {
  4190  		ptr := v_0
  4191  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4192  			break
  4193  		}
  4194  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4195  		mem := v_2
  4196  		if !(ssa.Is32Bit(c)) {
  4197  			break
  4198  		}
  4199  		v.Reset(ssaop.OpLOONG64MOVHload)
  4200  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4201  		v.AddArg2(ptr, mem)
  4202  		return true
  4203  	}
  4204  	// match: (MOVHloadidx (MOVVconst [c]) ptr mem)
  4205  	// cond: ssa.Is32Bit(c)
  4206  	// result: (MOVHload [int32(c)] ptr mem)
  4207  	for {
  4208  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4209  			break
  4210  		}
  4211  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4212  		ptr := v_1
  4213  		mem := v_2
  4214  		if !(ssa.Is32Bit(c)) {
  4215  			break
  4216  		}
  4217  		v.Reset(ssaop.OpLOONG64MOVHload)
  4218  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4219  		v.AddArg2(ptr, mem)
  4220  		return true
  4221  	}
  4222  	return false
  4223  }
  4224  func rewriteValue_OpLOONG64MOVHreg(v *ssa.Value) bool {
  4225  	v_0 := v.Args[0]
  4226  	// match: (MOVHreg (MOVVconst [c]))
  4227  	// result: (MOVVconst [int64(int16(c))])
  4228  	for {
  4229  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4230  			break
  4231  		}
  4232  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4233  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4234  		v.AuxInt = ssa.Int64ToAuxInt(int64(int16(c)))
  4235  		return true
  4236  	}
  4237  	// match: (MOVHreg x:(ANDconst [c] y))
  4238  	// cond: c >= 0 && int64(int16(c)) == c
  4239  	// result: x
  4240  	for {
  4241  		x := v_0
  4242  		if x.Op != ssaop.OpLOONG64ANDconst {
  4243  			break
  4244  		}
  4245  		c := ssa.AuxIntToInt64(x.AuxInt)
  4246  		if !(c >= 0 && int64(int16(c)) == c) {
  4247  			break
  4248  		}
  4249  		v.CopyOf(x)
  4250  		return true
  4251  	}
  4252  	return false
  4253  }
  4254  func rewriteValue_OpLOONG64MOVHstore(v *ssa.Value) bool {
  4255  	v_2 := v.Args[2]
  4256  	v_1 := v.Args[1]
  4257  	v_0 := v.Args[0]
  4258  	b := v.Block
  4259  	config := b.Func.Config
  4260  	typ := &b.Func.Config.Types
  4261  	// match: (MOVHstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  4262  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4263  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
  4264  	for {
  4265  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4266  		sym := ssa.AuxToSym(v.Aux)
  4267  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4268  			break
  4269  		}
  4270  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4271  		ptr := v_0.Args[0]
  4272  		val := v_1
  4273  		mem := v_2
  4274  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4275  			break
  4276  		}
  4277  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4278  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4279  		v.Aux = ssa.SymToAux(sym)
  4280  		v.AddArg3(ptr, val, mem)
  4281  		return true
  4282  	}
  4283  	// match: (MOVHstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  4284  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4285  	// result: (MOVHstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  4286  	for {
  4287  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4288  		sym1 := ssa.AuxToSym(v.Aux)
  4289  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4290  			break
  4291  		}
  4292  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4293  		sym2 := ssa.AuxToSym(v_0.Aux)
  4294  		ptr := v_0.Args[0]
  4295  		val := v_1
  4296  		mem := v_2
  4297  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4298  			break
  4299  		}
  4300  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4301  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4302  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4303  		v.AddArg3(ptr, val, mem)
  4304  		return true
  4305  	}
  4306  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  4307  	// result: (MOVHstore [off] {sym} ptr x mem)
  4308  	for {
  4309  		off := ssa.AuxIntToInt32(v.AuxInt)
  4310  		sym := ssa.AuxToSym(v.Aux)
  4311  		ptr := v_0
  4312  		if v_1.Op != ssaop.OpLOONG64MOVHreg {
  4313  			break
  4314  		}
  4315  		x := v_1.Args[0]
  4316  		mem := v_2
  4317  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4318  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4319  		v.Aux = ssa.SymToAux(sym)
  4320  		v.AddArg3(ptr, x, mem)
  4321  		return true
  4322  	}
  4323  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
  4324  	// result: (MOVHstore [off] {sym} ptr x mem)
  4325  	for {
  4326  		off := ssa.AuxIntToInt32(v.AuxInt)
  4327  		sym := ssa.AuxToSym(v.Aux)
  4328  		ptr := v_0
  4329  		if v_1.Op != ssaop.OpLOONG64MOVHUreg {
  4330  			break
  4331  		}
  4332  		x := v_1.Args[0]
  4333  		mem := v_2
  4334  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4335  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4336  		v.Aux = ssa.SymToAux(sym)
  4337  		v.AddArg3(ptr, x, mem)
  4338  		return true
  4339  	}
  4340  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
  4341  	// result: (MOVHstore [off] {sym} ptr x mem)
  4342  	for {
  4343  		off := ssa.AuxIntToInt32(v.AuxInt)
  4344  		sym := ssa.AuxToSym(v.Aux)
  4345  		ptr := v_0
  4346  		if v_1.Op != ssaop.OpLOONG64MOVWreg {
  4347  			break
  4348  		}
  4349  		x := v_1.Args[0]
  4350  		mem := v_2
  4351  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4352  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4353  		v.Aux = ssa.SymToAux(sym)
  4354  		v.AddArg3(ptr, x, mem)
  4355  		return true
  4356  	}
  4357  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
  4358  	// result: (MOVHstore [off] {sym} ptr x mem)
  4359  	for {
  4360  		off := ssa.AuxIntToInt32(v.AuxInt)
  4361  		sym := ssa.AuxToSym(v.Aux)
  4362  		ptr := v_0
  4363  		if v_1.Op != ssaop.OpLOONG64MOVWUreg {
  4364  			break
  4365  		}
  4366  		x := v_1.Args[0]
  4367  		mem := v_2
  4368  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4369  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4370  		v.Aux = ssa.SymToAux(sym)
  4371  		v.AddArg3(ptr, x, mem)
  4372  		return true
  4373  	}
  4374  	// match: (MOVHstore [off] {sym} (ADDV ptr idx) val mem)
  4375  	// cond: off == 0 && sym == nil
  4376  	// result: (MOVHstoreidx ptr idx val mem)
  4377  	for {
  4378  		off := ssa.AuxIntToInt32(v.AuxInt)
  4379  		sym := ssa.AuxToSym(v.Aux)
  4380  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4381  			break
  4382  		}
  4383  		idx := v_0.Args[1]
  4384  		ptr := v_0.Args[0]
  4385  		val := v_1
  4386  		mem := v_2
  4387  		if !(off == 0 && sym == nil) {
  4388  			break
  4389  		}
  4390  		v.Reset(ssaop.OpLOONG64MOVHstoreidx)
  4391  		v.AddArg4(ptr, idx, val, mem)
  4392  		return true
  4393  	}
  4394  	// match: (MOVHstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  4395  	// cond: off == 0 && sym == nil
  4396  	// result: (MOVHstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  4397  	for {
  4398  		off := ssa.AuxIntToInt32(v.AuxInt)
  4399  		sym := ssa.AuxToSym(v.Aux)
  4400  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4401  			break
  4402  		}
  4403  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4404  		idx := v_0.Args[1]
  4405  		ptr := v_0.Args[0]
  4406  		val := v_1
  4407  		mem := v_2
  4408  		if !(off == 0 && sym == nil) {
  4409  			break
  4410  		}
  4411  		v.Reset(ssaop.OpLOONG64MOVHstoreidx)
  4412  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4413  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4414  		v0.AddArg(idx)
  4415  		v.AddArg4(ptr, v0, val, mem)
  4416  		return true
  4417  	}
  4418  	return false
  4419  }
  4420  func rewriteValue_OpLOONG64MOVHstoreidx(v *ssa.Value) bool {
  4421  	v_3 := v.Args[3]
  4422  	v_2 := v.Args[2]
  4423  	v_1 := v.Args[1]
  4424  	v_0 := v.Args[0]
  4425  	// match: (MOVHstoreidx ptr (MOVVconst [c]) val mem)
  4426  	// cond: ssa.Is32Bit(c)
  4427  	// result: (MOVHstore [int32(c)] ptr val mem)
  4428  	for {
  4429  		ptr := v_0
  4430  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4431  			break
  4432  		}
  4433  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4434  		val := v_2
  4435  		mem := v_3
  4436  		if !(ssa.Is32Bit(c)) {
  4437  			break
  4438  		}
  4439  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4440  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4441  		v.AddArg3(ptr, val, mem)
  4442  		return true
  4443  	}
  4444  	// match: (MOVHstoreidx (MOVVconst [c]) idx val mem)
  4445  	// cond: ssa.Is32Bit(c)
  4446  	// result: (MOVHstore [int32(c)] idx val mem)
  4447  	for {
  4448  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4449  			break
  4450  		}
  4451  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4452  		idx := v_1
  4453  		val := v_2
  4454  		mem := v_3
  4455  		if !(ssa.Is32Bit(c)) {
  4456  			break
  4457  		}
  4458  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4459  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4460  		v.AddArg3(idx, val, mem)
  4461  		return true
  4462  	}
  4463  	return false
  4464  }
  4465  func rewriteValue_OpLOONG64MOVVload(v *ssa.Value) bool {
  4466  	v_1 := v.Args[1]
  4467  	v_0 := v.Args[0]
  4468  	b := v.Block
  4469  	config := b.Func.Config
  4470  	typ := &b.Func.Config.Types
  4471  	// match: (MOVVload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  4472  	// result: (MOVVfpgp val)
  4473  	for {
  4474  		off := ssa.AuxIntToInt32(v.AuxInt)
  4475  		sym := ssa.AuxToSym(v.Aux)
  4476  		ptr := v_0
  4477  		if v_1.Op != ssaop.OpLOONG64MOVDstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4478  			break
  4479  		}
  4480  		val := v_1.Args[1]
  4481  		if ptr != v_1.Args[0] {
  4482  			break
  4483  		}
  4484  		v.Reset(ssaop.OpLOONG64MOVVfpgp)
  4485  		v.AddArg(val)
  4486  		return true
  4487  	}
  4488  	// match: (MOVVload [off] {sym} ptr (MOVVstore [off] {sym} ptr x _))
  4489  	// result: (MOVVreg x)
  4490  	for {
  4491  		off := ssa.AuxIntToInt32(v.AuxInt)
  4492  		sym := ssa.AuxToSym(v.Aux)
  4493  		ptr := v_0
  4494  		if v_1.Op != ssaop.OpLOONG64MOVVstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4495  			break
  4496  		}
  4497  		x := v_1.Args[1]
  4498  		if ptr != v_1.Args[0] {
  4499  			break
  4500  		}
  4501  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4502  		v.AddArg(x)
  4503  		return true
  4504  	}
  4505  	// match: (MOVVload [off1] {sym} (ADDVconst [off2] ptr) mem)
  4506  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4507  	// result: (MOVVload [off1+int32(off2)] {sym} ptr mem)
  4508  	for {
  4509  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4510  		sym := ssa.AuxToSym(v.Aux)
  4511  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4512  			break
  4513  		}
  4514  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4515  		ptr := v_0.Args[0]
  4516  		mem := v_1
  4517  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4518  			break
  4519  		}
  4520  		v.Reset(ssaop.OpLOONG64MOVVload)
  4521  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4522  		v.Aux = ssa.SymToAux(sym)
  4523  		v.AddArg2(ptr, mem)
  4524  		return true
  4525  	}
  4526  	// match: (MOVVload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  4527  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4528  	// result: (MOVVload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  4529  	for {
  4530  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4531  		sym1 := ssa.AuxToSym(v.Aux)
  4532  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4533  			break
  4534  		}
  4535  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4536  		sym2 := ssa.AuxToSym(v_0.Aux)
  4537  		ptr := v_0.Args[0]
  4538  		mem := v_1
  4539  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4540  			break
  4541  		}
  4542  		v.Reset(ssaop.OpLOONG64MOVVload)
  4543  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4544  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4545  		v.AddArg2(ptr, mem)
  4546  		return true
  4547  	}
  4548  	// match: (MOVVload [off] {sym} (ADDV ptr idx) mem)
  4549  	// cond: off == 0 && sym == nil
  4550  	// result: (MOVVloadidx ptr idx mem)
  4551  	for {
  4552  		off := ssa.AuxIntToInt32(v.AuxInt)
  4553  		sym := ssa.AuxToSym(v.Aux)
  4554  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4555  			break
  4556  		}
  4557  		idx := v_0.Args[1]
  4558  		ptr := v_0.Args[0]
  4559  		mem := v_1
  4560  		if !(off == 0 && sym == nil) {
  4561  			break
  4562  		}
  4563  		v.Reset(ssaop.OpLOONG64MOVVloadidx)
  4564  		v.AddArg3(ptr, idx, mem)
  4565  		return true
  4566  	}
  4567  	// match: (MOVVload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4568  	// cond: off == 0 && sym == nil
  4569  	// result: (MOVVloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4570  	for {
  4571  		off := ssa.AuxIntToInt32(v.AuxInt)
  4572  		sym := ssa.AuxToSym(v.Aux)
  4573  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4574  			break
  4575  		}
  4576  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4577  		idx := v_0.Args[1]
  4578  		ptr := v_0.Args[0]
  4579  		mem := v_1
  4580  		if !(off == 0 && sym == nil) {
  4581  			break
  4582  		}
  4583  		v.Reset(ssaop.OpLOONG64MOVVloadidx)
  4584  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4585  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4586  		v0.AddArg(idx)
  4587  		v.AddArg3(ptr, v0, mem)
  4588  		return true
  4589  	}
  4590  	// match: (MOVVload [off] {sym} (SB) _)
  4591  	// cond: ssa.SymIsRO(sym)
  4592  	// result: (MOVVconst [int64(ssa.Read64(sym, int64(off), config.Ctxt.Arch.ByteOrder))])
  4593  	for {
  4594  		off := ssa.AuxIntToInt32(v.AuxInt)
  4595  		sym := ssa.AuxToSym(v.Aux)
  4596  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  4597  			break
  4598  		}
  4599  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4600  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read64(sym, int64(off), config.Ctxt.Arch.ByteOrder)))
  4601  		return true
  4602  	}
  4603  	return false
  4604  }
  4605  func rewriteValue_OpLOONG64MOVVloadidx(v *ssa.Value) bool {
  4606  	v_2 := v.Args[2]
  4607  	v_1 := v.Args[1]
  4608  	v_0 := v.Args[0]
  4609  	// match: (MOVVloadidx ptr (MOVVconst [c]) mem)
  4610  	// cond: ssa.Is32Bit(c)
  4611  	// result: (MOVVload [int32(c)] ptr mem)
  4612  	for {
  4613  		ptr := v_0
  4614  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4615  			break
  4616  		}
  4617  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4618  		mem := v_2
  4619  		if !(ssa.Is32Bit(c)) {
  4620  			break
  4621  		}
  4622  		v.Reset(ssaop.OpLOONG64MOVVload)
  4623  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4624  		v.AddArg2(ptr, mem)
  4625  		return true
  4626  	}
  4627  	// match: (MOVVloadidx (MOVVconst [c]) ptr mem)
  4628  	// cond: ssa.Is32Bit(c)
  4629  	// result: (MOVVload [int32(c)] ptr mem)
  4630  	for {
  4631  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4632  			break
  4633  		}
  4634  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4635  		ptr := v_1
  4636  		mem := v_2
  4637  		if !(ssa.Is32Bit(c)) {
  4638  			break
  4639  		}
  4640  		v.Reset(ssaop.OpLOONG64MOVVload)
  4641  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4642  		v.AddArg2(ptr, mem)
  4643  		return true
  4644  	}
  4645  	return false
  4646  }
  4647  func rewriteValue_OpLOONG64MOVVreg(v *ssa.Value) bool {
  4648  	v_0 := v.Args[0]
  4649  	// match: (MOVVreg (MOVVconst [c]))
  4650  	// result: (MOVVconst [c])
  4651  	for {
  4652  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4653  			break
  4654  		}
  4655  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4656  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4657  		v.AuxInt = ssa.Int64ToAuxInt(c)
  4658  		return true
  4659  	}
  4660  	return false
  4661  }
  4662  func rewriteValue_OpLOONG64MOVVstore(v *ssa.Value) bool {
  4663  	v_2 := v.Args[2]
  4664  	v_1 := v.Args[1]
  4665  	v_0 := v.Args[0]
  4666  	b := v.Block
  4667  	config := b.Func.Config
  4668  	typ := &b.Func.Config.Types
  4669  	// match: (MOVVstore [off] {sym} ptr (MOVVfpgp val) mem)
  4670  	// result: (MOVDstore [off] {sym} ptr val mem)
  4671  	for {
  4672  		off := ssa.AuxIntToInt32(v.AuxInt)
  4673  		sym := ssa.AuxToSym(v.Aux)
  4674  		ptr := v_0
  4675  		if v_1.Op != ssaop.OpLOONG64MOVVfpgp {
  4676  			break
  4677  		}
  4678  		val := v_1.Args[0]
  4679  		mem := v_2
  4680  		v.Reset(ssaop.OpLOONG64MOVDstore)
  4681  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4682  		v.Aux = ssa.SymToAux(sym)
  4683  		v.AddArg3(ptr, val, mem)
  4684  		return true
  4685  	}
  4686  	// match: (MOVVstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  4687  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4688  	// result: (MOVVstore [off1+int32(off2)] {sym} ptr val mem)
  4689  	for {
  4690  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4691  		sym := ssa.AuxToSym(v.Aux)
  4692  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4693  			break
  4694  		}
  4695  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4696  		ptr := v_0.Args[0]
  4697  		val := v_1
  4698  		mem := v_2
  4699  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4700  			break
  4701  		}
  4702  		v.Reset(ssaop.OpLOONG64MOVVstore)
  4703  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4704  		v.Aux = ssa.SymToAux(sym)
  4705  		v.AddArg3(ptr, val, mem)
  4706  		return true
  4707  	}
  4708  	// match: (MOVVstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  4709  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4710  	// result: (MOVVstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  4711  	for {
  4712  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4713  		sym1 := ssa.AuxToSym(v.Aux)
  4714  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4715  			break
  4716  		}
  4717  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4718  		sym2 := ssa.AuxToSym(v_0.Aux)
  4719  		ptr := v_0.Args[0]
  4720  		val := v_1
  4721  		mem := v_2
  4722  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4723  			break
  4724  		}
  4725  		v.Reset(ssaop.OpLOONG64MOVVstore)
  4726  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4727  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4728  		v.AddArg3(ptr, val, mem)
  4729  		return true
  4730  	}
  4731  	// match: (MOVVstore [off] {sym} (ADDV ptr idx) val mem)
  4732  	// cond: off == 0 && sym == nil
  4733  	// result: (MOVVstoreidx ptr idx val mem)
  4734  	for {
  4735  		off := ssa.AuxIntToInt32(v.AuxInt)
  4736  		sym := ssa.AuxToSym(v.Aux)
  4737  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4738  			break
  4739  		}
  4740  		idx := v_0.Args[1]
  4741  		ptr := v_0.Args[0]
  4742  		val := v_1
  4743  		mem := v_2
  4744  		if !(off == 0 && sym == nil) {
  4745  			break
  4746  		}
  4747  		v.Reset(ssaop.OpLOONG64MOVVstoreidx)
  4748  		v.AddArg4(ptr, idx, val, mem)
  4749  		return true
  4750  	}
  4751  	// match: (MOVVstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  4752  	// cond: off == 0 && sym == nil
  4753  	// result: (MOVVstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  4754  	for {
  4755  		off := ssa.AuxIntToInt32(v.AuxInt)
  4756  		sym := ssa.AuxToSym(v.Aux)
  4757  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4758  			break
  4759  		}
  4760  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4761  		idx := v_0.Args[1]
  4762  		ptr := v_0.Args[0]
  4763  		val := v_1
  4764  		mem := v_2
  4765  		if !(off == 0 && sym == nil) {
  4766  			break
  4767  		}
  4768  		v.Reset(ssaop.OpLOONG64MOVVstoreidx)
  4769  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4770  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4771  		v0.AddArg(idx)
  4772  		v.AddArg4(ptr, v0, val, mem)
  4773  		return true
  4774  	}
  4775  	return false
  4776  }
  4777  func rewriteValue_OpLOONG64MOVVstoreidx(v *ssa.Value) bool {
  4778  	v_3 := v.Args[3]
  4779  	v_2 := v.Args[2]
  4780  	v_1 := v.Args[1]
  4781  	v_0 := v.Args[0]
  4782  	// match: (MOVVstoreidx ptr (MOVVconst [c]) val mem)
  4783  	// cond: ssa.Is32Bit(c)
  4784  	// result: (MOVVstore [int32(c)] ptr val mem)
  4785  	for {
  4786  		ptr := v_0
  4787  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4788  			break
  4789  		}
  4790  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4791  		val := v_2
  4792  		mem := v_3
  4793  		if !(ssa.Is32Bit(c)) {
  4794  			break
  4795  		}
  4796  		v.Reset(ssaop.OpLOONG64MOVVstore)
  4797  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4798  		v.AddArg3(ptr, val, mem)
  4799  		return true
  4800  	}
  4801  	// match: (MOVVstoreidx (MOVVconst [c]) idx val mem)
  4802  	// cond: ssa.Is32Bit(c)
  4803  	// result: (MOVVstore [int32(c)] idx val mem)
  4804  	for {
  4805  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4806  			break
  4807  		}
  4808  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4809  		idx := v_1
  4810  		val := v_2
  4811  		mem := v_3
  4812  		if !(ssa.Is32Bit(c)) {
  4813  			break
  4814  		}
  4815  		v.Reset(ssaop.OpLOONG64MOVVstore)
  4816  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4817  		v.AddArg3(idx, val, mem)
  4818  		return true
  4819  	}
  4820  	return false
  4821  }
  4822  func rewriteValue_OpLOONG64MOVWUload(v *ssa.Value) bool {
  4823  	v_1 := v.Args[1]
  4824  	v_0 := v.Args[0]
  4825  	b := v.Block
  4826  	config := b.Func.Config
  4827  	typ := &b.Func.Config.Types
  4828  	// match: (MOVWUload [off] {sym} ptr (MOVFstore [off] {sym} ptr val _))
  4829  	// result: (ZeroExt32to64 (MOVWfpgp <typ.Float32> val))
  4830  	for {
  4831  		off := ssa.AuxIntToInt32(v.AuxInt)
  4832  		sym := ssa.AuxToSym(v.Aux)
  4833  		ptr := v_0
  4834  		if v_1.Op != ssaop.OpLOONG64MOVFstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4835  			break
  4836  		}
  4837  		val := v_1.Args[1]
  4838  		if ptr != v_1.Args[0] {
  4839  			break
  4840  		}
  4841  		v.Reset(ssaop.OpZeroExt32to64)
  4842  		v0 := b.NewValue0(v_1.Pos, ssaop.OpLOONG64MOVWfpgp, typ.Float32)
  4843  		v0.AddArg(val)
  4844  		v.AddArg(v0)
  4845  		return true
  4846  	}
  4847  	// match: (MOVWUload [off] {sym} ptr (MOVWstore [off] {sym} ptr x _))
  4848  	// result: (MOVWUreg x)
  4849  	for {
  4850  		off := ssa.AuxIntToInt32(v.AuxInt)
  4851  		sym := ssa.AuxToSym(v.Aux)
  4852  		ptr := v_0
  4853  		if v_1.Op != ssaop.OpLOONG64MOVWstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4854  			break
  4855  		}
  4856  		x := v_1.Args[1]
  4857  		if ptr != v_1.Args[0] {
  4858  			break
  4859  		}
  4860  		v.Reset(ssaop.OpLOONG64MOVWUreg)
  4861  		v.AddArg(x)
  4862  		return true
  4863  	}
  4864  	// match: (MOVWUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  4865  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4866  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
  4867  	for {
  4868  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4869  		sym := ssa.AuxToSym(v.Aux)
  4870  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4871  			break
  4872  		}
  4873  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4874  		ptr := v_0.Args[0]
  4875  		mem := v_1
  4876  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4877  			break
  4878  		}
  4879  		v.Reset(ssaop.OpLOONG64MOVWUload)
  4880  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4881  		v.Aux = ssa.SymToAux(sym)
  4882  		v.AddArg2(ptr, mem)
  4883  		return true
  4884  	}
  4885  	// match: (MOVWUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  4886  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4887  	// result: (MOVWUload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  4888  	for {
  4889  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4890  		sym1 := ssa.AuxToSym(v.Aux)
  4891  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4892  			break
  4893  		}
  4894  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4895  		sym2 := ssa.AuxToSym(v_0.Aux)
  4896  		ptr := v_0.Args[0]
  4897  		mem := v_1
  4898  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4899  			break
  4900  		}
  4901  		v.Reset(ssaop.OpLOONG64MOVWUload)
  4902  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4903  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4904  		v.AddArg2(ptr, mem)
  4905  		return true
  4906  	}
  4907  	// match: (MOVWUload [off] {sym} (ADDV ptr idx) mem)
  4908  	// cond: off == 0 && sym == nil
  4909  	// result: (MOVWUloadidx ptr idx mem)
  4910  	for {
  4911  		off := ssa.AuxIntToInt32(v.AuxInt)
  4912  		sym := ssa.AuxToSym(v.Aux)
  4913  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4914  			break
  4915  		}
  4916  		idx := v_0.Args[1]
  4917  		ptr := v_0.Args[0]
  4918  		mem := v_1
  4919  		if !(off == 0 && sym == nil) {
  4920  			break
  4921  		}
  4922  		v.Reset(ssaop.OpLOONG64MOVWUloadidx)
  4923  		v.AddArg3(ptr, idx, mem)
  4924  		return true
  4925  	}
  4926  	// match: (MOVWUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4927  	// cond: off == 0 && sym == nil
  4928  	// result: (MOVWUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4929  	for {
  4930  		off := ssa.AuxIntToInt32(v.AuxInt)
  4931  		sym := ssa.AuxToSym(v.Aux)
  4932  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4933  			break
  4934  		}
  4935  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4936  		idx := v_0.Args[1]
  4937  		ptr := v_0.Args[0]
  4938  		mem := v_1
  4939  		if !(off == 0 && sym == nil) {
  4940  			break
  4941  		}
  4942  		v.Reset(ssaop.OpLOONG64MOVWUloadidx)
  4943  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4944  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4945  		v0.AddArg(idx)
  4946  		v.AddArg3(ptr, v0, mem)
  4947  		return true
  4948  	}
  4949  	// match: (MOVWUload [off] {sym} (SB) _)
  4950  	// cond: ssa.SymIsRO(sym)
  4951  	// result: (MOVVconst [int64(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder))])
  4952  	for {
  4953  		off := ssa.AuxIntToInt32(v.AuxInt)
  4954  		sym := ssa.AuxToSym(v.Aux)
  4955  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  4956  			break
  4957  		}
  4958  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4959  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder)))
  4960  		return true
  4961  	}
  4962  	return false
  4963  }
  4964  func rewriteValue_OpLOONG64MOVWUloadidx(v *ssa.Value) bool {
  4965  	v_2 := v.Args[2]
  4966  	v_1 := v.Args[1]
  4967  	v_0 := v.Args[0]
  4968  	// match: (MOVWUloadidx ptr (MOVVconst [c]) mem)
  4969  	// cond: ssa.Is32Bit(c)
  4970  	// result: (MOVWUload [int32(c)] ptr mem)
  4971  	for {
  4972  		ptr := v_0
  4973  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4974  			break
  4975  		}
  4976  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4977  		mem := v_2
  4978  		if !(ssa.Is32Bit(c)) {
  4979  			break
  4980  		}
  4981  		v.Reset(ssaop.OpLOONG64MOVWUload)
  4982  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4983  		v.AddArg2(ptr, mem)
  4984  		return true
  4985  	}
  4986  	// match: (MOVWUloadidx (MOVVconst [c]) ptr mem)
  4987  	// cond: ssa.Is32Bit(c)
  4988  	// result: (MOVWUload [int32(c)] ptr mem)
  4989  	for {
  4990  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4991  			break
  4992  		}
  4993  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4994  		ptr := v_1
  4995  		mem := v_2
  4996  		if !(ssa.Is32Bit(c)) {
  4997  			break
  4998  		}
  4999  		v.Reset(ssaop.OpLOONG64MOVWUload)
  5000  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5001  		v.AddArg2(ptr, mem)
  5002  		return true
  5003  	}
  5004  	return false
  5005  }
  5006  func rewriteValue_OpLOONG64MOVWUreg(v *ssa.Value) bool {
  5007  	v_0 := v.Args[0]
  5008  	// match: (MOVWUreg (SRLVconst [rc] x))
  5009  	// cond: rc < 32
  5010  	// result: (BSTRPICKV [rc + (31+rc)<<6] x)
  5011  	for {
  5012  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  5013  			break
  5014  		}
  5015  		rc := ssa.AuxIntToInt64(v_0.AuxInt)
  5016  		x := v_0.Args[0]
  5017  		if !(rc < 32) {
  5018  			break
  5019  		}
  5020  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  5021  		v.AuxInt = ssa.Int64ToAuxInt(rc + (31+rc)<<6)
  5022  		v.AddArg(x)
  5023  		return true
  5024  	}
  5025  	// match: (MOVWUreg (SLLVconst [lc] x))
  5026  	// cond: lc >= 32
  5027  	// result: (MOVVconst [0])
  5028  	for {
  5029  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  5030  			break
  5031  		}
  5032  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  5033  		if !(lc >= 32) {
  5034  			break
  5035  		}
  5036  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5037  		v.AuxInt = ssa.Int64ToAuxInt(0)
  5038  		return true
  5039  	}
  5040  	// match: (MOVWUreg (MOVVconst [c]))
  5041  	// result: (MOVVconst [int64(uint32(c))])
  5042  	for {
  5043  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5044  			break
  5045  		}
  5046  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5047  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5048  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint32(c)))
  5049  		return true
  5050  	}
  5051  	// match: (MOVWUreg x:(SRLconst [c] y))
  5052  	// result: x
  5053  	for {
  5054  		x := v_0
  5055  		if x.Op != ssaop.OpLOONG64SRLconst {
  5056  			break
  5057  		}
  5058  		v.CopyOf(x)
  5059  		return true
  5060  	}
  5061  	// match: (MOVWUreg x:(ANDconst [c] y))
  5062  	// cond: c >= 0 && int64(uint32(c)) == c
  5063  	// result: x
  5064  	for {
  5065  		x := v_0
  5066  		if x.Op != ssaop.OpLOONG64ANDconst {
  5067  			break
  5068  		}
  5069  		c := ssa.AuxIntToInt64(x.AuxInt)
  5070  		if !(c >= 0 && int64(uint32(c)) == c) {
  5071  			break
  5072  		}
  5073  		v.CopyOf(x)
  5074  		return true
  5075  	}
  5076  	return false
  5077  }
  5078  func rewriteValue_OpLOONG64MOVWload(v *ssa.Value) bool {
  5079  	v_1 := v.Args[1]
  5080  	v_0 := v.Args[0]
  5081  	b := v.Block
  5082  	config := b.Func.Config
  5083  	typ := &b.Func.Config.Types
  5084  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off] {sym} ptr x _))
  5085  	// result: (MOVWreg x)
  5086  	for {
  5087  		off := ssa.AuxIntToInt32(v.AuxInt)
  5088  		sym := ssa.AuxToSym(v.Aux)
  5089  		ptr := v_0
  5090  		if v_1.Op != ssaop.OpLOONG64MOVWstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  5091  			break
  5092  		}
  5093  		x := v_1.Args[1]
  5094  		if ptr != v_1.Args[0] {
  5095  			break
  5096  		}
  5097  		v.Reset(ssaop.OpLOONG64MOVWreg)
  5098  		v.AddArg(x)
  5099  		return true
  5100  	}
  5101  	// match: (MOVWload [off1] {sym} (ADDVconst [off2] ptr) mem)
  5102  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5103  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
  5104  	for {
  5105  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5106  		sym := ssa.AuxToSym(v.Aux)
  5107  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  5108  			break
  5109  		}
  5110  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  5111  		ptr := v_0.Args[0]
  5112  		mem := v_1
  5113  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5114  			break
  5115  		}
  5116  		v.Reset(ssaop.OpLOONG64MOVWload)
  5117  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5118  		v.Aux = ssa.SymToAux(sym)
  5119  		v.AddArg2(ptr, mem)
  5120  		return true
  5121  	}
  5122  	// match: (MOVWload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  5123  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5124  	// result: (MOVWload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  5125  	for {
  5126  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5127  		sym1 := ssa.AuxToSym(v.Aux)
  5128  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  5129  			break
  5130  		}
  5131  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5132  		sym2 := ssa.AuxToSym(v_0.Aux)
  5133  		ptr := v_0.Args[0]
  5134  		mem := v_1
  5135  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5136  			break
  5137  		}
  5138  		v.Reset(ssaop.OpLOONG64MOVWload)
  5139  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5140  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5141  		v.AddArg2(ptr, mem)
  5142  		return true
  5143  	}
  5144  	// match: (MOVWload [off] {sym} (ADDV ptr idx) mem)
  5145  	// cond: off == 0 && sym == nil
  5146  	// result: (MOVWloadidx ptr idx mem)
  5147  	for {
  5148  		off := ssa.AuxIntToInt32(v.AuxInt)
  5149  		sym := ssa.AuxToSym(v.Aux)
  5150  		if v_0.Op != ssaop.OpLOONG64ADDV {
  5151  			break
  5152  		}
  5153  		idx := v_0.Args[1]
  5154  		ptr := v_0.Args[0]
  5155  		mem := v_1
  5156  		if !(off == 0 && sym == nil) {
  5157  			break
  5158  		}
  5159  		v.Reset(ssaop.OpLOONG64MOVWloadidx)
  5160  		v.AddArg3(ptr, idx, mem)
  5161  		return true
  5162  	}
  5163  	// match: (MOVWload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  5164  	// cond: off == 0 && sym == nil
  5165  	// result: (MOVWloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  5166  	for {
  5167  		off := ssa.AuxIntToInt32(v.AuxInt)
  5168  		sym := ssa.AuxToSym(v.Aux)
  5169  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  5170  			break
  5171  		}
  5172  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  5173  		idx := v_0.Args[1]
  5174  		ptr := v_0.Args[0]
  5175  		mem := v_1
  5176  		if !(off == 0 && sym == nil) {
  5177  			break
  5178  		}
  5179  		v.Reset(ssaop.OpLOONG64MOVWloadidx)
  5180  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  5181  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  5182  		v0.AddArg(idx)
  5183  		v.AddArg3(ptr, v0, mem)
  5184  		return true
  5185  	}
  5186  	// match: (MOVWload [off] {sym} (SB) _)
  5187  	// cond: ssa.SymIsRO(sym)
  5188  	// result: (MOVVconst [int64(int32(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder)))])
  5189  	for {
  5190  		off := ssa.AuxIntToInt32(v.AuxInt)
  5191  		sym := ssa.AuxToSym(v.Aux)
  5192  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  5193  			break
  5194  		}
  5195  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5196  		v.AuxInt = ssa.Int64ToAuxInt(int64(int32(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder))))
  5197  		return true
  5198  	}
  5199  	return false
  5200  }
  5201  func rewriteValue_OpLOONG64MOVWloadidx(v *ssa.Value) bool {
  5202  	v_2 := v.Args[2]
  5203  	v_1 := v.Args[1]
  5204  	v_0 := v.Args[0]
  5205  	// match: (MOVWloadidx ptr (MOVVconst [c]) mem)
  5206  	// cond: ssa.Is32Bit(c)
  5207  	// result: (MOVWload [int32(c)] ptr mem)
  5208  	for {
  5209  		ptr := v_0
  5210  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5211  			break
  5212  		}
  5213  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5214  		mem := v_2
  5215  		if !(ssa.Is32Bit(c)) {
  5216  			break
  5217  		}
  5218  		v.Reset(ssaop.OpLOONG64MOVWload)
  5219  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5220  		v.AddArg2(ptr, mem)
  5221  		return true
  5222  	}
  5223  	// match: (MOVWloadidx (MOVVconst [c]) ptr mem)
  5224  	// cond: ssa.Is32Bit(c)
  5225  	// result: (MOVWload [int32(c)] ptr mem)
  5226  	for {
  5227  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5228  			break
  5229  		}
  5230  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5231  		ptr := v_1
  5232  		mem := v_2
  5233  		if !(ssa.Is32Bit(c)) {
  5234  			break
  5235  		}
  5236  		v.Reset(ssaop.OpLOONG64MOVWload)
  5237  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5238  		v.AddArg2(ptr, mem)
  5239  		return true
  5240  	}
  5241  	return false
  5242  }
  5243  func rewriteValue_OpLOONG64MOVWreg(v *ssa.Value) bool {
  5244  	v_0 := v.Args[0]
  5245  	// match: (MOVWreg (MOVVconst [c]))
  5246  	// result: (MOVVconst [int64(int32(c))])
  5247  	for {
  5248  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5249  			break
  5250  		}
  5251  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5252  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5253  		v.AuxInt = ssa.Int64ToAuxInt(int64(int32(c)))
  5254  		return true
  5255  	}
  5256  	// match: (MOVWreg x:(ANDconst [c] y))
  5257  	// cond: c >= 0 && int64(int32(c)) == c
  5258  	// result: x
  5259  	for {
  5260  		x := v_0
  5261  		if x.Op != ssaop.OpLOONG64ANDconst {
  5262  			break
  5263  		}
  5264  		c := ssa.AuxIntToInt64(x.AuxInt)
  5265  		if !(c >= 0 && int64(int32(c)) == c) {
  5266  			break
  5267  		}
  5268  		v.CopyOf(x)
  5269  		return true
  5270  	}
  5271  	return false
  5272  }
  5273  func rewriteValue_OpLOONG64MOVWstore(v *ssa.Value) bool {
  5274  	v_2 := v.Args[2]
  5275  	v_1 := v.Args[1]
  5276  	v_0 := v.Args[0]
  5277  	b := v.Block
  5278  	config := b.Func.Config
  5279  	typ := &b.Func.Config.Types
  5280  	// match: (MOVWstore [off] {sym} ptr (MOVWfpgp val) mem)
  5281  	// result: (MOVFstore [off] {sym} ptr val mem)
  5282  	for {
  5283  		off := ssa.AuxIntToInt32(v.AuxInt)
  5284  		sym := ssa.AuxToSym(v.Aux)
  5285  		ptr := v_0
  5286  		if v_1.Op != ssaop.OpLOONG64MOVWfpgp {
  5287  			break
  5288  		}
  5289  		val := v_1.Args[0]
  5290  		mem := v_2
  5291  		v.Reset(ssaop.OpLOONG64MOVFstore)
  5292  		v.AuxInt = ssa.Int32ToAuxInt(off)
  5293  		v.Aux = ssa.SymToAux(sym)
  5294  		v.AddArg3(ptr, val, mem)
  5295  		return true
  5296  	}
  5297  	// match: (MOVWstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  5298  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5299  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
  5300  	for {
  5301  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5302  		sym := ssa.AuxToSym(v.Aux)
  5303  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  5304  			break
  5305  		}
  5306  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  5307  		ptr := v_0.Args[0]
  5308  		val := v_1
  5309  		mem := v_2
  5310  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5311  			break
  5312  		}
  5313  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5314  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5315  		v.Aux = ssa.SymToAux(sym)
  5316  		v.AddArg3(ptr, val, mem)
  5317  		return true
  5318  	}
  5319  	// match: (MOVWstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  5320  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5321  	// result: (MOVWstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  5322  	for {
  5323  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5324  		sym1 := ssa.AuxToSym(v.Aux)
  5325  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  5326  			break
  5327  		}
  5328  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5329  		sym2 := ssa.AuxToSym(v_0.Aux)
  5330  		ptr := v_0.Args[0]
  5331  		val := v_1
  5332  		mem := v_2
  5333  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5334  			break
  5335  		}
  5336  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5337  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5338  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5339  		v.AddArg3(ptr, val, mem)
  5340  		return true
  5341  	}
  5342  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
  5343  	// result: (MOVWstore [off] {sym} ptr x mem)
  5344  	for {
  5345  		off := ssa.AuxIntToInt32(v.AuxInt)
  5346  		sym := ssa.AuxToSym(v.Aux)
  5347  		ptr := v_0
  5348  		if v_1.Op != ssaop.OpLOONG64MOVWreg {
  5349  			break
  5350  		}
  5351  		x := v_1.Args[0]
  5352  		mem := v_2
  5353  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5354  		v.AuxInt = ssa.Int32ToAuxInt(off)
  5355  		v.Aux = ssa.SymToAux(sym)
  5356  		v.AddArg3(ptr, x, mem)
  5357  		return true
  5358  	}
  5359  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
  5360  	// result: (MOVWstore [off] {sym} ptr x mem)
  5361  	for {
  5362  		off := ssa.AuxIntToInt32(v.AuxInt)
  5363  		sym := ssa.AuxToSym(v.Aux)
  5364  		ptr := v_0
  5365  		if v_1.Op != ssaop.OpLOONG64MOVWUreg {
  5366  			break
  5367  		}
  5368  		x := v_1.Args[0]
  5369  		mem := v_2
  5370  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5371  		v.AuxInt = ssa.Int32ToAuxInt(off)
  5372  		v.Aux = ssa.SymToAux(sym)
  5373  		v.AddArg3(ptr, x, mem)
  5374  		return true
  5375  	}
  5376  	// match: (MOVWstore [off] {sym} (ADDV ptr idx) val mem)
  5377  	// cond: off == 0 && sym == nil
  5378  	// result: (MOVWstoreidx ptr idx val mem)
  5379  	for {
  5380  		off := ssa.AuxIntToInt32(v.AuxInt)
  5381  		sym := ssa.AuxToSym(v.Aux)
  5382  		if v_0.Op != ssaop.OpLOONG64ADDV {
  5383  			break
  5384  		}
  5385  		idx := v_0.Args[1]
  5386  		ptr := v_0.Args[0]
  5387  		val := v_1
  5388  		mem := v_2
  5389  		if !(off == 0 && sym == nil) {
  5390  			break
  5391  		}
  5392  		v.Reset(ssaop.OpLOONG64MOVWstoreidx)
  5393  		v.AddArg4(ptr, idx, val, mem)
  5394  		return true
  5395  	}
  5396  	// match: (MOVWstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  5397  	// cond: off == 0 && sym == nil
  5398  	// result: (MOVWstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  5399  	for {
  5400  		off := ssa.AuxIntToInt32(v.AuxInt)
  5401  		sym := ssa.AuxToSym(v.Aux)
  5402  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  5403  			break
  5404  		}
  5405  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  5406  		idx := v_0.Args[1]
  5407  		ptr := v_0.Args[0]
  5408  		val := v_1
  5409  		mem := v_2
  5410  		if !(off == 0 && sym == nil) {
  5411  			break
  5412  		}
  5413  		v.Reset(ssaop.OpLOONG64MOVWstoreidx)
  5414  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  5415  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  5416  		v0.AddArg(idx)
  5417  		v.AddArg4(ptr, v0, val, mem)
  5418  		return true
  5419  	}
  5420  	return false
  5421  }
  5422  func rewriteValue_OpLOONG64MOVWstoreidx(v *ssa.Value) bool {
  5423  	v_3 := v.Args[3]
  5424  	v_2 := v.Args[2]
  5425  	v_1 := v.Args[1]
  5426  	v_0 := v.Args[0]
  5427  	// match: (MOVWstoreidx ptr (MOVVconst [c]) val mem)
  5428  	// cond: ssa.Is32Bit(c)
  5429  	// result: (MOVWstore [int32(c)] ptr val mem)
  5430  	for {
  5431  		ptr := v_0
  5432  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5433  			break
  5434  		}
  5435  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5436  		val := v_2
  5437  		mem := v_3
  5438  		if !(ssa.Is32Bit(c)) {
  5439  			break
  5440  		}
  5441  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5442  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5443  		v.AddArg3(ptr, val, mem)
  5444  		return true
  5445  	}
  5446  	// match: (MOVWstoreidx (MOVVconst [c]) idx val mem)
  5447  	// cond: ssa.Is32Bit(c)
  5448  	// result: (MOVWstore [int32(c)] idx val mem)
  5449  	for {
  5450  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5451  			break
  5452  		}
  5453  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5454  		idx := v_1
  5455  		val := v_2
  5456  		mem := v_3
  5457  		if !(ssa.Is32Bit(c)) {
  5458  			break
  5459  		}
  5460  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5461  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5462  		v.AddArg3(idx, val, mem)
  5463  		return true
  5464  	}
  5465  	return false
  5466  }
  5467  func rewriteValue_OpLOONG64MULV(v *ssa.Value) bool {
  5468  	v_1 := v.Args[1]
  5469  	v_0 := v.Args[0]
  5470  	b := v.Block
  5471  	config := b.Func.Config
  5472  	// match: (MULV r:(MOVWUreg x) s:(MOVWUreg y))
  5473  	// cond: r.Uses == 1 && s.Uses == 1
  5474  	// result: (MULWVWU x y)
  5475  	for {
  5476  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5477  			r := v_0
  5478  			if r.Op != ssaop.OpLOONG64MOVWUreg {
  5479  				continue
  5480  			}
  5481  			x := r.Args[0]
  5482  			s := v_1
  5483  			if s.Op != ssaop.OpLOONG64MOVWUreg {
  5484  				continue
  5485  			}
  5486  			y := s.Args[0]
  5487  			if !(r.Uses == 1 && s.Uses == 1) {
  5488  				continue
  5489  			}
  5490  			v.Reset(ssaop.OpLOONG64MULWVWU)
  5491  			v.AddArg2(x, y)
  5492  			return true
  5493  		}
  5494  		break
  5495  	}
  5496  	// match: (MULV r:(MOVWreg x) s:(MOVWreg y))
  5497  	// cond: r.Uses == 1 && s.Uses == 1
  5498  	// result: (MULWVW x y)
  5499  	for {
  5500  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5501  			r := v_0
  5502  			if r.Op != ssaop.OpLOONG64MOVWreg {
  5503  				continue
  5504  			}
  5505  			x := r.Args[0]
  5506  			s := v_1
  5507  			if s.Op != ssaop.OpLOONG64MOVWreg {
  5508  				continue
  5509  			}
  5510  			y := s.Args[0]
  5511  			if !(r.Uses == 1 && s.Uses == 1) {
  5512  				continue
  5513  			}
  5514  			v.Reset(ssaop.OpLOONG64MULWVW)
  5515  			v.AddArg2(x, y)
  5516  			return true
  5517  		}
  5518  		break
  5519  	}
  5520  	// match: (MULV _ (MOVVconst [0]))
  5521  	// result: (MOVVconst [0])
  5522  	for {
  5523  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5524  			if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  5525  				continue
  5526  			}
  5527  			v.Reset(ssaop.OpLOONG64MOVVconst)
  5528  			v.AuxInt = ssa.Int64ToAuxInt(0)
  5529  			return true
  5530  		}
  5531  		break
  5532  	}
  5533  	// match: (MULV x (MOVVconst [1]))
  5534  	// result: x
  5535  	for {
  5536  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5537  			x := v_0
  5538  			if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 1 {
  5539  				continue
  5540  			}
  5541  			v.CopyOf(x)
  5542  			return true
  5543  		}
  5544  		break
  5545  	}
  5546  	// match: (MULV x (MOVVconst [c]))
  5547  	// cond: ssa.CanMulStrengthReduce(config, c)
  5548  	// result: {ssa.MulStrengthReduce(v, x, c)}
  5549  	for {
  5550  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5551  			x := v_0
  5552  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5553  				continue
  5554  			}
  5555  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  5556  			if !(ssa.CanMulStrengthReduce(config, c)) {
  5557  				continue
  5558  			}
  5559  			v.CopyOf(ssa.MulStrengthReduce(v, x, c))
  5560  			return true
  5561  		}
  5562  		break
  5563  	}
  5564  	// match: (MULV (MOVVconst [c]) (MOVVconst [d]))
  5565  	// result: (MOVVconst [c*d])
  5566  	for {
  5567  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5568  			if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5569  				continue
  5570  			}
  5571  			c := ssa.AuxIntToInt64(v_0.AuxInt)
  5572  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5573  				continue
  5574  			}
  5575  			d := ssa.AuxIntToInt64(v_1.AuxInt)
  5576  			v.Reset(ssaop.OpLOONG64MOVVconst)
  5577  			v.AuxInt = ssa.Int64ToAuxInt(c * d)
  5578  			return true
  5579  		}
  5580  		break
  5581  	}
  5582  	return false
  5583  }
  5584  func rewriteValue_OpLOONG64NEGV(v *ssa.Value) bool {
  5585  	v_0 := v.Args[0]
  5586  	b := v.Block
  5587  	// match: (NEGV (SUBV x y))
  5588  	// result: (SUBV y x)
  5589  	for {
  5590  		if v_0.Op != ssaop.OpLOONG64SUBV {
  5591  			break
  5592  		}
  5593  		y := v_0.Args[1]
  5594  		x := v_0.Args[0]
  5595  		v.Reset(ssaop.OpLOONG64SUBV)
  5596  		v.AddArg2(y, x)
  5597  		return true
  5598  	}
  5599  	// match: (NEGV <t> s:(ADDVconst [c] (SUBV x y)))
  5600  	// cond: s.Uses == 1 && ssa.Is12Bit(-c)
  5601  	// result: (ADDVconst [-c] (SUBV <t> y x))
  5602  	for {
  5603  		t := v.Type
  5604  		s := v_0
  5605  		if s.Op != ssaop.OpLOONG64ADDVconst {
  5606  			break
  5607  		}
  5608  		c := ssa.AuxIntToInt64(s.AuxInt)
  5609  		s_0 := s.Args[0]
  5610  		if s_0.Op != ssaop.OpLOONG64SUBV {
  5611  			break
  5612  		}
  5613  		y := s_0.Args[1]
  5614  		x := s_0.Args[0]
  5615  		if !(s.Uses == 1 && ssa.Is12Bit(-c)) {
  5616  			break
  5617  		}
  5618  		v.Reset(ssaop.OpLOONG64ADDVconst)
  5619  		v.AuxInt = ssa.Int64ToAuxInt(-c)
  5620  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
  5621  		v0.AddArg2(y, x)
  5622  		v.AddArg(v0)
  5623  		return true
  5624  	}
  5625  	// match: (NEGV (NEGV x))
  5626  	// result: x
  5627  	for {
  5628  		if v_0.Op != ssaop.OpLOONG64NEGV {
  5629  			break
  5630  		}
  5631  		x := v_0.Args[0]
  5632  		v.CopyOf(x)
  5633  		return true
  5634  	}
  5635  	// match: (NEGV <t> s:(ADDVconst [c] (NEGV x)))
  5636  	// cond: s.Uses == 1 && ssa.Is12Bit(-c)
  5637  	// result: (ADDVconst [-c] x)
  5638  	for {
  5639  		s := v_0
  5640  		if s.Op != ssaop.OpLOONG64ADDVconst {
  5641  			break
  5642  		}
  5643  		c := ssa.AuxIntToInt64(s.AuxInt)
  5644  		s_0 := s.Args[0]
  5645  		if s_0.Op != ssaop.OpLOONG64NEGV {
  5646  			break
  5647  		}
  5648  		x := s_0.Args[0]
  5649  		if !(s.Uses == 1 && ssa.Is12Bit(-c)) {
  5650  			break
  5651  		}
  5652  		v.Reset(ssaop.OpLOONG64ADDVconst)
  5653  		v.AuxInt = ssa.Int64ToAuxInt(-c)
  5654  		v.AddArg(x)
  5655  		return true
  5656  	}
  5657  	// match: (NEGV (MOVVconst [c]))
  5658  	// result: (MOVVconst [-c])
  5659  	for {
  5660  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5661  			break
  5662  		}
  5663  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5664  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5665  		v.AuxInt = ssa.Int64ToAuxInt(-c)
  5666  		return true
  5667  	}
  5668  	return false
  5669  }
  5670  func rewriteValue_OpLOONG64NOR(v *ssa.Value) bool {
  5671  	v_1 := v.Args[1]
  5672  	v_0 := v.Args[0]
  5673  	// match: (NOR x (MOVVconst [c]))
  5674  	// cond: ssa.Is32Bit(c)
  5675  	// result: (NORconst [c] x)
  5676  	for {
  5677  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5678  			x := v_0
  5679  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5680  				continue
  5681  			}
  5682  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  5683  			if !(ssa.Is32Bit(c)) {
  5684  				continue
  5685  			}
  5686  			v.Reset(ssaop.OpLOONG64NORconst)
  5687  			v.AuxInt = ssa.Int64ToAuxInt(c)
  5688  			v.AddArg(x)
  5689  			return true
  5690  		}
  5691  		break
  5692  	}
  5693  	return false
  5694  }
  5695  func rewriteValue_OpLOONG64NORconst(v *ssa.Value) bool {
  5696  	v_0 := v.Args[0]
  5697  	// match: (NORconst [c] (MOVVconst [d]))
  5698  	// result: (MOVVconst [^(c|d)])
  5699  	for {
  5700  		c := ssa.AuxIntToInt64(v.AuxInt)
  5701  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5702  			break
  5703  		}
  5704  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  5705  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5706  		v.AuxInt = ssa.Int64ToAuxInt(^(c | d))
  5707  		return true
  5708  	}
  5709  	return false
  5710  }
  5711  func rewriteValue_OpLOONG64OR(v *ssa.Value) bool {
  5712  	v_1 := v.Args[1]
  5713  	v_0 := v.Args[0]
  5714  	b := v.Block
  5715  	typ := &b.Func.Config.Types
  5716  	// match: (OR <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  5717  	// result: (REVB2H x)
  5718  	for {
  5719  		if v.Type != typ.UInt16 {
  5720  			break
  5721  		}
  5722  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5723  			if v_0.Op != ssaop.OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  5724  				continue
  5725  			}
  5726  			x := v_0.Args[0]
  5727  			if v_1.Op != ssaop.OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || ssa.AuxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  5728  				continue
  5729  			}
  5730  			v.Reset(ssaop.OpLOONG64REVB2H)
  5731  			v.AddArg(x)
  5732  			return true
  5733  		}
  5734  		break
  5735  	}
  5736  	// match: (OR (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  5737  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  5738  	// result: (REVB2H x)
  5739  	for {
  5740  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5741  			if v_0.Op != ssaop.OpLOONG64SRLconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  5742  				continue
  5743  			}
  5744  			v_0_0 := v_0.Args[0]
  5745  			if v_0_0.Op != ssaop.OpLOONG64ANDconst {
  5746  				continue
  5747  			}
  5748  			c1 := ssa.AuxIntToInt64(v_0_0.AuxInt)
  5749  			x := v_0_0.Args[0]
  5750  			if v_1.Op != ssaop.OpLOONG64SLLconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  5751  				continue
  5752  			}
  5753  			v_1_0 := v_1.Args[0]
  5754  			if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  5755  				continue
  5756  			}
  5757  			c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  5758  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  5759  				continue
  5760  			}
  5761  			v.Reset(ssaop.OpLOONG64REVB2H)
  5762  			v.AddArg(x)
  5763  			return true
  5764  		}
  5765  		break
  5766  	}
  5767  	// match: (OR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  5768  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  5769  	// result: (REVB4H x)
  5770  	for {
  5771  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5772  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  5773  				continue
  5774  			}
  5775  			v_0_0 := v_0.Args[0]
  5776  			if v_0_0.Op != ssaop.OpLOONG64AND {
  5777  				continue
  5778  			}
  5779  			_ = v_0_0.Args[1]
  5780  			v_0_0_0 := v_0_0.Args[0]
  5781  			v_0_0_1 := v_0_0.Args[1]
  5782  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  5783  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  5784  					continue
  5785  				}
  5786  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  5787  				x := v_0_0_1
  5788  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  5789  					continue
  5790  				}
  5791  				v_1_0 := v_1.Args[0]
  5792  				if v_1_0.Op != ssaop.OpLOONG64AND {
  5793  					continue
  5794  				}
  5795  				_ = v_1_0.Args[1]
  5796  				v_1_0_0 := v_1_0.Args[0]
  5797  				v_1_0_1 := v_1_0.Args[1]
  5798  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  5799  					if v_1_0_0.Op != ssaop.OpLOONG64MOVVconst {
  5800  						continue
  5801  					}
  5802  					c2 := ssa.AuxIntToInt64(v_1_0_0.AuxInt)
  5803  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  5804  						continue
  5805  					}
  5806  					v.Reset(ssaop.OpLOONG64REVB4H)
  5807  					v.AddArg(x)
  5808  					return true
  5809  				}
  5810  			}
  5811  		}
  5812  		break
  5813  	}
  5814  	// match: (OR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  5815  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  5816  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  5817  	for {
  5818  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5819  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  5820  				continue
  5821  			}
  5822  			v_0_0 := v_0.Args[0]
  5823  			if v_0_0.Op != ssaop.OpLOONG64AND {
  5824  				continue
  5825  			}
  5826  			_ = v_0_0.Args[1]
  5827  			v_0_0_0 := v_0_0.Args[0]
  5828  			v_0_0_1 := v_0_0.Args[1]
  5829  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  5830  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  5831  					continue
  5832  				}
  5833  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  5834  				x := v_0_0_1
  5835  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  5836  					continue
  5837  				}
  5838  				v_1_0 := v_1.Args[0]
  5839  				if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  5840  					continue
  5841  				}
  5842  				c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  5843  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  5844  					continue
  5845  				}
  5846  				v.Reset(ssaop.OpLOONG64REVB4H)
  5847  				v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, x.Type)
  5848  				v0.AuxInt = ssa.Int64ToAuxInt(0xffffffff)
  5849  				v0.AddArg(x)
  5850  				v.AddArg(v0)
  5851  				return true
  5852  			}
  5853  		}
  5854  		break
  5855  	}
  5856  	// match: (OR x (MOVVconst [c]))
  5857  	// cond: ssa.Is32Bit(c)
  5858  	// result: (ORconst [c] x)
  5859  	for {
  5860  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5861  			x := v_0
  5862  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5863  				continue
  5864  			}
  5865  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  5866  			if !(ssa.Is32Bit(c)) {
  5867  				continue
  5868  			}
  5869  			v.Reset(ssaop.OpLOONG64ORconst)
  5870  			v.AuxInt = ssa.Int64ToAuxInt(c)
  5871  			v.AddArg(x)
  5872  			return true
  5873  		}
  5874  		break
  5875  	}
  5876  	// match: (OR x x)
  5877  	// result: x
  5878  	for {
  5879  		x := v_0
  5880  		if x != v_1 {
  5881  			break
  5882  		}
  5883  		v.CopyOf(x)
  5884  		return true
  5885  	}
  5886  	// match: (OR x (NORconst [0] y))
  5887  	// result: (ORN x y)
  5888  	for {
  5889  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5890  			x := v_0
  5891  			if v_1.Op != ssaop.OpLOONG64NORconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  5892  				continue
  5893  			}
  5894  			y := v_1.Args[0]
  5895  			v.Reset(ssaop.OpLOONG64ORN)
  5896  			v.AddArg2(x, y)
  5897  			return true
  5898  		}
  5899  		break
  5900  	}
  5901  	return false
  5902  }
  5903  func rewriteValue_OpLOONG64ORN(v *ssa.Value) bool {
  5904  	v_1 := v.Args[1]
  5905  	v_0 := v.Args[0]
  5906  	// match: (ORN x (MOVVconst [-1]))
  5907  	// result: x
  5908  	for {
  5909  		x := v_0
  5910  		if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != -1 {
  5911  			break
  5912  		}
  5913  		v.CopyOf(x)
  5914  		return true
  5915  	}
  5916  	return false
  5917  }
  5918  func rewriteValue_OpLOONG64ORconst(v *ssa.Value) bool {
  5919  	v_0 := v.Args[0]
  5920  	// match: (ORconst [0] x)
  5921  	// result: x
  5922  	for {
  5923  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  5924  			break
  5925  		}
  5926  		x := v_0
  5927  		v.CopyOf(x)
  5928  		return true
  5929  	}
  5930  	// match: (ORconst [-1] _)
  5931  	// result: (MOVVconst [-1])
  5932  	for {
  5933  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
  5934  			break
  5935  		}
  5936  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5937  		v.AuxInt = ssa.Int64ToAuxInt(-1)
  5938  		return true
  5939  	}
  5940  	// match: (ORconst [c] (MOVVconst [d]))
  5941  	// result: (MOVVconst [c|d])
  5942  	for {
  5943  		c := ssa.AuxIntToInt64(v.AuxInt)
  5944  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5945  			break
  5946  		}
  5947  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  5948  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5949  		v.AuxInt = ssa.Int64ToAuxInt(c | d)
  5950  		return true
  5951  	}
  5952  	// match: (ORconst [c] (ORconst [d] x))
  5953  	// cond: ssa.Is32Bit(c|d)
  5954  	// result: (ORconst [c|d] x)
  5955  	for {
  5956  		c := ssa.AuxIntToInt64(v.AuxInt)
  5957  		if v_0.Op != ssaop.OpLOONG64ORconst {
  5958  			break
  5959  		}
  5960  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  5961  		x := v_0.Args[0]
  5962  		if !(ssa.Is32Bit(c | d)) {
  5963  			break
  5964  		}
  5965  		v.Reset(ssaop.OpLOONG64ORconst)
  5966  		v.AuxInt = ssa.Int64ToAuxInt(c | d)
  5967  		v.AddArg(x)
  5968  		return true
  5969  	}
  5970  	return false
  5971  }
  5972  func rewriteValue_OpLOONG64REMV(v *ssa.Value) bool {
  5973  	v_1 := v.Args[1]
  5974  	v_0 := v.Args[0]
  5975  	// match: (REMV (MOVVconst [c]) (MOVVconst [d]))
  5976  	// cond: d != 0
  5977  	// result: (MOVVconst [c%d])
  5978  	for {
  5979  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5980  			break
  5981  		}
  5982  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5983  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5984  			break
  5985  		}
  5986  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  5987  		if !(d != 0) {
  5988  			break
  5989  		}
  5990  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5991  		v.AuxInt = ssa.Int64ToAuxInt(c % d)
  5992  		return true
  5993  	}
  5994  	return false
  5995  }
  5996  func rewriteValue_OpLOONG64REMVU(v *ssa.Value) bool {
  5997  	v_1 := v.Args[1]
  5998  	v_0 := v.Args[0]
  5999  	// match: (REMVU _ (MOVVconst [1]))
  6000  	// result: (MOVVconst [0])
  6001  	for {
  6002  		if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 1 {
  6003  			break
  6004  		}
  6005  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6006  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6007  		return true
  6008  	}
  6009  	// match: (REMVU x (MOVVconst [c]))
  6010  	// cond: ssa.IsPowerOfTwo(c)
  6011  	// result: (ANDconst [c-1] x)
  6012  	for {
  6013  		x := v_0
  6014  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6015  			break
  6016  		}
  6017  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6018  		if !(ssa.IsPowerOfTwo(c)) {
  6019  			break
  6020  		}
  6021  		v.Reset(ssaop.OpLOONG64ANDconst)
  6022  		v.AuxInt = ssa.Int64ToAuxInt(c - 1)
  6023  		v.AddArg(x)
  6024  		return true
  6025  	}
  6026  	// match: (REMVU (MOVVconst [c]) (MOVVconst [d]))
  6027  	// cond: d != 0
  6028  	// result: (MOVVconst [int64(uint64(c)%uint64(d))])
  6029  	for {
  6030  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6031  			break
  6032  		}
  6033  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6034  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6035  			break
  6036  		}
  6037  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  6038  		if !(d != 0) {
  6039  			break
  6040  		}
  6041  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6042  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint64(c) % uint64(d)))
  6043  		return true
  6044  	}
  6045  	return false
  6046  }
  6047  func rewriteValue_OpLOONG64ROTR(v *ssa.Value) bool {
  6048  	v_1 := v.Args[1]
  6049  	v_0 := v.Args[0]
  6050  	// match: (ROTR x (MOVVconst [c]))
  6051  	// result: (ROTRconst x [c&31])
  6052  	for {
  6053  		x := v_0
  6054  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6055  			break
  6056  		}
  6057  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6058  		v.Reset(ssaop.OpLOONG64ROTRconst)
  6059  		v.AuxInt = ssa.Int64ToAuxInt(c & 31)
  6060  		v.AddArg(x)
  6061  		return true
  6062  	}
  6063  	return false
  6064  }
  6065  func rewriteValue_OpLOONG64ROTRV(v *ssa.Value) bool {
  6066  	v_1 := v.Args[1]
  6067  	v_0 := v.Args[0]
  6068  	// match: (ROTRV x (MOVVconst [c]))
  6069  	// result: (ROTRVconst x [c&63])
  6070  	for {
  6071  		x := v_0
  6072  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6073  			break
  6074  		}
  6075  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6076  		v.Reset(ssaop.OpLOONG64ROTRVconst)
  6077  		v.AuxInt = ssa.Int64ToAuxInt(c & 63)
  6078  		v.AddArg(x)
  6079  		return true
  6080  	}
  6081  	return false
  6082  }
  6083  func rewriteValue_OpLOONG64SGT(v *ssa.Value) bool {
  6084  	v_1 := v.Args[1]
  6085  	v_0 := v.Args[0]
  6086  	b := v.Block
  6087  	typ := &b.Func.Config.Types
  6088  	// match: (SGT (MOVVconst [c]) (NEGV (SUBVconst [d] x)))
  6089  	// cond: ssa.Is32Bit(d-c)
  6090  	// result: (SGT x (MOVVconst [d-c]))
  6091  	for {
  6092  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6093  			break
  6094  		}
  6095  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6096  		if v_1.Op != ssaop.OpLOONG64NEGV {
  6097  			break
  6098  		}
  6099  		v_1_0 := v_1.Args[0]
  6100  		if v_1_0.Op != ssaop.OpLOONG64SUBVconst {
  6101  			break
  6102  		}
  6103  		d := ssa.AuxIntToInt64(v_1_0.AuxInt)
  6104  		x := v_1_0.Args[0]
  6105  		if !(ssa.Is32Bit(d - c)) {
  6106  			break
  6107  		}
  6108  		v.Reset(ssaop.OpLOONG64SGT)
  6109  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  6110  		v0.AuxInt = ssa.Int64ToAuxInt(d - c)
  6111  		v.AddArg2(x, v0)
  6112  		return true
  6113  	}
  6114  	// match: (SGT (MOVVconst [c]) x)
  6115  	// cond: ssa.Is32Bit(c)
  6116  	// result: (SGTconst [c] x)
  6117  	for {
  6118  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6119  			break
  6120  		}
  6121  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6122  		x := v_1
  6123  		if !(ssa.Is32Bit(c)) {
  6124  			break
  6125  		}
  6126  		v.Reset(ssaop.OpLOONG64SGTconst)
  6127  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6128  		v.AddArg(x)
  6129  		return true
  6130  	}
  6131  	// match: (SGT x x)
  6132  	// result: (MOVVconst [0])
  6133  	for {
  6134  		x := v_0
  6135  		if x != v_1 {
  6136  			break
  6137  		}
  6138  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6139  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6140  		return true
  6141  	}
  6142  	return false
  6143  }
  6144  func rewriteValue_OpLOONG64SGTU(v *ssa.Value) bool {
  6145  	v_1 := v.Args[1]
  6146  	v_0 := v.Args[0]
  6147  	// match: (SGTU (MOVVconst [c]) x)
  6148  	// cond: ssa.Is32Bit(c)
  6149  	// result: (SGTUconst [c] x)
  6150  	for {
  6151  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6152  			break
  6153  		}
  6154  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6155  		x := v_1
  6156  		if !(ssa.Is32Bit(c)) {
  6157  			break
  6158  		}
  6159  		v.Reset(ssaop.OpLOONG64SGTUconst)
  6160  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6161  		v.AddArg(x)
  6162  		return true
  6163  	}
  6164  	// match: (SGTU x x)
  6165  	// result: (MOVVconst [0])
  6166  	for {
  6167  		x := v_0
  6168  		if x != v_1 {
  6169  			break
  6170  		}
  6171  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6172  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6173  		return true
  6174  	}
  6175  	return false
  6176  }
  6177  func rewriteValue_OpLOONG64SGTUconst(v *ssa.Value) bool {
  6178  	v_0 := v.Args[0]
  6179  	// match: (SGTUconst [c] (MOVVconst [d]))
  6180  	// cond: uint64(c)>uint64(d)
  6181  	// result: (MOVVconst [1])
  6182  	for {
  6183  		c := ssa.AuxIntToInt64(v.AuxInt)
  6184  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6185  			break
  6186  		}
  6187  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6188  		if !(uint64(c) > uint64(d)) {
  6189  			break
  6190  		}
  6191  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6192  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6193  		return true
  6194  	}
  6195  	// match: (SGTUconst [c] (MOVVconst [d]))
  6196  	// cond: uint64(c)<=uint64(d)
  6197  	// result: (MOVVconst [0])
  6198  	for {
  6199  		c := ssa.AuxIntToInt64(v.AuxInt)
  6200  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6201  			break
  6202  		}
  6203  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6204  		if !(uint64(c) <= uint64(d)) {
  6205  			break
  6206  		}
  6207  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6208  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6209  		return true
  6210  	}
  6211  	// match: (SGTUconst [c] (MOVBUreg _))
  6212  	// cond: 0xff < uint64(c)
  6213  	// result: (MOVVconst [1])
  6214  	for {
  6215  		c := ssa.AuxIntToInt64(v.AuxInt)
  6216  		if v_0.Op != ssaop.OpLOONG64MOVBUreg || !(0xff < uint64(c)) {
  6217  			break
  6218  		}
  6219  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6220  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6221  		return true
  6222  	}
  6223  	// match: (SGTUconst [c] (MOVHUreg _))
  6224  	// cond: 0xffff < uint64(c)
  6225  	// result: (MOVVconst [1])
  6226  	for {
  6227  		c := ssa.AuxIntToInt64(v.AuxInt)
  6228  		if v_0.Op != ssaop.OpLOONG64MOVHUreg || !(0xffff < uint64(c)) {
  6229  			break
  6230  		}
  6231  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6232  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6233  		return true
  6234  	}
  6235  	// match: (SGTUconst [c] (ANDconst [m] _))
  6236  	// cond: uint64(m) < uint64(c)
  6237  	// result: (MOVVconst [1])
  6238  	for {
  6239  		c := ssa.AuxIntToInt64(v.AuxInt)
  6240  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  6241  			break
  6242  		}
  6243  		m := ssa.AuxIntToInt64(v_0.AuxInt)
  6244  		if !(uint64(m) < uint64(c)) {
  6245  			break
  6246  		}
  6247  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6248  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6249  		return true
  6250  	}
  6251  	// match: (SGTUconst [c] (SRLVconst _ [d]))
  6252  	// cond: 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)
  6253  	// result: (MOVVconst [1])
  6254  	for {
  6255  		c := ssa.AuxIntToInt64(v.AuxInt)
  6256  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  6257  			break
  6258  		}
  6259  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6260  		if !(0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
  6261  			break
  6262  		}
  6263  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6264  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6265  		return true
  6266  	}
  6267  	return false
  6268  }
  6269  func rewriteValue_OpLOONG64SGTconst(v *ssa.Value) bool {
  6270  	v_0 := v.Args[0]
  6271  	// match: (SGTconst [c] (MOVVconst [d]))
  6272  	// cond: c>d
  6273  	// result: (MOVVconst [1])
  6274  	for {
  6275  		c := ssa.AuxIntToInt64(v.AuxInt)
  6276  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6277  			break
  6278  		}
  6279  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6280  		if !(c > d) {
  6281  			break
  6282  		}
  6283  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6284  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6285  		return true
  6286  	}
  6287  	// match: (SGTconst [c] (MOVVconst [d]))
  6288  	// cond: c<=d
  6289  	// result: (MOVVconst [0])
  6290  	for {
  6291  		c := ssa.AuxIntToInt64(v.AuxInt)
  6292  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6293  			break
  6294  		}
  6295  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6296  		if !(c <= d) {
  6297  			break
  6298  		}
  6299  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6300  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6301  		return true
  6302  	}
  6303  	// match: (SGTconst [c] (MOVBreg _))
  6304  	// cond: 0x7f < c
  6305  	// result: (MOVVconst [1])
  6306  	for {
  6307  		c := ssa.AuxIntToInt64(v.AuxInt)
  6308  		if v_0.Op != ssaop.OpLOONG64MOVBreg || !(0x7f < c) {
  6309  			break
  6310  		}
  6311  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6312  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6313  		return true
  6314  	}
  6315  	// match: (SGTconst [c] (MOVBreg _))
  6316  	// cond: c <= -0x80
  6317  	// result: (MOVVconst [0])
  6318  	for {
  6319  		c := ssa.AuxIntToInt64(v.AuxInt)
  6320  		if v_0.Op != ssaop.OpLOONG64MOVBreg || !(c <= -0x80) {
  6321  			break
  6322  		}
  6323  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6324  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6325  		return true
  6326  	}
  6327  	// match: (SGTconst [c] (MOVBUreg _))
  6328  	// cond: 0xff < c
  6329  	// result: (MOVVconst [1])
  6330  	for {
  6331  		c := ssa.AuxIntToInt64(v.AuxInt)
  6332  		if v_0.Op != ssaop.OpLOONG64MOVBUreg || !(0xff < c) {
  6333  			break
  6334  		}
  6335  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6336  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6337  		return true
  6338  	}
  6339  	// match: (SGTconst [c] (MOVBUreg _))
  6340  	// cond: c < 0
  6341  	// result: (MOVVconst [0])
  6342  	for {
  6343  		c := ssa.AuxIntToInt64(v.AuxInt)
  6344  		if v_0.Op != ssaop.OpLOONG64MOVBUreg || !(c < 0) {
  6345  			break
  6346  		}
  6347  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6348  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6349  		return true
  6350  	}
  6351  	// match: (SGTconst [c] (MOVHreg _))
  6352  	// cond: 0x7fff < c
  6353  	// result: (MOVVconst [1])
  6354  	for {
  6355  		c := ssa.AuxIntToInt64(v.AuxInt)
  6356  		if v_0.Op != ssaop.OpLOONG64MOVHreg || !(0x7fff < c) {
  6357  			break
  6358  		}
  6359  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6360  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6361  		return true
  6362  	}
  6363  	// match: (SGTconst [c] (MOVHreg _))
  6364  	// cond: c <= -0x8000
  6365  	// result: (MOVVconst [0])
  6366  	for {
  6367  		c := ssa.AuxIntToInt64(v.AuxInt)
  6368  		if v_0.Op != ssaop.OpLOONG64MOVHreg || !(c <= -0x8000) {
  6369  			break
  6370  		}
  6371  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6372  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6373  		return true
  6374  	}
  6375  	// match: (SGTconst [c] (MOVHUreg _))
  6376  	// cond: 0xffff < c
  6377  	// result: (MOVVconst [1])
  6378  	for {
  6379  		c := ssa.AuxIntToInt64(v.AuxInt)
  6380  		if v_0.Op != ssaop.OpLOONG64MOVHUreg || !(0xffff < c) {
  6381  			break
  6382  		}
  6383  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6384  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6385  		return true
  6386  	}
  6387  	// match: (SGTconst [c] (MOVHUreg _))
  6388  	// cond: c < 0
  6389  	// result: (MOVVconst [0])
  6390  	for {
  6391  		c := ssa.AuxIntToInt64(v.AuxInt)
  6392  		if v_0.Op != ssaop.OpLOONG64MOVHUreg || !(c < 0) {
  6393  			break
  6394  		}
  6395  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6396  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6397  		return true
  6398  	}
  6399  	// match: (SGTconst [c] (MOVWUreg _))
  6400  	// cond: c < 0
  6401  	// result: (MOVVconst [0])
  6402  	for {
  6403  		c := ssa.AuxIntToInt64(v.AuxInt)
  6404  		if v_0.Op != ssaop.OpLOONG64MOVWUreg || !(c < 0) {
  6405  			break
  6406  		}
  6407  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6408  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6409  		return true
  6410  	}
  6411  	// match: (SGTconst [c] (ANDconst [m] _))
  6412  	// cond: 0 <= m && m < c
  6413  	// result: (MOVVconst [1])
  6414  	for {
  6415  		c := ssa.AuxIntToInt64(v.AuxInt)
  6416  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  6417  			break
  6418  		}
  6419  		m := ssa.AuxIntToInt64(v_0.AuxInt)
  6420  		if !(0 <= m && m < c) {
  6421  			break
  6422  		}
  6423  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6424  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6425  		return true
  6426  	}
  6427  	// match: (SGTconst [c] (SRLVconst _ [d]))
  6428  	// cond: 0 <= c && 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)
  6429  	// result: (MOVVconst [1])
  6430  	for {
  6431  		c := ssa.AuxIntToInt64(v.AuxInt)
  6432  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  6433  			break
  6434  		}
  6435  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6436  		if !(0 <= c && 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
  6437  			break
  6438  		}
  6439  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6440  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6441  		return true
  6442  	}
  6443  	return false
  6444  }
  6445  func rewriteValue_OpLOONG64SLL(v *ssa.Value) bool {
  6446  	v_1 := v.Args[1]
  6447  	v_0 := v.Args[0]
  6448  	// match: (SLL _ (MOVVconst [c]))
  6449  	// cond: uint64(c)>=32
  6450  	// result: (MOVVconst [0])
  6451  	for {
  6452  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6453  			break
  6454  		}
  6455  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6456  		if !(uint64(c) >= 32) {
  6457  			break
  6458  		}
  6459  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6460  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6461  		return true
  6462  	}
  6463  	// match: (SLL x (MOVVconst [c]))
  6464  	// cond: uint64(c) >=0 && uint64(c) <=31
  6465  	// result: (SLLconst x [c])
  6466  	for {
  6467  		x := v_0
  6468  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6469  			break
  6470  		}
  6471  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6472  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  6473  			break
  6474  		}
  6475  		v.Reset(ssaop.OpLOONG64SLLconst)
  6476  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6477  		v.AddArg(x)
  6478  		return true
  6479  	}
  6480  	// match: (SLL x (ANDconst [31] y))
  6481  	// result: (SLL x y)
  6482  	for {
  6483  		x := v_0
  6484  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 31 {
  6485  			break
  6486  		}
  6487  		y := v_1.Args[0]
  6488  		v.Reset(ssaop.OpLOONG64SLL)
  6489  		v.AddArg2(x, y)
  6490  		return true
  6491  	}
  6492  	return false
  6493  }
  6494  func rewriteValue_OpLOONG64SLLV(v *ssa.Value) bool {
  6495  	v_1 := v.Args[1]
  6496  	v_0 := v.Args[0]
  6497  	// match: (SLLV _ (MOVVconst [c]))
  6498  	// cond: uint64(c)>=64
  6499  	// result: (MOVVconst [0])
  6500  	for {
  6501  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6502  			break
  6503  		}
  6504  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6505  		if !(uint64(c) >= 64) {
  6506  			break
  6507  		}
  6508  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6509  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6510  		return true
  6511  	}
  6512  	// match: (SLLV x (MOVVconst [c]))
  6513  	// result: (SLLVconst x [c])
  6514  	for {
  6515  		x := v_0
  6516  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6517  			break
  6518  		}
  6519  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6520  		v.Reset(ssaop.OpLOONG64SLLVconst)
  6521  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6522  		v.AddArg(x)
  6523  		return true
  6524  	}
  6525  	// match: (SLLV x (ANDconst [63] y))
  6526  	// result: (SLLV x y)
  6527  	for {
  6528  		x := v_0
  6529  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 63 {
  6530  			break
  6531  		}
  6532  		y := v_1.Args[0]
  6533  		v.Reset(ssaop.OpLOONG64SLLV)
  6534  		v.AddArg2(x, y)
  6535  		return true
  6536  	}
  6537  	return false
  6538  }
  6539  func rewriteValue_OpLOONG64SLLVconst(v *ssa.Value) bool {
  6540  	v_0 := v.Args[0]
  6541  	// match: (SLLVconst <t> [c] (ADDV x x))
  6542  	// cond: c < t.Size() * 8 - 1
  6543  	// result: (SLLVconst [c+1] x)
  6544  	for {
  6545  		t := v.Type
  6546  		c := ssa.AuxIntToInt64(v.AuxInt)
  6547  		if v_0.Op != ssaop.OpLOONG64ADDV {
  6548  			break
  6549  		}
  6550  		x := v_0.Args[1]
  6551  		if x != v_0.Args[0] || !(c < t.Size()*8-1) {
  6552  			break
  6553  		}
  6554  		v.Reset(ssaop.OpLOONG64SLLVconst)
  6555  		v.AuxInt = ssa.Int64ToAuxInt(c + 1)
  6556  		v.AddArg(x)
  6557  		return true
  6558  	}
  6559  	// match: (SLLVconst <t> [c] (ADDV x x))
  6560  	// cond: c >= t.Size() * 8 - 1
  6561  	// result: (MOVVconst [0])
  6562  	for {
  6563  		t := v.Type
  6564  		c := ssa.AuxIntToInt64(v.AuxInt)
  6565  		if v_0.Op != ssaop.OpLOONG64ADDV {
  6566  			break
  6567  		}
  6568  		x := v_0.Args[1]
  6569  		if x != v_0.Args[0] || !(c >= t.Size()*8-1) {
  6570  			break
  6571  		}
  6572  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6573  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6574  		return true
  6575  	}
  6576  	// match: (SLLVconst [c] (MOVVconst [d]))
  6577  	// result: (MOVVconst [d<<uint64(c)])
  6578  	for {
  6579  		c := ssa.AuxIntToInt64(v.AuxInt)
  6580  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6581  			break
  6582  		}
  6583  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6584  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6585  		v.AuxInt = ssa.Int64ToAuxInt(d << uint64(c))
  6586  		return true
  6587  	}
  6588  	return false
  6589  }
  6590  func rewriteValue_OpLOONG64SLLconst(v *ssa.Value) bool {
  6591  	v_0 := v.Args[0]
  6592  	// match: (SLLconst <t> [c] (ADDV x x))
  6593  	// cond: c < t.Size() * 8 - 1
  6594  	// result: (SLLconst [c+1] x)
  6595  	for {
  6596  		t := v.Type
  6597  		c := ssa.AuxIntToInt64(v.AuxInt)
  6598  		if v_0.Op != ssaop.OpLOONG64ADDV {
  6599  			break
  6600  		}
  6601  		x := v_0.Args[1]
  6602  		if x != v_0.Args[0] || !(c < t.Size()*8-1) {
  6603  			break
  6604  		}
  6605  		v.Reset(ssaop.OpLOONG64SLLconst)
  6606  		v.AuxInt = ssa.Int64ToAuxInt(c + 1)
  6607  		v.AddArg(x)
  6608  		return true
  6609  	}
  6610  	// match: (SLLconst <t> [c] (ADDV x x))
  6611  	// cond: c >= t.Size() * 8 - 1
  6612  	// result: (MOVVconst [0])
  6613  	for {
  6614  		t := v.Type
  6615  		c := ssa.AuxIntToInt64(v.AuxInt)
  6616  		if v_0.Op != ssaop.OpLOONG64ADDV {
  6617  			break
  6618  		}
  6619  		x := v_0.Args[1]
  6620  		if x != v_0.Args[0] || !(c >= t.Size()*8-1) {
  6621  			break
  6622  		}
  6623  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6624  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6625  		return true
  6626  	}
  6627  	return false
  6628  }
  6629  func rewriteValue_OpLOONG64SRA(v *ssa.Value) bool {
  6630  	v_1 := v.Args[1]
  6631  	v_0 := v.Args[0]
  6632  	// match: (SRA x (MOVVconst [c]))
  6633  	// cond: uint64(c)>=32
  6634  	// result: (SRAconst x [31])
  6635  	for {
  6636  		x := v_0
  6637  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6638  			break
  6639  		}
  6640  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6641  		if !(uint64(c) >= 32) {
  6642  			break
  6643  		}
  6644  		v.Reset(ssaop.OpLOONG64SRAconst)
  6645  		v.AuxInt = ssa.Int64ToAuxInt(31)
  6646  		v.AddArg(x)
  6647  		return true
  6648  	}
  6649  	// match: (SRA x (MOVVconst [c]))
  6650  	// cond: uint64(c) >=0 && uint64(c) <=31
  6651  	// result: (SRAconst x [c])
  6652  	for {
  6653  		x := v_0
  6654  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6655  			break
  6656  		}
  6657  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6658  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  6659  			break
  6660  		}
  6661  		v.Reset(ssaop.OpLOONG64SRAconst)
  6662  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6663  		v.AddArg(x)
  6664  		return true
  6665  	}
  6666  	// match: (SRA x (ANDconst [31] y))
  6667  	// result: (SRA x y)
  6668  	for {
  6669  		x := v_0
  6670  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 31 {
  6671  			break
  6672  		}
  6673  		y := v_1.Args[0]
  6674  		v.Reset(ssaop.OpLOONG64SRA)
  6675  		v.AddArg2(x, y)
  6676  		return true
  6677  	}
  6678  	return false
  6679  }
  6680  func rewriteValue_OpLOONG64SRAV(v *ssa.Value) bool {
  6681  	v_1 := v.Args[1]
  6682  	v_0 := v.Args[0]
  6683  	// match: (SRAV x (MOVVconst [c]))
  6684  	// cond: uint64(c)>=64
  6685  	// result: (SRAVconst x [63])
  6686  	for {
  6687  		x := v_0
  6688  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6689  			break
  6690  		}
  6691  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6692  		if !(uint64(c) >= 64) {
  6693  			break
  6694  		}
  6695  		v.Reset(ssaop.OpLOONG64SRAVconst)
  6696  		v.AuxInt = ssa.Int64ToAuxInt(63)
  6697  		v.AddArg(x)
  6698  		return true
  6699  	}
  6700  	// match: (SRAV x (MOVVconst [c]))
  6701  	// result: (SRAVconst x [c])
  6702  	for {
  6703  		x := v_0
  6704  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6705  			break
  6706  		}
  6707  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6708  		v.Reset(ssaop.OpLOONG64SRAVconst)
  6709  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6710  		v.AddArg(x)
  6711  		return true
  6712  	}
  6713  	// match: (SRAV x (ANDconst [63] y))
  6714  	// result: (SRAV x y)
  6715  	for {
  6716  		x := v_0
  6717  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 63 {
  6718  			break
  6719  		}
  6720  		y := v_1.Args[0]
  6721  		v.Reset(ssaop.OpLOONG64SRAV)
  6722  		v.AddArg2(x, y)
  6723  		return true
  6724  	}
  6725  	return false
  6726  }
  6727  func rewriteValue_OpLOONG64SRAVconst(v *ssa.Value) bool {
  6728  	v_0 := v.Args[0]
  6729  	b := v.Block
  6730  	// match: (SRAVconst [rc] (MOVWreg y))
  6731  	// cond: rc >= 0 && rc <= 31
  6732  	// result: (SRAconst [int64(rc)] y)
  6733  	for {
  6734  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6735  		if v_0.Op != ssaop.OpLOONG64MOVWreg {
  6736  			break
  6737  		}
  6738  		y := v_0.Args[0]
  6739  		if !(rc >= 0 && rc <= 31) {
  6740  			break
  6741  		}
  6742  		v.Reset(ssaop.OpLOONG64SRAconst)
  6743  		v.AuxInt = ssa.Int64ToAuxInt(int64(rc))
  6744  		v.AddArg(y)
  6745  		return true
  6746  	}
  6747  	// match: (SRAVconst <t> [rc] (MOVBreg y))
  6748  	// cond: rc >= 8
  6749  	// result: (SRAVconst [63] (SLLVconst <t> [56] y))
  6750  	for {
  6751  		t := v.Type
  6752  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6753  		if v_0.Op != ssaop.OpLOONG64MOVBreg {
  6754  			break
  6755  		}
  6756  		y := v_0.Args[0]
  6757  		if !(rc >= 8) {
  6758  			break
  6759  		}
  6760  		v.Reset(ssaop.OpLOONG64SRAVconst)
  6761  		v.AuxInt = ssa.Int64ToAuxInt(63)
  6762  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, t)
  6763  		v0.AuxInt = ssa.Int64ToAuxInt(56)
  6764  		v0.AddArg(y)
  6765  		v.AddArg(v0)
  6766  		return true
  6767  	}
  6768  	// match: (SRAVconst <t> [rc] (MOVHreg y))
  6769  	// cond: rc >= 16
  6770  	// result: (SRAVconst [63] (SLLVconst <t> [48] y))
  6771  	for {
  6772  		t := v.Type
  6773  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6774  		if v_0.Op != ssaop.OpLOONG64MOVHreg {
  6775  			break
  6776  		}
  6777  		y := v_0.Args[0]
  6778  		if !(rc >= 16) {
  6779  			break
  6780  		}
  6781  		v.Reset(ssaop.OpLOONG64SRAVconst)
  6782  		v.AuxInt = ssa.Int64ToAuxInt(63)
  6783  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, t)
  6784  		v0.AuxInt = ssa.Int64ToAuxInt(48)
  6785  		v0.AddArg(y)
  6786  		v.AddArg(v0)
  6787  		return true
  6788  	}
  6789  	// match: (SRAVconst <t> [rc] (MOVWreg y))
  6790  	// cond: rc >= 32
  6791  	// result: (SRAconst [31] y)
  6792  	for {
  6793  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6794  		if v_0.Op != ssaop.OpLOONG64MOVWreg {
  6795  			break
  6796  		}
  6797  		y := v_0.Args[0]
  6798  		if !(rc >= 32) {
  6799  			break
  6800  		}
  6801  		v.Reset(ssaop.OpLOONG64SRAconst)
  6802  		v.AuxInt = ssa.Int64ToAuxInt(31)
  6803  		v.AddArg(y)
  6804  		return true
  6805  	}
  6806  	// match: (SRAVconst [c] (MOVVconst [d]))
  6807  	// result: (MOVVconst [d>>uint64(c)])
  6808  	for {
  6809  		c := ssa.AuxIntToInt64(v.AuxInt)
  6810  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6811  			break
  6812  		}
  6813  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6814  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6815  		v.AuxInt = ssa.Int64ToAuxInt(d >> uint64(c))
  6816  		return true
  6817  	}
  6818  	return false
  6819  }
  6820  func rewriteValue_OpLOONG64SRL(v *ssa.Value) bool {
  6821  	v_1 := v.Args[1]
  6822  	v_0 := v.Args[0]
  6823  	// match: (SRL _ (MOVVconst [c]))
  6824  	// cond: uint64(c)>=32
  6825  	// result: (MOVVconst [0])
  6826  	for {
  6827  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6828  			break
  6829  		}
  6830  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6831  		if !(uint64(c) >= 32) {
  6832  			break
  6833  		}
  6834  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6835  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6836  		return true
  6837  	}
  6838  	// match: (SRL x (MOVVconst [c]))
  6839  	// cond: uint64(c) >=0 && uint64(c) <=31
  6840  	// result: (SRLconst x [c])
  6841  	for {
  6842  		x := v_0
  6843  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6844  			break
  6845  		}
  6846  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6847  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  6848  			break
  6849  		}
  6850  		v.Reset(ssaop.OpLOONG64SRLconst)
  6851  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6852  		v.AddArg(x)
  6853  		return true
  6854  	}
  6855  	// match: (SRL x (ANDconst [31] y))
  6856  	// result: (SRL x y)
  6857  	for {
  6858  		x := v_0
  6859  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 31 {
  6860  			break
  6861  		}
  6862  		y := v_1.Args[0]
  6863  		v.Reset(ssaop.OpLOONG64SRL)
  6864  		v.AddArg2(x, y)
  6865  		return true
  6866  	}
  6867  	return false
  6868  }
  6869  func rewriteValue_OpLOONG64SRLV(v *ssa.Value) bool {
  6870  	v_1 := v.Args[1]
  6871  	v_0 := v.Args[0]
  6872  	// match: (SRLV _ (MOVVconst [c]))
  6873  	// cond: uint64(c)>=64
  6874  	// result: (MOVVconst [0])
  6875  	for {
  6876  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6877  			break
  6878  		}
  6879  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6880  		if !(uint64(c) >= 64) {
  6881  			break
  6882  		}
  6883  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6884  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6885  		return true
  6886  	}
  6887  	// match: (SRLV x (MOVVconst [c]))
  6888  	// result: (SRLVconst x [c])
  6889  	for {
  6890  		x := v_0
  6891  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6892  			break
  6893  		}
  6894  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6895  		v.Reset(ssaop.OpLOONG64SRLVconst)
  6896  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6897  		v.AddArg(x)
  6898  		return true
  6899  	}
  6900  	// match: (SRLV x (ANDconst [63] y))
  6901  	// result: (SRLV x y)
  6902  	for {
  6903  		x := v_0
  6904  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 63 {
  6905  			break
  6906  		}
  6907  		y := v_1.Args[0]
  6908  		v.Reset(ssaop.OpLOONG64SRLV)
  6909  		v.AddArg2(x, y)
  6910  		return true
  6911  	}
  6912  	return false
  6913  }
  6914  func rewriteValue_OpLOONG64SRLVconst(v *ssa.Value) bool {
  6915  	v_0 := v.Args[0]
  6916  	// match: (SRLVconst [rc] (SLLVconst [lc] x))
  6917  	// cond: lc <= rc
  6918  	// result: (BSTRPICKV [rc-lc + ((64-lc)-1)<<6] x)
  6919  	for {
  6920  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6921  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  6922  			break
  6923  		}
  6924  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  6925  		x := v_0.Args[0]
  6926  		if !(lc <= rc) {
  6927  			break
  6928  		}
  6929  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  6930  		v.AuxInt = ssa.Int64ToAuxInt(rc - lc + ((64-lc)-1)<<6)
  6931  		v.AddArg(x)
  6932  		return true
  6933  	}
  6934  	// match: (SRLVconst [rc] (MOVWUreg x))
  6935  	// cond: rc < 32
  6936  	// result: (BSTRPICKV [rc + 31<<6] x)
  6937  	for {
  6938  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6939  		if v_0.Op != ssaop.OpLOONG64MOVWUreg {
  6940  			break
  6941  		}
  6942  		x := v_0.Args[0]
  6943  		if !(rc < 32) {
  6944  			break
  6945  		}
  6946  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  6947  		v.AuxInt = ssa.Int64ToAuxInt(rc + 31<<6)
  6948  		v.AddArg(x)
  6949  		return true
  6950  	}
  6951  	// match: (SRLVconst [rc] (MOVHUreg x))
  6952  	// cond: rc < 16
  6953  	// result: (BSTRPICKV [rc + 15<<6] x)
  6954  	for {
  6955  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6956  		if v_0.Op != ssaop.OpLOONG64MOVHUreg {
  6957  			break
  6958  		}
  6959  		x := v_0.Args[0]
  6960  		if !(rc < 16) {
  6961  			break
  6962  		}
  6963  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  6964  		v.AuxInt = ssa.Int64ToAuxInt(rc + 15<<6)
  6965  		v.AddArg(x)
  6966  		return true
  6967  	}
  6968  	// match: (SRLVconst [rc] (MOVBUreg x))
  6969  	// cond: rc < 8
  6970  	// result: (BSTRPICKV [rc + 7<<6] x)
  6971  	for {
  6972  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6973  		if v_0.Op != ssaop.OpLOONG64MOVBUreg {
  6974  			break
  6975  		}
  6976  		x := v_0.Args[0]
  6977  		if !(rc < 8) {
  6978  			break
  6979  		}
  6980  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  6981  		v.AuxInt = ssa.Int64ToAuxInt(rc + 7<<6)
  6982  		v.AddArg(x)
  6983  		return true
  6984  	}
  6985  	// match: (SRLVconst [rc] (MOVWUreg y))
  6986  	// cond: rc >= 0 && rc <= 31
  6987  	// result: (SRLconst [int64(rc)] y)
  6988  	for {
  6989  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6990  		if v_0.Op != ssaop.OpLOONG64MOVWUreg {
  6991  			break
  6992  		}
  6993  		y := v_0.Args[0]
  6994  		if !(rc >= 0 && rc <= 31) {
  6995  			break
  6996  		}
  6997  		v.Reset(ssaop.OpLOONG64SRLconst)
  6998  		v.AuxInt = ssa.Int64ToAuxInt(int64(rc))
  6999  		v.AddArg(y)
  7000  		return true
  7001  	}
  7002  	// match: (SRLVconst [rc] (MOVWUreg x))
  7003  	// cond: rc >= 32
  7004  	// result: (MOVVconst [0])
  7005  	for {
  7006  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7007  		if v_0.Op != ssaop.OpLOONG64MOVWUreg {
  7008  			break
  7009  		}
  7010  		if !(rc >= 32) {
  7011  			break
  7012  		}
  7013  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7014  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7015  		return true
  7016  	}
  7017  	// match: (SRLVconst [rc] (MOVHUreg x))
  7018  	// cond: rc >= 16
  7019  	// result: (MOVVconst [0])
  7020  	for {
  7021  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7022  		if v_0.Op != ssaop.OpLOONG64MOVHUreg {
  7023  			break
  7024  		}
  7025  		if !(rc >= 16) {
  7026  			break
  7027  		}
  7028  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7029  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7030  		return true
  7031  	}
  7032  	// match: (SRLVconst [rc] (MOVBUreg x))
  7033  	// cond: rc >= 8
  7034  	// result: (MOVVconst [0])
  7035  	for {
  7036  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7037  		if v_0.Op != ssaop.OpLOONG64MOVBUreg {
  7038  			break
  7039  		}
  7040  		if !(rc >= 8) {
  7041  			break
  7042  		}
  7043  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7044  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7045  		return true
  7046  	}
  7047  	// match: (SRLVconst [c] (MOVVconst [d]))
  7048  	// result: (MOVVconst [int64(uint64(d)>>uint64(c))])
  7049  	for {
  7050  		c := ssa.AuxIntToInt64(v.AuxInt)
  7051  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7052  			break
  7053  		}
  7054  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7055  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7056  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint64(d) >> uint64(c)))
  7057  		return true
  7058  	}
  7059  	return false
  7060  }
  7061  func rewriteValue_OpLOONG64SUBD(v *ssa.Value) bool {
  7062  	v_1 := v.Args[1]
  7063  	v_0 := v.Args[0]
  7064  	// match: (SUBD (MULD x y) z)
  7065  	// cond: z.Block.Func.UseFMA(v)
  7066  	// result: (FMSUBD x y z)
  7067  	for {
  7068  		if v_0.Op != ssaop.OpLOONG64MULD {
  7069  			break
  7070  		}
  7071  		y := v_0.Args[1]
  7072  		x := v_0.Args[0]
  7073  		z := v_1
  7074  		if !(z.Block.Func.UseFMA(v)) {
  7075  			break
  7076  		}
  7077  		v.Reset(ssaop.OpLOONG64FMSUBD)
  7078  		v.AddArg3(x, y, z)
  7079  		return true
  7080  	}
  7081  	// match: (SUBD z (MULD x y))
  7082  	// cond: z.Block.Func.UseFMA(v)
  7083  	// result: (FNMSUBD x y z)
  7084  	for {
  7085  		z := v_0
  7086  		if v_1.Op != ssaop.OpLOONG64MULD {
  7087  			break
  7088  		}
  7089  		y := v_1.Args[1]
  7090  		x := v_1.Args[0]
  7091  		if !(z.Block.Func.UseFMA(v)) {
  7092  			break
  7093  		}
  7094  		v.Reset(ssaop.OpLOONG64FNMSUBD)
  7095  		v.AddArg3(x, y, z)
  7096  		return true
  7097  	}
  7098  	// match: (SUBD z (NEGD (MULD x y)))
  7099  	// cond: z.Block.Func.UseFMA(v)
  7100  	// result: (FMADDD x y z)
  7101  	for {
  7102  		z := v_0
  7103  		if v_1.Op != ssaop.OpLOONG64NEGD {
  7104  			break
  7105  		}
  7106  		v_1_0 := v_1.Args[0]
  7107  		if v_1_0.Op != ssaop.OpLOONG64MULD {
  7108  			break
  7109  		}
  7110  		y := v_1_0.Args[1]
  7111  		x := v_1_0.Args[0]
  7112  		if !(z.Block.Func.UseFMA(v)) {
  7113  			break
  7114  		}
  7115  		v.Reset(ssaop.OpLOONG64FMADDD)
  7116  		v.AddArg3(x, y, z)
  7117  		return true
  7118  	}
  7119  	// match: (SUBD (NEGD (MULD x y)) z)
  7120  	// cond: z.Block.Func.UseFMA(v)
  7121  	// result: (FNMADDD x y z)
  7122  	for {
  7123  		if v_0.Op != ssaop.OpLOONG64NEGD {
  7124  			break
  7125  		}
  7126  		v_0_0 := v_0.Args[0]
  7127  		if v_0_0.Op != ssaop.OpLOONG64MULD {
  7128  			break
  7129  		}
  7130  		y := v_0_0.Args[1]
  7131  		x := v_0_0.Args[0]
  7132  		z := v_1
  7133  		if !(z.Block.Func.UseFMA(v)) {
  7134  			break
  7135  		}
  7136  		v.Reset(ssaop.OpLOONG64FNMADDD)
  7137  		v.AddArg3(x, y, z)
  7138  		return true
  7139  	}
  7140  	return false
  7141  }
  7142  func rewriteValue_OpLOONG64SUBF(v *ssa.Value) bool {
  7143  	v_1 := v.Args[1]
  7144  	v_0 := v.Args[0]
  7145  	// match: (SUBF (MULF x y) z)
  7146  	// cond: z.Block.Func.UseFMA(v)
  7147  	// result: (FMSUBF x y z)
  7148  	for {
  7149  		if v_0.Op != ssaop.OpLOONG64MULF {
  7150  			break
  7151  		}
  7152  		y := v_0.Args[1]
  7153  		x := v_0.Args[0]
  7154  		z := v_1
  7155  		if !(z.Block.Func.UseFMA(v)) {
  7156  			break
  7157  		}
  7158  		v.Reset(ssaop.OpLOONG64FMSUBF)
  7159  		v.AddArg3(x, y, z)
  7160  		return true
  7161  	}
  7162  	// match: (SUBF z (MULF x y))
  7163  	// cond: z.Block.Func.UseFMA(v)
  7164  	// result: (FNMSUBF x y z)
  7165  	for {
  7166  		z := v_0
  7167  		if v_1.Op != ssaop.OpLOONG64MULF {
  7168  			break
  7169  		}
  7170  		y := v_1.Args[1]
  7171  		x := v_1.Args[0]
  7172  		if !(z.Block.Func.UseFMA(v)) {
  7173  			break
  7174  		}
  7175  		v.Reset(ssaop.OpLOONG64FNMSUBF)
  7176  		v.AddArg3(x, y, z)
  7177  		return true
  7178  	}
  7179  	// match: (SUBF z (NEGF (MULF x y)))
  7180  	// cond: z.Block.Func.UseFMA(v)
  7181  	// result: (FMADDF x y z)
  7182  	for {
  7183  		z := v_0
  7184  		if v_1.Op != ssaop.OpLOONG64NEGF {
  7185  			break
  7186  		}
  7187  		v_1_0 := v_1.Args[0]
  7188  		if v_1_0.Op != ssaop.OpLOONG64MULF {
  7189  			break
  7190  		}
  7191  		y := v_1_0.Args[1]
  7192  		x := v_1_0.Args[0]
  7193  		if !(z.Block.Func.UseFMA(v)) {
  7194  			break
  7195  		}
  7196  		v.Reset(ssaop.OpLOONG64FMADDF)
  7197  		v.AddArg3(x, y, z)
  7198  		return true
  7199  	}
  7200  	// match: (SUBF (NEGF (MULF x y)) z)
  7201  	// cond: z.Block.Func.UseFMA(v)
  7202  	// result: (FNMADDF x y z)
  7203  	for {
  7204  		if v_0.Op != ssaop.OpLOONG64NEGF {
  7205  			break
  7206  		}
  7207  		v_0_0 := v_0.Args[0]
  7208  		if v_0_0.Op != ssaop.OpLOONG64MULF {
  7209  			break
  7210  		}
  7211  		y := v_0_0.Args[1]
  7212  		x := v_0_0.Args[0]
  7213  		z := v_1
  7214  		if !(z.Block.Func.UseFMA(v)) {
  7215  			break
  7216  		}
  7217  		v.Reset(ssaop.OpLOONG64FNMADDF)
  7218  		v.AddArg3(x, y, z)
  7219  		return true
  7220  	}
  7221  	return false
  7222  }
  7223  func rewriteValue_OpLOONG64SUBV(v *ssa.Value) bool {
  7224  	v_1 := v.Args[1]
  7225  	v_0 := v.Args[0]
  7226  	// match: (SUBV x (MOVVconst [c]))
  7227  	// cond: ssa.Is32Bit(c)
  7228  	// result: (SUBVconst [c] x)
  7229  	for {
  7230  		x := v_0
  7231  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7232  			break
  7233  		}
  7234  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7235  		if !(ssa.Is32Bit(c)) {
  7236  			break
  7237  		}
  7238  		v.Reset(ssaop.OpLOONG64SUBVconst)
  7239  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7240  		v.AddArg(x)
  7241  		return true
  7242  	}
  7243  	// match: (SUBV x (NEGV y))
  7244  	// result: (ADDV x y)
  7245  	for {
  7246  		x := v_0
  7247  		if v_1.Op != ssaop.OpLOONG64NEGV {
  7248  			break
  7249  		}
  7250  		y := v_1.Args[0]
  7251  		v.Reset(ssaop.OpLOONG64ADDV)
  7252  		v.AddArg2(x, y)
  7253  		return true
  7254  	}
  7255  	// match: (SUBV x x)
  7256  	// result: (MOVVconst [0])
  7257  	for {
  7258  		x := v_0
  7259  		if x != v_1 {
  7260  			break
  7261  		}
  7262  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7263  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7264  		return true
  7265  	}
  7266  	// match: (SUBV (MOVVconst [0]) x)
  7267  	// result: (NEGV x)
  7268  	for {
  7269  		if v_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
  7270  			break
  7271  		}
  7272  		x := v_1
  7273  		v.Reset(ssaop.OpLOONG64NEGV)
  7274  		v.AddArg(x)
  7275  		return true
  7276  	}
  7277  	// match: (SUBV (MOVVconst [c]) (NEGV (SUBVconst [d] x)))
  7278  	// result: (ADDVconst [c-d] x)
  7279  	for {
  7280  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7281  			break
  7282  		}
  7283  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7284  		if v_1.Op != ssaop.OpLOONG64NEGV {
  7285  			break
  7286  		}
  7287  		v_1_0 := v_1.Args[0]
  7288  		if v_1_0.Op != ssaop.OpLOONG64SUBVconst {
  7289  			break
  7290  		}
  7291  		d := ssa.AuxIntToInt64(v_1_0.AuxInt)
  7292  		x := v_1_0.Args[0]
  7293  		v.Reset(ssaop.OpLOONG64ADDVconst)
  7294  		v.AuxInt = ssa.Int64ToAuxInt(c - d)
  7295  		v.AddArg(x)
  7296  		return true
  7297  	}
  7298  	return false
  7299  }
  7300  func rewriteValue_OpLOONG64SUBVconst(v *ssa.Value) bool {
  7301  	v_0 := v.Args[0]
  7302  	// match: (SUBVconst [0] x)
  7303  	// result: x
  7304  	for {
  7305  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  7306  			break
  7307  		}
  7308  		x := v_0
  7309  		v.CopyOf(x)
  7310  		return true
  7311  	}
  7312  	// match: (SUBVconst [c] (MOVVconst [d]))
  7313  	// result: (MOVVconst [d-c])
  7314  	for {
  7315  		c := ssa.AuxIntToInt64(v.AuxInt)
  7316  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7317  			break
  7318  		}
  7319  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7320  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7321  		v.AuxInt = ssa.Int64ToAuxInt(d - c)
  7322  		return true
  7323  	}
  7324  	// match: (SUBVconst [c] (SUBVconst [d] x))
  7325  	// cond: ssa.Is32Bit(-c-d)
  7326  	// result: (ADDVconst [-c-d] x)
  7327  	for {
  7328  		c := ssa.AuxIntToInt64(v.AuxInt)
  7329  		if v_0.Op != ssaop.OpLOONG64SUBVconst {
  7330  			break
  7331  		}
  7332  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7333  		x := v_0.Args[0]
  7334  		if !(ssa.Is32Bit(-c - d)) {
  7335  			break
  7336  		}
  7337  		v.Reset(ssaop.OpLOONG64ADDVconst)
  7338  		v.AuxInt = ssa.Int64ToAuxInt(-c - d)
  7339  		v.AddArg(x)
  7340  		return true
  7341  	}
  7342  	// match: (SUBVconst [c] (ADDVconst [d] x))
  7343  	// cond: ssa.Is32Bit(-c+d)
  7344  	// result: (ADDVconst [-c+d] x)
  7345  	for {
  7346  		c := ssa.AuxIntToInt64(v.AuxInt)
  7347  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  7348  			break
  7349  		}
  7350  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7351  		x := v_0.Args[0]
  7352  		if !(ssa.Is32Bit(-c + d)) {
  7353  			break
  7354  		}
  7355  		v.Reset(ssaop.OpLOONG64ADDVconst)
  7356  		v.AuxInt = ssa.Int64ToAuxInt(-c + d)
  7357  		v.AddArg(x)
  7358  		return true
  7359  	}
  7360  	return false
  7361  }
  7362  func rewriteValue_OpLOONG64XOR(v *ssa.Value) bool {
  7363  	v_1 := v.Args[1]
  7364  	v_0 := v.Args[0]
  7365  	b := v.Block
  7366  	typ := &b.Func.Config.Types
  7367  	// match: (XOR <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  7368  	// result: (REVB2H x)
  7369  	for {
  7370  		if v.Type != typ.UInt16 {
  7371  			break
  7372  		}
  7373  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7374  			if v_0.Op != ssaop.OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7375  				continue
  7376  			}
  7377  			x := v_0.Args[0]
  7378  			if v_1.Op != ssaop.OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || ssa.AuxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  7379  				continue
  7380  			}
  7381  			v.Reset(ssaop.OpLOONG64REVB2H)
  7382  			v.AddArg(x)
  7383  			return true
  7384  		}
  7385  		break
  7386  	}
  7387  	// match: (XOR (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  7388  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  7389  	// result: (REVB2H x)
  7390  	for {
  7391  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7392  			if v_0.Op != ssaop.OpLOONG64SRLconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7393  				continue
  7394  			}
  7395  			v_0_0 := v_0.Args[0]
  7396  			if v_0_0.Op != ssaop.OpLOONG64ANDconst {
  7397  				continue
  7398  			}
  7399  			c1 := ssa.AuxIntToInt64(v_0_0.AuxInt)
  7400  			x := v_0_0.Args[0]
  7401  			if v_1.Op != ssaop.OpLOONG64SLLconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  7402  				continue
  7403  			}
  7404  			v_1_0 := v_1.Args[0]
  7405  			if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  7406  				continue
  7407  			}
  7408  			c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  7409  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  7410  				continue
  7411  			}
  7412  			v.Reset(ssaop.OpLOONG64REVB2H)
  7413  			v.AddArg(x)
  7414  			return true
  7415  		}
  7416  		break
  7417  	}
  7418  	// match: (XOR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  7419  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  7420  	// result: (REVB4H x)
  7421  	for {
  7422  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7423  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7424  				continue
  7425  			}
  7426  			v_0_0 := v_0.Args[0]
  7427  			if v_0_0.Op != ssaop.OpLOONG64AND {
  7428  				continue
  7429  			}
  7430  			_ = v_0_0.Args[1]
  7431  			v_0_0_0 := v_0_0.Args[0]
  7432  			v_0_0_1 := v_0_0.Args[1]
  7433  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  7434  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  7435  					continue
  7436  				}
  7437  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  7438  				x := v_0_0_1
  7439  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  7440  					continue
  7441  				}
  7442  				v_1_0 := v_1.Args[0]
  7443  				if v_1_0.Op != ssaop.OpLOONG64AND {
  7444  					continue
  7445  				}
  7446  				_ = v_1_0.Args[1]
  7447  				v_1_0_0 := v_1_0.Args[0]
  7448  				v_1_0_1 := v_1_0.Args[1]
  7449  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  7450  					if v_1_0_0.Op != ssaop.OpLOONG64MOVVconst {
  7451  						continue
  7452  					}
  7453  					c2 := ssa.AuxIntToInt64(v_1_0_0.AuxInt)
  7454  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  7455  						continue
  7456  					}
  7457  					v.Reset(ssaop.OpLOONG64REVB4H)
  7458  					v.AddArg(x)
  7459  					return true
  7460  				}
  7461  			}
  7462  		}
  7463  		break
  7464  	}
  7465  	// match: (XOR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  7466  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  7467  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  7468  	for {
  7469  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7470  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7471  				continue
  7472  			}
  7473  			v_0_0 := v_0.Args[0]
  7474  			if v_0_0.Op != ssaop.OpLOONG64AND {
  7475  				continue
  7476  			}
  7477  			_ = v_0_0.Args[1]
  7478  			v_0_0_0 := v_0_0.Args[0]
  7479  			v_0_0_1 := v_0_0.Args[1]
  7480  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  7481  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  7482  					continue
  7483  				}
  7484  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  7485  				x := v_0_0_1
  7486  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  7487  					continue
  7488  				}
  7489  				v_1_0 := v_1.Args[0]
  7490  				if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  7491  					continue
  7492  				}
  7493  				c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  7494  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  7495  					continue
  7496  				}
  7497  				v.Reset(ssaop.OpLOONG64REVB4H)
  7498  				v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, x.Type)
  7499  				v0.AuxInt = ssa.Int64ToAuxInt(0xffffffff)
  7500  				v0.AddArg(x)
  7501  				v.AddArg(v0)
  7502  				return true
  7503  			}
  7504  		}
  7505  		break
  7506  	}
  7507  	// match: (XOR x (MOVVconst [c]))
  7508  	// cond: ssa.Is32Bit(c)
  7509  	// result: (XORconst [c] x)
  7510  	for {
  7511  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7512  			x := v_0
  7513  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7514  				continue
  7515  			}
  7516  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  7517  			if !(ssa.Is32Bit(c)) {
  7518  				continue
  7519  			}
  7520  			v.Reset(ssaop.OpLOONG64XORconst)
  7521  			v.AuxInt = ssa.Int64ToAuxInt(c)
  7522  			v.AddArg(x)
  7523  			return true
  7524  		}
  7525  		break
  7526  	}
  7527  	// match: (XOR x x)
  7528  	// result: (MOVVconst [0])
  7529  	for {
  7530  		x := v_0
  7531  		if x != v_1 {
  7532  			break
  7533  		}
  7534  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7535  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7536  		return true
  7537  	}
  7538  	return false
  7539  }
  7540  func rewriteValue_OpLOONG64XORconst(v *ssa.Value) bool {
  7541  	v_0 := v.Args[0]
  7542  	// match: (XORconst [0] x)
  7543  	// result: x
  7544  	for {
  7545  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  7546  			break
  7547  		}
  7548  		x := v_0
  7549  		v.CopyOf(x)
  7550  		return true
  7551  	}
  7552  	// match: (XORconst [-1] x)
  7553  	// result: (NORconst [0] x)
  7554  	for {
  7555  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
  7556  			break
  7557  		}
  7558  		x := v_0
  7559  		v.Reset(ssaop.OpLOONG64NORconst)
  7560  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7561  		v.AddArg(x)
  7562  		return true
  7563  	}
  7564  	// match: (XORconst [c] (MOVVconst [d]))
  7565  	// result: (MOVVconst [c^d])
  7566  	for {
  7567  		c := ssa.AuxIntToInt64(v.AuxInt)
  7568  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7569  			break
  7570  		}
  7571  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7572  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7573  		v.AuxInt = ssa.Int64ToAuxInt(c ^ d)
  7574  		return true
  7575  	}
  7576  	// match: (XORconst [c] (XORconst [d] x))
  7577  	// cond: ssa.Is32Bit(c^d)
  7578  	// result: (XORconst [c^d] x)
  7579  	for {
  7580  		c := ssa.AuxIntToInt64(v.AuxInt)
  7581  		if v_0.Op != ssaop.OpLOONG64XORconst {
  7582  			break
  7583  		}
  7584  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7585  		x := v_0.Args[0]
  7586  		if !(ssa.Is32Bit(c ^ d)) {
  7587  			break
  7588  		}
  7589  		v.Reset(ssaop.OpLOONG64XORconst)
  7590  		v.AuxInt = ssa.Int64ToAuxInt(c ^ d)
  7591  		v.AddArg(x)
  7592  		return true
  7593  	}
  7594  	return false
  7595  }
  7596  func rewriteValue_OpLeq16(v *ssa.Value) bool {
  7597  	v_1 := v.Args[1]
  7598  	v_0 := v.Args[0]
  7599  	b := v.Block
  7600  	typ := &b.Func.Config.Types
  7601  	// match: (Leq16 x y)
  7602  	// result: (XOR (MOVVconst [1]) (SGT (SignExt16to64 x) (SignExt16to64 y)))
  7603  	for {
  7604  		x := v_0
  7605  		y := v_1
  7606  		v.Reset(ssaop.OpLOONG64XOR)
  7607  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7608  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7609  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  7610  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  7611  		v2.AddArg(x)
  7612  		v3 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  7613  		v3.AddArg(y)
  7614  		v1.AddArg2(v2, v3)
  7615  		v.AddArg2(v0, v1)
  7616  		return true
  7617  	}
  7618  }
  7619  func rewriteValue_OpLeq16U(v *ssa.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: (Leq16U x y)
  7625  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt16to64 x) (ZeroExt16to64 y)))
  7626  	for {
  7627  		x := v_0
  7628  		y := v_1
  7629  		v.Reset(ssaop.OpLOONG64XOR)
  7630  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7631  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7632  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  7633  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  7634  		v2.AddArg(x)
  7635  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  7636  		v3.AddArg(y)
  7637  		v1.AddArg2(v2, v3)
  7638  		v.AddArg2(v0, v1)
  7639  		return true
  7640  	}
  7641  }
  7642  func rewriteValue_OpLeq32(v *ssa.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: (Leq32 x y)
  7648  	// result: (XOR (MOVVconst [1]) (SGT (SignExt32to64 x) (SignExt32to64 y)))
  7649  	for {
  7650  		x := v_0
  7651  		y := v_1
  7652  		v.Reset(ssaop.OpLOONG64XOR)
  7653  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7654  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7655  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  7656  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  7657  		v2.AddArg(x)
  7658  		v3 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  7659  		v3.AddArg(y)
  7660  		v1.AddArg2(v2, v3)
  7661  		v.AddArg2(v0, v1)
  7662  		return true
  7663  	}
  7664  }
  7665  func rewriteValue_OpLeq32F(v *ssa.Value) bool {
  7666  	v_1 := v.Args[1]
  7667  	v_0 := v.Args[0]
  7668  	b := v.Block
  7669  	// match: (Leq32F x y)
  7670  	// result: (FPFlagTrue (CMPGEF y x))
  7671  	for {
  7672  		x := v_0
  7673  		y := v_1
  7674  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  7675  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGEF, types.TypeFlags)
  7676  		v0.AddArg2(y, x)
  7677  		v.AddArg(v0)
  7678  		return true
  7679  	}
  7680  }
  7681  func rewriteValue_OpLeq32U(v *ssa.Value) bool {
  7682  	v_1 := v.Args[1]
  7683  	v_0 := v.Args[0]
  7684  	b := v.Block
  7685  	typ := &b.Func.Config.Types
  7686  	// match: (Leq32U x y)
  7687  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt32to64 x) (ZeroExt32to64 y)))
  7688  	for {
  7689  		x := v_0
  7690  		y := v_1
  7691  		v.Reset(ssaop.OpLOONG64XOR)
  7692  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7693  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7694  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  7695  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  7696  		v2.AddArg(x)
  7697  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  7698  		v3.AddArg(y)
  7699  		v1.AddArg2(v2, v3)
  7700  		v.AddArg2(v0, v1)
  7701  		return true
  7702  	}
  7703  }
  7704  func rewriteValue_OpLeq64(v *ssa.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: (Leq64 x y)
  7710  	// result: (XOR (MOVVconst [1]) (SGT x y))
  7711  	for {
  7712  		x := v_0
  7713  		y := v_1
  7714  		v.Reset(ssaop.OpLOONG64XOR)
  7715  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7716  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7717  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  7718  		v1.AddArg2(x, y)
  7719  		v.AddArg2(v0, v1)
  7720  		return true
  7721  	}
  7722  }
  7723  func rewriteValue_OpLeq64F(v *ssa.Value) bool {
  7724  	v_1 := v.Args[1]
  7725  	v_0 := v.Args[0]
  7726  	b := v.Block
  7727  	// match: (Leq64F x y)
  7728  	// result: (FPFlagTrue (CMPGED y x))
  7729  	for {
  7730  		x := v_0
  7731  		y := v_1
  7732  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  7733  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGED, types.TypeFlags)
  7734  		v0.AddArg2(y, x)
  7735  		v.AddArg(v0)
  7736  		return true
  7737  	}
  7738  }
  7739  func rewriteValue_OpLeq64U(v *ssa.Value) bool {
  7740  	v_1 := v.Args[1]
  7741  	v_0 := v.Args[0]
  7742  	b := v.Block
  7743  	typ := &b.Func.Config.Types
  7744  	// match: (Leq64U x y)
  7745  	// result: (XOR (MOVVconst [1]) (SGTU x y))
  7746  	for {
  7747  		x := v_0
  7748  		y := v_1
  7749  		v.Reset(ssaop.OpLOONG64XOR)
  7750  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7751  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7752  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  7753  		v1.AddArg2(x, y)
  7754  		v.AddArg2(v0, v1)
  7755  		return true
  7756  	}
  7757  }
  7758  func rewriteValue_OpLeq8(v *ssa.Value) bool {
  7759  	v_1 := v.Args[1]
  7760  	v_0 := v.Args[0]
  7761  	b := v.Block
  7762  	typ := &b.Func.Config.Types
  7763  	// match: (Leq8 x y)
  7764  	// result: (XOR (MOVVconst [1]) (SGT (SignExt8to64 x) (SignExt8to64 y)))
  7765  	for {
  7766  		x := v_0
  7767  		y := v_1
  7768  		v.Reset(ssaop.OpLOONG64XOR)
  7769  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7770  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7771  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  7772  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  7773  		v2.AddArg(x)
  7774  		v3 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  7775  		v3.AddArg(y)
  7776  		v1.AddArg2(v2, v3)
  7777  		v.AddArg2(v0, v1)
  7778  		return true
  7779  	}
  7780  }
  7781  func rewriteValue_OpLeq8U(v *ssa.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: (Leq8U x y)
  7787  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt8to64 x) (ZeroExt8to64 y)))
  7788  	for {
  7789  		x := v_0
  7790  		y := v_1
  7791  		v.Reset(ssaop.OpLOONG64XOR)
  7792  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7793  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7794  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  7795  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  7796  		v2.AddArg(x)
  7797  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  7798  		v3.AddArg(y)
  7799  		v1.AddArg2(v2, v3)
  7800  		v.AddArg2(v0, v1)
  7801  		return true
  7802  	}
  7803  }
  7804  func rewriteValue_OpLess16(v *ssa.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: (Less16 x y)
  7810  	// result: (SGT (SignExt16to64 y) (SignExt16to64 x))
  7811  	for {
  7812  		x := v_0
  7813  		y := v_1
  7814  		v.Reset(ssaop.OpLOONG64SGT)
  7815  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  7816  		v0.AddArg(y)
  7817  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  7818  		v1.AddArg(x)
  7819  		v.AddArg2(v0, v1)
  7820  		return true
  7821  	}
  7822  }
  7823  func rewriteValue_OpLess16U(v *ssa.Value) bool {
  7824  	v_1 := v.Args[1]
  7825  	v_0 := v.Args[0]
  7826  	b := v.Block
  7827  	typ := &b.Func.Config.Types
  7828  	// match: (Less16U x y)
  7829  	// result: (SGTU (ZeroExt16to64 y) (ZeroExt16to64 x))
  7830  	for {
  7831  		x := v_0
  7832  		y := v_1
  7833  		v.Reset(ssaop.OpLOONG64SGTU)
  7834  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  7835  		v0.AddArg(y)
  7836  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  7837  		v1.AddArg(x)
  7838  		v.AddArg2(v0, v1)
  7839  		return true
  7840  	}
  7841  }
  7842  func rewriteValue_OpLess32(v *ssa.Value) bool {
  7843  	v_1 := v.Args[1]
  7844  	v_0 := v.Args[0]
  7845  	b := v.Block
  7846  	typ := &b.Func.Config.Types
  7847  	// match: (Less32 x y)
  7848  	// result: (SGT (SignExt32to64 y) (SignExt32to64 x))
  7849  	for {
  7850  		x := v_0
  7851  		y := v_1
  7852  		v.Reset(ssaop.OpLOONG64SGT)
  7853  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  7854  		v0.AddArg(y)
  7855  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  7856  		v1.AddArg(x)
  7857  		v.AddArg2(v0, v1)
  7858  		return true
  7859  	}
  7860  }
  7861  func rewriteValue_OpLess32F(v *ssa.Value) bool {
  7862  	v_1 := v.Args[1]
  7863  	v_0 := v.Args[0]
  7864  	b := v.Block
  7865  	// match: (Less32F x y)
  7866  	// result: (FPFlagTrue (CMPGTF y x))
  7867  	for {
  7868  		x := v_0
  7869  		y := v_1
  7870  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  7871  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGTF, types.TypeFlags)
  7872  		v0.AddArg2(y, x)
  7873  		v.AddArg(v0)
  7874  		return true
  7875  	}
  7876  }
  7877  func rewriteValue_OpLess32U(v *ssa.Value) bool {
  7878  	v_1 := v.Args[1]
  7879  	v_0 := v.Args[0]
  7880  	b := v.Block
  7881  	typ := &b.Func.Config.Types
  7882  	// match: (Less32U x y)
  7883  	// result: (SGTU (ZeroExt32to64 y) (ZeroExt32to64 x))
  7884  	for {
  7885  		x := v_0
  7886  		y := v_1
  7887  		v.Reset(ssaop.OpLOONG64SGTU)
  7888  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  7889  		v0.AddArg(y)
  7890  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  7891  		v1.AddArg(x)
  7892  		v.AddArg2(v0, v1)
  7893  		return true
  7894  	}
  7895  }
  7896  func rewriteValue_OpLess64(v *ssa.Value) bool {
  7897  	v_1 := v.Args[1]
  7898  	v_0 := v.Args[0]
  7899  	// match: (Less64 x y)
  7900  	// result: (SGT y x)
  7901  	for {
  7902  		x := v_0
  7903  		y := v_1
  7904  		v.Reset(ssaop.OpLOONG64SGT)
  7905  		v.AddArg2(y, x)
  7906  		return true
  7907  	}
  7908  }
  7909  func rewriteValue_OpLess64F(v *ssa.Value) bool {
  7910  	v_1 := v.Args[1]
  7911  	v_0 := v.Args[0]
  7912  	b := v.Block
  7913  	// match: (Less64F x y)
  7914  	// result: (FPFlagTrue (CMPGTD y x))
  7915  	for {
  7916  		x := v_0
  7917  		y := v_1
  7918  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  7919  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGTD, types.TypeFlags)
  7920  		v0.AddArg2(y, x)
  7921  		v.AddArg(v0)
  7922  		return true
  7923  	}
  7924  }
  7925  func rewriteValue_OpLess64U(v *ssa.Value) bool {
  7926  	v_1 := v.Args[1]
  7927  	v_0 := v.Args[0]
  7928  	// match: (Less64U x y)
  7929  	// result: (SGTU y x)
  7930  	for {
  7931  		x := v_0
  7932  		y := v_1
  7933  		v.Reset(ssaop.OpLOONG64SGTU)
  7934  		v.AddArg2(y, x)
  7935  		return true
  7936  	}
  7937  }
  7938  func rewriteValue_OpLess8(v *ssa.Value) bool {
  7939  	v_1 := v.Args[1]
  7940  	v_0 := v.Args[0]
  7941  	b := v.Block
  7942  	typ := &b.Func.Config.Types
  7943  	// match: (Less8 x y)
  7944  	// result: (SGT (SignExt8to64 y) (SignExt8to64 x))
  7945  	for {
  7946  		x := v_0
  7947  		y := v_1
  7948  		v.Reset(ssaop.OpLOONG64SGT)
  7949  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  7950  		v0.AddArg(y)
  7951  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  7952  		v1.AddArg(x)
  7953  		v.AddArg2(v0, v1)
  7954  		return true
  7955  	}
  7956  }
  7957  func rewriteValue_OpLess8U(v *ssa.Value) bool {
  7958  	v_1 := v.Args[1]
  7959  	v_0 := v.Args[0]
  7960  	b := v.Block
  7961  	typ := &b.Func.Config.Types
  7962  	// match: (Less8U x y)
  7963  	// result: (SGTU (ZeroExt8to64 y) (ZeroExt8to64 x))
  7964  	for {
  7965  		x := v_0
  7966  		y := v_1
  7967  		v.Reset(ssaop.OpLOONG64SGTU)
  7968  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  7969  		v0.AddArg(y)
  7970  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  7971  		v1.AddArg(x)
  7972  		v.AddArg2(v0, v1)
  7973  		return true
  7974  	}
  7975  }
  7976  func rewriteValue_OpLoad(v *ssa.Value) bool {
  7977  	v_1 := v.Args[1]
  7978  	v_0 := v.Args[0]
  7979  	// match: (Load <t> ptr mem)
  7980  	// cond: t.IsBoolean()
  7981  	// result: (MOVBUload ptr mem)
  7982  	for {
  7983  		t := v.Type
  7984  		ptr := v_0
  7985  		mem := v_1
  7986  		if !(t.IsBoolean()) {
  7987  			break
  7988  		}
  7989  		v.Reset(ssaop.OpLOONG64MOVBUload)
  7990  		v.AddArg2(ptr, mem)
  7991  		return true
  7992  	}
  7993  	// match: (Load <t> ptr mem)
  7994  	// cond: (ssa.Is8BitInt(t) && t.IsSigned())
  7995  	// result: (MOVBload ptr mem)
  7996  	for {
  7997  		t := v.Type
  7998  		ptr := v_0
  7999  		mem := v_1
  8000  		if !(ssa.Is8BitInt(t) && t.IsSigned()) {
  8001  			break
  8002  		}
  8003  		v.Reset(ssaop.OpLOONG64MOVBload)
  8004  		v.AddArg2(ptr, mem)
  8005  		return true
  8006  	}
  8007  	// match: (Load <t> ptr mem)
  8008  	// cond: (ssa.Is8BitInt(t) && !t.IsSigned())
  8009  	// result: (MOVBUload ptr mem)
  8010  	for {
  8011  		t := v.Type
  8012  		ptr := v_0
  8013  		mem := v_1
  8014  		if !(ssa.Is8BitInt(t) && !t.IsSigned()) {
  8015  			break
  8016  		}
  8017  		v.Reset(ssaop.OpLOONG64MOVBUload)
  8018  		v.AddArg2(ptr, mem)
  8019  		return true
  8020  	}
  8021  	// match: (Load <t> ptr mem)
  8022  	// cond: (ssa.Is16BitInt(t) && t.IsSigned())
  8023  	// result: (MOVHload ptr mem)
  8024  	for {
  8025  		t := v.Type
  8026  		ptr := v_0
  8027  		mem := v_1
  8028  		if !(ssa.Is16BitInt(t) && t.IsSigned()) {
  8029  			break
  8030  		}
  8031  		v.Reset(ssaop.OpLOONG64MOVHload)
  8032  		v.AddArg2(ptr, mem)
  8033  		return true
  8034  	}
  8035  	// match: (Load <t> ptr mem)
  8036  	// cond: (ssa.Is16BitInt(t) && !t.IsSigned())
  8037  	// result: (MOVHUload ptr mem)
  8038  	for {
  8039  		t := v.Type
  8040  		ptr := v_0
  8041  		mem := v_1
  8042  		if !(ssa.Is16BitInt(t) && !t.IsSigned()) {
  8043  			break
  8044  		}
  8045  		v.Reset(ssaop.OpLOONG64MOVHUload)
  8046  		v.AddArg2(ptr, mem)
  8047  		return true
  8048  	}
  8049  	// match: (Load <t> ptr mem)
  8050  	// cond: (ssa.Is32BitInt(t) && t.IsSigned())
  8051  	// result: (MOVWload ptr mem)
  8052  	for {
  8053  		t := v.Type
  8054  		ptr := v_0
  8055  		mem := v_1
  8056  		if !(ssa.Is32BitInt(t) && t.IsSigned()) {
  8057  			break
  8058  		}
  8059  		v.Reset(ssaop.OpLOONG64MOVWload)
  8060  		v.AddArg2(ptr, mem)
  8061  		return true
  8062  	}
  8063  	// match: (Load <t> ptr mem)
  8064  	// cond: (ssa.Is32BitInt(t) && !t.IsSigned())
  8065  	// result: (MOVWUload ptr mem)
  8066  	for {
  8067  		t := v.Type
  8068  		ptr := v_0
  8069  		mem := v_1
  8070  		if !(ssa.Is32BitInt(t) && !t.IsSigned()) {
  8071  			break
  8072  		}
  8073  		v.Reset(ssaop.OpLOONG64MOVWUload)
  8074  		v.AddArg2(ptr, mem)
  8075  		return true
  8076  	}
  8077  	// match: (Load <t> ptr mem)
  8078  	// cond: (ssa.Is64BitInt(t) ||ssa.IsPtr(t))
  8079  	// result: (MOVVload ptr mem)
  8080  	for {
  8081  		t := v.Type
  8082  		ptr := v_0
  8083  		mem := v_1
  8084  		if !(ssa.Is64BitInt(t) || ssa.IsPtr(t)) {
  8085  			break
  8086  		}
  8087  		v.Reset(ssaop.OpLOONG64MOVVload)
  8088  		v.AddArg2(ptr, mem)
  8089  		return true
  8090  	}
  8091  	// match: (Load <t> ptr mem)
  8092  	// cond: ssa.Is32BitFloat(t)
  8093  	// result: (MOVFload ptr mem)
  8094  	for {
  8095  		t := v.Type
  8096  		ptr := v_0
  8097  		mem := v_1
  8098  		if !(ssa.Is32BitFloat(t)) {
  8099  			break
  8100  		}
  8101  		v.Reset(ssaop.OpLOONG64MOVFload)
  8102  		v.AddArg2(ptr, mem)
  8103  		return true
  8104  	}
  8105  	// match: (Load <t> ptr mem)
  8106  	// cond: ssa.Is64BitFloat(t)
  8107  	// result: (MOVDload ptr mem)
  8108  	for {
  8109  		t := v.Type
  8110  		ptr := v_0
  8111  		mem := v_1
  8112  		if !(ssa.Is64BitFloat(t)) {
  8113  			break
  8114  		}
  8115  		v.Reset(ssaop.OpLOONG64MOVDload)
  8116  		v.AddArg2(ptr, mem)
  8117  		return true
  8118  	}
  8119  	return false
  8120  }
  8121  func rewriteValue_OpLocalAddr(v *ssa.Value) bool {
  8122  	v_1 := v.Args[1]
  8123  	v_0 := v.Args[0]
  8124  	b := v.Block
  8125  	typ := &b.Func.Config.Types
  8126  	// match: (LocalAddr <t> {sym} base mem)
  8127  	// cond: t.Elem().HasPointers()
  8128  	// result: (MOVVaddr {sym} (SPanchored base mem))
  8129  	for {
  8130  		t := v.Type
  8131  		sym := ssa.AuxToSym(v.Aux)
  8132  		base := v_0
  8133  		mem := v_1
  8134  		if !(t.Elem().HasPointers()) {
  8135  			break
  8136  		}
  8137  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  8138  		v.Aux = ssa.SymToAux(sym)
  8139  		v0 := b.NewValue0(v.Pos, ssaop.OpSPanchored, typ.Uintptr)
  8140  		v0.AddArg2(base, mem)
  8141  		v.AddArg(v0)
  8142  		return true
  8143  	}
  8144  	// match: (LocalAddr <t> {sym} base _)
  8145  	// cond: !t.Elem().HasPointers()
  8146  	// result: (MOVVaddr {sym} base)
  8147  	for {
  8148  		t := v.Type
  8149  		sym := ssa.AuxToSym(v.Aux)
  8150  		base := v_0
  8151  		if !(!t.Elem().HasPointers()) {
  8152  			break
  8153  		}
  8154  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  8155  		v.Aux = ssa.SymToAux(sym)
  8156  		v.AddArg(base)
  8157  		return true
  8158  	}
  8159  	return false
  8160  }
  8161  func rewriteValue_OpLsh16x16(v *ssa.Value) bool {
  8162  	v_1 := v.Args[1]
  8163  	v_0 := v.Args[0]
  8164  	b := v.Block
  8165  	typ := &b.Func.Config.Types
  8166  	// match: (Lsh16x16 x y)
  8167  	// cond: ssa.ShiftIsBounded(v)
  8168  	// result: (SLLV x y)
  8169  	for {
  8170  		x := v_0
  8171  		y := v_1
  8172  		if !(ssa.ShiftIsBounded(v)) {
  8173  			break
  8174  		}
  8175  		v.Reset(ssaop.OpLOONG64SLLV)
  8176  		v.AddArg2(x, y)
  8177  		return true
  8178  	}
  8179  	// match: (Lsh16x16 <t> x y)
  8180  	// cond: !ssa.ShiftIsBounded(v)
  8181  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  8182  	for {
  8183  		t := v.Type
  8184  		x := v_0
  8185  		y := v_1
  8186  		if !(!ssa.ShiftIsBounded(v)) {
  8187  			break
  8188  		}
  8189  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8190  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8191  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8192  		v1.AddArg(y)
  8193  		v0.AddArg2(x, v1)
  8194  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8195  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8196  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8197  		v2.AddArg2(v3, v1)
  8198  		v.AddArg2(v0, v2)
  8199  		return true
  8200  	}
  8201  	return false
  8202  }
  8203  func rewriteValue_OpLsh16x32(v *ssa.Value) bool {
  8204  	v_1 := v.Args[1]
  8205  	v_0 := v.Args[0]
  8206  	b := v.Block
  8207  	typ := &b.Func.Config.Types
  8208  	// match: (Lsh16x32 x y)
  8209  	// cond: ssa.ShiftIsBounded(v)
  8210  	// result: (SLLV x y)
  8211  	for {
  8212  		x := v_0
  8213  		y := v_1
  8214  		if !(ssa.ShiftIsBounded(v)) {
  8215  			break
  8216  		}
  8217  		v.Reset(ssaop.OpLOONG64SLLV)
  8218  		v.AddArg2(x, y)
  8219  		return true
  8220  	}
  8221  	// match: (Lsh16x32 <t> x y)
  8222  	// cond: !ssa.ShiftIsBounded(v)
  8223  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  8224  	for {
  8225  		t := v.Type
  8226  		x := v_0
  8227  		y := v_1
  8228  		if !(!ssa.ShiftIsBounded(v)) {
  8229  			break
  8230  		}
  8231  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8232  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8233  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8234  		v1.AddArg(y)
  8235  		v0.AddArg2(x, v1)
  8236  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8237  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8238  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8239  		v2.AddArg2(v3, v1)
  8240  		v.AddArg2(v0, v2)
  8241  		return true
  8242  	}
  8243  	return false
  8244  }
  8245  func rewriteValue_OpLsh16x64(v *ssa.Value) bool {
  8246  	v_1 := v.Args[1]
  8247  	v_0 := v.Args[0]
  8248  	b := v.Block
  8249  	typ := &b.Func.Config.Types
  8250  	// match: (Lsh16x64 x y)
  8251  	// cond: ssa.ShiftIsBounded(v)
  8252  	// result: (SLLV x y)
  8253  	for {
  8254  		x := v_0
  8255  		y := v_1
  8256  		if !(ssa.ShiftIsBounded(v)) {
  8257  			break
  8258  		}
  8259  		v.Reset(ssaop.OpLOONG64SLLV)
  8260  		v.AddArg2(x, y)
  8261  		return true
  8262  	}
  8263  	// match: (Lsh16x64 <t> x y)
  8264  	// cond: !ssa.ShiftIsBounded(v)
  8265  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  8266  	for {
  8267  		t := v.Type
  8268  		x := v_0
  8269  		y := v_1
  8270  		if !(!ssa.ShiftIsBounded(v)) {
  8271  			break
  8272  		}
  8273  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8274  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8275  		v0.AddArg2(x, y)
  8276  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8277  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8278  		v2.AuxInt = ssa.Int64ToAuxInt(64)
  8279  		v1.AddArg2(v2, y)
  8280  		v.AddArg2(v0, v1)
  8281  		return true
  8282  	}
  8283  	return false
  8284  }
  8285  func rewriteValue_OpLsh16x8(v *ssa.Value) bool {
  8286  	v_1 := v.Args[1]
  8287  	v_0 := v.Args[0]
  8288  	b := v.Block
  8289  	typ := &b.Func.Config.Types
  8290  	// match: (Lsh16x8 x y)
  8291  	// cond: ssa.ShiftIsBounded(v)
  8292  	// result: (SLLV x y)
  8293  	for {
  8294  		x := v_0
  8295  		y := v_1
  8296  		if !(ssa.ShiftIsBounded(v)) {
  8297  			break
  8298  		}
  8299  		v.Reset(ssaop.OpLOONG64SLLV)
  8300  		v.AddArg2(x, y)
  8301  		return true
  8302  	}
  8303  	// match: (Lsh16x8 <t> x y)
  8304  	// cond: !ssa.ShiftIsBounded(v)
  8305  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  8306  	for {
  8307  		t := v.Type
  8308  		x := v_0
  8309  		y := v_1
  8310  		if !(!ssa.ShiftIsBounded(v)) {
  8311  			break
  8312  		}
  8313  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8314  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8315  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8316  		v1.AddArg(y)
  8317  		v0.AddArg2(x, v1)
  8318  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8319  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8320  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8321  		v2.AddArg2(v3, v1)
  8322  		v.AddArg2(v0, v2)
  8323  		return true
  8324  	}
  8325  	return false
  8326  }
  8327  func rewriteValue_OpLsh32x16(v *ssa.Value) bool {
  8328  	v_1 := v.Args[1]
  8329  	v_0 := v.Args[0]
  8330  	b := v.Block
  8331  	typ := &b.Func.Config.Types
  8332  	// match: (Lsh32x16 x y)
  8333  	// cond: ssa.ShiftIsBounded(v)
  8334  	// result: (SLL x y)
  8335  	for {
  8336  		x := v_0
  8337  		y := v_1
  8338  		if !(ssa.ShiftIsBounded(v)) {
  8339  			break
  8340  		}
  8341  		v.Reset(ssaop.OpLOONG64SLL)
  8342  		v.AddArg2(x, y)
  8343  		return true
  8344  	}
  8345  	// match: (Lsh32x16 <t> x y)
  8346  	// cond: !ssa.ShiftIsBounded(v)
  8347  	// result: (MASKEQZ (SLL <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt16to64 y)))
  8348  	for {
  8349  		t := v.Type
  8350  		x := v_0
  8351  		y := v_1
  8352  		if !(!ssa.ShiftIsBounded(v)) {
  8353  			break
  8354  		}
  8355  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8356  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8357  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8358  		v1.AddArg(y)
  8359  		v0.AddArg2(x, v1)
  8360  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8361  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8362  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  8363  		v2.AddArg2(v3, v1)
  8364  		v.AddArg2(v0, v2)
  8365  		return true
  8366  	}
  8367  	return false
  8368  }
  8369  func rewriteValue_OpLsh32x32(v *ssa.Value) bool {
  8370  	v_1 := v.Args[1]
  8371  	v_0 := v.Args[0]
  8372  	b := v.Block
  8373  	typ := &b.Func.Config.Types
  8374  	// match: (Lsh32x32 x y)
  8375  	// cond: ssa.ShiftIsBounded(v)
  8376  	// result: (SLL x y)
  8377  	for {
  8378  		x := v_0
  8379  		y := v_1
  8380  		if !(ssa.ShiftIsBounded(v)) {
  8381  			break
  8382  		}
  8383  		v.Reset(ssaop.OpLOONG64SLL)
  8384  		v.AddArg2(x, y)
  8385  		return true
  8386  	}
  8387  	// match: (Lsh32x32 <t> x y)
  8388  	// cond: !ssa.ShiftIsBounded(v)
  8389  	// result: (MASKEQZ (SLL <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt32to64 y)))
  8390  	for {
  8391  		t := v.Type
  8392  		x := v_0
  8393  		y := v_1
  8394  		if !(!ssa.ShiftIsBounded(v)) {
  8395  			break
  8396  		}
  8397  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8398  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8399  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8400  		v1.AddArg(y)
  8401  		v0.AddArg2(x, v1)
  8402  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8403  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8404  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  8405  		v2.AddArg2(v3, v1)
  8406  		v.AddArg2(v0, v2)
  8407  		return true
  8408  	}
  8409  	return false
  8410  }
  8411  func rewriteValue_OpLsh32x64(v *ssa.Value) bool {
  8412  	v_1 := v.Args[1]
  8413  	v_0 := v.Args[0]
  8414  	b := v.Block
  8415  	typ := &b.Func.Config.Types
  8416  	// match: (Lsh32x64 x y)
  8417  	// cond: ssa.ShiftIsBounded(v)
  8418  	// result: (SLL x y)
  8419  	for {
  8420  		x := v_0
  8421  		y := v_1
  8422  		if !(ssa.ShiftIsBounded(v)) {
  8423  			break
  8424  		}
  8425  		v.Reset(ssaop.OpLOONG64SLL)
  8426  		v.AddArg2(x, y)
  8427  		return true
  8428  	}
  8429  	// match: (Lsh32x64 <t> x y)
  8430  	// cond: !ssa.ShiftIsBounded(v)
  8431  	// result: (MASKEQZ (SLL <t> x y) (SGTU (MOVVconst <typ.UInt64> [32]) y))
  8432  	for {
  8433  		t := v.Type
  8434  		x := v_0
  8435  		y := v_1
  8436  		if !(!ssa.ShiftIsBounded(v)) {
  8437  			break
  8438  		}
  8439  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8440  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8441  		v0.AddArg2(x, y)
  8442  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8443  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8444  		v2.AuxInt = ssa.Int64ToAuxInt(32)
  8445  		v1.AddArg2(v2, y)
  8446  		v.AddArg2(v0, v1)
  8447  		return true
  8448  	}
  8449  	return false
  8450  }
  8451  func rewriteValue_OpLsh32x8(v *ssa.Value) bool {
  8452  	v_1 := v.Args[1]
  8453  	v_0 := v.Args[0]
  8454  	b := v.Block
  8455  	typ := &b.Func.Config.Types
  8456  	// match: (Lsh32x8 x y)
  8457  	// cond: ssa.ShiftIsBounded(v)
  8458  	// result: (SLL x y)
  8459  	for {
  8460  		x := v_0
  8461  		y := v_1
  8462  		if !(ssa.ShiftIsBounded(v)) {
  8463  			break
  8464  		}
  8465  		v.Reset(ssaop.OpLOONG64SLL)
  8466  		v.AddArg2(x, y)
  8467  		return true
  8468  	}
  8469  	// match: (Lsh32x8 <t> x y)
  8470  	// cond: !ssa.ShiftIsBounded(v)
  8471  	// result: (MASKEQZ (SLL <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt8to64 y)))
  8472  	for {
  8473  		t := v.Type
  8474  		x := v_0
  8475  		y := v_1
  8476  		if !(!ssa.ShiftIsBounded(v)) {
  8477  			break
  8478  		}
  8479  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8480  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8481  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8482  		v1.AddArg(y)
  8483  		v0.AddArg2(x, v1)
  8484  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8485  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8486  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  8487  		v2.AddArg2(v3, v1)
  8488  		v.AddArg2(v0, v2)
  8489  		return true
  8490  	}
  8491  	return false
  8492  }
  8493  func rewriteValue_OpLsh64x16(v *ssa.Value) bool {
  8494  	v_1 := v.Args[1]
  8495  	v_0 := v.Args[0]
  8496  	b := v.Block
  8497  	typ := &b.Func.Config.Types
  8498  	// match: (Lsh64x16 x y)
  8499  	// cond: ssa.ShiftIsBounded(v)
  8500  	// result: (SLLV x y)
  8501  	for {
  8502  		x := v_0
  8503  		y := v_1
  8504  		if !(ssa.ShiftIsBounded(v)) {
  8505  			break
  8506  		}
  8507  		v.Reset(ssaop.OpLOONG64SLLV)
  8508  		v.AddArg2(x, y)
  8509  		return true
  8510  	}
  8511  	// match: (Lsh64x16 <t> x y)
  8512  	// cond: !ssa.ShiftIsBounded(v)
  8513  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  8514  	for {
  8515  		t := v.Type
  8516  		x := v_0
  8517  		y := v_1
  8518  		if !(!ssa.ShiftIsBounded(v)) {
  8519  			break
  8520  		}
  8521  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8522  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8523  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8524  		v1.AddArg(y)
  8525  		v0.AddArg2(x, v1)
  8526  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8527  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8528  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8529  		v2.AddArg2(v3, v1)
  8530  		v.AddArg2(v0, v2)
  8531  		return true
  8532  	}
  8533  	return false
  8534  }
  8535  func rewriteValue_OpLsh64x32(v *ssa.Value) bool {
  8536  	v_1 := v.Args[1]
  8537  	v_0 := v.Args[0]
  8538  	b := v.Block
  8539  	typ := &b.Func.Config.Types
  8540  	// match: (Lsh64x32 x y)
  8541  	// cond: ssa.ShiftIsBounded(v)
  8542  	// result: (SLLV x y)
  8543  	for {
  8544  		x := v_0
  8545  		y := v_1
  8546  		if !(ssa.ShiftIsBounded(v)) {
  8547  			break
  8548  		}
  8549  		v.Reset(ssaop.OpLOONG64SLLV)
  8550  		v.AddArg2(x, y)
  8551  		return true
  8552  	}
  8553  	// match: (Lsh64x32 <t> x y)
  8554  	// cond: !ssa.ShiftIsBounded(v)
  8555  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  8556  	for {
  8557  		t := v.Type
  8558  		x := v_0
  8559  		y := v_1
  8560  		if !(!ssa.ShiftIsBounded(v)) {
  8561  			break
  8562  		}
  8563  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8564  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8565  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8566  		v1.AddArg(y)
  8567  		v0.AddArg2(x, v1)
  8568  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8569  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8570  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8571  		v2.AddArg2(v3, v1)
  8572  		v.AddArg2(v0, v2)
  8573  		return true
  8574  	}
  8575  	return false
  8576  }
  8577  func rewriteValue_OpLsh64x64(v *ssa.Value) bool {
  8578  	v_1 := v.Args[1]
  8579  	v_0 := v.Args[0]
  8580  	b := v.Block
  8581  	typ := &b.Func.Config.Types
  8582  	// match: (Lsh64x64 x y)
  8583  	// cond: ssa.ShiftIsBounded(v)
  8584  	// result: (SLLV x y)
  8585  	for {
  8586  		x := v_0
  8587  		y := v_1
  8588  		if !(ssa.ShiftIsBounded(v)) {
  8589  			break
  8590  		}
  8591  		v.Reset(ssaop.OpLOONG64SLLV)
  8592  		v.AddArg2(x, y)
  8593  		return true
  8594  	}
  8595  	// match: (Lsh64x64 <t> x y)
  8596  	// cond: !ssa.ShiftIsBounded(v)
  8597  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  8598  	for {
  8599  		t := v.Type
  8600  		x := v_0
  8601  		y := v_1
  8602  		if !(!ssa.ShiftIsBounded(v)) {
  8603  			break
  8604  		}
  8605  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8606  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8607  		v0.AddArg2(x, y)
  8608  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8609  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8610  		v2.AuxInt = ssa.Int64ToAuxInt(64)
  8611  		v1.AddArg2(v2, y)
  8612  		v.AddArg2(v0, v1)
  8613  		return true
  8614  	}
  8615  	return false
  8616  }
  8617  func rewriteValue_OpLsh64x8(v *ssa.Value) bool {
  8618  	v_1 := v.Args[1]
  8619  	v_0 := v.Args[0]
  8620  	b := v.Block
  8621  	typ := &b.Func.Config.Types
  8622  	// match: (Lsh64x8 x y)
  8623  	// cond: ssa.ShiftIsBounded(v)
  8624  	// result: (SLLV x y)
  8625  	for {
  8626  		x := v_0
  8627  		y := v_1
  8628  		if !(ssa.ShiftIsBounded(v)) {
  8629  			break
  8630  		}
  8631  		v.Reset(ssaop.OpLOONG64SLLV)
  8632  		v.AddArg2(x, y)
  8633  		return true
  8634  	}
  8635  	// match: (Lsh64x8 <t> x y)
  8636  	// cond: !ssa.ShiftIsBounded(v)
  8637  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  8638  	for {
  8639  		t := v.Type
  8640  		x := v_0
  8641  		y := v_1
  8642  		if !(!ssa.ShiftIsBounded(v)) {
  8643  			break
  8644  		}
  8645  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8646  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8647  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8648  		v1.AddArg(y)
  8649  		v0.AddArg2(x, v1)
  8650  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8651  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8652  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8653  		v2.AddArg2(v3, v1)
  8654  		v.AddArg2(v0, v2)
  8655  		return true
  8656  	}
  8657  	return false
  8658  }
  8659  func rewriteValue_OpLsh8x16(v *ssa.Value) bool {
  8660  	v_1 := v.Args[1]
  8661  	v_0 := v.Args[0]
  8662  	b := v.Block
  8663  	typ := &b.Func.Config.Types
  8664  	// match: (Lsh8x16 x y)
  8665  	// cond: ssa.ShiftIsBounded(v)
  8666  	// result: (SLLV x y)
  8667  	for {
  8668  		x := v_0
  8669  		y := v_1
  8670  		if !(ssa.ShiftIsBounded(v)) {
  8671  			break
  8672  		}
  8673  		v.Reset(ssaop.OpLOONG64SLLV)
  8674  		v.AddArg2(x, y)
  8675  		return true
  8676  	}
  8677  	// match: (Lsh8x16 <t> x y)
  8678  	// cond: !ssa.ShiftIsBounded(v)
  8679  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  8680  	for {
  8681  		t := v.Type
  8682  		x := v_0
  8683  		y := v_1
  8684  		if !(!ssa.ShiftIsBounded(v)) {
  8685  			break
  8686  		}
  8687  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8688  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8689  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8690  		v1.AddArg(y)
  8691  		v0.AddArg2(x, v1)
  8692  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8693  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8694  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8695  		v2.AddArg2(v3, v1)
  8696  		v.AddArg2(v0, v2)
  8697  		return true
  8698  	}
  8699  	return false
  8700  }
  8701  func rewriteValue_OpLsh8x32(v *ssa.Value) bool {
  8702  	v_1 := v.Args[1]
  8703  	v_0 := v.Args[0]
  8704  	b := v.Block
  8705  	typ := &b.Func.Config.Types
  8706  	// match: (Lsh8x32 x y)
  8707  	// cond: ssa.ShiftIsBounded(v)
  8708  	// result: (SLLV x y)
  8709  	for {
  8710  		x := v_0
  8711  		y := v_1
  8712  		if !(ssa.ShiftIsBounded(v)) {
  8713  			break
  8714  		}
  8715  		v.Reset(ssaop.OpLOONG64SLLV)
  8716  		v.AddArg2(x, y)
  8717  		return true
  8718  	}
  8719  	// match: (Lsh8x32 <t> x y)
  8720  	// cond: !ssa.ShiftIsBounded(v)
  8721  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  8722  	for {
  8723  		t := v.Type
  8724  		x := v_0
  8725  		y := v_1
  8726  		if !(!ssa.ShiftIsBounded(v)) {
  8727  			break
  8728  		}
  8729  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8730  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8731  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8732  		v1.AddArg(y)
  8733  		v0.AddArg2(x, v1)
  8734  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8735  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8736  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8737  		v2.AddArg2(v3, v1)
  8738  		v.AddArg2(v0, v2)
  8739  		return true
  8740  	}
  8741  	return false
  8742  }
  8743  func rewriteValue_OpLsh8x64(v *ssa.Value) bool {
  8744  	v_1 := v.Args[1]
  8745  	v_0 := v.Args[0]
  8746  	b := v.Block
  8747  	typ := &b.Func.Config.Types
  8748  	// match: (Lsh8x64 x y)
  8749  	// cond: ssa.ShiftIsBounded(v)
  8750  	// result: (SLLV x y)
  8751  	for {
  8752  		x := v_0
  8753  		y := v_1
  8754  		if !(ssa.ShiftIsBounded(v)) {
  8755  			break
  8756  		}
  8757  		v.Reset(ssaop.OpLOONG64SLLV)
  8758  		v.AddArg2(x, y)
  8759  		return true
  8760  	}
  8761  	// match: (Lsh8x64 <t> x y)
  8762  	// cond: !ssa.ShiftIsBounded(v)
  8763  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  8764  	for {
  8765  		t := v.Type
  8766  		x := v_0
  8767  		y := v_1
  8768  		if !(!ssa.ShiftIsBounded(v)) {
  8769  			break
  8770  		}
  8771  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8772  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8773  		v0.AddArg2(x, y)
  8774  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8775  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8776  		v2.AuxInt = ssa.Int64ToAuxInt(64)
  8777  		v1.AddArg2(v2, y)
  8778  		v.AddArg2(v0, v1)
  8779  		return true
  8780  	}
  8781  	return false
  8782  }
  8783  func rewriteValue_OpLsh8x8(v *ssa.Value) bool {
  8784  	v_1 := v.Args[1]
  8785  	v_0 := v.Args[0]
  8786  	b := v.Block
  8787  	typ := &b.Func.Config.Types
  8788  	// match: (Lsh8x8 x y)
  8789  	// cond: ssa.ShiftIsBounded(v)
  8790  	// result: (SLLV x y)
  8791  	for {
  8792  		x := v_0
  8793  		y := v_1
  8794  		if !(ssa.ShiftIsBounded(v)) {
  8795  			break
  8796  		}
  8797  		v.Reset(ssaop.OpLOONG64SLLV)
  8798  		v.AddArg2(x, y)
  8799  		return true
  8800  	}
  8801  	// match: (Lsh8x8 <t> x y)
  8802  	// cond: !ssa.ShiftIsBounded(v)
  8803  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  8804  	for {
  8805  		t := v.Type
  8806  		x := v_0
  8807  		y := v_1
  8808  		if !(!ssa.ShiftIsBounded(v)) {
  8809  			break
  8810  		}
  8811  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8812  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8813  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8814  		v1.AddArg(y)
  8815  		v0.AddArg2(x, v1)
  8816  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8817  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8818  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8819  		v2.AddArg2(v3, v1)
  8820  		v.AddArg2(v0, v2)
  8821  		return true
  8822  	}
  8823  	return false
  8824  }
  8825  func rewriteValue_OpMod16(v *ssa.Value) bool {
  8826  	v_1 := v.Args[1]
  8827  	v_0 := v.Args[0]
  8828  	b := v.Block
  8829  	typ := &b.Func.Config.Types
  8830  	// match: (Mod16 x y)
  8831  	// result: (REMV (SignExt16to64 x) (SignExt16to64 y))
  8832  	for {
  8833  		x := v_0
  8834  		y := v_1
  8835  		v.Reset(ssaop.OpLOONG64REMV)
  8836  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  8837  		v0.AddArg(x)
  8838  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  8839  		v1.AddArg(y)
  8840  		v.AddArg2(v0, v1)
  8841  		return true
  8842  	}
  8843  }
  8844  func rewriteValue_OpMod16u(v *ssa.Value) bool {
  8845  	v_1 := v.Args[1]
  8846  	v_0 := v.Args[0]
  8847  	b := v.Block
  8848  	typ := &b.Func.Config.Types
  8849  	// match: (Mod16u x y)
  8850  	// result: (REMVU (ZeroExt16to64 x) (ZeroExt16to64 y))
  8851  	for {
  8852  		x := v_0
  8853  		y := v_1
  8854  		v.Reset(ssaop.OpLOONG64REMVU)
  8855  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8856  		v0.AddArg(x)
  8857  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8858  		v1.AddArg(y)
  8859  		v.AddArg2(v0, v1)
  8860  		return true
  8861  	}
  8862  }
  8863  func rewriteValue_OpMod32(v *ssa.Value) bool {
  8864  	v_1 := v.Args[1]
  8865  	v_0 := v.Args[0]
  8866  	b := v.Block
  8867  	typ := &b.Func.Config.Types
  8868  	// match: (Mod32 x y)
  8869  	// result: (REMV (SignExt32to64 x) (SignExt32to64 y))
  8870  	for {
  8871  		x := v_0
  8872  		y := v_1
  8873  		v.Reset(ssaop.OpLOONG64REMV)
  8874  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  8875  		v0.AddArg(x)
  8876  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  8877  		v1.AddArg(y)
  8878  		v.AddArg2(v0, v1)
  8879  		return true
  8880  	}
  8881  }
  8882  func rewriteValue_OpMod32u(v *ssa.Value) bool {
  8883  	v_1 := v.Args[1]
  8884  	v_0 := v.Args[0]
  8885  	b := v.Block
  8886  	typ := &b.Func.Config.Types
  8887  	// match: (Mod32u x y)
  8888  	// result: (REMVU (ZeroExt32to64 x) (ZeroExt32to64 y))
  8889  	for {
  8890  		x := v_0
  8891  		y := v_1
  8892  		v.Reset(ssaop.OpLOONG64REMVU)
  8893  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8894  		v0.AddArg(x)
  8895  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8896  		v1.AddArg(y)
  8897  		v.AddArg2(v0, v1)
  8898  		return true
  8899  	}
  8900  }
  8901  func rewriteValue_OpMod64(v *ssa.Value) bool {
  8902  	v_1 := v.Args[1]
  8903  	v_0 := v.Args[0]
  8904  	// match: (Mod64 x y)
  8905  	// result: (REMV x y)
  8906  	for {
  8907  		x := v_0
  8908  		y := v_1
  8909  		v.Reset(ssaop.OpLOONG64REMV)
  8910  		v.AddArg2(x, y)
  8911  		return true
  8912  	}
  8913  }
  8914  func rewriteValue_OpMod8(v *ssa.Value) bool {
  8915  	v_1 := v.Args[1]
  8916  	v_0 := v.Args[0]
  8917  	b := v.Block
  8918  	typ := &b.Func.Config.Types
  8919  	// match: (Mod8 x y)
  8920  	// result: (REMV (SignExt8to64 x) (SignExt8to64 y))
  8921  	for {
  8922  		x := v_0
  8923  		y := v_1
  8924  		v.Reset(ssaop.OpLOONG64REMV)
  8925  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  8926  		v0.AddArg(x)
  8927  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  8928  		v1.AddArg(y)
  8929  		v.AddArg2(v0, v1)
  8930  		return true
  8931  	}
  8932  }
  8933  func rewriteValue_OpMod8u(v *ssa.Value) bool {
  8934  	v_1 := v.Args[1]
  8935  	v_0 := v.Args[0]
  8936  	b := v.Block
  8937  	typ := &b.Func.Config.Types
  8938  	// match: (Mod8u x y)
  8939  	// result: (REMVU (ZeroExt8to64 x) (ZeroExt8to64 y))
  8940  	for {
  8941  		x := v_0
  8942  		y := v_1
  8943  		v.Reset(ssaop.OpLOONG64REMVU)
  8944  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8945  		v0.AddArg(x)
  8946  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8947  		v1.AddArg(y)
  8948  		v.AddArg2(v0, v1)
  8949  		return true
  8950  	}
  8951  }
  8952  func rewriteValue_OpMove(v *ssa.Value) bool {
  8953  	v_2 := v.Args[2]
  8954  	v_1 := v.Args[1]
  8955  	v_0 := v.Args[0]
  8956  	b := v.Block
  8957  	typ := &b.Func.Config.Types
  8958  	// match: (Move [0] _ _ mem)
  8959  	// result: mem
  8960  	for {
  8961  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  8962  			break
  8963  		}
  8964  		mem := v_2
  8965  		v.CopyOf(mem)
  8966  		return true
  8967  	}
  8968  	// match: (Move [1] dst src mem)
  8969  	// result: (MOVBstore dst (MOVBUload src mem) mem)
  8970  	for {
  8971  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
  8972  			break
  8973  		}
  8974  		dst := v_0
  8975  		src := v_1
  8976  		mem := v_2
  8977  		v.Reset(ssaop.OpLOONG64MOVBstore)
  8978  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  8979  		v0.AddArg2(src, mem)
  8980  		v.AddArg3(dst, v0, mem)
  8981  		return true
  8982  	}
  8983  	// match: (Move [2] dst src mem)
  8984  	// result: (MOVHstore dst (MOVHUload src mem) mem)
  8985  	for {
  8986  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
  8987  			break
  8988  		}
  8989  		dst := v_0
  8990  		src := v_1
  8991  		mem := v_2
  8992  		v.Reset(ssaop.OpLOONG64MOVHstore)
  8993  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  8994  		v0.AddArg2(src, mem)
  8995  		v.AddArg3(dst, v0, mem)
  8996  		return true
  8997  	}
  8998  	// match: (Move [3] dst src mem)
  8999  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
  9000  	for {
  9001  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
  9002  			break
  9003  		}
  9004  		dst := v_0
  9005  		src := v_1
  9006  		mem := v_2
  9007  		v.Reset(ssaop.OpLOONG64MOVBstore)
  9008  		v.AuxInt = ssa.Int32ToAuxInt(2)
  9009  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  9010  		v0.AuxInt = ssa.Int32ToAuxInt(2)
  9011  		v0.AddArg2(src, mem)
  9012  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHstore, types.TypeMem)
  9013  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  9014  		v2.AddArg2(src, mem)
  9015  		v1.AddArg3(dst, v2, mem)
  9016  		v.AddArg3(dst, v0, v1)
  9017  		return true
  9018  	}
  9019  	// match: (Move [4] dst src mem)
  9020  	// result: (MOVWstore dst (MOVWUload src mem) mem)
  9021  	for {
  9022  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
  9023  			break
  9024  		}
  9025  		dst := v_0
  9026  		src := v_1
  9027  		mem := v_2
  9028  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9029  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9030  		v0.AddArg2(src, mem)
  9031  		v.AddArg3(dst, v0, mem)
  9032  		return true
  9033  	}
  9034  	// match: (Move [5] dst src mem)
  9035  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9036  	for {
  9037  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
  9038  			break
  9039  		}
  9040  		dst := v_0
  9041  		src := v_1
  9042  		mem := v_2
  9043  		v.Reset(ssaop.OpLOONG64MOVBstore)
  9044  		v.AuxInt = ssa.Int32ToAuxInt(4)
  9045  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  9046  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  9047  		v0.AddArg2(src, mem)
  9048  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
  9049  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9050  		v2.AddArg2(src, mem)
  9051  		v1.AddArg3(dst, v2, mem)
  9052  		v.AddArg3(dst, v0, v1)
  9053  		return true
  9054  	}
  9055  	// match: (Move [6] dst src mem)
  9056  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9057  	for {
  9058  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
  9059  			break
  9060  		}
  9061  		dst := v_0
  9062  		src := v_1
  9063  		mem := v_2
  9064  		v.Reset(ssaop.OpLOONG64MOVHstore)
  9065  		v.AuxInt = ssa.Int32ToAuxInt(4)
  9066  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  9067  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  9068  		v0.AddArg2(src, mem)
  9069  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
  9070  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9071  		v2.AddArg2(src, mem)
  9072  		v1.AddArg3(dst, v2, mem)
  9073  		v.AddArg3(dst, v0, v1)
  9074  		return true
  9075  	}
  9076  	// match: (Move [7] dst src mem)
  9077  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9078  	for {
  9079  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
  9080  			break
  9081  		}
  9082  		dst := v_0
  9083  		src := v_1
  9084  		mem := v_2
  9085  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9086  		v.AuxInt = ssa.Int32ToAuxInt(3)
  9087  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9088  		v0.AuxInt = ssa.Int32ToAuxInt(3)
  9089  		v0.AddArg2(src, mem)
  9090  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
  9091  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9092  		v2.AddArg2(src, mem)
  9093  		v1.AddArg3(dst, v2, mem)
  9094  		v.AddArg3(dst, v0, v1)
  9095  		return true
  9096  	}
  9097  	// match: (Move [8] dst src mem)
  9098  	// result: (MOVVstore dst (MOVVload src mem) mem)
  9099  	for {
  9100  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
  9101  			break
  9102  		}
  9103  		dst := v_0
  9104  		src := v_1
  9105  		mem := v_2
  9106  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9107  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9108  		v0.AddArg2(src, mem)
  9109  		v.AddArg3(dst, v0, mem)
  9110  		return true
  9111  	}
  9112  	// match: (Move [9] dst src mem)
  9113  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9114  	for {
  9115  		if ssa.AuxIntToInt64(v.AuxInt) != 9 {
  9116  			break
  9117  		}
  9118  		dst := v_0
  9119  		src := v_1
  9120  		mem := v_2
  9121  		v.Reset(ssaop.OpLOONG64MOVBstore)
  9122  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9123  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  9124  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9125  		v0.AddArg2(src, mem)
  9126  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9127  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9128  		v2.AddArg2(src, mem)
  9129  		v1.AddArg3(dst, v2, mem)
  9130  		v.AddArg3(dst, v0, v1)
  9131  		return true
  9132  	}
  9133  	// match: (Move [10] dst src mem)
  9134  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9135  	for {
  9136  		if ssa.AuxIntToInt64(v.AuxInt) != 10 {
  9137  			break
  9138  		}
  9139  		dst := v_0
  9140  		src := v_1
  9141  		mem := v_2
  9142  		v.Reset(ssaop.OpLOONG64MOVHstore)
  9143  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9144  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  9145  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9146  		v0.AddArg2(src, mem)
  9147  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9148  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9149  		v2.AddArg2(src, mem)
  9150  		v1.AddArg3(dst, v2, mem)
  9151  		v.AddArg3(dst, v0, v1)
  9152  		return true
  9153  	}
  9154  	// match: (Move [11] dst src mem)
  9155  	// result: (MOVWstore [7] dst (MOVWload [7] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9156  	for {
  9157  		if ssa.AuxIntToInt64(v.AuxInt) != 11 {
  9158  			break
  9159  		}
  9160  		dst := v_0
  9161  		src := v_1
  9162  		mem := v_2
  9163  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9164  		v.AuxInt = ssa.Int32ToAuxInt(7)
  9165  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWload, typ.Int32)
  9166  		v0.AuxInt = ssa.Int32ToAuxInt(7)
  9167  		v0.AddArg2(src, mem)
  9168  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9169  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9170  		v2.AddArg2(src, mem)
  9171  		v1.AddArg3(dst, v2, mem)
  9172  		v.AddArg3(dst, v0, v1)
  9173  		return true
  9174  	}
  9175  	// match: (Move [12] dst src mem)
  9176  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9177  	for {
  9178  		if ssa.AuxIntToInt64(v.AuxInt) != 12 {
  9179  			break
  9180  		}
  9181  		dst := v_0
  9182  		src := v_1
  9183  		mem := v_2
  9184  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9185  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9186  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9187  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9188  		v0.AddArg2(src, mem)
  9189  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9190  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9191  		v2.AddArg2(src, mem)
  9192  		v1.AddArg3(dst, v2, mem)
  9193  		v.AddArg3(dst, v0, v1)
  9194  		return true
  9195  	}
  9196  	// match: (Move [13] dst src mem)
  9197  	// result: (MOVVstore [5] dst (MOVVload [5] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9198  	for {
  9199  		if ssa.AuxIntToInt64(v.AuxInt) != 13 {
  9200  			break
  9201  		}
  9202  		dst := v_0
  9203  		src := v_1
  9204  		mem := v_2
  9205  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9206  		v.AuxInt = ssa.Int32ToAuxInt(5)
  9207  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9208  		v0.AuxInt = ssa.Int32ToAuxInt(5)
  9209  		v0.AddArg2(src, mem)
  9210  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9211  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9212  		v2.AddArg2(src, mem)
  9213  		v1.AddArg3(dst, v2, mem)
  9214  		v.AddArg3(dst, v0, v1)
  9215  		return true
  9216  	}
  9217  	// match: (Move [14] dst src mem)
  9218  	// result: (MOVVstore [6] dst (MOVVload [6] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9219  	for {
  9220  		if ssa.AuxIntToInt64(v.AuxInt) != 14 {
  9221  			break
  9222  		}
  9223  		dst := v_0
  9224  		src := v_1
  9225  		mem := v_2
  9226  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9227  		v.AuxInt = ssa.Int32ToAuxInt(6)
  9228  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9229  		v0.AuxInt = ssa.Int32ToAuxInt(6)
  9230  		v0.AddArg2(src, mem)
  9231  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9232  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9233  		v2.AddArg2(src, mem)
  9234  		v1.AddArg3(dst, v2, mem)
  9235  		v.AddArg3(dst, v0, v1)
  9236  		return true
  9237  	}
  9238  	// match: (Move [15] dst src mem)
  9239  	// result: (MOVVstore [7] dst (MOVVload [7] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9240  	for {
  9241  		if ssa.AuxIntToInt64(v.AuxInt) != 15 {
  9242  			break
  9243  		}
  9244  		dst := v_0
  9245  		src := v_1
  9246  		mem := v_2
  9247  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9248  		v.AuxInt = ssa.Int32ToAuxInt(7)
  9249  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9250  		v0.AuxInt = ssa.Int32ToAuxInt(7)
  9251  		v0.AddArg2(src, mem)
  9252  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9253  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9254  		v2.AddArg2(src, mem)
  9255  		v1.AddArg3(dst, v2, mem)
  9256  		v.AddArg3(dst, v0, v1)
  9257  		return true
  9258  	}
  9259  	// match: (Move [16] dst src mem)
  9260  	// result: (MOVVstore [8] dst (MOVVload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9261  	for {
  9262  		if ssa.AuxIntToInt64(v.AuxInt) != 16 {
  9263  			break
  9264  		}
  9265  		dst := v_0
  9266  		src := v_1
  9267  		mem := v_2
  9268  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9269  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9270  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9271  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9272  		v0.AddArg2(src, mem)
  9273  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9274  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9275  		v2.AddArg2(src, mem)
  9276  		v1.AddArg3(dst, v2, mem)
  9277  		v.AddArg3(dst, v0, v1)
  9278  		return true
  9279  	}
  9280  	// match: (Move [s] dst src mem)
  9281  	// cond: s > 16 && s < 192 && ssa.LogLargeCopyValue(v, s)
  9282  	// result: (LoweredMove [s] dst src mem)
  9283  	for {
  9284  		s := ssa.AuxIntToInt64(v.AuxInt)
  9285  		dst := v_0
  9286  		src := v_1
  9287  		mem := v_2
  9288  		if !(s > 16 && s < 192 && ssa.LogLargeCopyValue(v, s)) {
  9289  			break
  9290  		}
  9291  		v.Reset(ssaop.OpLOONG64LoweredMove)
  9292  		v.AuxInt = ssa.Int64ToAuxInt(s)
  9293  		v.AddArg3(dst, src, mem)
  9294  		return true
  9295  	}
  9296  	// match: (Move [s] dst src mem)
  9297  	// cond: s >= 192 && ssa.LogLargeCopyValue(v, s)
  9298  	// result: (LoweredMoveLoop [s] dst src mem)
  9299  	for {
  9300  		s := ssa.AuxIntToInt64(v.AuxInt)
  9301  		dst := v_0
  9302  		src := v_1
  9303  		mem := v_2
  9304  		if !(s >= 192 && ssa.LogLargeCopyValue(v, s)) {
  9305  			break
  9306  		}
  9307  		v.Reset(ssaop.OpLOONG64LoweredMoveLoop)
  9308  		v.AuxInt = ssa.Int64ToAuxInt(s)
  9309  		v.AddArg3(dst, src, mem)
  9310  		return true
  9311  	}
  9312  	return false
  9313  }
  9314  func rewriteValue_OpNeq16(v *ssa.Value) bool {
  9315  	v_1 := v.Args[1]
  9316  	v_0 := v.Args[0]
  9317  	b := v.Block
  9318  	typ := &b.Func.Config.Types
  9319  	// match: (Neq16 x y)
  9320  	// result: (SGTU (XOR (ZeroExt16to32 x) (ZeroExt16to64 y)) (MOVVconst [0]))
  9321  	for {
  9322  		x := v_0
  9323  		y := v_1
  9324  		v.Reset(ssaop.OpLOONG64SGTU)
  9325  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9326  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  9327  		v1.AddArg(x)
  9328  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9329  		v2.AddArg(y)
  9330  		v0.AddArg2(v1, v2)
  9331  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9332  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  9333  		v.AddArg2(v0, v3)
  9334  		return true
  9335  	}
  9336  }
  9337  func rewriteValue_OpNeq32(v *ssa.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: (Neq32 x y)
  9343  	// result: (SGTU (XOR (ZeroExt32to64 x) (ZeroExt32to64 y)) (MOVVconst [0]))
  9344  	for {
  9345  		x := v_0
  9346  		y := v_1
  9347  		v.Reset(ssaop.OpLOONG64SGTU)
  9348  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9349  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9350  		v1.AddArg(x)
  9351  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9352  		v2.AddArg(y)
  9353  		v0.AddArg2(v1, v2)
  9354  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9355  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  9356  		v.AddArg2(v0, v3)
  9357  		return true
  9358  	}
  9359  }
  9360  func rewriteValue_OpNeq32F(v *ssa.Value) bool {
  9361  	v_1 := v.Args[1]
  9362  	v_0 := v.Args[0]
  9363  	b := v.Block
  9364  	// match: (Neq32F x y)
  9365  	// result: (FPFlagFalse (CMPEQF x y))
  9366  	for {
  9367  		x := v_0
  9368  		y := v_1
  9369  		v.Reset(ssaop.OpLOONG64FPFlagFalse)
  9370  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQF, types.TypeFlags)
  9371  		v0.AddArg2(x, y)
  9372  		v.AddArg(v0)
  9373  		return true
  9374  	}
  9375  }
  9376  func rewriteValue_OpNeq64(v *ssa.Value) bool {
  9377  	v_1 := v.Args[1]
  9378  	v_0 := v.Args[0]
  9379  	b := v.Block
  9380  	typ := &b.Func.Config.Types
  9381  	// match: (Neq64 x y)
  9382  	// result: (SGTU (XOR x y) (MOVVconst [0]))
  9383  	for {
  9384  		x := v_0
  9385  		y := v_1
  9386  		v.Reset(ssaop.OpLOONG64SGTU)
  9387  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9388  		v0.AddArg2(x, y)
  9389  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9390  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  9391  		v.AddArg2(v0, v1)
  9392  		return true
  9393  	}
  9394  }
  9395  func rewriteValue_OpNeq64F(v *ssa.Value) bool {
  9396  	v_1 := v.Args[1]
  9397  	v_0 := v.Args[0]
  9398  	b := v.Block
  9399  	// match: (Neq64F x y)
  9400  	// result: (FPFlagFalse (CMPEQD x y))
  9401  	for {
  9402  		x := v_0
  9403  		y := v_1
  9404  		v.Reset(ssaop.OpLOONG64FPFlagFalse)
  9405  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQD, types.TypeFlags)
  9406  		v0.AddArg2(x, y)
  9407  		v.AddArg(v0)
  9408  		return true
  9409  	}
  9410  }
  9411  func rewriteValue_OpNeq8(v *ssa.Value) bool {
  9412  	v_1 := v.Args[1]
  9413  	v_0 := v.Args[0]
  9414  	b := v.Block
  9415  	typ := &b.Func.Config.Types
  9416  	// match: (Neq8 x y)
  9417  	// result: (SGTU (XOR (ZeroExt8to64 x) (ZeroExt8to64 y)) (MOVVconst [0]))
  9418  	for {
  9419  		x := v_0
  9420  		y := v_1
  9421  		v.Reset(ssaop.OpLOONG64SGTU)
  9422  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9423  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9424  		v1.AddArg(x)
  9425  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9426  		v2.AddArg(y)
  9427  		v0.AddArg2(v1, v2)
  9428  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9429  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  9430  		v.AddArg2(v0, v3)
  9431  		return true
  9432  	}
  9433  }
  9434  func rewriteValue_OpNeqPtr(v *ssa.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: (NeqPtr x y)
  9440  	// result: (SGTU (XOR x y) (MOVVconst [0]))
  9441  	for {
  9442  		x := v_0
  9443  		y := v_1
  9444  		v.Reset(ssaop.OpLOONG64SGTU)
  9445  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9446  		v0.AddArg2(x, y)
  9447  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9448  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  9449  		v.AddArg2(v0, v1)
  9450  		return true
  9451  	}
  9452  }
  9453  func rewriteValue_OpNot(v *ssa.Value) bool {
  9454  	v_0 := v.Args[0]
  9455  	// match: (Not x)
  9456  	// result: (XORconst [1] x)
  9457  	for {
  9458  		x := v_0
  9459  		v.Reset(ssaop.OpLOONG64XORconst)
  9460  		v.AuxInt = ssa.Int64ToAuxInt(1)
  9461  		v.AddArg(x)
  9462  		return true
  9463  	}
  9464  }
  9465  func rewriteValue_OpOffPtr(v *ssa.Value) bool {
  9466  	v_0 := v.Args[0]
  9467  	// match: (OffPtr [off] ptr:(SP))
  9468  	// result: (MOVVaddr [int32(off)] ptr)
  9469  	for {
  9470  		off := ssa.AuxIntToInt64(v.AuxInt)
  9471  		ptr := v_0
  9472  		if ptr.Op != ssaop.OpSP {
  9473  			break
  9474  		}
  9475  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  9476  		v.AuxInt = ssa.Int32ToAuxInt(int32(off))
  9477  		v.AddArg(ptr)
  9478  		return true
  9479  	}
  9480  	// match: (OffPtr [off] ptr)
  9481  	// result: (ADDVconst [off] ptr)
  9482  	for {
  9483  		off := ssa.AuxIntToInt64(v.AuxInt)
  9484  		ptr := v_0
  9485  		v.Reset(ssaop.OpLOONG64ADDVconst)
  9486  		v.AuxInt = ssa.Int64ToAuxInt(off)
  9487  		v.AddArg(ptr)
  9488  		return true
  9489  	}
  9490  }
  9491  func rewriteValue_OpPopCount16(v *ssa.Value) bool {
  9492  	v_0 := v.Args[0]
  9493  	b := v.Block
  9494  	typ := &b.Func.Config.Types
  9495  	// match: (PopCount16 <t> x)
  9496  	// result: (MOVWfpgp <t> (VPCNT16 <typ.Float32> (MOVWgpfp <typ.Float32> (ZeroExt16to32 x))))
  9497  	for {
  9498  		t := v.Type
  9499  		x := v_0
  9500  		v.Reset(ssaop.OpLOONG64MOVWfpgp)
  9501  		v.Type = t
  9502  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64VPCNT16, typ.Float32)
  9503  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWgpfp, typ.Float32)
  9504  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  9505  		v2.AddArg(x)
  9506  		v1.AddArg(v2)
  9507  		v0.AddArg(v1)
  9508  		v.AddArg(v0)
  9509  		return true
  9510  	}
  9511  }
  9512  func rewriteValue_OpPopCount32(v *ssa.Value) bool {
  9513  	v_0 := v.Args[0]
  9514  	b := v.Block
  9515  	typ := &b.Func.Config.Types
  9516  	// match: (PopCount32 <t> x)
  9517  	// result: (MOVWfpgp <t> (VPCNT32 <typ.Float32> (MOVWgpfp <typ.Float32> x)))
  9518  	for {
  9519  		t := v.Type
  9520  		x := v_0
  9521  		v.Reset(ssaop.OpLOONG64MOVWfpgp)
  9522  		v.Type = t
  9523  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64VPCNT32, typ.Float32)
  9524  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWgpfp, typ.Float32)
  9525  		v1.AddArg(x)
  9526  		v0.AddArg(v1)
  9527  		v.AddArg(v0)
  9528  		return true
  9529  	}
  9530  }
  9531  func rewriteValue_OpPopCount64(v *ssa.Value) bool {
  9532  	v_0 := v.Args[0]
  9533  	b := v.Block
  9534  	typ := &b.Func.Config.Types
  9535  	// match: (PopCount64 <t> x)
  9536  	// result: (MOVVfpgp <t> (VPCNT64 <typ.Float64> (MOVVgpfp <typ.Float64> x)))
  9537  	for {
  9538  		t := v.Type
  9539  		x := v_0
  9540  		v.Reset(ssaop.OpLOONG64MOVVfpgp)
  9541  		v.Type = t
  9542  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64VPCNT64, typ.Float64)
  9543  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVgpfp, typ.Float64)
  9544  		v1.AddArg(x)
  9545  		v0.AddArg(v1)
  9546  		v.AddArg(v0)
  9547  		return true
  9548  	}
  9549  }
  9550  func rewriteValue_OpPrefetchCache(v *ssa.Value) bool {
  9551  	v_1 := v.Args[1]
  9552  	v_0 := v.Args[0]
  9553  	// match: (PrefetchCache addr mem)
  9554  	// result: (PRELD addr mem [0])
  9555  	for {
  9556  		addr := v_0
  9557  		mem := v_1
  9558  		v.Reset(ssaop.OpLOONG64PRELD)
  9559  		v.AuxInt = ssa.Int64ToAuxInt(0)
  9560  		v.AddArg2(addr, mem)
  9561  		return true
  9562  	}
  9563  }
  9564  func rewriteValue_OpPrefetchCacheStreamed(v *ssa.Value) bool {
  9565  	v_1 := v.Args[1]
  9566  	v_0 := v.Args[0]
  9567  	// match: (PrefetchCacheStreamed addr mem)
  9568  	// result: (PRELDX addr mem [(((512 << 1) + (1 << 12)) << 5) + 2])
  9569  	for {
  9570  		addr := v_0
  9571  		mem := v_1
  9572  		v.Reset(ssaop.OpLOONG64PRELDX)
  9573  		v.AuxInt = ssa.Int64ToAuxInt((((512 << 1) + (1 << 12)) << 5) + 2)
  9574  		v.AddArg2(addr, mem)
  9575  		return true
  9576  	}
  9577  }
  9578  func rewriteValue_OpRotateLeft16(v *ssa.Value) bool {
  9579  	v_1 := v.Args[1]
  9580  	v_0 := v.Args[0]
  9581  	b := v.Block
  9582  	typ := &b.Func.Config.Types
  9583  	// match: (RotateLeft16 <t> x (MOVVconst [c]))
  9584  	// result: (Or16 (Lsh16x64 <t> x (MOVVconst [c&15])) (Rsh16Ux64 <t> x (MOVVconst [-c&15])))
  9585  	for {
  9586  		t := v.Type
  9587  		x := v_0
  9588  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  9589  			break
  9590  		}
  9591  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9592  		v.Reset(ssaop.OpOr16)
  9593  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh16x64, t)
  9594  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9595  		v1.AuxInt = ssa.Int64ToAuxInt(c & 15)
  9596  		v0.AddArg2(x, v1)
  9597  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh16Ux64, t)
  9598  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9599  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 15)
  9600  		v2.AddArg2(x, v3)
  9601  		v.AddArg2(v0, v2)
  9602  		return true
  9603  	}
  9604  	// match: (RotateLeft16 <t> x y)
  9605  	// result: (ROTR <t> (OR <typ.UInt32> (ZeroExt16to32 x) (SLLVconst <t> (ZeroExt16to32 x) [16])) (NEGV <typ.Int64> y))
  9606  	for {
  9607  		t := v.Type
  9608  		x := v_0
  9609  		y := v_1
  9610  		v.Reset(ssaop.OpLOONG64ROTR)
  9611  		v.Type = t
  9612  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, typ.UInt32)
  9613  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  9614  		v1.AddArg(x)
  9615  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, t)
  9616  		v2.AuxInt = ssa.Int64ToAuxInt(16)
  9617  		v2.AddArg(v1)
  9618  		v0.AddArg2(v1, v2)
  9619  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, typ.Int64)
  9620  		v3.AddArg(y)
  9621  		v.AddArg2(v0, v3)
  9622  		return true
  9623  	}
  9624  }
  9625  func rewriteValue_OpRotateLeft32(v *ssa.Value) bool {
  9626  	v_1 := v.Args[1]
  9627  	v_0 := v.Args[0]
  9628  	b := v.Block
  9629  	// match: (RotateLeft32 x y)
  9630  	// result: (ROTR x (NEGV <y.Type> y))
  9631  	for {
  9632  		x := v_0
  9633  		y := v_1
  9634  		v.Reset(ssaop.OpLOONG64ROTR)
  9635  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, y.Type)
  9636  		v0.AddArg(y)
  9637  		v.AddArg2(x, v0)
  9638  		return true
  9639  	}
  9640  }
  9641  func rewriteValue_OpRotateLeft64(v *ssa.Value) bool {
  9642  	v_1 := v.Args[1]
  9643  	v_0 := v.Args[0]
  9644  	b := v.Block
  9645  	// match: (RotateLeft64 x y)
  9646  	// result: (ROTRV x (NEGV <y.Type> y))
  9647  	for {
  9648  		x := v_0
  9649  		y := v_1
  9650  		v.Reset(ssaop.OpLOONG64ROTRV)
  9651  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, y.Type)
  9652  		v0.AddArg(y)
  9653  		v.AddArg2(x, v0)
  9654  		return true
  9655  	}
  9656  }
  9657  func rewriteValue_OpRotateLeft8(v *ssa.Value) bool {
  9658  	v_1 := v.Args[1]
  9659  	v_0 := v.Args[0]
  9660  	b := v.Block
  9661  	typ := &b.Func.Config.Types
  9662  	// match: (RotateLeft8 <t> x (MOVVconst [c]))
  9663  	// result: (Or8 (Lsh8x64 <t> x (MOVVconst [c&7])) (Rsh8Ux64 <t> x (MOVVconst [-c&7])))
  9664  	for {
  9665  		t := v.Type
  9666  		x := v_0
  9667  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  9668  			break
  9669  		}
  9670  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9671  		v.Reset(ssaop.OpOr8)
  9672  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh8x64, t)
  9673  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9674  		v1.AuxInt = ssa.Int64ToAuxInt(c & 7)
  9675  		v0.AddArg2(x, v1)
  9676  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh8Ux64, t)
  9677  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9678  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 7)
  9679  		v2.AddArg2(x, v3)
  9680  		v.AddArg2(v0, v2)
  9681  		return true
  9682  	}
  9683  	// match: (RotateLeft8 <t> x y)
  9684  	// result: (OR <t> (SLLV <t> x (ANDconst <typ.Int64> [7] y)) (SRLV <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEGV <typ.Int64> y))))
  9685  	for {
  9686  		t := v.Type
  9687  		x := v_0
  9688  		y := v_1
  9689  		v.Reset(ssaop.OpLOONG64OR)
  9690  		v.Type = t
  9691  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  9692  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.Int64)
  9693  		v1.AuxInt = ssa.Int64ToAuxInt(7)
  9694  		v1.AddArg(y)
  9695  		v0.AddArg2(x, v1)
  9696  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
  9697  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9698  		v3.AddArg(x)
  9699  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.Int64)
  9700  		v4.AuxInt = ssa.Int64ToAuxInt(7)
  9701  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, typ.Int64)
  9702  		v5.AddArg(y)
  9703  		v4.AddArg(v5)
  9704  		v2.AddArg2(v3, v4)
  9705  		v.AddArg2(v0, v2)
  9706  		return true
  9707  	}
  9708  }
  9709  func rewriteValue_OpRsh16Ux16(v *ssa.Value) bool {
  9710  	v_1 := v.Args[1]
  9711  	v_0 := v.Args[0]
  9712  	b := v.Block
  9713  	typ := &b.Func.Config.Types
  9714  	// match: (Rsh16Ux16 x y)
  9715  	// cond: ssa.ShiftIsBounded(v)
  9716  	// result: (SRLV (ZeroExt16to64 x) y)
  9717  	for {
  9718  		x := v_0
  9719  		y := v_1
  9720  		if !(ssa.ShiftIsBounded(v)) {
  9721  			break
  9722  		}
  9723  		v.Reset(ssaop.OpLOONG64SRLV)
  9724  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9725  		v0.AddArg(x)
  9726  		v.AddArg2(v0, y)
  9727  		return true
  9728  	}
  9729  	// match: (Rsh16Ux16 <t> x y)
  9730  	// cond: !ssa.ShiftIsBounded(v)
  9731  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  9732  	for {
  9733  		t := v.Type
  9734  		x := v_0
  9735  		y := v_1
  9736  		if !(!ssa.ShiftIsBounded(v)) {
  9737  			break
  9738  		}
  9739  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9740  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
  9741  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9742  		v1.AddArg(x)
  9743  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9744  		v2.AddArg(y)
  9745  		v0.AddArg2(v1, v2)
  9746  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9747  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9748  		v4.AuxInt = ssa.Int64ToAuxInt(64)
  9749  		v3.AddArg2(v4, v2)
  9750  		v.AddArg2(v0, v3)
  9751  		return true
  9752  	}
  9753  	return false
  9754  }
  9755  func rewriteValue_OpRsh16Ux32(v *ssa.Value) bool {
  9756  	v_1 := v.Args[1]
  9757  	v_0 := v.Args[0]
  9758  	b := v.Block
  9759  	typ := &b.Func.Config.Types
  9760  	// match: (Rsh16Ux32 x y)
  9761  	// cond: ssa.ShiftIsBounded(v)
  9762  	// result: (SRLV (ZeroExt16to64 x) y)
  9763  	for {
  9764  		x := v_0
  9765  		y := v_1
  9766  		if !(ssa.ShiftIsBounded(v)) {
  9767  			break
  9768  		}
  9769  		v.Reset(ssaop.OpLOONG64SRLV)
  9770  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9771  		v0.AddArg(x)
  9772  		v.AddArg2(v0, y)
  9773  		return true
  9774  	}
  9775  	// match: (Rsh16Ux32 <t> x y)
  9776  	// cond: !ssa.ShiftIsBounded(v)
  9777  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  9778  	for {
  9779  		t := v.Type
  9780  		x := v_0
  9781  		y := v_1
  9782  		if !(!ssa.ShiftIsBounded(v)) {
  9783  			break
  9784  		}
  9785  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9786  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
  9787  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9788  		v1.AddArg(x)
  9789  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9790  		v2.AddArg(y)
  9791  		v0.AddArg2(v1, v2)
  9792  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9793  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9794  		v4.AuxInt = ssa.Int64ToAuxInt(64)
  9795  		v3.AddArg2(v4, v2)
  9796  		v.AddArg2(v0, v3)
  9797  		return true
  9798  	}
  9799  	return false
  9800  }
  9801  func rewriteValue_OpRsh16Ux64(v *ssa.Value) bool {
  9802  	v_1 := v.Args[1]
  9803  	v_0 := v.Args[0]
  9804  	b := v.Block
  9805  	typ := &b.Func.Config.Types
  9806  	// match: (Rsh16Ux64 x y)
  9807  	// cond: ssa.ShiftIsBounded(v)
  9808  	// result: (SRLV (ZeroExt16to64 x) y)
  9809  	for {
  9810  		x := v_0
  9811  		y := v_1
  9812  		if !(ssa.ShiftIsBounded(v)) {
  9813  			break
  9814  		}
  9815  		v.Reset(ssaop.OpLOONG64SRLV)
  9816  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9817  		v0.AddArg(x)
  9818  		v.AddArg2(v0, y)
  9819  		return true
  9820  	}
  9821  	// match: (Rsh16Ux64 <t> x y)
  9822  	// cond: !ssa.ShiftIsBounded(v)
  9823  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  9824  	for {
  9825  		t := v.Type
  9826  		x := v_0
  9827  		y := v_1
  9828  		if !(!ssa.ShiftIsBounded(v)) {
  9829  			break
  9830  		}
  9831  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9832  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
  9833  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9834  		v1.AddArg(x)
  9835  		v0.AddArg2(v1, y)
  9836  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9837  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9838  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  9839  		v2.AddArg2(v3, y)
  9840  		v.AddArg2(v0, v2)
  9841  		return true
  9842  	}
  9843  	return false
  9844  }
  9845  func rewriteValue_OpRsh16Ux8(v *ssa.Value) bool {
  9846  	v_1 := v.Args[1]
  9847  	v_0 := v.Args[0]
  9848  	b := v.Block
  9849  	typ := &b.Func.Config.Types
  9850  	// match: (Rsh16Ux8 x y)
  9851  	// cond: ssa.ShiftIsBounded(v)
  9852  	// result: (SRLV (ZeroExt16to64 x) y)
  9853  	for {
  9854  		x := v_0
  9855  		y := v_1
  9856  		if !(ssa.ShiftIsBounded(v)) {
  9857  			break
  9858  		}
  9859  		v.Reset(ssaop.OpLOONG64SRLV)
  9860  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9861  		v0.AddArg(x)
  9862  		v.AddArg2(v0, y)
  9863  		return true
  9864  	}
  9865  	// match: (Rsh16Ux8 <t> x y)
  9866  	// cond: !ssa.ShiftIsBounded(v)
  9867  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  9868  	for {
  9869  		t := v.Type
  9870  		x := v_0
  9871  		y := v_1
  9872  		if !(!ssa.ShiftIsBounded(v)) {
  9873  			break
  9874  		}
  9875  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9876  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
  9877  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9878  		v1.AddArg(x)
  9879  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9880  		v2.AddArg(y)
  9881  		v0.AddArg2(v1, v2)
  9882  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9883  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9884  		v4.AuxInt = ssa.Int64ToAuxInt(64)
  9885  		v3.AddArg2(v4, v2)
  9886  		v.AddArg2(v0, v3)
  9887  		return true
  9888  	}
  9889  	return false
  9890  }
  9891  func rewriteValue_OpRsh16x16(v *ssa.Value) bool {
  9892  	v_1 := v.Args[1]
  9893  	v_0 := v.Args[0]
  9894  	b := v.Block
  9895  	typ := &b.Func.Config.Types
  9896  	// match: (Rsh16x16 x y)
  9897  	// cond: ssa.ShiftIsBounded(v)
  9898  	// result: (SRAV (SignExt16to64 x) y)
  9899  	for {
  9900  		x := v_0
  9901  		y := v_1
  9902  		if !(ssa.ShiftIsBounded(v)) {
  9903  			break
  9904  		}
  9905  		v.Reset(ssaop.OpLOONG64SRAV)
  9906  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  9907  		v0.AddArg(x)
  9908  		v.AddArg2(v0, y)
  9909  		return true
  9910  	}
  9911  	// match: (Rsh16x16 <t> x y)
  9912  	// cond: !ssa.ShiftIsBounded(v)
  9913  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
  9914  	for {
  9915  		t := v.Type
  9916  		x := v_0
  9917  		y := v_1
  9918  		if !(!ssa.ShiftIsBounded(v)) {
  9919  			break
  9920  		}
  9921  		v.Reset(ssaop.OpLOONG64SRAV)
  9922  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  9923  		v0.AddArg(x)
  9924  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
  9925  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
  9926  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9927  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9928  		v4.AddArg(y)
  9929  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9930  		v5.AuxInt = ssa.Int64ToAuxInt(63)
  9931  		v3.AddArg2(v4, v5)
  9932  		v2.AddArg(v3)
  9933  		v1.AddArg2(v2, v4)
  9934  		v.AddArg2(v0, v1)
  9935  		return true
  9936  	}
  9937  	return false
  9938  }
  9939  func rewriteValue_OpRsh16x32(v *ssa.Value) bool {
  9940  	v_1 := v.Args[1]
  9941  	v_0 := v.Args[0]
  9942  	b := v.Block
  9943  	typ := &b.Func.Config.Types
  9944  	// match: (Rsh16x32 x y)
  9945  	// cond: ssa.ShiftIsBounded(v)
  9946  	// result: (SRAV (SignExt16to64 x) y)
  9947  	for {
  9948  		x := v_0
  9949  		y := v_1
  9950  		if !(ssa.ShiftIsBounded(v)) {
  9951  			break
  9952  		}
  9953  		v.Reset(ssaop.OpLOONG64SRAV)
  9954  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  9955  		v0.AddArg(x)
  9956  		v.AddArg2(v0, y)
  9957  		return true
  9958  	}
  9959  	// match: (Rsh16x32 <t> x y)
  9960  	// cond: !ssa.ShiftIsBounded(v)
  9961  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
  9962  	for {
  9963  		t := v.Type
  9964  		x := v_0
  9965  		y := v_1
  9966  		if !(!ssa.ShiftIsBounded(v)) {
  9967  			break
  9968  		}
  9969  		v.Reset(ssaop.OpLOONG64SRAV)
  9970  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  9971  		v0.AddArg(x)
  9972  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
  9973  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
  9974  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9975  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9976  		v4.AddArg(y)
  9977  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9978  		v5.AuxInt = ssa.Int64ToAuxInt(63)
  9979  		v3.AddArg2(v4, v5)
  9980  		v2.AddArg(v3)
  9981  		v1.AddArg2(v2, v4)
  9982  		v.AddArg2(v0, v1)
  9983  		return true
  9984  	}
  9985  	return false
  9986  }
  9987  func rewriteValue_OpRsh16x64(v *ssa.Value) bool {
  9988  	v_1 := v.Args[1]
  9989  	v_0 := v.Args[0]
  9990  	b := v.Block
  9991  	typ := &b.Func.Config.Types
  9992  	// match: (Rsh16x64 x y)
  9993  	// cond: ssa.ShiftIsBounded(v)
  9994  	// result: (SRAV (SignExt16to64 x) y)
  9995  	for {
  9996  		x := v_0
  9997  		y := v_1
  9998  		if !(ssa.ShiftIsBounded(v)) {
  9999  			break
 10000  		}
 10001  		v.Reset(ssaop.OpLOONG64SRAV)
 10002  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10003  		v0.AddArg(x)
 10004  		v.AddArg2(v0, y)
 10005  		return true
 10006  	}
 10007  	// match: (Rsh16x64 <t> x y)
 10008  	// cond: !ssa.ShiftIsBounded(v)
 10009  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 10010  	for {
 10011  		t := v.Type
 10012  		x := v_0
 10013  		y := v_1
 10014  		if !(!ssa.ShiftIsBounded(v)) {
 10015  			break
 10016  		}
 10017  		v.Reset(ssaop.OpLOONG64SRAV)
 10018  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10019  		v0.AddArg(x)
 10020  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10021  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10022  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10023  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10024  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 10025  		v3.AddArg2(y, v4)
 10026  		v2.AddArg(v3)
 10027  		v1.AddArg2(v2, y)
 10028  		v.AddArg2(v0, v1)
 10029  		return true
 10030  	}
 10031  	return false
 10032  }
 10033  func rewriteValue_OpRsh16x8(v *ssa.Value) bool {
 10034  	v_1 := v.Args[1]
 10035  	v_0 := v.Args[0]
 10036  	b := v.Block
 10037  	typ := &b.Func.Config.Types
 10038  	// match: (Rsh16x8 x y)
 10039  	// cond: ssa.ShiftIsBounded(v)
 10040  	// result: (SRAV (SignExt16to64 x) y)
 10041  	for {
 10042  		x := v_0
 10043  		y := v_1
 10044  		if !(ssa.ShiftIsBounded(v)) {
 10045  			break
 10046  		}
 10047  		v.Reset(ssaop.OpLOONG64SRAV)
 10048  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10049  		v0.AddArg(x)
 10050  		v.AddArg2(v0, y)
 10051  		return true
 10052  	}
 10053  	// match: (Rsh16x8 <t> x y)
 10054  	// cond: !ssa.ShiftIsBounded(v)
 10055  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 10056  	for {
 10057  		t := v.Type
 10058  		x := v_0
 10059  		y := v_1
 10060  		if !(!ssa.ShiftIsBounded(v)) {
 10061  			break
 10062  		}
 10063  		v.Reset(ssaop.OpLOONG64SRAV)
 10064  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10065  		v0.AddArg(x)
 10066  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10067  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10068  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10069  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10070  		v4.AddArg(y)
 10071  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10072  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 10073  		v3.AddArg2(v4, v5)
 10074  		v2.AddArg(v3)
 10075  		v1.AddArg2(v2, v4)
 10076  		v.AddArg2(v0, v1)
 10077  		return true
 10078  	}
 10079  	return false
 10080  }
 10081  func rewriteValue_OpRsh32Ux16(v *ssa.Value) bool {
 10082  	v_1 := v.Args[1]
 10083  	v_0 := v.Args[0]
 10084  	b := v.Block
 10085  	typ := &b.Func.Config.Types
 10086  	// match: (Rsh32Ux16 x y)
 10087  	// cond: ssa.ShiftIsBounded(v)
 10088  	// result: (SRL x y)
 10089  	for {
 10090  		x := v_0
 10091  		y := v_1
 10092  		if !(ssa.ShiftIsBounded(v)) {
 10093  			break
 10094  		}
 10095  		v.Reset(ssaop.OpLOONG64SRL)
 10096  		v.AddArg2(x, y)
 10097  		return true
 10098  	}
 10099  	// match: (Rsh32Ux16 <t> x y)
 10100  	// cond: !ssa.ShiftIsBounded(v)
 10101  	// result: (MASKEQZ (SRL <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt16to64 y)))
 10102  	for {
 10103  		t := v.Type
 10104  		x := v_0
 10105  		y := v_1
 10106  		if !(!ssa.ShiftIsBounded(v)) {
 10107  			break
 10108  		}
 10109  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10110  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10111  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10112  		v1.AddArg(y)
 10113  		v0.AddArg2(x, v1)
 10114  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10115  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10116  		v3.AuxInt = ssa.Int64ToAuxInt(32)
 10117  		v2.AddArg2(v3, v1)
 10118  		v.AddArg2(v0, v2)
 10119  		return true
 10120  	}
 10121  	return false
 10122  }
 10123  func rewriteValue_OpRsh32Ux32(v *ssa.Value) bool {
 10124  	v_1 := v.Args[1]
 10125  	v_0 := v.Args[0]
 10126  	b := v.Block
 10127  	typ := &b.Func.Config.Types
 10128  	// match: (Rsh32Ux32 x y)
 10129  	// cond: ssa.ShiftIsBounded(v)
 10130  	// result: (SRL x y)
 10131  	for {
 10132  		x := v_0
 10133  		y := v_1
 10134  		if !(ssa.ShiftIsBounded(v)) {
 10135  			break
 10136  		}
 10137  		v.Reset(ssaop.OpLOONG64SRL)
 10138  		v.AddArg2(x, y)
 10139  		return true
 10140  	}
 10141  	// match: (Rsh32Ux32 <t> x y)
 10142  	// cond: !ssa.ShiftIsBounded(v)
 10143  	// result: (MASKEQZ (SRL <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt32to64 y)))
 10144  	for {
 10145  		t := v.Type
 10146  		x := v_0
 10147  		y := v_1
 10148  		if !(!ssa.ShiftIsBounded(v)) {
 10149  			break
 10150  		}
 10151  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10152  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10153  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10154  		v1.AddArg(y)
 10155  		v0.AddArg2(x, v1)
 10156  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10157  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10158  		v3.AuxInt = ssa.Int64ToAuxInt(32)
 10159  		v2.AddArg2(v3, v1)
 10160  		v.AddArg2(v0, v2)
 10161  		return true
 10162  	}
 10163  	return false
 10164  }
 10165  func rewriteValue_OpRsh32Ux64(v *ssa.Value) bool {
 10166  	v_1 := v.Args[1]
 10167  	v_0 := v.Args[0]
 10168  	b := v.Block
 10169  	typ := &b.Func.Config.Types
 10170  	// match: (Rsh32Ux64 x y)
 10171  	// cond: ssa.ShiftIsBounded(v)
 10172  	// result: (SRL x y)
 10173  	for {
 10174  		x := v_0
 10175  		y := v_1
 10176  		if !(ssa.ShiftIsBounded(v)) {
 10177  			break
 10178  		}
 10179  		v.Reset(ssaop.OpLOONG64SRL)
 10180  		v.AddArg2(x, y)
 10181  		return true
 10182  	}
 10183  	// match: (Rsh32Ux64 <t> x y)
 10184  	// cond: !ssa.ShiftIsBounded(v)
 10185  	// result: (MASKEQZ (SRL <t> x y) (SGTU (MOVVconst <typ.UInt64> [32]) y))
 10186  	for {
 10187  		t := v.Type
 10188  		x := v_0
 10189  		y := v_1
 10190  		if !(!ssa.ShiftIsBounded(v)) {
 10191  			break
 10192  		}
 10193  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10194  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10195  		v0.AddArg2(x, y)
 10196  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10197  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10198  		v2.AuxInt = ssa.Int64ToAuxInt(32)
 10199  		v1.AddArg2(v2, y)
 10200  		v.AddArg2(v0, v1)
 10201  		return true
 10202  	}
 10203  	return false
 10204  }
 10205  func rewriteValue_OpRsh32Ux8(v *ssa.Value) bool {
 10206  	v_1 := v.Args[1]
 10207  	v_0 := v.Args[0]
 10208  	b := v.Block
 10209  	typ := &b.Func.Config.Types
 10210  	// match: (Rsh32Ux8 x y)
 10211  	// cond: ssa.ShiftIsBounded(v)
 10212  	// result: (SRL x y)
 10213  	for {
 10214  		x := v_0
 10215  		y := v_1
 10216  		if !(ssa.ShiftIsBounded(v)) {
 10217  			break
 10218  		}
 10219  		v.Reset(ssaop.OpLOONG64SRL)
 10220  		v.AddArg2(x, y)
 10221  		return true
 10222  	}
 10223  	// match: (Rsh32Ux8 <t> x y)
 10224  	// cond: !ssa.ShiftIsBounded(v)
 10225  	// result: (MASKEQZ (SRL <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt8to64 y)))
 10226  	for {
 10227  		t := v.Type
 10228  		x := v_0
 10229  		y := v_1
 10230  		if !(!ssa.ShiftIsBounded(v)) {
 10231  			break
 10232  		}
 10233  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10234  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10235  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10236  		v1.AddArg(y)
 10237  		v0.AddArg2(x, v1)
 10238  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10239  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10240  		v3.AuxInt = ssa.Int64ToAuxInt(32)
 10241  		v2.AddArg2(v3, v1)
 10242  		v.AddArg2(v0, v2)
 10243  		return true
 10244  	}
 10245  	return false
 10246  }
 10247  func rewriteValue_OpRsh32x16(v *ssa.Value) bool {
 10248  	v_1 := v.Args[1]
 10249  	v_0 := v.Args[0]
 10250  	b := v.Block
 10251  	typ := &b.Func.Config.Types
 10252  	// match: (Rsh32x16 x y)
 10253  	// cond: ssa.ShiftIsBounded(v)
 10254  	// result: (SRA x y)
 10255  	for {
 10256  		x := v_0
 10257  		y := v_1
 10258  		if !(ssa.ShiftIsBounded(v)) {
 10259  			break
 10260  		}
 10261  		v.Reset(ssaop.OpLOONG64SRA)
 10262  		v.AddArg2(x, y)
 10263  		return true
 10264  	}
 10265  	// match: (Rsh32x16 <t> x y)
 10266  	// cond: !ssa.ShiftIsBounded(v)
 10267  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt16to64 y)))
 10268  	for {
 10269  		t := v.Type
 10270  		x := v_0
 10271  		y := v_1
 10272  		if !(!ssa.ShiftIsBounded(v)) {
 10273  			break
 10274  		}
 10275  		v.Reset(ssaop.OpLOONG64SRA)
 10276  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10277  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10278  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10279  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10280  		v3.AddArg(y)
 10281  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10282  		v4.AuxInt = ssa.Int64ToAuxInt(31)
 10283  		v2.AddArg2(v3, v4)
 10284  		v1.AddArg(v2)
 10285  		v0.AddArg2(v1, v3)
 10286  		v.AddArg2(x, v0)
 10287  		return true
 10288  	}
 10289  	return false
 10290  }
 10291  func rewriteValue_OpRsh32x32(v *ssa.Value) bool {
 10292  	v_1 := v.Args[1]
 10293  	v_0 := v.Args[0]
 10294  	b := v.Block
 10295  	typ := &b.Func.Config.Types
 10296  	// match: (Rsh32x32 x y)
 10297  	// cond: ssa.ShiftIsBounded(v)
 10298  	// result: (SRA x y)
 10299  	for {
 10300  		x := v_0
 10301  		y := v_1
 10302  		if !(ssa.ShiftIsBounded(v)) {
 10303  			break
 10304  		}
 10305  		v.Reset(ssaop.OpLOONG64SRA)
 10306  		v.AddArg2(x, y)
 10307  		return true
 10308  	}
 10309  	// match: (Rsh32x32 <t> x y)
 10310  	// cond: !ssa.ShiftIsBounded(v)
 10311  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt32to64 y)))
 10312  	for {
 10313  		t := v.Type
 10314  		x := v_0
 10315  		y := v_1
 10316  		if !(!ssa.ShiftIsBounded(v)) {
 10317  			break
 10318  		}
 10319  		v.Reset(ssaop.OpLOONG64SRA)
 10320  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10321  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10322  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10323  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10324  		v3.AddArg(y)
 10325  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10326  		v4.AuxInt = ssa.Int64ToAuxInt(31)
 10327  		v2.AddArg2(v3, v4)
 10328  		v1.AddArg(v2)
 10329  		v0.AddArg2(v1, v3)
 10330  		v.AddArg2(x, v0)
 10331  		return true
 10332  	}
 10333  	return false
 10334  }
 10335  func rewriteValue_OpRsh32x64(v *ssa.Value) bool {
 10336  	v_1 := v.Args[1]
 10337  	v_0 := v.Args[0]
 10338  	b := v.Block
 10339  	typ := &b.Func.Config.Types
 10340  	// match: (Rsh32x64 x y)
 10341  	// cond: ssa.ShiftIsBounded(v)
 10342  	// result: (SRA x y)
 10343  	for {
 10344  		x := v_0
 10345  		y := v_1
 10346  		if !(ssa.ShiftIsBounded(v)) {
 10347  			break
 10348  		}
 10349  		v.Reset(ssaop.OpLOONG64SRA)
 10350  		v.AddArg2(x, y)
 10351  		return true
 10352  	}
 10353  	// match: (Rsh32x64 <t> x y)
 10354  	// cond: !ssa.ShiftIsBounded(v)
 10355  	// result: (SRA x (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [31]))) y))
 10356  	for {
 10357  		t := v.Type
 10358  		x := v_0
 10359  		y := v_1
 10360  		if !(!ssa.ShiftIsBounded(v)) {
 10361  			break
 10362  		}
 10363  		v.Reset(ssaop.OpLOONG64SRA)
 10364  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10365  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10366  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10367  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10368  		v3.AuxInt = ssa.Int64ToAuxInt(31)
 10369  		v2.AddArg2(y, v3)
 10370  		v1.AddArg(v2)
 10371  		v0.AddArg2(v1, y)
 10372  		v.AddArg2(x, v0)
 10373  		return true
 10374  	}
 10375  	return false
 10376  }
 10377  func rewriteValue_OpRsh32x8(v *ssa.Value) bool {
 10378  	v_1 := v.Args[1]
 10379  	v_0 := v.Args[0]
 10380  	b := v.Block
 10381  	typ := &b.Func.Config.Types
 10382  	// match: (Rsh32x8 x y)
 10383  	// cond: ssa.ShiftIsBounded(v)
 10384  	// result: (SRA x y)
 10385  	for {
 10386  		x := v_0
 10387  		y := v_1
 10388  		if !(ssa.ShiftIsBounded(v)) {
 10389  			break
 10390  		}
 10391  		v.Reset(ssaop.OpLOONG64SRA)
 10392  		v.AddArg2(x, y)
 10393  		return true
 10394  	}
 10395  	// match: (Rsh32x8 <t> x y)
 10396  	// cond: !ssa.ShiftIsBounded(v)
 10397  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt8to64 y)))
 10398  	for {
 10399  		t := v.Type
 10400  		x := v_0
 10401  		y := v_1
 10402  		if !(!ssa.ShiftIsBounded(v)) {
 10403  			break
 10404  		}
 10405  		v.Reset(ssaop.OpLOONG64SRA)
 10406  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10407  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10408  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10409  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10410  		v3.AddArg(y)
 10411  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10412  		v4.AuxInt = ssa.Int64ToAuxInt(31)
 10413  		v2.AddArg2(v3, v4)
 10414  		v1.AddArg(v2)
 10415  		v0.AddArg2(v1, v3)
 10416  		v.AddArg2(x, v0)
 10417  		return true
 10418  	}
 10419  	return false
 10420  }
 10421  func rewriteValue_OpRsh64Ux16(v *ssa.Value) bool {
 10422  	v_1 := v.Args[1]
 10423  	v_0 := v.Args[0]
 10424  	b := v.Block
 10425  	typ := &b.Func.Config.Types
 10426  	// match: (Rsh64Ux16 x y)
 10427  	// cond: ssa.ShiftIsBounded(v)
 10428  	// result: (SRLV x y)
 10429  	for {
 10430  		x := v_0
 10431  		y := v_1
 10432  		if !(ssa.ShiftIsBounded(v)) {
 10433  			break
 10434  		}
 10435  		v.Reset(ssaop.OpLOONG64SRLV)
 10436  		v.AddArg2(x, y)
 10437  		return true
 10438  	}
 10439  	// match: (Rsh64Ux16 <t> x y)
 10440  	// cond: !ssa.ShiftIsBounded(v)
 10441  	// result: (MASKEQZ (SRLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 10442  	for {
 10443  		t := v.Type
 10444  		x := v_0
 10445  		y := v_1
 10446  		if !(!ssa.ShiftIsBounded(v)) {
 10447  			break
 10448  		}
 10449  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10450  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10451  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10452  		v1.AddArg(y)
 10453  		v0.AddArg2(x, v1)
 10454  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10455  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10456  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 10457  		v2.AddArg2(v3, v1)
 10458  		v.AddArg2(v0, v2)
 10459  		return true
 10460  	}
 10461  	return false
 10462  }
 10463  func rewriteValue_OpRsh64Ux32(v *ssa.Value) bool {
 10464  	v_1 := v.Args[1]
 10465  	v_0 := v.Args[0]
 10466  	b := v.Block
 10467  	typ := &b.Func.Config.Types
 10468  	// match: (Rsh64Ux32 x y)
 10469  	// cond: ssa.ShiftIsBounded(v)
 10470  	// result: (SRLV x y)
 10471  	for {
 10472  		x := v_0
 10473  		y := v_1
 10474  		if !(ssa.ShiftIsBounded(v)) {
 10475  			break
 10476  		}
 10477  		v.Reset(ssaop.OpLOONG64SRLV)
 10478  		v.AddArg2(x, y)
 10479  		return true
 10480  	}
 10481  	// match: (Rsh64Ux32 <t> x y)
 10482  	// cond: !ssa.ShiftIsBounded(v)
 10483  	// result: (MASKEQZ (SRLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 10484  	for {
 10485  		t := v.Type
 10486  		x := v_0
 10487  		y := v_1
 10488  		if !(!ssa.ShiftIsBounded(v)) {
 10489  			break
 10490  		}
 10491  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10492  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10493  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10494  		v1.AddArg(y)
 10495  		v0.AddArg2(x, v1)
 10496  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10497  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10498  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 10499  		v2.AddArg2(v3, v1)
 10500  		v.AddArg2(v0, v2)
 10501  		return true
 10502  	}
 10503  	return false
 10504  }
 10505  func rewriteValue_OpRsh64Ux64(v *ssa.Value) bool {
 10506  	v_1 := v.Args[1]
 10507  	v_0 := v.Args[0]
 10508  	b := v.Block
 10509  	typ := &b.Func.Config.Types
 10510  	// match: (Rsh64Ux64 x y)
 10511  	// cond: ssa.ShiftIsBounded(v)
 10512  	// result: (SRLV x y)
 10513  	for {
 10514  		x := v_0
 10515  		y := v_1
 10516  		if !(ssa.ShiftIsBounded(v)) {
 10517  			break
 10518  		}
 10519  		v.Reset(ssaop.OpLOONG64SRLV)
 10520  		v.AddArg2(x, y)
 10521  		return true
 10522  	}
 10523  	// match: (Rsh64Ux64 <t> x y)
 10524  	// cond: !ssa.ShiftIsBounded(v)
 10525  	// result: (MASKEQZ (SRLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 10526  	for {
 10527  		t := v.Type
 10528  		x := v_0
 10529  		y := v_1
 10530  		if !(!ssa.ShiftIsBounded(v)) {
 10531  			break
 10532  		}
 10533  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10534  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10535  		v0.AddArg2(x, y)
 10536  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10537  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10538  		v2.AuxInt = ssa.Int64ToAuxInt(64)
 10539  		v1.AddArg2(v2, y)
 10540  		v.AddArg2(v0, v1)
 10541  		return true
 10542  	}
 10543  	return false
 10544  }
 10545  func rewriteValue_OpRsh64Ux8(v *ssa.Value) bool {
 10546  	v_1 := v.Args[1]
 10547  	v_0 := v.Args[0]
 10548  	b := v.Block
 10549  	typ := &b.Func.Config.Types
 10550  	// match: (Rsh64Ux8 x y)
 10551  	// cond: ssa.ShiftIsBounded(v)
 10552  	// result: (SRLV x y)
 10553  	for {
 10554  		x := v_0
 10555  		y := v_1
 10556  		if !(ssa.ShiftIsBounded(v)) {
 10557  			break
 10558  		}
 10559  		v.Reset(ssaop.OpLOONG64SRLV)
 10560  		v.AddArg2(x, y)
 10561  		return true
 10562  	}
 10563  	// match: (Rsh64Ux8 <t> x y)
 10564  	// cond: !ssa.ShiftIsBounded(v)
 10565  	// result: (MASKEQZ (SRLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 10566  	for {
 10567  		t := v.Type
 10568  		x := v_0
 10569  		y := v_1
 10570  		if !(!ssa.ShiftIsBounded(v)) {
 10571  			break
 10572  		}
 10573  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10574  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10575  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10576  		v1.AddArg(y)
 10577  		v0.AddArg2(x, v1)
 10578  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10579  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10580  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 10581  		v2.AddArg2(v3, v1)
 10582  		v.AddArg2(v0, v2)
 10583  		return true
 10584  	}
 10585  	return false
 10586  }
 10587  func rewriteValue_OpRsh64x16(v *ssa.Value) bool {
 10588  	v_1 := v.Args[1]
 10589  	v_0 := v.Args[0]
 10590  	b := v.Block
 10591  	typ := &b.Func.Config.Types
 10592  	// match: (Rsh64x16 x y)
 10593  	// cond: ssa.ShiftIsBounded(v)
 10594  	// result: (SRAV x y)
 10595  	for {
 10596  		x := v_0
 10597  		y := v_1
 10598  		if !(ssa.ShiftIsBounded(v)) {
 10599  			break
 10600  		}
 10601  		v.Reset(ssaop.OpLOONG64SRAV)
 10602  		v.AddArg2(x, y)
 10603  		return true
 10604  	}
 10605  	// match: (Rsh64x16 <t> x y)
 10606  	// cond: !ssa.ShiftIsBounded(v)
 10607  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 10608  	for {
 10609  		t := v.Type
 10610  		x := v_0
 10611  		y := v_1
 10612  		if !(!ssa.ShiftIsBounded(v)) {
 10613  			break
 10614  		}
 10615  		v.Reset(ssaop.OpLOONG64SRAV)
 10616  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10617  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10618  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10619  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10620  		v3.AddArg(y)
 10621  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10622  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 10623  		v2.AddArg2(v3, v4)
 10624  		v1.AddArg(v2)
 10625  		v0.AddArg2(v1, v3)
 10626  		v.AddArg2(x, v0)
 10627  		return true
 10628  	}
 10629  	return false
 10630  }
 10631  func rewriteValue_OpRsh64x32(v *ssa.Value) bool {
 10632  	v_1 := v.Args[1]
 10633  	v_0 := v.Args[0]
 10634  	b := v.Block
 10635  	typ := &b.Func.Config.Types
 10636  	// match: (Rsh64x32 x y)
 10637  	// cond: ssa.ShiftIsBounded(v)
 10638  	// result: (SRAV x y)
 10639  	for {
 10640  		x := v_0
 10641  		y := v_1
 10642  		if !(ssa.ShiftIsBounded(v)) {
 10643  			break
 10644  		}
 10645  		v.Reset(ssaop.OpLOONG64SRAV)
 10646  		v.AddArg2(x, y)
 10647  		return true
 10648  	}
 10649  	// match: (Rsh64x32 <t> x y)
 10650  	// cond: !ssa.ShiftIsBounded(v)
 10651  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 10652  	for {
 10653  		t := v.Type
 10654  		x := v_0
 10655  		y := v_1
 10656  		if !(!ssa.ShiftIsBounded(v)) {
 10657  			break
 10658  		}
 10659  		v.Reset(ssaop.OpLOONG64SRAV)
 10660  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10661  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10662  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10663  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10664  		v3.AddArg(y)
 10665  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10666  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 10667  		v2.AddArg2(v3, v4)
 10668  		v1.AddArg(v2)
 10669  		v0.AddArg2(v1, v3)
 10670  		v.AddArg2(x, v0)
 10671  		return true
 10672  	}
 10673  	return false
 10674  }
 10675  func rewriteValue_OpRsh64x64(v *ssa.Value) bool {
 10676  	v_1 := v.Args[1]
 10677  	v_0 := v.Args[0]
 10678  	b := v.Block
 10679  	typ := &b.Func.Config.Types
 10680  	// match: (Rsh64x64 x y)
 10681  	// cond: ssa.ShiftIsBounded(v)
 10682  	// result: (SRAV x y)
 10683  	for {
 10684  		x := v_0
 10685  		y := v_1
 10686  		if !(ssa.ShiftIsBounded(v)) {
 10687  			break
 10688  		}
 10689  		v.Reset(ssaop.OpLOONG64SRAV)
 10690  		v.AddArg2(x, y)
 10691  		return true
 10692  	}
 10693  	// match: (Rsh64x64 <t> x y)
 10694  	// cond: !ssa.ShiftIsBounded(v)
 10695  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 10696  	for {
 10697  		t := v.Type
 10698  		x := v_0
 10699  		y := v_1
 10700  		if !(!ssa.ShiftIsBounded(v)) {
 10701  			break
 10702  		}
 10703  		v.Reset(ssaop.OpLOONG64SRAV)
 10704  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10705  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10706  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10707  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10708  		v3.AuxInt = ssa.Int64ToAuxInt(63)
 10709  		v2.AddArg2(y, v3)
 10710  		v1.AddArg(v2)
 10711  		v0.AddArg2(v1, y)
 10712  		v.AddArg2(x, v0)
 10713  		return true
 10714  	}
 10715  	return false
 10716  }
 10717  func rewriteValue_OpRsh64x8(v *ssa.Value) bool {
 10718  	v_1 := v.Args[1]
 10719  	v_0 := v.Args[0]
 10720  	b := v.Block
 10721  	typ := &b.Func.Config.Types
 10722  	// match: (Rsh64x8 x y)
 10723  	// cond: ssa.ShiftIsBounded(v)
 10724  	// result: (SRAV x y)
 10725  	for {
 10726  		x := v_0
 10727  		y := v_1
 10728  		if !(ssa.ShiftIsBounded(v)) {
 10729  			break
 10730  		}
 10731  		v.Reset(ssaop.OpLOONG64SRAV)
 10732  		v.AddArg2(x, y)
 10733  		return true
 10734  	}
 10735  	// match: (Rsh64x8 <t> x y)
 10736  	// cond: !ssa.ShiftIsBounded(v)
 10737  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 10738  	for {
 10739  		t := v.Type
 10740  		x := v_0
 10741  		y := v_1
 10742  		if !(!ssa.ShiftIsBounded(v)) {
 10743  			break
 10744  		}
 10745  		v.Reset(ssaop.OpLOONG64SRAV)
 10746  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10747  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10748  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10749  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10750  		v3.AddArg(y)
 10751  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10752  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 10753  		v2.AddArg2(v3, v4)
 10754  		v1.AddArg(v2)
 10755  		v0.AddArg2(v1, v3)
 10756  		v.AddArg2(x, v0)
 10757  		return true
 10758  	}
 10759  	return false
 10760  }
 10761  func rewriteValue_OpRsh8Ux16(v *ssa.Value) bool {
 10762  	v_1 := v.Args[1]
 10763  	v_0 := v.Args[0]
 10764  	b := v.Block
 10765  	typ := &b.Func.Config.Types
 10766  	// match: (Rsh8Ux16 x y)
 10767  	// cond: ssa.ShiftIsBounded(v)
 10768  	// result: (SRLV (ZeroExt8to64 x) y)
 10769  	for {
 10770  		x := v_0
 10771  		y := v_1
 10772  		if !(ssa.ShiftIsBounded(v)) {
 10773  			break
 10774  		}
 10775  		v.Reset(ssaop.OpLOONG64SRLV)
 10776  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10777  		v0.AddArg(x)
 10778  		v.AddArg2(v0, y)
 10779  		return true
 10780  	}
 10781  	// match: (Rsh8Ux16 <t> x y)
 10782  	// cond: !ssa.ShiftIsBounded(v)
 10783  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 10784  	for {
 10785  		t := v.Type
 10786  		x := v_0
 10787  		y := v_1
 10788  		if !(!ssa.ShiftIsBounded(v)) {
 10789  			break
 10790  		}
 10791  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10792  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10793  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10794  		v1.AddArg(x)
 10795  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10796  		v2.AddArg(y)
 10797  		v0.AddArg2(v1, v2)
 10798  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10799  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10800  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 10801  		v3.AddArg2(v4, v2)
 10802  		v.AddArg2(v0, v3)
 10803  		return true
 10804  	}
 10805  	return false
 10806  }
 10807  func rewriteValue_OpRsh8Ux32(v *ssa.Value) bool {
 10808  	v_1 := v.Args[1]
 10809  	v_0 := v.Args[0]
 10810  	b := v.Block
 10811  	typ := &b.Func.Config.Types
 10812  	// match: (Rsh8Ux32 x y)
 10813  	// cond: ssa.ShiftIsBounded(v)
 10814  	// result: (SRLV (ZeroExt8to64 x) y)
 10815  	for {
 10816  		x := v_0
 10817  		y := v_1
 10818  		if !(ssa.ShiftIsBounded(v)) {
 10819  			break
 10820  		}
 10821  		v.Reset(ssaop.OpLOONG64SRLV)
 10822  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10823  		v0.AddArg(x)
 10824  		v.AddArg2(v0, y)
 10825  		return true
 10826  	}
 10827  	// match: (Rsh8Ux32 <t> x y)
 10828  	// cond: !ssa.ShiftIsBounded(v)
 10829  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 10830  	for {
 10831  		t := v.Type
 10832  		x := v_0
 10833  		y := v_1
 10834  		if !(!ssa.ShiftIsBounded(v)) {
 10835  			break
 10836  		}
 10837  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10838  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10839  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10840  		v1.AddArg(x)
 10841  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10842  		v2.AddArg(y)
 10843  		v0.AddArg2(v1, v2)
 10844  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10845  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10846  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 10847  		v3.AddArg2(v4, v2)
 10848  		v.AddArg2(v0, v3)
 10849  		return true
 10850  	}
 10851  	return false
 10852  }
 10853  func rewriteValue_OpRsh8Ux64(v *ssa.Value) bool {
 10854  	v_1 := v.Args[1]
 10855  	v_0 := v.Args[0]
 10856  	b := v.Block
 10857  	typ := &b.Func.Config.Types
 10858  	// match: (Rsh8Ux64 x y)
 10859  	// cond: ssa.ShiftIsBounded(v)
 10860  	// result: (SRLV (ZeroExt8to64 x) y)
 10861  	for {
 10862  		x := v_0
 10863  		y := v_1
 10864  		if !(ssa.ShiftIsBounded(v)) {
 10865  			break
 10866  		}
 10867  		v.Reset(ssaop.OpLOONG64SRLV)
 10868  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10869  		v0.AddArg(x)
 10870  		v.AddArg2(v0, y)
 10871  		return true
 10872  	}
 10873  	// match: (Rsh8Ux64 <t> x y)
 10874  	// cond: !ssa.ShiftIsBounded(v)
 10875  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 10876  	for {
 10877  		t := v.Type
 10878  		x := v_0
 10879  		y := v_1
 10880  		if !(!ssa.ShiftIsBounded(v)) {
 10881  			break
 10882  		}
 10883  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10884  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10885  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10886  		v1.AddArg(x)
 10887  		v0.AddArg2(v1, y)
 10888  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10889  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10890  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 10891  		v2.AddArg2(v3, y)
 10892  		v.AddArg2(v0, v2)
 10893  		return true
 10894  	}
 10895  	return false
 10896  }
 10897  func rewriteValue_OpRsh8Ux8(v *ssa.Value) bool {
 10898  	v_1 := v.Args[1]
 10899  	v_0 := v.Args[0]
 10900  	b := v.Block
 10901  	typ := &b.Func.Config.Types
 10902  	// match: (Rsh8Ux8 x y)
 10903  	// cond: ssa.ShiftIsBounded(v)
 10904  	// result: (SRLV (ZeroExt8to64 x) y)
 10905  	for {
 10906  		x := v_0
 10907  		y := v_1
 10908  		if !(ssa.ShiftIsBounded(v)) {
 10909  			break
 10910  		}
 10911  		v.Reset(ssaop.OpLOONG64SRLV)
 10912  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10913  		v0.AddArg(x)
 10914  		v.AddArg2(v0, y)
 10915  		return true
 10916  	}
 10917  	// match: (Rsh8Ux8 <t> x y)
 10918  	// cond: !ssa.ShiftIsBounded(v)
 10919  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 10920  	for {
 10921  		t := v.Type
 10922  		x := v_0
 10923  		y := v_1
 10924  		if !(!ssa.ShiftIsBounded(v)) {
 10925  			break
 10926  		}
 10927  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10928  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10929  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10930  		v1.AddArg(x)
 10931  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10932  		v2.AddArg(y)
 10933  		v0.AddArg2(v1, v2)
 10934  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10935  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10936  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 10937  		v3.AddArg2(v4, v2)
 10938  		v.AddArg2(v0, v3)
 10939  		return true
 10940  	}
 10941  	return false
 10942  }
 10943  func rewriteValue_OpRsh8x16(v *ssa.Value) bool {
 10944  	v_1 := v.Args[1]
 10945  	v_0 := v.Args[0]
 10946  	b := v.Block
 10947  	typ := &b.Func.Config.Types
 10948  	// match: (Rsh8x16 x y)
 10949  	// cond: ssa.ShiftIsBounded(v)
 10950  	// result: (SRAV (SignExt8to64 x) y)
 10951  	for {
 10952  		x := v_0
 10953  		y := v_1
 10954  		if !(ssa.ShiftIsBounded(v)) {
 10955  			break
 10956  		}
 10957  		v.Reset(ssaop.OpLOONG64SRAV)
 10958  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 10959  		v0.AddArg(x)
 10960  		v.AddArg2(v0, y)
 10961  		return true
 10962  	}
 10963  	// match: (Rsh8x16 <t> x y)
 10964  	// cond: !ssa.ShiftIsBounded(v)
 10965  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 10966  	for {
 10967  		t := v.Type
 10968  		x := v_0
 10969  		y := v_1
 10970  		if !(!ssa.ShiftIsBounded(v)) {
 10971  			break
 10972  		}
 10973  		v.Reset(ssaop.OpLOONG64SRAV)
 10974  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 10975  		v0.AddArg(x)
 10976  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10977  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10978  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10979  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10980  		v4.AddArg(y)
 10981  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10982  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 10983  		v3.AddArg2(v4, v5)
 10984  		v2.AddArg(v3)
 10985  		v1.AddArg2(v2, v4)
 10986  		v.AddArg2(v0, v1)
 10987  		return true
 10988  	}
 10989  	return false
 10990  }
 10991  func rewriteValue_OpRsh8x32(v *ssa.Value) bool {
 10992  	v_1 := v.Args[1]
 10993  	v_0 := v.Args[0]
 10994  	b := v.Block
 10995  	typ := &b.Func.Config.Types
 10996  	// match: (Rsh8x32 x y)
 10997  	// cond: ssa.ShiftIsBounded(v)
 10998  	// result: (SRAV (SignExt8to64 x) y)
 10999  	for {
 11000  		x := v_0
 11001  		y := v_1
 11002  		if !(ssa.ShiftIsBounded(v)) {
 11003  			break
 11004  		}
 11005  		v.Reset(ssaop.OpLOONG64SRAV)
 11006  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11007  		v0.AddArg(x)
 11008  		v.AddArg2(v0, y)
 11009  		return true
 11010  	}
 11011  	// match: (Rsh8x32 <t> x y)
 11012  	// cond: !ssa.ShiftIsBounded(v)
 11013  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 11014  	for {
 11015  		t := v.Type
 11016  		x := v_0
 11017  		y := v_1
 11018  		if !(!ssa.ShiftIsBounded(v)) {
 11019  			break
 11020  		}
 11021  		v.Reset(ssaop.OpLOONG64SRAV)
 11022  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11023  		v0.AddArg(x)
 11024  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11025  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11026  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11027  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 11028  		v4.AddArg(y)
 11029  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11030  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 11031  		v3.AddArg2(v4, v5)
 11032  		v2.AddArg(v3)
 11033  		v1.AddArg2(v2, v4)
 11034  		v.AddArg2(v0, v1)
 11035  		return true
 11036  	}
 11037  	return false
 11038  }
 11039  func rewriteValue_OpRsh8x64(v *ssa.Value) bool {
 11040  	v_1 := v.Args[1]
 11041  	v_0 := v.Args[0]
 11042  	b := v.Block
 11043  	typ := &b.Func.Config.Types
 11044  	// match: (Rsh8x64 x y)
 11045  	// cond: ssa.ShiftIsBounded(v)
 11046  	// result: (SRAV (SignExt8to64 x) y)
 11047  	for {
 11048  		x := v_0
 11049  		y := v_1
 11050  		if !(ssa.ShiftIsBounded(v)) {
 11051  			break
 11052  		}
 11053  		v.Reset(ssaop.OpLOONG64SRAV)
 11054  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11055  		v0.AddArg(x)
 11056  		v.AddArg2(v0, y)
 11057  		return true
 11058  	}
 11059  	// match: (Rsh8x64 <t> x y)
 11060  	// cond: !ssa.ShiftIsBounded(v)
 11061  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 11062  	for {
 11063  		t := v.Type
 11064  		x := v_0
 11065  		y := v_1
 11066  		if !(!ssa.ShiftIsBounded(v)) {
 11067  			break
 11068  		}
 11069  		v.Reset(ssaop.OpLOONG64SRAV)
 11070  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11071  		v0.AddArg(x)
 11072  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11073  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11074  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11075  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11076  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 11077  		v3.AddArg2(y, v4)
 11078  		v2.AddArg(v3)
 11079  		v1.AddArg2(v2, y)
 11080  		v.AddArg2(v0, v1)
 11081  		return true
 11082  	}
 11083  	return false
 11084  }
 11085  func rewriteValue_OpRsh8x8(v *ssa.Value) bool {
 11086  	v_1 := v.Args[1]
 11087  	v_0 := v.Args[0]
 11088  	b := v.Block
 11089  	typ := &b.Func.Config.Types
 11090  	// match: (Rsh8x8 x y)
 11091  	// cond: ssa.ShiftIsBounded(v)
 11092  	// result: (SRAV (SignExt8to64 x) y)
 11093  	for {
 11094  		x := v_0
 11095  		y := v_1
 11096  		if !(ssa.ShiftIsBounded(v)) {
 11097  			break
 11098  		}
 11099  		v.Reset(ssaop.OpLOONG64SRAV)
 11100  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11101  		v0.AddArg(x)
 11102  		v.AddArg2(v0, y)
 11103  		return true
 11104  	}
 11105  	// match: (Rsh8x8 <t> x y)
 11106  	// cond: !ssa.ShiftIsBounded(v)
 11107  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 11108  	for {
 11109  		t := v.Type
 11110  		x := v_0
 11111  		y := v_1
 11112  		if !(!ssa.ShiftIsBounded(v)) {
 11113  			break
 11114  		}
 11115  		v.Reset(ssaop.OpLOONG64SRAV)
 11116  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11117  		v0.AddArg(x)
 11118  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11119  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11120  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11121  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11122  		v4.AddArg(y)
 11123  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11124  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 11125  		v3.AddArg2(v4, v5)
 11126  		v2.AddArg(v3)
 11127  		v1.AddArg2(v2, v4)
 11128  		v.AddArg2(v0, v1)
 11129  		return true
 11130  	}
 11131  	return false
 11132  }
 11133  func rewriteValue_OpSelect0(v *ssa.Value) bool {
 11134  	v_0 := v.Args[0]
 11135  	b := v.Block
 11136  	// match: (Select0 (Mul64uhilo x y))
 11137  	// result: (MULHVU x y)
 11138  	for {
 11139  		if v_0.Op != ssaop.OpMul64uhilo {
 11140  			break
 11141  		}
 11142  		y := v_0.Args[1]
 11143  		x := v_0.Args[0]
 11144  		v.Reset(ssaop.OpLOONG64MULHVU)
 11145  		v.AddArg2(x, y)
 11146  		return true
 11147  	}
 11148  	// match: (Select0 (Mul64uover x y))
 11149  	// result: (MULV x y)
 11150  	for {
 11151  		if v_0.Op != ssaop.OpMul64uover {
 11152  			break
 11153  		}
 11154  		y := v_0.Args[1]
 11155  		x := v_0.Args[0]
 11156  		v.Reset(ssaop.OpLOONG64MULV)
 11157  		v.AddArg2(x, y)
 11158  		return true
 11159  	}
 11160  	// match: (Select0 <t> (Add64carry x y c))
 11161  	// result: (ADDV (ADDV <t> x y) c)
 11162  	for {
 11163  		t := v.Type
 11164  		if v_0.Op != ssaop.OpAdd64carry {
 11165  			break
 11166  		}
 11167  		c := v_0.Args[2]
 11168  		x := v_0.Args[0]
 11169  		y := v_0.Args[1]
 11170  		v.Reset(ssaop.OpLOONG64ADDV)
 11171  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ADDV, t)
 11172  		v0.AddArg2(x, y)
 11173  		v.AddArg2(v0, c)
 11174  		return true
 11175  	}
 11176  	// match: (Select0 <t> (Sub64borrow x y c))
 11177  	// result: (SUBV (SUBV <t> x y) c)
 11178  	for {
 11179  		t := v.Type
 11180  		if v_0.Op != ssaop.OpSub64borrow {
 11181  			break
 11182  		}
 11183  		c := v_0.Args[2]
 11184  		x := v_0.Args[0]
 11185  		y := v_0.Args[1]
 11186  		v.Reset(ssaop.OpLOONG64SUBV)
 11187  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
 11188  		v0.AddArg2(x, y)
 11189  		v.AddArg2(v0, c)
 11190  		return true
 11191  	}
 11192  	return false
 11193  }
 11194  func rewriteValue_OpSelect1(v *ssa.Value) bool {
 11195  	v_0 := v.Args[0]
 11196  	b := v.Block
 11197  	typ := &b.Func.Config.Types
 11198  	// match: (Select1 (Mul64uhilo x y))
 11199  	// result: (MULV x y)
 11200  	for {
 11201  		if v_0.Op != ssaop.OpMul64uhilo {
 11202  			break
 11203  		}
 11204  		y := v_0.Args[1]
 11205  		x := v_0.Args[0]
 11206  		v.Reset(ssaop.OpLOONG64MULV)
 11207  		v.AddArg2(x, y)
 11208  		return true
 11209  	}
 11210  	// match: (Select1 (Mul64uover x y))
 11211  	// result: (SGTU <typ.Bool> (MULHVU x y) (MOVVconst <typ.UInt64> [0]))
 11212  	for {
 11213  		if v_0.Op != ssaop.OpMul64uover {
 11214  			break
 11215  		}
 11216  		y := v_0.Args[1]
 11217  		x := v_0.Args[0]
 11218  		v.Reset(ssaop.OpLOONG64SGTU)
 11219  		v.Type = typ.Bool
 11220  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MULHVU, typ.UInt64)
 11221  		v0.AddArg2(x, y)
 11222  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11223  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 11224  		v.AddArg2(v0, v1)
 11225  		return true
 11226  	}
 11227  	// match: (Select1 <t> (Add64carry x y c))
 11228  	// result: (OR (SGTU <t> x s:(ADDV <t> x y)) (SGTU <t> s (ADDV <t> s c)))
 11229  	for {
 11230  		t := v.Type
 11231  		if v_0.Op != ssaop.OpAdd64carry {
 11232  			break
 11233  		}
 11234  		c := v_0.Args[2]
 11235  		x := v_0.Args[0]
 11236  		y := v_0.Args[1]
 11237  		v.Reset(ssaop.OpLOONG64OR)
 11238  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11239  		s := b.NewValue0(v.Pos, ssaop.OpLOONG64ADDV, t)
 11240  		s.AddArg2(x, y)
 11241  		v0.AddArg2(x, s)
 11242  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11243  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64ADDV, t)
 11244  		v3.AddArg2(s, c)
 11245  		v2.AddArg2(s, v3)
 11246  		v.AddArg2(v0, v2)
 11247  		return true
 11248  	}
 11249  	// match: (Select1 <t> (Sub64borrow x y c))
 11250  	// result: (OR (SGTU <t> s:(SUBV <t> x y) x) (SGTU <t> (SUBV <t> s c) s))
 11251  	for {
 11252  		t := v.Type
 11253  		if v_0.Op != ssaop.OpSub64borrow {
 11254  			break
 11255  		}
 11256  		c := v_0.Args[2]
 11257  		x := v_0.Args[0]
 11258  		y := v_0.Args[1]
 11259  		v.Reset(ssaop.OpLOONG64OR)
 11260  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11261  		s := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
 11262  		s.AddArg2(x, y)
 11263  		v0.AddArg2(s, x)
 11264  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11265  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
 11266  		v3.AddArg2(s, c)
 11267  		v2.AddArg2(v3, s)
 11268  		v.AddArg2(v0, v2)
 11269  		return true
 11270  	}
 11271  	return false
 11272  }
 11273  func rewriteValue_OpSelectN(v *ssa.Value) bool {
 11274  	v_0 := v.Args[0]
 11275  	b := v.Block
 11276  	config := b.Func.Config
 11277  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVVconst [sz]) mem))
 11278  	// cond: sz >= 0 && ssa.IsSameCall(sym, "runtime.memmove") && call.Uses == 1 && ssa.IsInlinableMemmove(dst, src, sz, config) && ssa.Clobber(call)
 11279  	// result: (Move [sz] dst src mem)
 11280  	for {
 11281  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 11282  			break
 11283  		}
 11284  		call := v_0
 11285  		if call.Op != ssaop.OpLOONG64CALLstatic || len(call.Args) != 4 {
 11286  			break
 11287  		}
 11288  		sym := ssa.AuxToCall(call.Aux)
 11289  		mem := call.Args[3]
 11290  		dst := call.Args[0]
 11291  		src := call.Args[1]
 11292  		call_2 := call.Args[2]
 11293  		if call_2.Op != ssaop.OpLOONG64MOVVconst {
 11294  			break
 11295  		}
 11296  		sz := ssa.AuxIntToInt64(call_2.AuxInt)
 11297  		if !(sz >= 0 && ssa.IsSameCall(sym, "runtime.memmove") && call.Uses == 1 && ssa.IsInlinableMemmove(dst, src, sz, config) && ssa.Clobber(call)) {
 11298  			break
 11299  		}
 11300  		v.Reset(ssaop.OpMove)
 11301  		v.AuxInt = ssa.Int64ToAuxInt(sz)
 11302  		v.AddArg3(dst, src, mem)
 11303  		return true
 11304  	}
 11305  	return false
 11306  }
 11307  func rewriteValue_OpSlicemask(v *ssa.Value) bool {
 11308  	v_0 := v.Args[0]
 11309  	b := v.Block
 11310  	// match: (Slicemask <t> x)
 11311  	// result: (SRAVconst (NEGV <t> x) [63])
 11312  	for {
 11313  		t := v.Type
 11314  		x := v_0
 11315  		v.Reset(ssaop.OpLOONG64SRAVconst)
 11316  		v.AuxInt = ssa.Int64ToAuxInt(63)
 11317  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11318  		v0.AddArg(x)
 11319  		v.AddArg(v0)
 11320  		return true
 11321  	}
 11322  }
 11323  func rewriteValue_OpStore(v *ssa.Value) bool {
 11324  	v_2 := v.Args[2]
 11325  	v_1 := v.Args[1]
 11326  	v_0 := v.Args[0]
 11327  	// match: (Store {t} ptr val mem)
 11328  	// cond: t.Size() == 1
 11329  	// result: (MOVBstore ptr val mem)
 11330  	for {
 11331  		t := ssa.AuxToType(v.Aux)
 11332  		ptr := v_0
 11333  		val := v_1
 11334  		mem := v_2
 11335  		if !(t.Size() == 1) {
 11336  			break
 11337  		}
 11338  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11339  		v.AddArg3(ptr, val, mem)
 11340  		return true
 11341  	}
 11342  	// match: (Store {t} ptr val mem)
 11343  	// cond: t.Size() == 2
 11344  	// result: (MOVHstore ptr val mem)
 11345  	for {
 11346  		t := ssa.AuxToType(v.Aux)
 11347  		ptr := v_0
 11348  		val := v_1
 11349  		mem := v_2
 11350  		if !(t.Size() == 2) {
 11351  			break
 11352  		}
 11353  		v.Reset(ssaop.OpLOONG64MOVHstore)
 11354  		v.AddArg3(ptr, val, mem)
 11355  		return true
 11356  	}
 11357  	// match: (Store {t} ptr val mem)
 11358  	// cond: t.Size() == 4 && !t.IsFloat()
 11359  	// result: (MOVWstore ptr val mem)
 11360  	for {
 11361  		t := ssa.AuxToType(v.Aux)
 11362  		ptr := v_0
 11363  		val := v_1
 11364  		mem := v_2
 11365  		if !(t.Size() == 4 && !t.IsFloat()) {
 11366  			break
 11367  		}
 11368  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11369  		v.AddArg3(ptr, val, mem)
 11370  		return true
 11371  	}
 11372  	// match: (Store {t} ptr val mem)
 11373  	// cond: t.Size() == 8 && !t.IsFloat()
 11374  	// result: (MOVVstore ptr val mem)
 11375  	for {
 11376  		t := ssa.AuxToType(v.Aux)
 11377  		ptr := v_0
 11378  		val := v_1
 11379  		mem := v_2
 11380  		if !(t.Size() == 8 && !t.IsFloat()) {
 11381  			break
 11382  		}
 11383  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11384  		v.AddArg3(ptr, val, mem)
 11385  		return true
 11386  	}
 11387  	// match: (Store {t} ptr val mem)
 11388  	// cond: t.Size() == 4 && t.IsFloat()
 11389  	// result: (MOVFstore ptr val mem)
 11390  	for {
 11391  		t := ssa.AuxToType(v.Aux)
 11392  		ptr := v_0
 11393  		val := v_1
 11394  		mem := v_2
 11395  		if !(t.Size() == 4 && t.IsFloat()) {
 11396  			break
 11397  		}
 11398  		v.Reset(ssaop.OpLOONG64MOVFstore)
 11399  		v.AddArg3(ptr, val, mem)
 11400  		return true
 11401  	}
 11402  	// match: (Store {t} ptr val mem)
 11403  	// cond: t.Size() == 8 && t.IsFloat()
 11404  	// result: (MOVDstore ptr val mem)
 11405  	for {
 11406  		t := ssa.AuxToType(v.Aux)
 11407  		ptr := v_0
 11408  		val := v_1
 11409  		mem := v_2
 11410  		if !(t.Size() == 8 && t.IsFloat()) {
 11411  			break
 11412  		}
 11413  		v.Reset(ssaop.OpLOONG64MOVDstore)
 11414  		v.AddArg3(ptr, val, mem)
 11415  		return true
 11416  	}
 11417  	return false
 11418  }
 11419  func rewriteValue_OpZero(v *ssa.Value) bool {
 11420  	v_1 := v.Args[1]
 11421  	v_0 := v.Args[0]
 11422  	b := v.Block
 11423  	typ := &b.Func.Config.Types
 11424  	// match: (Zero [0] _ mem)
 11425  	// result: mem
 11426  	for {
 11427  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 11428  			break
 11429  		}
 11430  		mem := v_1
 11431  		v.CopyOf(mem)
 11432  		return true
 11433  	}
 11434  	// match: (Zero [1] ptr mem)
 11435  	// result: (MOVBstore ptr (MOVVconst [0]) mem)
 11436  	for {
 11437  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
 11438  			break
 11439  		}
 11440  		ptr := v_0
 11441  		mem := v_1
 11442  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11443  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11444  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11445  		v.AddArg3(ptr, v0, mem)
 11446  		return true
 11447  	}
 11448  	// match: (Zero [2] ptr mem)
 11449  	// result: (MOVHstore ptr (MOVVconst [0]) mem)
 11450  	for {
 11451  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
 11452  			break
 11453  		}
 11454  		ptr := v_0
 11455  		mem := v_1
 11456  		v.Reset(ssaop.OpLOONG64MOVHstore)
 11457  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11458  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11459  		v.AddArg3(ptr, v0, mem)
 11460  		return true
 11461  	}
 11462  	// match: (Zero [3] ptr mem)
 11463  	// result: (MOVBstore [2] ptr (MOVVconst [0]) (MOVHstore ptr (MOVVconst [0]) mem))
 11464  	for {
 11465  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
 11466  			break
 11467  		}
 11468  		ptr := v_0
 11469  		mem := v_1
 11470  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11471  		v.AuxInt = ssa.Int32ToAuxInt(2)
 11472  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11473  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11474  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHstore, types.TypeMem)
 11475  		v1.AddArg3(ptr, v0, mem)
 11476  		v.AddArg3(ptr, v0, v1)
 11477  		return true
 11478  	}
 11479  	// match: (Zero [4] {t} ptr mem)
 11480  	// result: (MOVWstore ptr (MOVVconst [0]) mem)
 11481  	for {
 11482  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
 11483  			break
 11484  		}
 11485  		ptr := v_0
 11486  		mem := v_1
 11487  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11488  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11489  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11490  		v.AddArg3(ptr, v0, mem)
 11491  		return true
 11492  	}
 11493  	// match: (Zero [5] ptr mem)
 11494  	// result: (MOVBstore [4] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11495  	for {
 11496  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
 11497  			break
 11498  		}
 11499  		ptr := v_0
 11500  		mem := v_1
 11501  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11502  		v.AuxInt = ssa.Int32ToAuxInt(4)
 11503  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11504  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11505  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
 11506  		v1.AddArg3(ptr, v0, mem)
 11507  		v.AddArg3(ptr, v0, v1)
 11508  		return true
 11509  	}
 11510  	// match: (Zero [6] ptr mem)
 11511  	// result: (MOVHstore [4] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11512  	for {
 11513  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
 11514  			break
 11515  		}
 11516  		ptr := v_0
 11517  		mem := v_1
 11518  		v.Reset(ssaop.OpLOONG64MOVHstore)
 11519  		v.AuxInt = ssa.Int32ToAuxInt(4)
 11520  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11521  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11522  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
 11523  		v1.AddArg3(ptr, v0, mem)
 11524  		v.AddArg3(ptr, v0, v1)
 11525  		return true
 11526  	}
 11527  	// match: (Zero [7] ptr mem)
 11528  	// result: (MOVWstore [3] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11529  	for {
 11530  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
 11531  			break
 11532  		}
 11533  		ptr := v_0
 11534  		mem := v_1
 11535  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11536  		v.AuxInt = ssa.Int32ToAuxInt(3)
 11537  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11538  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11539  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
 11540  		v1.AddArg3(ptr, v0, mem)
 11541  		v.AddArg3(ptr, v0, v1)
 11542  		return true
 11543  	}
 11544  	// match: (Zero [8] {t} ptr mem)
 11545  	// result: (MOVVstore ptr (MOVVconst [0]) mem)
 11546  	for {
 11547  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
 11548  			break
 11549  		}
 11550  		ptr := v_0
 11551  		mem := v_1
 11552  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11553  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11554  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11555  		v.AddArg3(ptr, v0, mem)
 11556  		return true
 11557  	}
 11558  	// match: (Zero [9] ptr mem)
 11559  	// result: (MOVBstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11560  	for {
 11561  		if ssa.AuxIntToInt64(v.AuxInt) != 9 {
 11562  			break
 11563  		}
 11564  		ptr := v_0
 11565  		mem := v_1
 11566  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11567  		v.AuxInt = ssa.Int32ToAuxInt(8)
 11568  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11569  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11570  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11571  		v1.AddArg3(ptr, v0, mem)
 11572  		v.AddArg3(ptr, v0, v1)
 11573  		return true
 11574  	}
 11575  	// match: (Zero [10] ptr mem)
 11576  	// result: (MOVHstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11577  	for {
 11578  		if ssa.AuxIntToInt64(v.AuxInt) != 10 {
 11579  			break
 11580  		}
 11581  		ptr := v_0
 11582  		mem := v_1
 11583  		v.Reset(ssaop.OpLOONG64MOVHstore)
 11584  		v.AuxInt = ssa.Int32ToAuxInt(8)
 11585  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11586  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11587  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11588  		v1.AddArg3(ptr, v0, mem)
 11589  		v.AddArg3(ptr, v0, v1)
 11590  		return true
 11591  	}
 11592  	// match: (Zero [11] ptr mem)
 11593  	// result: (MOVWstore [7] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11594  	for {
 11595  		if ssa.AuxIntToInt64(v.AuxInt) != 11 {
 11596  			break
 11597  		}
 11598  		ptr := v_0
 11599  		mem := v_1
 11600  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11601  		v.AuxInt = ssa.Int32ToAuxInt(7)
 11602  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11603  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11604  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11605  		v1.AddArg3(ptr, v0, mem)
 11606  		v.AddArg3(ptr, v0, v1)
 11607  		return true
 11608  	}
 11609  	// match: (Zero [12] ptr mem)
 11610  	// result: (MOVWstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11611  	for {
 11612  		if ssa.AuxIntToInt64(v.AuxInt) != 12 {
 11613  			break
 11614  		}
 11615  		ptr := v_0
 11616  		mem := v_1
 11617  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11618  		v.AuxInt = ssa.Int32ToAuxInt(8)
 11619  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11620  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11621  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11622  		v1.AddArg3(ptr, v0, mem)
 11623  		v.AddArg3(ptr, v0, v1)
 11624  		return true
 11625  	}
 11626  	// match: (Zero [13] ptr mem)
 11627  	// result: (MOVVstore [5] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11628  	for {
 11629  		if ssa.AuxIntToInt64(v.AuxInt) != 13 {
 11630  			break
 11631  		}
 11632  		ptr := v_0
 11633  		mem := v_1
 11634  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11635  		v.AuxInt = ssa.Int32ToAuxInt(5)
 11636  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11637  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11638  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11639  		v1.AddArg3(ptr, v0, mem)
 11640  		v.AddArg3(ptr, v0, v1)
 11641  		return true
 11642  	}
 11643  	// match: (Zero [14] ptr mem)
 11644  	// result: (MOVVstore [6] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11645  	for {
 11646  		if ssa.AuxIntToInt64(v.AuxInt) != 14 {
 11647  			break
 11648  		}
 11649  		ptr := v_0
 11650  		mem := v_1
 11651  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11652  		v.AuxInt = ssa.Int32ToAuxInt(6)
 11653  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11654  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11655  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11656  		v1.AddArg3(ptr, v0, mem)
 11657  		v.AddArg3(ptr, v0, v1)
 11658  		return true
 11659  	}
 11660  	// match: (Zero [15] ptr mem)
 11661  	// result: (MOVVstore [7] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11662  	for {
 11663  		if ssa.AuxIntToInt64(v.AuxInt) != 15 {
 11664  			break
 11665  		}
 11666  		ptr := v_0
 11667  		mem := v_1
 11668  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11669  		v.AuxInt = ssa.Int32ToAuxInt(7)
 11670  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11671  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11672  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11673  		v1.AddArg3(ptr, v0, mem)
 11674  		v.AddArg3(ptr, v0, v1)
 11675  		return true
 11676  	}
 11677  	// match: (Zero [16] ptr mem)
 11678  	// result: (MOVVstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11679  	for {
 11680  		if ssa.AuxIntToInt64(v.AuxInt) != 16 {
 11681  			break
 11682  		}
 11683  		ptr := v_0
 11684  		mem := v_1
 11685  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11686  		v.AuxInt = ssa.Int32ToAuxInt(8)
 11687  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11688  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11689  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11690  		v1.AddArg3(ptr, v0, mem)
 11691  		v.AddArg3(ptr, v0, v1)
 11692  		return true
 11693  	}
 11694  	// match: (Zero [s] ptr mem)
 11695  	// cond: s > 16 && s < 192
 11696  	// result: (LoweredZero [s] ptr mem)
 11697  	for {
 11698  		s := ssa.AuxIntToInt64(v.AuxInt)
 11699  		ptr := v_0
 11700  		mem := v_1
 11701  		if !(s > 16 && s < 192) {
 11702  			break
 11703  		}
 11704  		v.Reset(ssaop.OpLOONG64LoweredZero)
 11705  		v.AuxInt = ssa.Int64ToAuxInt(s)
 11706  		v.AddArg2(ptr, mem)
 11707  		return true
 11708  	}
 11709  	// match: (Zero [s] ptr mem)
 11710  	// cond: s >= 192
 11711  	// result: (LoweredZeroLoop [s] ptr mem)
 11712  	for {
 11713  		s := ssa.AuxIntToInt64(v.AuxInt)
 11714  		ptr := v_0
 11715  		mem := v_1
 11716  		if !(s >= 192) {
 11717  			break
 11718  		}
 11719  		v.Reset(ssaop.OpLOONG64LoweredZeroLoop)
 11720  		v.AuxInt = ssa.Int64ToAuxInt(s)
 11721  		v.AddArg2(ptr, mem)
 11722  		return true
 11723  	}
 11724  	return false
 11725  }
 11726  func RewriteBlock(b *ssa.Block) bool {
 11727  	typ := &b.Func.Config.Types
 11728  	switch b.Kind {
 11729  	case block.BlockLOONG64BEQ:
 11730  		// match: (BEQ (MOVVconst [0]) cond yes no)
 11731  		// result: (EQZ cond yes no)
 11732  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 11733  			v_0 := b.Controls[0]
 11734  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11735  				break
 11736  			}
 11737  			cond := b.Controls[1]
 11738  			b.ResetWithControl(block.BlockLOONG64EQZ, cond)
 11739  			return true
 11740  		}
 11741  		// match: (BEQ cond (MOVVconst [0]) yes no)
 11742  		// result: (EQZ cond yes no)
 11743  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 11744  			cond := b.Controls[0]
 11745  			v_1 := b.Controls[1]
 11746  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 11747  				break
 11748  			}
 11749  			b.ResetWithControl(block.BlockLOONG64EQZ, cond)
 11750  			return true
 11751  		}
 11752  	case block.BlockLOONG64BGE:
 11753  		// match: (BGE (MOVVconst [0]) cond yes no)
 11754  		// result: (LEZ cond yes no)
 11755  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 11756  			v_0 := b.Controls[0]
 11757  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11758  				break
 11759  			}
 11760  			cond := b.Controls[1]
 11761  			b.ResetWithControl(block.BlockLOONG64LEZ, cond)
 11762  			return true
 11763  		}
 11764  		// match: (BGE cond (MOVVconst [0]) yes no)
 11765  		// result: (GEZ cond yes no)
 11766  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 11767  			cond := b.Controls[0]
 11768  			v_1 := b.Controls[1]
 11769  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 11770  				break
 11771  			}
 11772  			b.ResetWithControl(block.BlockLOONG64GEZ, cond)
 11773  			return true
 11774  		}
 11775  	case block.BlockLOONG64BGEU:
 11776  		// match: (BGEU (MOVVconst [0]) cond yes no)
 11777  		// result: (EQZ cond yes no)
 11778  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 11779  			v_0 := b.Controls[0]
 11780  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11781  				break
 11782  			}
 11783  			cond := b.Controls[1]
 11784  			b.ResetWithControl(block.BlockLOONG64EQZ, cond)
 11785  			return true
 11786  		}
 11787  	case block.BlockLOONG64BLT:
 11788  		// match: (BLT (MOVVconst [0]) cond yes no)
 11789  		// result: (GTZ cond yes no)
 11790  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 11791  			v_0 := b.Controls[0]
 11792  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11793  				break
 11794  			}
 11795  			cond := b.Controls[1]
 11796  			b.ResetWithControl(block.BlockLOONG64GTZ, cond)
 11797  			return true
 11798  		}
 11799  		// match: (BLT cond (MOVVconst [0]) yes no)
 11800  		// result: (LTZ cond yes no)
 11801  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 11802  			cond := b.Controls[0]
 11803  			v_1 := b.Controls[1]
 11804  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 11805  				break
 11806  			}
 11807  			b.ResetWithControl(block.BlockLOONG64LTZ, cond)
 11808  			return true
 11809  		}
 11810  	case block.BlockLOONG64BLTU:
 11811  		// match: (BLTU (MOVVconst [0]) cond yes no)
 11812  		// result: (NEZ cond yes no)
 11813  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 11814  			v_0 := b.Controls[0]
 11815  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11816  				break
 11817  			}
 11818  			cond := b.Controls[1]
 11819  			b.ResetWithControl(block.BlockLOONG64NEZ, cond)
 11820  			return true
 11821  		}
 11822  	case block.BlockLOONG64BNE:
 11823  		// match: (BNE (MOVVconst [0]) cond yes no)
 11824  		// result: (NEZ cond yes no)
 11825  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 11826  			v_0 := b.Controls[0]
 11827  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11828  				break
 11829  			}
 11830  			cond := b.Controls[1]
 11831  			b.ResetWithControl(block.BlockLOONG64NEZ, cond)
 11832  			return true
 11833  		}
 11834  		// match: (BNE cond (MOVVconst [0]) yes no)
 11835  		// result: (NEZ cond yes no)
 11836  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 11837  			cond := b.Controls[0]
 11838  			v_1 := b.Controls[1]
 11839  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 11840  				break
 11841  			}
 11842  			b.ResetWithControl(block.BlockLOONG64NEZ, cond)
 11843  			return true
 11844  		}
 11845  	case block.BlockLOONG64EQZ:
 11846  		// match: (EQZ (FPFlagTrue cmp) yes no)
 11847  		// result: (FPF cmp yes no)
 11848  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagTrue {
 11849  			v_0 := b.Controls[0]
 11850  			cmp := v_0.Args[0]
 11851  			b.ResetWithControl(block.BlockLOONG64FPF, cmp)
 11852  			return true
 11853  		}
 11854  		// match: (EQZ (FPFlagFalse cmp) yes no)
 11855  		// result: (FPT cmp yes no)
 11856  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagFalse {
 11857  			v_0 := b.Controls[0]
 11858  			cmp := v_0.Args[0]
 11859  			b.ResetWithControl(block.BlockLOONG64FPT, cmp)
 11860  			return true
 11861  		}
 11862  		// match: (EQZ (XORconst [1] cmp:(SGT _ _)) yes no)
 11863  		// result: (NEZ cmp yes no)
 11864  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 11865  			v_0 := b.Controls[0]
 11866  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 11867  				break
 11868  			}
 11869  			cmp := v_0.Args[0]
 11870  			if cmp.Op != ssaop.OpLOONG64SGT {
 11871  				break
 11872  			}
 11873  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 11874  			return true
 11875  		}
 11876  		// match: (EQZ (XORconst [1] cmp:(SGTU _ _)) yes no)
 11877  		// result: (NEZ cmp yes no)
 11878  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 11879  			v_0 := b.Controls[0]
 11880  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 11881  				break
 11882  			}
 11883  			cmp := v_0.Args[0]
 11884  			if cmp.Op != ssaop.OpLOONG64SGTU {
 11885  				break
 11886  			}
 11887  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 11888  			return true
 11889  		}
 11890  		// match: (EQZ (XORconst [1] cmp:(SGTconst _)) yes no)
 11891  		// result: (NEZ cmp yes no)
 11892  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 11893  			v_0 := b.Controls[0]
 11894  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 11895  				break
 11896  			}
 11897  			cmp := v_0.Args[0]
 11898  			if cmp.Op != ssaop.OpLOONG64SGTconst {
 11899  				break
 11900  			}
 11901  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 11902  			return true
 11903  		}
 11904  		// match: (EQZ (XORconst [1] cmp:(SGTUconst _)) yes no)
 11905  		// result: (NEZ cmp yes no)
 11906  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 11907  			v_0 := b.Controls[0]
 11908  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 11909  				break
 11910  			}
 11911  			cmp := v_0.Args[0]
 11912  			if cmp.Op != ssaop.OpLOONG64SGTUconst {
 11913  				break
 11914  			}
 11915  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 11916  			return true
 11917  		}
 11918  		// match: (EQZ (SGTUconst [1] x) yes no)
 11919  		// result: (NEZ x yes no)
 11920  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 11921  			v_0 := b.Controls[0]
 11922  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 11923  				break
 11924  			}
 11925  			x := v_0.Args[0]
 11926  			b.ResetWithControl(block.BlockLOONG64NEZ, x)
 11927  			return true
 11928  		}
 11929  		// match: (EQZ (SGTU x (MOVVconst [0])) yes no)
 11930  		// result: (EQZ x yes no)
 11931  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 11932  			v_0 := b.Controls[0]
 11933  			_ = v_0.Args[1]
 11934  			x := v_0.Args[0]
 11935  			v_0_1 := v_0.Args[1]
 11936  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 11937  				break
 11938  			}
 11939  			b.ResetWithControl(block.BlockLOONG64EQZ, x)
 11940  			return true
 11941  		}
 11942  		// match: (EQZ (SGTconst [0] x) yes no)
 11943  		// result: (GEZ x yes no)
 11944  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 11945  			v_0 := b.Controls[0]
 11946  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11947  				break
 11948  			}
 11949  			x := v_0.Args[0]
 11950  			b.ResetWithControl(block.BlockLOONG64GEZ, x)
 11951  			return true
 11952  		}
 11953  		// match: (EQZ (SGT x (MOVVconst [0])) yes no)
 11954  		// result: (LEZ x yes no)
 11955  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 11956  			v_0 := b.Controls[0]
 11957  			_ = v_0.Args[1]
 11958  			x := v_0.Args[0]
 11959  			v_0_1 := v_0.Args[1]
 11960  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 11961  				break
 11962  			}
 11963  			b.ResetWithControl(block.BlockLOONG64LEZ, x)
 11964  			return true
 11965  		}
 11966  		// match: (EQZ (SGTU (MOVVconst [c]) y) yes no)
 11967  		// cond: c >= -2048 && c <= 2047
 11968  		// result: (EQZ (SGTUconst [c] y) yes no)
 11969  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 11970  			v_0 := b.Controls[0]
 11971  			y := v_0.Args[1]
 11972  			v_0_0 := v_0.Args[0]
 11973  			if v_0_0.Op != ssaop.OpLOONG64MOVVconst {
 11974  				break
 11975  			}
 11976  			c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 11977  			if !(c >= -2048 && c <= 2047) {
 11978  				break
 11979  			}
 11980  			v0 := b.NewValue0(v_0.Pos, ssaop.OpLOONG64SGTUconst, typ.Bool)
 11981  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 11982  			v0.AddArg(y)
 11983  			b.ResetWithControl(block.BlockLOONG64EQZ, v0)
 11984  			return true
 11985  		}
 11986  		// match: (EQZ (SUBV x y) yes no)
 11987  		// result: (BEQ x y yes no)
 11988  		for b.Controls[0].Op == ssaop.OpLOONG64SUBV {
 11989  			v_0 := b.Controls[0]
 11990  			y := v_0.Args[1]
 11991  			x := v_0.Args[0]
 11992  			b.ResetWithControl2(block.BlockLOONG64BEQ, x, y)
 11993  			return true
 11994  		}
 11995  		// match: (EQZ (SGT x y) yes no)
 11996  		// result: (BGE y x yes no)
 11997  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 11998  			v_0 := b.Controls[0]
 11999  			y := v_0.Args[1]
 12000  			x := v_0.Args[0]
 12001  			b.ResetWithControl2(block.BlockLOONG64BGE, y, x)
 12002  			return true
 12003  		}
 12004  		// match: (EQZ (SGTU x y) yes no)
 12005  		// result: (BGEU y x yes no)
 12006  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12007  			v_0 := b.Controls[0]
 12008  			y := v_0.Args[1]
 12009  			x := v_0.Args[0]
 12010  			b.ResetWithControl2(block.BlockLOONG64BGEU, y, x)
 12011  			return true
 12012  		}
 12013  		// match: (EQZ (SGTconst [c] y) yes no)
 12014  		// result: (BGE y (MOVVconst [c]) yes no)
 12015  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 12016  			v_0 := b.Controls[0]
 12017  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12018  			y := v_0.Args[0]
 12019  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12020  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12021  			b.ResetWithControl2(block.BlockLOONG64BGE, y, v0)
 12022  			return true
 12023  		}
 12024  		// match: (EQZ (SGTUconst [c] y) yes no)
 12025  		// result: (BGEU y (MOVVconst [c]) yes no)
 12026  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 12027  			v_0 := b.Controls[0]
 12028  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12029  			y := v_0.Args[0]
 12030  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12031  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12032  			b.ResetWithControl2(block.BlockLOONG64BGEU, y, v0)
 12033  			return true
 12034  		}
 12035  		// match: (EQZ (MOVVconst [0]) yes no)
 12036  		// result: (First yes no)
 12037  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12038  			v_0 := b.Controls[0]
 12039  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12040  				break
 12041  			}
 12042  			b.Reset(block.BlockFirst)
 12043  			return true
 12044  		}
 12045  		// match: (EQZ (MOVVconst [c]) yes no)
 12046  		// cond: c != 0
 12047  		// result: (First no yes)
 12048  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12049  			v_0 := b.Controls[0]
 12050  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12051  			if !(c != 0) {
 12052  				break
 12053  			}
 12054  			b.Reset(block.BlockFirst)
 12055  			b.SwapSuccessors()
 12056  			return true
 12057  		}
 12058  		// match: (EQZ (NEGV x) yes no)
 12059  		// result: (EQZ x yes no)
 12060  		for b.Controls[0].Op == ssaop.OpLOONG64NEGV {
 12061  			v_0 := b.Controls[0]
 12062  			x := v_0.Args[0]
 12063  			b.ResetWithControl(block.BlockLOONG64EQZ, x)
 12064  			return true
 12065  		}
 12066  	case block.BlockLOONG64GEZ:
 12067  		// match: (GEZ (MOVVconst [c]) yes no)
 12068  		// cond: c >= 0
 12069  		// result: (First yes no)
 12070  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12071  			v_0 := b.Controls[0]
 12072  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12073  			if !(c >= 0) {
 12074  				break
 12075  			}
 12076  			b.Reset(block.BlockFirst)
 12077  			return true
 12078  		}
 12079  		// match: (GEZ (MOVVconst [c]) yes no)
 12080  		// cond: c < 0
 12081  		// result: (First no yes)
 12082  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12083  			v_0 := b.Controls[0]
 12084  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12085  			if !(c < 0) {
 12086  				break
 12087  			}
 12088  			b.Reset(block.BlockFirst)
 12089  			b.SwapSuccessors()
 12090  			return true
 12091  		}
 12092  	case block.BlockLOONG64GTZ:
 12093  		// match: (GTZ (MOVVconst [c]) yes no)
 12094  		// cond: c > 0
 12095  		// result: (First yes no)
 12096  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12097  			v_0 := b.Controls[0]
 12098  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12099  			if !(c > 0) {
 12100  				break
 12101  			}
 12102  			b.Reset(block.BlockFirst)
 12103  			return true
 12104  		}
 12105  		// match: (GTZ (MOVVconst [c]) yes no)
 12106  		// cond: c <= 0
 12107  		// result: (First no yes)
 12108  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12109  			v_0 := b.Controls[0]
 12110  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12111  			if !(c <= 0) {
 12112  				break
 12113  			}
 12114  			b.Reset(block.BlockFirst)
 12115  			b.SwapSuccessors()
 12116  			return true
 12117  		}
 12118  	case block.BlockIf:
 12119  		// match: (If cond yes no)
 12120  		// result: (NEZ (MOVBUreg <typ.UInt64> cond) yes no)
 12121  		for {
 12122  			cond := b.Controls[0]
 12123  			v0 := b.NewValue0(cond.Pos, ssaop.OpLOONG64MOVBUreg, typ.UInt64)
 12124  			v0.AddArg(cond)
 12125  			b.ResetWithControl(block.BlockLOONG64NEZ, v0)
 12126  			return true
 12127  		}
 12128  	case block.BlockJumpTable:
 12129  		// match: (JumpTable idx)
 12130  		// result: (JUMPTABLE {ssa.MakeJumpTableSym(b)} idx (MOVVaddr <typ.Uintptr> {ssa.MakeJumpTableSym(b)} (SB)))
 12131  		for {
 12132  			idx := b.Controls[0]
 12133  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVaddr, typ.Uintptr)
 12134  			v0.Aux = ssa.SymToAux(ssa.MakeJumpTableSym(b))
 12135  			v1 := b.NewValue0(b.Pos, ssaop.OpSB, typ.Uintptr)
 12136  			v0.AddArg(v1)
 12137  			b.ResetWithControl2(block.BlockLOONG64JUMPTABLE, idx, v0)
 12138  			b.Aux = ssa.SymToAux(ssa.MakeJumpTableSym(b))
 12139  			return true
 12140  		}
 12141  	case block.BlockLOONG64LEZ:
 12142  		// match: (LEZ (MOVVconst [c]) yes no)
 12143  		// cond: c <= 0
 12144  		// result: (First yes no)
 12145  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12146  			v_0 := b.Controls[0]
 12147  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12148  			if !(c <= 0) {
 12149  				break
 12150  			}
 12151  			b.Reset(block.BlockFirst)
 12152  			return true
 12153  		}
 12154  		// match: (LEZ (MOVVconst [c]) yes no)
 12155  		// cond: c > 0
 12156  		// result: (First no yes)
 12157  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12158  			v_0 := b.Controls[0]
 12159  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12160  			if !(c > 0) {
 12161  				break
 12162  			}
 12163  			b.Reset(block.BlockFirst)
 12164  			b.SwapSuccessors()
 12165  			return true
 12166  		}
 12167  	case block.BlockLOONG64LTZ:
 12168  		// match: (LTZ (MOVVconst [c]) yes no)
 12169  		// cond: c < 0
 12170  		// result: (First yes no)
 12171  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12172  			v_0 := b.Controls[0]
 12173  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12174  			if !(c < 0) {
 12175  				break
 12176  			}
 12177  			b.Reset(block.BlockFirst)
 12178  			return true
 12179  		}
 12180  		// match: (LTZ (MOVVconst [c]) yes no)
 12181  		// cond: c >= 0
 12182  		// result: (First no yes)
 12183  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12184  			v_0 := b.Controls[0]
 12185  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12186  			if !(c >= 0) {
 12187  				break
 12188  			}
 12189  			b.Reset(block.BlockFirst)
 12190  			b.SwapSuccessors()
 12191  			return true
 12192  		}
 12193  	case block.BlockLOONG64NEZ:
 12194  		// match: (NEZ (FPFlagTrue cmp) yes no)
 12195  		// result: (FPT cmp yes no)
 12196  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagTrue {
 12197  			v_0 := b.Controls[0]
 12198  			cmp := v_0.Args[0]
 12199  			b.ResetWithControl(block.BlockLOONG64FPT, cmp)
 12200  			return true
 12201  		}
 12202  		// match: (NEZ (FPFlagFalse cmp) yes no)
 12203  		// result: (FPF cmp yes no)
 12204  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagFalse {
 12205  			v_0 := b.Controls[0]
 12206  			cmp := v_0.Args[0]
 12207  			b.ResetWithControl(block.BlockLOONG64FPF, cmp)
 12208  			return true
 12209  		}
 12210  		// match: (NEZ (XORconst [1] cmp:(SGT _ _)) yes no)
 12211  		// result: (EQZ cmp yes no)
 12212  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12213  			v_0 := b.Controls[0]
 12214  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12215  				break
 12216  			}
 12217  			cmp := v_0.Args[0]
 12218  			if cmp.Op != ssaop.OpLOONG64SGT {
 12219  				break
 12220  			}
 12221  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12222  			return true
 12223  		}
 12224  		// match: (NEZ (XORconst [1] cmp:(SGTU _ _)) yes no)
 12225  		// result: (EQZ cmp yes no)
 12226  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12227  			v_0 := b.Controls[0]
 12228  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12229  				break
 12230  			}
 12231  			cmp := v_0.Args[0]
 12232  			if cmp.Op != ssaop.OpLOONG64SGTU {
 12233  				break
 12234  			}
 12235  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12236  			return true
 12237  		}
 12238  		// match: (NEZ (XORconst [1] cmp:(SGTconst _)) yes no)
 12239  		// result: (EQZ cmp yes no)
 12240  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12241  			v_0 := b.Controls[0]
 12242  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12243  				break
 12244  			}
 12245  			cmp := v_0.Args[0]
 12246  			if cmp.Op != ssaop.OpLOONG64SGTconst {
 12247  				break
 12248  			}
 12249  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12250  			return true
 12251  		}
 12252  		// match: (NEZ (XORconst [1] cmp:(SGTUconst _)) yes no)
 12253  		// result: (EQZ cmp yes no)
 12254  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12255  			v_0 := b.Controls[0]
 12256  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12257  				break
 12258  			}
 12259  			cmp := v_0.Args[0]
 12260  			if cmp.Op != ssaop.OpLOONG64SGTUconst {
 12261  				break
 12262  			}
 12263  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12264  			return true
 12265  		}
 12266  		// match: (NEZ (SGTUconst [1] x) yes no)
 12267  		// result: (EQZ x yes no)
 12268  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 12269  			v_0 := b.Controls[0]
 12270  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12271  				break
 12272  			}
 12273  			x := v_0.Args[0]
 12274  			b.ResetWithControl(block.BlockLOONG64EQZ, x)
 12275  			return true
 12276  		}
 12277  		// match: (NEZ (SGTU x (MOVVconst [0])) yes no)
 12278  		// result: (NEZ x yes no)
 12279  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12280  			v_0 := b.Controls[0]
 12281  			_ = v_0.Args[1]
 12282  			x := v_0.Args[0]
 12283  			v_0_1 := v_0.Args[1]
 12284  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 12285  				break
 12286  			}
 12287  			b.ResetWithControl(block.BlockLOONG64NEZ, x)
 12288  			return true
 12289  		}
 12290  		// match: (NEZ (SGTconst [0] x) yes no)
 12291  		// result: (LTZ x yes no)
 12292  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 12293  			v_0 := b.Controls[0]
 12294  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12295  				break
 12296  			}
 12297  			x := v_0.Args[0]
 12298  			b.ResetWithControl(block.BlockLOONG64LTZ, x)
 12299  			return true
 12300  		}
 12301  		// match: (NEZ (SGT x (MOVVconst [0])) yes no)
 12302  		// result: (GTZ x yes no)
 12303  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 12304  			v_0 := b.Controls[0]
 12305  			_ = v_0.Args[1]
 12306  			x := v_0.Args[0]
 12307  			v_0_1 := v_0.Args[1]
 12308  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 12309  				break
 12310  			}
 12311  			b.ResetWithControl(block.BlockLOONG64GTZ, x)
 12312  			return true
 12313  		}
 12314  		// match: (NEZ (SGTU (MOVVconst [c]) y) yes no)
 12315  		// cond: c >= -2048 && c <= 2047
 12316  		// result: (NEZ (SGTUconst [c] y) yes no)
 12317  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12318  			v_0 := b.Controls[0]
 12319  			y := v_0.Args[1]
 12320  			v_0_0 := v_0.Args[0]
 12321  			if v_0_0.Op != ssaop.OpLOONG64MOVVconst {
 12322  				break
 12323  			}
 12324  			c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 12325  			if !(c >= -2048 && c <= 2047) {
 12326  				break
 12327  			}
 12328  			v0 := b.NewValue0(v_0.Pos, ssaop.OpLOONG64SGTUconst, typ.Bool)
 12329  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12330  			v0.AddArg(y)
 12331  			b.ResetWithControl(block.BlockLOONG64NEZ, v0)
 12332  			return true
 12333  		}
 12334  		// match: (NEZ (SUBV x y) yes no)
 12335  		// result: (BNE x y yes no)
 12336  		for b.Controls[0].Op == ssaop.OpLOONG64SUBV {
 12337  			v_0 := b.Controls[0]
 12338  			y := v_0.Args[1]
 12339  			x := v_0.Args[0]
 12340  			b.ResetWithControl2(block.BlockLOONG64BNE, x, y)
 12341  			return true
 12342  		}
 12343  		// match: (NEZ (SGT x y) yes no)
 12344  		// result: (BLT y x yes no)
 12345  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 12346  			v_0 := b.Controls[0]
 12347  			y := v_0.Args[1]
 12348  			x := v_0.Args[0]
 12349  			b.ResetWithControl2(block.BlockLOONG64BLT, y, x)
 12350  			return true
 12351  		}
 12352  		// match: (NEZ (SGTU x y) yes no)
 12353  		// result: (BLTU y x yes no)
 12354  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12355  			v_0 := b.Controls[0]
 12356  			y := v_0.Args[1]
 12357  			x := v_0.Args[0]
 12358  			b.ResetWithControl2(block.BlockLOONG64BLTU, y, x)
 12359  			return true
 12360  		}
 12361  		// match: (NEZ (SGTconst [c] y) yes no)
 12362  		// result: (BLT y (MOVVconst [c]) yes no)
 12363  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 12364  			v_0 := b.Controls[0]
 12365  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12366  			y := v_0.Args[0]
 12367  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12368  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12369  			b.ResetWithControl2(block.BlockLOONG64BLT, y, v0)
 12370  			return true
 12371  		}
 12372  		// match: (NEZ (SGTUconst [c] y) yes no)
 12373  		// result: (BLTU y (MOVVconst [c]) yes no)
 12374  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 12375  			v_0 := b.Controls[0]
 12376  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12377  			y := v_0.Args[0]
 12378  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12379  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12380  			b.ResetWithControl2(block.BlockLOONG64BLTU, y, v0)
 12381  			return true
 12382  		}
 12383  		// match: (NEZ (MOVVconst [0]) yes no)
 12384  		// result: (First no yes)
 12385  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12386  			v_0 := b.Controls[0]
 12387  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12388  				break
 12389  			}
 12390  			b.Reset(block.BlockFirst)
 12391  			b.SwapSuccessors()
 12392  			return true
 12393  		}
 12394  		// match: (NEZ (MOVVconst [c]) yes no)
 12395  		// cond: c != 0
 12396  		// result: (First yes no)
 12397  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12398  			v_0 := b.Controls[0]
 12399  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12400  			if !(c != 0) {
 12401  				break
 12402  			}
 12403  			b.Reset(block.BlockFirst)
 12404  			return true
 12405  		}
 12406  		// match: (NEZ (NEGV x) yes no)
 12407  		// result: (NEZ x yes no)
 12408  		for b.Controls[0].Op == ssaop.OpLOONG64NEGV {
 12409  			v_0 := b.Controls[0]
 12410  			x := v_0.Args[0]
 12411  			b.ResetWithControl(block.BlockLOONG64NEZ, x)
 12412  			return true
 12413  		}
 12414  	}
 12415  	return false
 12416  }
 12417  

View as plain text