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  		return rewriteValue_OpCvt32Fto32(v)
   222  	case ssaop.OpCvt32Fto64:
   223  		return rewriteValue_OpCvt32Fto64(v)
   224  	case ssaop.OpCvt32Fto64F:
   225  		v.Op = ssaop.OpLOONG64MOVFD
   226  		return true
   227  	case ssaop.OpCvt32to32F:
   228  		return rewriteValue_OpCvt32to32F(v)
   229  	case ssaop.OpCvt32to64F:
   230  		return rewriteValue_OpCvt32to64F(v)
   231  	case ssaop.OpCvt64Fto32:
   232  		return rewriteValue_OpCvt64Fto32(v)
   233  	case ssaop.OpCvt64Fto32F:
   234  		v.Op = ssaop.OpLOONG64MOVDF
   235  		return true
   236  	case ssaop.OpCvt64Fto64:
   237  		return rewriteValue_OpCvt64Fto64(v)
   238  	case ssaop.OpCvt64to32F:
   239  		return rewriteValue_OpCvt64to32F(v)
   240  	case ssaop.OpCvt64to64F:
   241  		return rewriteValue_OpCvt64to64F(v)
   242  	case ssaop.OpCvtBoolToUint8:
   243  		v.Op = ssaop.OpCopy
   244  		return true
   245  	case ssaop.OpDiv16:
   246  		return rewriteValue_OpDiv16(v)
   247  	case ssaop.OpDiv16u:
   248  		return rewriteValue_OpDiv16u(v)
   249  	case ssaop.OpDiv32:
   250  		return rewriteValue_OpDiv32(v)
   251  	case ssaop.OpDiv32F:
   252  		v.Op = ssaop.OpLOONG64DIVF
   253  		return true
   254  	case ssaop.OpDiv32u:
   255  		return rewriteValue_OpDiv32u(v)
   256  	case ssaop.OpDiv64:
   257  		return rewriteValue_OpDiv64(v)
   258  	case ssaop.OpDiv64F:
   259  		v.Op = ssaop.OpLOONG64DIVD
   260  		return true
   261  	case ssaop.OpDiv64u:
   262  		v.Op = ssaop.OpLOONG64DIVVU
   263  		return true
   264  	case ssaop.OpDiv8:
   265  		return rewriteValue_OpDiv8(v)
   266  	case ssaop.OpDiv8u:
   267  		return rewriteValue_OpDiv8u(v)
   268  	case ssaop.OpEq16:
   269  		return rewriteValue_OpEq16(v)
   270  	case ssaop.OpEq32:
   271  		return rewriteValue_OpEq32(v)
   272  	case ssaop.OpEq32F:
   273  		return rewriteValue_OpEq32F(v)
   274  	case ssaop.OpEq64:
   275  		return rewriteValue_OpEq64(v)
   276  	case ssaop.OpEq64F:
   277  		return rewriteValue_OpEq64F(v)
   278  	case ssaop.OpEq8:
   279  		return rewriteValue_OpEq8(v)
   280  	case ssaop.OpEqB:
   281  		return rewriteValue_OpEqB(v)
   282  	case ssaop.OpEqPtr:
   283  		return rewriteValue_OpEqPtr(v)
   284  	case ssaop.OpFMA:
   285  		v.Op = ssaop.OpLOONG64FMADDD
   286  		return true
   287  	case ssaop.OpFloor:
   288  		v.Op = ssaop.OpLOONG64FRINTMD
   289  		return true
   290  	case ssaop.OpGetCallerPC:
   291  		v.Op = ssaop.OpLOONG64LoweredGetCallerPC
   292  		return true
   293  	case ssaop.OpGetCallerSP:
   294  		v.Op = ssaop.OpLOONG64LoweredGetCallerSP
   295  		return true
   296  	case ssaop.OpGetClosurePtr:
   297  		v.Op = ssaop.OpLOONG64LoweredGetClosurePtr
   298  		return true
   299  	case ssaop.OpHmul32:
   300  		v.Op = ssaop.OpLOONG64MULH
   301  		return true
   302  	case ssaop.OpHmul32u:
   303  		v.Op = ssaop.OpLOONG64MULHU
   304  		return true
   305  	case ssaop.OpHmul64:
   306  		v.Op = ssaop.OpLOONG64MULHV
   307  		return true
   308  	case ssaop.OpHmul64u:
   309  		v.Op = ssaop.OpLOONG64MULHVU
   310  		return true
   311  	case ssaop.OpInterCall:
   312  		v.Op = ssaop.OpLOONG64CALLinter
   313  		return true
   314  	case ssaop.OpIsInBounds:
   315  		return rewriteValue_OpIsInBounds(v)
   316  	case ssaop.OpIsNonNil:
   317  		return rewriteValue_OpIsNonNil(v)
   318  	case ssaop.OpIsSliceInBounds:
   319  		return rewriteValue_OpIsSliceInBounds(v)
   320  	case ssaop.OpLOONG64ADDD:
   321  		return rewriteValue_OpLOONG64ADDD(v)
   322  	case ssaop.OpLOONG64ADDF:
   323  		return rewriteValue_OpLOONG64ADDF(v)
   324  	case ssaop.OpLOONG64ADDV:
   325  		return rewriteValue_OpLOONG64ADDV(v)
   326  	case ssaop.OpLOONG64ADDVconst:
   327  		return rewriteValue_OpLOONG64ADDVconst(v)
   328  	case ssaop.OpLOONG64ADDshiftLLV:
   329  		return rewriteValue_OpLOONG64ADDshiftLLV(v)
   330  	case ssaop.OpLOONG64AND:
   331  		return rewriteValue_OpLOONG64AND(v)
   332  	case ssaop.OpLOONG64ANDconst:
   333  		return rewriteValue_OpLOONG64ANDconst(v)
   334  	case ssaop.OpLOONG64DIVV:
   335  		return rewriteValue_OpLOONG64DIVV(v)
   336  	case ssaop.OpLOONG64DIVVU:
   337  		return rewriteValue_OpLOONG64DIVVU(v)
   338  	case ssaop.OpLOONG64LoweredPanicBoundsCR:
   339  		return rewriteValue_OpLOONG64LoweredPanicBoundsCR(v)
   340  	case ssaop.OpLOONG64LoweredPanicBoundsRC:
   341  		return rewriteValue_OpLOONG64LoweredPanicBoundsRC(v)
   342  	case ssaop.OpLOONG64LoweredPanicBoundsRR:
   343  		return rewriteValue_OpLOONG64LoweredPanicBoundsRR(v)
   344  	case ssaop.OpLOONG64MASKEQZ:
   345  		return rewriteValue_OpLOONG64MASKEQZ(v)
   346  	case ssaop.OpLOONG64MASKNEZ:
   347  		return rewriteValue_OpLOONG64MASKNEZ(v)
   348  	case ssaop.OpLOONG64MOVBUload:
   349  		return rewriteValue_OpLOONG64MOVBUload(v)
   350  	case ssaop.OpLOONG64MOVBUloadidx:
   351  		return rewriteValue_OpLOONG64MOVBUloadidx(v)
   352  	case ssaop.OpLOONG64MOVBUreg:
   353  		return rewriteValue_OpLOONG64MOVBUreg(v)
   354  	case ssaop.OpLOONG64MOVBload:
   355  		return rewriteValue_OpLOONG64MOVBload(v)
   356  	case ssaop.OpLOONG64MOVBloadidx:
   357  		return rewriteValue_OpLOONG64MOVBloadidx(v)
   358  	case ssaop.OpLOONG64MOVBreg:
   359  		return rewriteValue_OpLOONG64MOVBreg(v)
   360  	case ssaop.OpLOONG64MOVBstore:
   361  		return rewriteValue_OpLOONG64MOVBstore(v)
   362  	case ssaop.OpLOONG64MOVBstoreidx:
   363  		return rewriteValue_OpLOONG64MOVBstoreidx(v)
   364  	case ssaop.OpLOONG64MOVDF:
   365  		return rewriteValue_OpLOONG64MOVDF(v)
   366  	case ssaop.OpLOONG64MOVDload:
   367  		return rewriteValue_OpLOONG64MOVDload(v)
   368  	case ssaop.OpLOONG64MOVDloadidx:
   369  		return rewriteValue_OpLOONG64MOVDloadidx(v)
   370  	case ssaop.OpLOONG64MOVDstore:
   371  		return rewriteValue_OpLOONG64MOVDstore(v)
   372  	case ssaop.OpLOONG64MOVDstoreidx:
   373  		return rewriteValue_OpLOONG64MOVDstoreidx(v)
   374  	case ssaop.OpLOONG64MOVFload:
   375  		return rewriteValue_OpLOONG64MOVFload(v)
   376  	case ssaop.OpLOONG64MOVFloadidx:
   377  		return rewriteValue_OpLOONG64MOVFloadidx(v)
   378  	case ssaop.OpLOONG64MOVFstore:
   379  		return rewriteValue_OpLOONG64MOVFstore(v)
   380  	case ssaop.OpLOONG64MOVFstoreidx:
   381  		return rewriteValue_OpLOONG64MOVFstoreidx(v)
   382  	case ssaop.OpLOONG64MOVHUload:
   383  		return rewriteValue_OpLOONG64MOVHUload(v)
   384  	case ssaop.OpLOONG64MOVHUloadidx:
   385  		return rewriteValue_OpLOONG64MOVHUloadidx(v)
   386  	case ssaop.OpLOONG64MOVHUreg:
   387  		return rewriteValue_OpLOONG64MOVHUreg(v)
   388  	case ssaop.OpLOONG64MOVHload:
   389  		return rewriteValue_OpLOONG64MOVHload(v)
   390  	case ssaop.OpLOONG64MOVHloadidx:
   391  		return rewriteValue_OpLOONG64MOVHloadidx(v)
   392  	case ssaop.OpLOONG64MOVHreg:
   393  		return rewriteValue_OpLOONG64MOVHreg(v)
   394  	case ssaop.OpLOONG64MOVHstore:
   395  		return rewriteValue_OpLOONG64MOVHstore(v)
   396  	case ssaop.OpLOONG64MOVHstoreidx:
   397  		return rewriteValue_OpLOONG64MOVHstoreidx(v)
   398  	case ssaop.OpLOONG64MOVVload:
   399  		return rewriteValue_OpLOONG64MOVVload(v)
   400  	case ssaop.OpLOONG64MOVVloadidx:
   401  		return rewriteValue_OpLOONG64MOVVloadidx(v)
   402  	case ssaop.OpLOONG64MOVVreg:
   403  		return rewriteValue_OpLOONG64MOVVreg(v)
   404  	case ssaop.OpLOONG64MOVVstore:
   405  		return rewriteValue_OpLOONG64MOVVstore(v)
   406  	case ssaop.OpLOONG64MOVVstoreidx:
   407  		return rewriteValue_OpLOONG64MOVVstoreidx(v)
   408  	case ssaop.OpLOONG64MOVWUload:
   409  		return rewriteValue_OpLOONG64MOVWUload(v)
   410  	case ssaop.OpLOONG64MOVWUloadidx:
   411  		return rewriteValue_OpLOONG64MOVWUloadidx(v)
   412  	case ssaop.OpLOONG64MOVWUreg:
   413  		return rewriteValue_OpLOONG64MOVWUreg(v)
   414  	case ssaop.OpLOONG64MOVWload:
   415  		return rewriteValue_OpLOONG64MOVWload(v)
   416  	case ssaop.OpLOONG64MOVWloadidx:
   417  		return rewriteValue_OpLOONG64MOVWloadidx(v)
   418  	case ssaop.OpLOONG64MOVWreg:
   419  		return rewriteValue_OpLOONG64MOVWreg(v)
   420  	case ssaop.OpLOONG64MOVWstore:
   421  		return rewriteValue_OpLOONG64MOVWstore(v)
   422  	case ssaop.OpLOONG64MOVWstoreidx:
   423  		return rewriteValue_OpLOONG64MOVWstoreidx(v)
   424  	case ssaop.OpLOONG64MULV:
   425  		return rewriteValue_OpLOONG64MULV(v)
   426  	case ssaop.OpLOONG64NEGV:
   427  		return rewriteValue_OpLOONG64NEGV(v)
   428  	case ssaop.OpLOONG64NOR:
   429  		return rewriteValue_OpLOONG64NOR(v)
   430  	case ssaop.OpLOONG64NORconst:
   431  		return rewriteValue_OpLOONG64NORconst(v)
   432  	case ssaop.OpLOONG64OR:
   433  		return rewriteValue_OpLOONG64OR(v)
   434  	case ssaop.OpLOONG64ORN:
   435  		return rewriteValue_OpLOONG64ORN(v)
   436  	case ssaop.OpLOONG64ORconst:
   437  		return rewriteValue_OpLOONG64ORconst(v)
   438  	case ssaop.OpLOONG64REMV:
   439  		return rewriteValue_OpLOONG64REMV(v)
   440  	case ssaop.OpLOONG64REMVU:
   441  		return rewriteValue_OpLOONG64REMVU(v)
   442  	case ssaop.OpLOONG64ROTR:
   443  		return rewriteValue_OpLOONG64ROTR(v)
   444  	case ssaop.OpLOONG64ROTRV:
   445  		return rewriteValue_OpLOONG64ROTRV(v)
   446  	case ssaop.OpLOONG64SGT:
   447  		return rewriteValue_OpLOONG64SGT(v)
   448  	case ssaop.OpLOONG64SGTU:
   449  		return rewriteValue_OpLOONG64SGTU(v)
   450  	case ssaop.OpLOONG64SGTUconst:
   451  		return rewriteValue_OpLOONG64SGTUconst(v)
   452  	case ssaop.OpLOONG64SGTconst:
   453  		return rewriteValue_OpLOONG64SGTconst(v)
   454  	case ssaop.OpLOONG64SLL:
   455  		return rewriteValue_OpLOONG64SLL(v)
   456  	case ssaop.OpLOONG64SLLV:
   457  		return rewriteValue_OpLOONG64SLLV(v)
   458  	case ssaop.OpLOONG64SLLVconst:
   459  		return rewriteValue_OpLOONG64SLLVconst(v)
   460  	case ssaop.OpLOONG64SLLconst:
   461  		return rewriteValue_OpLOONG64SLLconst(v)
   462  	case ssaop.OpLOONG64SRA:
   463  		return rewriteValue_OpLOONG64SRA(v)
   464  	case ssaop.OpLOONG64SRAV:
   465  		return rewriteValue_OpLOONG64SRAV(v)
   466  	case ssaop.OpLOONG64SRAVconst:
   467  		return rewriteValue_OpLOONG64SRAVconst(v)
   468  	case ssaop.OpLOONG64SRL:
   469  		return rewriteValue_OpLOONG64SRL(v)
   470  	case ssaop.OpLOONG64SRLV:
   471  		return rewriteValue_OpLOONG64SRLV(v)
   472  	case ssaop.OpLOONG64SRLVconst:
   473  		return rewriteValue_OpLOONG64SRLVconst(v)
   474  	case ssaop.OpLOONG64SUBD:
   475  		return rewriteValue_OpLOONG64SUBD(v)
   476  	case ssaop.OpLOONG64SUBF:
   477  		return rewriteValue_OpLOONG64SUBF(v)
   478  	case ssaop.OpLOONG64SUBV:
   479  		return rewriteValue_OpLOONG64SUBV(v)
   480  	case ssaop.OpLOONG64SUBVconst:
   481  		return rewriteValue_OpLOONG64SUBVconst(v)
   482  	case ssaop.OpLOONG64XOR:
   483  		return rewriteValue_OpLOONG64XOR(v)
   484  	case ssaop.OpLOONG64XORconst:
   485  		return rewriteValue_OpLOONG64XORconst(v)
   486  	case ssaop.OpLeq16:
   487  		return rewriteValue_OpLeq16(v)
   488  	case ssaop.OpLeq16U:
   489  		return rewriteValue_OpLeq16U(v)
   490  	case ssaop.OpLeq32:
   491  		return rewriteValue_OpLeq32(v)
   492  	case ssaop.OpLeq32F:
   493  		return rewriteValue_OpLeq32F(v)
   494  	case ssaop.OpLeq32U:
   495  		return rewriteValue_OpLeq32U(v)
   496  	case ssaop.OpLeq64:
   497  		return rewriteValue_OpLeq64(v)
   498  	case ssaop.OpLeq64F:
   499  		return rewriteValue_OpLeq64F(v)
   500  	case ssaop.OpLeq64U:
   501  		return rewriteValue_OpLeq64U(v)
   502  	case ssaop.OpLeq8:
   503  		return rewriteValue_OpLeq8(v)
   504  	case ssaop.OpLeq8U:
   505  		return rewriteValue_OpLeq8U(v)
   506  	case ssaop.OpLess16:
   507  		return rewriteValue_OpLess16(v)
   508  	case ssaop.OpLess16U:
   509  		return rewriteValue_OpLess16U(v)
   510  	case ssaop.OpLess32:
   511  		return rewriteValue_OpLess32(v)
   512  	case ssaop.OpLess32F:
   513  		return rewriteValue_OpLess32F(v)
   514  	case ssaop.OpLess32U:
   515  		return rewriteValue_OpLess32U(v)
   516  	case ssaop.OpLess64:
   517  		return rewriteValue_OpLess64(v)
   518  	case ssaop.OpLess64F:
   519  		return rewriteValue_OpLess64F(v)
   520  	case ssaop.OpLess64U:
   521  		return rewriteValue_OpLess64U(v)
   522  	case ssaop.OpLess8:
   523  		return rewriteValue_OpLess8(v)
   524  	case ssaop.OpLess8U:
   525  		return rewriteValue_OpLess8U(v)
   526  	case ssaop.OpLoad:
   527  		return rewriteValue_OpLoad(v)
   528  	case ssaop.OpLocalAddr:
   529  		return rewriteValue_OpLocalAddr(v)
   530  	case ssaop.OpLsh16x16:
   531  		return rewriteValue_OpLsh16x16(v)
   532  	case ssaop.OpLsh16x32:
   533  		return rewriteValue_OpLsh16x32(v)
   534  	case ssaop.OpLsh16x64:
   535  		return rewriteValue_OpLsh16x64(v)
   536  	case ssaop.OpLsh16x8:
   537  		return rewriteValue_OpLsh16x8(v)
   538  	case ssaop.OpLsh32x16:
   539  		return rewriteValue_OpLsh32x16(v)
   540  	case ssaop.OpLsh32x32:
   541  		return rewriteValue_OpLsh32x32(v)
   542  	case ssaop.OpLsh32x64:
   543  		return rewriteValue_OpLsh32x64(v)
   544  	case ssaop.OpLsh32x8:
   545  		return rewriteValue_OpLsh32x8(v)
   546  	case ssaop.OpLsh64x16:
   547  		return rewriteValue_OpLsh64x16(v)
   548  	case ssaop.OpLsh64x32:
   549  		return rewriteValue_OpLsh64x32(v)
   550  	case ssaop.OpLsh64x64:
   551  		return rewriteValue_OpLsh64x64(v)
   552  	case ssaop.OpLsh64x8:
   553  		return rewriteValue_OpLsh64x8(v)
   554  	case ssaop.OpLsh8x16:
   555  		return rewriteValue_OpLsh8x16(v)
   556  	case ssaop.OpLsh8x32:
   557  		return rewriteValue_OpLsh8x32(v)
   558  	case ssaop.OpLsh8x64:
   559  		return rewriteValue_OpLsh8x64(v)
   560  	case ssaop.OpLsh8x8:
   561  		return rewriteValue_OpLsh8x8(v)
   562  	case ssaop.OpMax32F:
   563  		v.Op = ssaop.OpLOONG64FMAXF
   564  		return true
   565  	case ssaop.OpMax64F:
   566  		v.Op = ssaop.OpLOONG64FMAXD
   567  		return true
   568  	case ssaop.OpMin32F:
   569  		v.Op = ssaop.OpLOONG64FMINF
   570  		return true
   571  	case ssaop.OpMin64F:
   572  		v.Op = ssaop.OpLOONG64FMIND
   573  		return true
   574  	case ssaop.OpMod16:
   575  		return rewriteValue_OpMod16(v)
   576  	case ssaop.OpMod16u:
   577  		return rewriteValue_OpMod16u(v)
   578  	case ssaop.OpMod32:
   579  		return rewriteValue_OpMod32(v)
   580  	case ssaop.OpMod32u:
   581  		return rewriteValue_OpMod32u(v)
   582  	case ssaop.OpMod64:
   583  		return rewriteValue_OpMod64(v)
   584  	case ssaop.OpMod64u:
   585  		v.Op = ssaop.OpLOONG64REMVU
   586  		return true
   587  	case ssaop.OpMod8:
   588  		return rewriteValue_OpMod8(v)
   589  	case ssaop.OpMod8u:
   590  		return rewriteValue_OpMod8u(v)
   591  	case ssaop.OpMove:
   592  		return rewriteValue_OpMove(v)
   593  	case ssaop.OpMul16:
   594  		v.Op = ssaop.OpLOONG64MULV
   595  		return true
   596  	case ssaop.OpMul32:
   597  		v.Op = ssaop.OpLOONG64MULV
   598  		return true
   599  	case ssaop.OpMul32F:
   600  		v.Op = ssaop.OpLOONG64MULF
   601  		return true
   602  	case ssaop.OpMul64:
   603  		v.Op = ssaop.OpLOONG64MULV
   604  		return true
   605  	case ssaop.OpMul64F:
   606  		v.Op = ssaop.OpLOONG64MULD
   607  		return true
   608  	case ssaop.OpMul8:
   609  		v.Op = ssaop.OpLOONG64MULV
   610  		return true
   611  	case ssaop.OpNeg16:
   612  		v.Op = ssaop.OpLOONG64NEGV
   613  		return true
   614  	case ssaop.OpNeg32:
   615  		v.Op = ssaop.OpLOONG64NEGV
   616  		return true
   617  	case ssaop.OpNeg32F:
   618  		v.Op = ssaop.OpLOONG64NEGF
   619  		return true
   620  	case ssaop.OpNeg64:
   621  		v.Op = ssaop.OpLOONG64NEGV
   622  		return true
   623  	case ssaop.OpNeg64F:
   624  		v.Op = ssaop.OpLOONG64NEGD
   625  		return true
   626  	case ssaop.OpNeg8:
   627  		v.Op = ssaop.OpLOONG64NEGV
   628  		return true
   629  	case ssaop.OpNeq16:
   630  		return rewriteValue_OpNeq16(v)
   631  	case ssaop.OpNeq32:
   632  		return rewriteValue_OpNeq32(v)
   633  	case ssaop.OpNeq32F:
   634  		return rewriteValue_OpNeq32F(v)
   635  	case ssaop.OpNeq64:
   636  		return rewriteValue_OpNeq64(v)
   637  	case ssaop.OpNeq64F:
   638  		return rewriteValue_OpNeq64F(v)
   639  	case ssaop.OpNeq8:
   640  		return rewriteValue_OpNeq8(v)
   641  	case ssaop.OpNeqB:
   642  		v.Op = ssaop.OpLOONG64XOR
   643  		return true
   644  	case ssaop.OpNeqPtr:
   645  		return rewriteValue_OpNeqPtr(v)
   646  	case ssaop.OpNilCheck:
   647  		v.Op = ssaop.OpLOONG64LoweredNilCheck
   648  		return true
   649  	case ssaop.OpNot:
   650  		return rewriteValue_OpNot(v)
   651  	case ssaop.OpOffPtr:
   652  		return rewriteValue_OpOffPtr(v)
   653  	case ssaop.OpOr16:
   654  		v.Op = ssaop.OpLOONG64OR
   655  		return true
   656  	case ssaop.OpOr32:
   657  		v.Op = ssaop.OpLOONG64OR
   658  		return true
   659  	case ssaop.OpOr64:
   660  		v.Op = ssaop.OpLOONG64OR
   661  		return true
   662  	case ssaop.OpOr8:
   663  		v.Op = ssaop.OpLOONG64OR
   664  		return true
   665  	case ssaop.OpOrB:
   666  		v.Op = ssaop.OpLOONG64OR
   667  		return true
   668  	case ssaop.OpPanicBounds:
   669  		v.Op = ssaop.OpLOONG64LoweredPanicBoundsRR
   670  		return true
   671  	case ssaop.OpPopCount16:
   672  		return rewriteValue_OpPopCount16(v)
   673  	case ssaop.OpPopCount32:
   674  		return rewriteValue_OpPopCount32(v)
   675  	case ssaop.OpPopCount64:
   676  		return rewriteValue_OpPopCount64(v)
   677  	case ssaop.OpPrefetchCache:
   678  		return rewriteValue_OpPrefetchCache(v)
   679  	case ssaop.OpPrefetchCacheStreamed:
   680  		return rewriteValue_OpPrefetchCacheStreamed(v)
   681  	case ssaop.OpPubBarrier:
   682  		v.Op = ssaop.OpLOONG64LoweredPubBarrier
   683  		return true
   684  	case ssaop.OpRotateLeft16:
   685  		return rewriteValue_OpRotateLeft16(v)
   686  	case ssaop.OpRotateLeft32:
   687  		return rewriteValue_OpRotateLeft32(v)
   688  	case ssaop.OpRotateLeft64:
   689  		return rewriteValue_OpRotateLeft64(v)
   690  	case ssaop.OpRotateLeft8:
   691  		return rewriteValue_OpRotateLeft8(v)
   692  	case ssaop.OpRound32F:
   693  		v.Op = ssaop.OpLOONG64LoweredRound32F
   694  		return true
   695  	case ssaop.OpRound64F:
   696  		v.Op = ssaop.OpLOONG64LoweredRound64F
   697  		return true
   698  	case ssaop.OpRoundToEven:
   699  		v.Op = ssaop.OpLOONG64FRINTND
   700  		return true
   701  	case ssaop.OpRsh16Ux16:
   702  		return rewriteValue_OpRsh16Ux16(v)
   703  	case ssaop.OpRsh16Ux32:
   704  		return rewriteValue_OpRsh16Ux32(v)
   705  	case ssaop.OpRsh16Ux64:
   706  		return rewriteValue_OpRsh16Ux64(v)
   707  	case ssaop.OpRsh16Ux8:
   708  		return rewriteValue_OpRsh16Ux8(v)
   709  	case ssaop.OpRsh16x16:
   710  		return rewriteValue_OpRsh16x16(v)
   711  	case ssaop.OpRsh16x32:
   712  		return rewriteValue_OpRsh16x32(v)
   713  	case ssaop.OpRsh16x64:
   714  		return rewriteValue_OpRsh16x64(v)
   715  	case ssaop.OpRsh16x8:
   716  		return rewriteValue_OpRsh16x8(v)
   717  	case ssaop.OpRsh32Ux16:
   718  		return rewriteValue_OpRsh32Ux16(v)
   719  	case ssaop.OpRsh32Ux32:
   720  		return rewriteValue_OpRsh32Ux32(v)
   721  	case ssaop.OpRsh32Ux64:
   722  		return rewriteValue_OpRsh32Ux64(v)
   723  	case ssaop.OpRsh32Ux8:
   724  		return rewriteValue_OpRsh32Ux8(v)
   725  	case ssaop.OpRsh32x16:
   726  		return rewriteValue_OpRsh32x16(v)
   727  	case ssaop.OpRsh32x32:
   728  		return rewriteValue_OpRsh32x32(v)
   729  	case ssaop.OpRsh32x64:
   730  		return rewriteValue_OpRsh32x64(v)
   731  	case ssaop.OpRsh32x8:
   732  		return rewriteValue_OpRsh32x8(v)
   733  	case ssaop.OpRsh64Ux16:
   734  		return rewriteValue_OpRsh64Ux16(v)
   735  	case ssaop.OpRsh64Ux32:
   736  		return rewriteValue_OpRsh64Ux32(v)
   737  	case ssaop.OpRsh64Ux64:
   738  		return rewriteValue_OpRsh64Ux64(v)
   739  	case ssaop.OpRsh64Ux8:
   740  		return rewriteValue_OpRsh64Ux8(v)
   741  	case ssaop.OpRsh64x16:
   742  		return rewriteValue_OpRsh64x16(v)
   743  	case ssaop.OpRsh64x32:
   744  		return rewriteValue_OpRsh64x32(v)
   745  	case ssaop.OpRsh64x64:
   746  		return rewriteValue_OpRsh64x64(v)
   747  	case ssaop.OpRsh64x8:
   748  		return rewriteValue_OpRsh64x8(v)
   749  	case ssaop.OpRsh8Ux16:
   750  		return rewriteValue_OpRsh8Ux16(v)
   751  	case ssaop.OpRsh8Ux32:
   752  		return rewriteValue_OpRsh8Ux32(v)
   753  	case ssaop.OpRsh8Ux64:
   754  		return rewriteValue_OpRsh8Ux64(v)
   755  	case ssaop.OpRsh8Ux8:
   756  		return rewriteValue_OpRsh8Ux8(v)
   757  	case ssaop.OpRsh8x16:
   758  		return rewriteValue_OpRsh8x16(v)
   759  	case ssaop.OpRsh8x32:
   760  		return rewriteValue_OpRsh8x32(v)
   761  	case ssaop.OpRsh8x64:
   762  		return rewriteValue_OpRsh8x64(v)
   763  	case ssaop.OpRsh8x8:
   764  		return rewriteValue_OpRsh8x8(v)
   765  	case ssaop.OpSelect0:
   766  		return rewriteValue_OpSelect0(v)
   767  	case ssaop.OpSelect1:
   768  		return rewriteValue_OpSelect1(v)
   769  	case ssaop.OpSelectN:
   770  		return rewriteValue_OpSelectN(v)
   771  	case ssaop.OpSignExt16to32:
   772  		v.Op = ssaop.OpLOONG64MOVHreg
   773  		return true
   774  	case ssaop.OpSignExt16to64:
   775  		v.Op = ssaop.OpLOONG64MOVHreg
   776  		return true
   777  	case ssaop.OpSignExt32to64:
   778  		v.Op = ssaop.OpLOONG64MOVWreg
   779  		return true
   780  	case ssaop.OpSignExt8to16:
   781  		v.Op = ssaop.OpLOONG64MOVBreg
   782  		return true
   783  	case ssaop.OpSignExt8to32:
   784  		v.Op = ssaop.OpLOONG64MOVBreg
   785  		return true
   786  	case ssaop.OpSignExt8to64:
   787  		v.Op = ssaop.OpLOONG64MOVBreg
   788  		return true
   789  	case ssaop.OpSlicemask:
   790  		return rewriteValue_OpSlicemask(v)
   791  	case ssaop.OpSqrt:
   792  		v.Op = ssaop.OpLOONG64SQRTD
   793  		return true
   794  	case ssaop.OpSqrt32:
   795  		v.Op = ssaop.OpLOONG64SQRTF
   796  		return true
   797  	case ssaop.OpStaticCall:
   798  		v.Op = ssaop.OpLOONG64CALLstatic
   799  		return true
   800  	case ssaop.OpStore:
   801  		return rewriteValue_OpStore(v)
   802  	case ssaop.OpSub16:
   803  		v.Op = ssaop.OpLOONG64SUBV
   804  		return true
   805  	case ssaop.OpSub32:
   806  		v.Op = ssaop.OpLOONG64SUBV
   807  		return true
   808  	case ssaop.OpSub32F:
   809  		v.Op = ssaop.OpLOONG64SUBF
   810  		return true
   811  	case ssaop.OpSub64:
   812  		v.Op = ssaop.OpLOONG64SUBV
   813  		return true
   814  	case ssaop.OpSub64F:
   815  		v.Op = ssaop.OpLOONG64SUBD
   816  		return true
   817  	case ssaop.OpSub8:
   818  		v.Op = ssaop.OpLOONG64SUBV
   819  		return true
   820  	case ssaop.OpSubPtr:
   821  		v.Op = ssaop.OpLOONG64SUBV
   822  		return true
   823  	case ssaop.OpTailCall:
   824  		v.Op = ssaop.OpLOONG64CALLtail
   825  		return true
   826  	case ssaop.OpTailCallInter:
   827  		v.Op = ssaop.OpLOONG64CALLtailinter
   828  		return true
   829  	case ssaop.OpTrunc:
   830  		v.Op = ssaop.OpLOONG64FRINTZD
   831  		return true
   832  	case ssaop.OpTrunc16to8:
   833  		v.Op = ssaop.OpCopy
   834  		return true
   835  	case ssaop.OpTrunc32to16:
   836  		v.Op = ssaop.OpCopy
   837  		return true
   838  	case ssaop.OpTrunc32to8:
   839  		v.Op = ssaop.OpCopy
   840  		return true
   841  	case ssaop.OpTrunc64to16:
   842  		v.Op = ssaop.OpCopy
   843  		return true
   844  	case ssaop.OpTrunc64to32:
   845  		v.Op = ssaop.OpCopy
   846  		return true
   847  	case ssaop.OpTrunc64to8:
   848  		v.Op = ssaop.OpCopy
   849  		return true
   850  	case ssaop.OpWB:
   851  		v.Op = ssaop.OpLOONG64LoweredWB
   852  		return true
   853  	case ssaop.OpXor16:
   854  		v.Op = ssaop.OpLOONG64XOR
   855  		return true
   856  	case ssaop.OpXor32:
   857  		v.Op = ssaop.OpLOONG64XOR
   858  		return true
   859  	case ssaop.OpXor64:
   860  		v.Op = ssaop.OpLOONG64XOR
   861  		return true
   862  	case ssaop.OpXor8:
   863  		v.Op = ssaop.OpLOONG64XOR
   864  		return true
   865  	case ssaop.OpZero:
   866  		return rewriteValue_OpZero(v)
   867  	case ssaop.OpZeroExt16to32:
   868  		v.Op = ssaop.OpLOONG64MOVHUreg
   869  		return true
   870  	case ssaop.OpZeroExt16to64:
   871  		v.Op = ssaop.OpLOONG64MOVHUreg
   872  		return true
   873  	case ssaop.OpZeroExt32to64:
   874  		v.Op = ssaop.OpLOONG64MOVWUreg
   875  		return true
   876  	case ssaop.OpZeroExt8to16:
   877  		v.Op = ssaop.OpLOONG64MOVBUreg
   878  		return true
   879  	case ssaop.OpZeroExt8to32:
   880  		v.Op = ssaop.OpLOONG64MOVBUreg
   881  		return true
   882  	case ssaop.OpZeroExt8to64:
   883  		v.Op = ssaop.OpLOONG64MOVBUreg
   884  		return true
   885  	}
   886  	return false
   887  }
   888  func rewriteValue_OpAddr(v *ssa.Value) bool {
   889  	v_0 := v.Args[0]
   890  	// match: (Addr {sym} base)
   891  	// result: (MOVVaddr {sym} base)
   892  	for {
   893  		sym := ssa.AuxToSym(v.Aux)
   894  		base := v_0
   895  		v.Reset(ssaop.OpLOONG64MOVVaddr)
   896  		v.Aux = ssa.SymToAux(sym)
   897  		v.AddArg(base)
   898  		return true
   899  	}
   900  }
   901  func rewriteValue_OpAtomicAnd8(v *ssa.Value) bool {
   902  	v_2 := v.Args[2]
   903  	v_1 := v.Args[1]
   904  	v_0 := v.Args[0]
   905  	b := v.Block
   906  	typ := &b.Func.Config.Types
   907  	// match: (AtomicAnd8 ptr val mem)
   908  	// 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)
   909  	for {
   910  		ptr := v_0
   911  		val := v_1
   912  		mem := v_2
   913  		v.Reset(ssaop.OpLOONG64LoweredAtomicAnd32)
   914  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64AND, typ.Uintptr)
   915  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
   916  		v1.AuxInt = ssa.Int64ToAuxInt(^3)
   917  		v0.AddArg2(v1, ptr)
   918  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NORconst, typ.UInt32)
   919  		v2.AuxInt = ssa.Int64ToAuxInt(0)
   920  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, typ.UInt32)
   921  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64XORconst, typ.UInt32)
   922  		v4.AuxInt = ssa.Int64ToAuxInt(0xff)
   923  		v5 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
   924  		v5.AddArg(val)
   925  		v4.AddArg(v5)
   926  		v6 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.UInt64)
   927  		v6.AuxInt = ssa.Int64ToAuxInt(3)
   928  		v7 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.UInt64)
   929  		v7.AuxInt = ssa.Int64ToAuxInt(3)
   930  		v7.AddArg(ptr)
   931  		v6.AddArg(v7)
   932  		v3.AddArg2(v4, v6)
   933  		v2.AddArg(v3)
   934  		v.AddArg3(v0, v2, mem)
   935  		return true
   936  	}
   937  }
   938  func rewriteValue_OpAtomicCompareAndSwap32(v *ssa.Value) bool {
   939  	v_3 := v.Args[3]
   940  	v_2 := v.Args[2]
   941  	v_1 := v.Args[1]
   942  	v_0 := v.Args[0]
   943  	b := v.Block
   944  	typ := &b.Func.Config.Types
   945  	// match: (AtomicCompareAndSwap32 ptr old new mem)
   946  	// result: (LoweredAtomicCas32 ptr (SignExt32to64 old) new mem)
   947  	for {
   948  		ptr := v_0
   949  		old := v_1
   950  		new := v_2
   951  		mem := v_3
   952  		v.Reset(ssaop.OpLOONG64LoweredAtomicCas32)
   953  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
   954  		v0.AddArg(old)
   955  		v.AddArg4(ptr, v0, new, mem)
   956  		return true
   957  	}
   958  }
   959  func rewriteValue_OpAtomicCompareAndSwap32Variant(v *ssa.Value) bool {
   960  	v_3 := v.Args[3]
   961  	v_2 := v.Args[2]
   962  	v_1 := v.Args[1]
   963  	v_0 := v.Args[0]
   964  	b := v.Block
   965  	typ := &b.Func.Config.Types
   966  	// match: (AtomicCompareAndSwap32Variant ptr old new mem)
   967  	// result: (LoweredAtomicCas32Variant ptr (SignExt32to64 old) new mem)
   968  	for {
   969  		ptr := v_0
   970  		old := v_1
   971  		new := v_2
   972  		mem := v_3
   973  		v.Reset(ssaop.OpLOONG64LoweredAtomicCas32Variant)
   974  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
   975  		v0.AddArg(old)
   976  		v.AddArg4(ptr, v0, new, mem)
   977  		return true
   978  	}
   979  }
   980  func rewriteValue_OpAtomicOr8(v *ssa.Value) bool {
   981  	v_2 := v.Args[2]
   982  	v_1 := v.Args[1]
   983  	v_0 := v.Args[0]
   984  	b := v.Block
   985  	typ := &b.Func.Config.Types
   986  	// match: (AtomicOr8 ptr val mem)
   987  	// result: (LoweredAtomicOr32 (AND <typ.Uintptr> (MOVVconst [^3]) ptr) (SLLV <typ.UInt32> (ZeroExt8to32 val) (SLLVconst <typ.UInt64> [3] (ANDconst <typ.UInt64> [3] ptr))) mem)
   988  	for {
   989  		ptr := v_0
   990  		val := v_1
   991  		mem := v_2
   992  		v.Reset(ssaop.OpLOONG64LoweredAtomicOr32)
   993  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64AND, typ.Uintptr)
   994  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
   995  		v1.AuxInt = ssa.Int64ToAuxInt(^3)
   996  		v0.AddArg2(v1, ptr)
   997  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, typ.UInt32)
   998  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
   999  		v3.AddArg(val)
  1000  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.UInt64)
  1001  		v4.AuxInt = ssa.Int64ToAuxInt(3)
  1002  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.UInt64)
  1003  		v5.AuxInt = ssa.Int64ToAuxInt(3)
  1004  		v5.AddArg(ptr)
  1005  		v4.AddArg(v5)
  1006  		v2.AddArg2(v3, v4)
  1007  		v.AddArg3(v0, v2, mem)
  1008  		return true
  1009  	}
  1010  }
  1011  func rewriteValue_OpAvg64u(v *ssa.Value) bool {
  1012  	v_1 := v.Args[1]
  1013  	v_0 := v.Args[0]
  1014  	b := v.Block
  1015  	// match: (Avg64u <t> x y)
  1016  	// result: (ADDV (SRLVconst <t> (SUBV <t> x y) [1]) y)
  1017  	for {
  1018  		t := v.Type
  1019  		x := v_0
  1020  		y := v_1
  1021  		v.Reset(ssaop.OpLOONG64ADDV)
  1022  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLVconst, t)
  1023  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1024  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
  1025  		v1.AddArg2(x, y)
  1026  		v0.AddArg(v1)
  1027  		v.AddArg2(v0, y)
  1028  		return true
  1029  	}
  1030  }
  1031  func rewriteValue_OpBitLen16(v *ssa.Value) bool {
  1032  	v_0 := v.Args[0]
  1033  	b := v.Block
  1034  	typ := &b.Func.Config.Types
  1035  	// match: (BitLen16 x)
  1036  	// result: (BitLen64 (ZeroExt16to64 x))
  1037  	for {
  1038  		x := v_0
  1039  		v.Reset(ssaop.OpBitLen64)
  1040  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1041  		v0.AddArg(x)
  1042  		v.AddArg(v0)
  1043  		return true
  1044  	}
  1045  }
  1046  func rewriteValue_OpBitLen32(v *ssa.Value) bool {
  1047  	v_0 := v.Args[0]
  1048  	b := v.Block
  1049  	// match: (BitLen32 <t> x)
  1050  	// result: (NEGV <t> (SUBVconst <t> [32] (CLZW <t> x)))
  1051  	for {
  1052  		t := v.Type
  1053  		x := v_0
  1054  		v.Reset(ssaop.OpLOONG64NEGV)
  1055  		v.Type = t
  1056  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBVconst, t)
  1057  		v0.AuxInt = ssa.Int64ToAuxInt(32)
  1058  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64CLZW, t)
  1059  		v1.AddArg(x)
  1060  		v0.AddArg(v1)
  1061  		v.AddArg(v0)
  1062  		return true
  1063  	}
  1064  }
  1065  func rewriteValue_OpBitLen64(v *ssa.Value) bool {
  1066  	v_0 := v.Args[0]
  1067  	b := v.Block
  1068  	// match: (BitLen64 <t> x)
  1069  	// result: (NEGV <t> (SUBVconst <t> [64] (CLZV <t> x)))
  1070  	for {
  1071  		t := v.Type
  1072  		x := v_0
  1073  		v.Reset(ssaop.OpLOONG64NEGV)
  1074  		v.Type = t
  1075  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBVconst, t)
  1076  		v0.AuxInt = ssa.Int64ToAuxInt(64)
  1077  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64CLZV, t)
  1078  		v1.AddArg(x)
  1079  		v0.AddArg(v1)
  1080  		v.AddArg(v0)
  1081  		return true
  1082  	}
  1083  }
  1084  func rewriteValue_OpBitLen8(v *ssa.Value) bool {
  1085  	v_0 := v.Args[0]
  1086  	b := v.Block
  1087  	typ := &b.Func.Config.Types
  1088  	// match: (BitLen8 x)
  1089  	// result: (BitLen64 (ZeroExt8to64 x))
  1090  	for {
  1091  		x := v_0
  1092  		v.Reset(ssaop.OpBitLen64)
  1093  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1094  		v0.AddArg(x)
  1095  		v.AddArg(v0)
  1096  		return true
  1097  	}
  1098  }
  1099  func rewriteValue_OpBitRev16(v *ssa.Value) bool {
  1100  	v_0 := v.Args[0]
  1101  	b := v.Block
  1102  	// match: (BitRev16 <t> x)
  1103  	// result: (REVB2H (BITREV4B <t> x))
  1104  	for {
  1105  		t := v.Type
  1106  		x := v_0
  1107  		v.Reset(ssaop.OpLOONG64REVB2H)
  1108  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64BITREV4B, t)
  1109  		v0.AddArg(x)
  1110  		v.AddArg(v0)
  1111  		return true
  1112  	}
  1113  }
  1114  func rewriteValue_OpCom16(v *ssa.Value) bool {
  1115  	v_0 := v.Args[0]
  1116  	b := v.Block
  1117  	typ := &b.Func.Config.Types
  1118  	// match: (Com16 x)
  1119  	// result: (NOR (MOVVconst [0]) x)
  1120  	for {
  1121  		x := v_0
  1122  		v.Reset(ssaop.OpLOONG64NOR)
  1123  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1124  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1125  		v.AddArg2(v0, x)
  1126  		return true
  1127  	}
  1128  }
  1129  func rewriteValue_OpCom32(v *ssa.Value) bool {
  1130  	v_0 := v.Args[0]
  1131  	b := v.Block
  1132  	typ := &b.Func.Config.Types
  1133  	// match: (Com32 x)
  1134  	// result: (NOR (MOVVconst [0]) x)
  1135  	for {
  1136  		x := v_0
  1137  		v.Reset(ssaop.OpLOONG64NOR)
  1138  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1139  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1140  		v.AddArg2(v0, x)
  1141  		return true
  1142  	}
  1143  }
  1144  func rewriteValue_OpCom64(v *ssa.Value) bool {
  1145  	v_0 := v.Args[0]
  1146  	b := v.Block
  1147  	typ := &b.Func.Config.Types
  1148  	// match: (Com64 x)
  1149  	// result: (NOR (MOVVconst [0]) x)
  1150  	for {
  1151  		x := v_0
  1152  		v.Reset(ssaop.OpLOONG64NOR)
  1153  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1154  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1155  		v.AddArg2(v0, x)
  1156  		return true
  1157  	}
  1158  }
  1159  func rewriteValue_OpCom8(v *ssa.Value) bool {
  1160  	v_0 := v.Args[0]
  1161  	b := v.Block
  1162  	typ := &b.Func.Config.Types
  1163  	// match: (Com8 x)
  1164  	// result: (NOR (MOVVconst [0]) x)
  1165  	for {
  1166  		x := v_0
  1167  		v.Reset(ssaop.OpLOONG64NOR)
  1168  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1169  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1170  		v.AddArg2(v0, x)
  1171  		return true
  1172  	}
  1173  }
  1174  func rewriteValue_OpCondSelect(v *ssa.Value) bool {
  1175  	v_2 := v.Args[2]
  1176  	v_1 := v.Args[1]
  1177  	v_0 := v.Args[0]
  1178  	b := v.Block
  1179  	// match: (CondSelect <t> x y cond)
  1180  	// result: (OR (MASKEQZ <t> x cond) (MASKNEZ <t> y cond))
  1181  	for {
  1182  		t := v.Type
  1183  		x := v_0
  1184  		y := v_1
  1185  		cond := v_2
  1186  		v.Reset(ssaop.OpLOONG64OR)
  1187  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MASKEQZ, t)
  1188  		v0.AddArg2(x, cond)
  1189  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MASKNEZ, t)
  1190  		v1.AddArg2(y, cond)
  1191  		v.AddArg2(v0, v1)
  1192  		return true
  1193  	}
  1194  }
  1195  func rewriteValue_OpConst16(v *ssa.Value) bool {
  1196  	// match: (Const16 [val])
  1197  	// result: (MOVVconst [int64(val)])
  1198  	for {
  1199  		val := ssa.AuxIntToInt16(v.AuxInt)
  1200  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1201  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1202  		return true
  1203  	}
  1204  }
  1205  func rewriteValue_OpConst32(v *ssa.Value) bool {
  1206  	// match: (Const32 [val])
  1207  	// result: (MOVVconst [int64(val)])
  1208  	for {
  1209  		val := ssa.AuxIntToInt32(v.AuxInt)
  1210  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1211  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1212  		return true
  1213  	}
  1214  }
  1215  func rewriteValue_OpConst32F(v *ssa.Value) bool {
  1216  	// match: (Const32F [val])
  1217  	// result: (MOVFconst [float64(val)])
  1218  	for {
  1219  		val := ssa.AuxIntToFloat32(v.AuxInt)
  1220  		v.Reset(ssaop.OpLOONG64MOVFconst)
  1221  		v.AuxInt = ssa.Float64ToAuxInt(float64(val))
  1222  		return true
  1223  	}
  1224  }
  1225  func rewriteValue_OpConst64(v *ssa.Value) bool {
  1226  	// match: (Const64 [val])
  1227  	// result: (MOVVconst [int64(val)])
  1228  	for {
  1229  		val := ssa.AuxIntToInt64(v.AuxInt)
  1230  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1231  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1232  		return true
  1233  	}
  1234  }
  1235  func rewriteValue_OpConst64F(v *ssa.Value) bool {
  1236  	// match: (Const64F [val])
  1237  	// result: (MOVDconst [float64(val)])
  1238  	for {
  1239  		val := ssa.AuxIntToFloat64(v.AuxInt)
  1240  		v.Reset(ssaop.OpLOONG64MOVDconst)
  1241  		v.AuxInt = ssa.Float64ToAuxInt(float64(val))
  1242  		return true
  1243  	}
  1244  }
  1245  func rewriteValue_OpConst8(v *ssa.Value) bool {
  1246  	// match: (Const8 [val])
  1247  	// result: (MOVVconst [int64(val)])
  1248  	for {
  1249  		val := ssa.AuxIntToInt8(v.AuxInt)
  1250  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1251  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1252  		return true
  1253  	}
  1254  }
  1255  func rewriteValue_OpConstBool(v *ssa.Value) bool {
  1256  	// match: (ConstBool [t])
  1257  	// result: (MOVVconst [int64(ssa.B2i(t))])
  1258  	for {
  1259  		t := ssa.AuxIntToBool(v.AuxInt)
  1260  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1261  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.B2i(t)))
  1262  		return true
  1263  	}
  1264  }
  1265  func rewriteValue_OpConstNil(v *ssa.Value) bool {
  1266  	// match: (ConstNil)
  1267  	// result: (MOVVconst [0])
  1268  	for {
  1269  		v.Reset(ssaop.OpLOONG64MOVVconst)
  1270  		v.AuxInt = ssa.Int64ToAuxInt(0)
  1271  		return true
  1272  	}
  1273  }
  1274  func rewriteValue_OpCtz16(v *ssa.Value) bool {
  1275  	v_0 := v.Args[0]
  1276  	b := v.Block
  1277  	typ := &b.Func.Config.Types
  1278  	// match: (Ctz16 x)
  1279  	// result: (CTZV (OR <typ.UInt64> x (MOVVconst [1<<16])))
  1280  	for {
  1281  		x := v_0
  1282  		v.Reset(ssaop.OpLOONG64CTZV)
  1283  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, typ.UInt64)
  1284  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1285  		v1.AuxInt = ssa.Int64ToAuxInt(1 << 16)
  1286  		v0.AddArg2(x, v1)
  1287  		v.AddArg(v0)
  1288  		return true
  1289  	}
  1290  }
  1291  func rewriteValue_OpCtz8(v *ssa.Value) bool {
  1292  	v_0 := v.Args[0]
  1293  	b := v.Block
  1294  	typ := &b.Func.Config.Types
  1295  	// match: (Ctz8 x)
  1296  	// result: (CTZV (OR <typ.UInt64> x (MOVVconst [1<<8])))
  1297  	for {
  1298  		x := v_0
  1299  		v.Reset(ssaop.OpLOONG64CTZV)
  1300  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, typ.UInt64)
  1301  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1302  		v1.AuxInt = ssa.Int64ToAuxInt(1 << 8)
  1303  		v0.AddArg2(x, v1)
  1304  		v.AddArg(v0)
  1305  		return true
  1306  	}
  1307  }
  1308  func rewriteValue_OpCvt32Fto32(v *ssa.Value) bool {
  1309  	v_0 := v.Args[0]
  1310  	b := v.Block
  1311  	// match: (Cvt32Fto32 <t> x)
  1312  	// result: (MOVWfpgp (TRUNCFW <t> x))
  1313  	for {
  1314  		t := v.Type
  1315  		x := v_0
  1316  		v.Reset(ssaop.OpLOONG64MOVWfpgp)
  1317  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64TRUNCFW, t)
  1318  		v0.AddArg(x)
  1319  		v.AddArg(v0)
  1320  		return true
  1321  	}
  1322  }
  1323  func rewriteValue_OpCvt32Fto64(v *ssa.Value) bool {
  1324  	v_0 := v.Args[0]
  1325  	b := v.Block
  1326  	// match: (Cvt32Fto64 <t> x)
  1327  	// result: (MOVVfpgp (TRUNCFV <t> x))
  1328  	for {
  1329  		t := v.Type
  1330  		x := v_0
  1331  		v.Reset(ssaop.OpLOONG64MOVVfpgp)
  1332  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64TRUNCFV, t)
  1333  		v0.AddArg(x)
  1334  		v.AddArg(v0)
  1335  		return true
  1336  	}
  1337  }
  1338  func rewriteValue_OpCvt32to32F(v *ssa.Value) bool {
  1339  	v_0 := v.Args[0]
  1340  	b := v.Block
  1341  	// match: (Cvt32to32F <t> x)
  1342  	// result: (MOVWF (MOVWgpfp <t> x))
  1343  	for {
  1344  		t := v.Type
  1345  		x := v_0
  1346  		v.Reset(ssaop.OpLOONG64MOVWF)
  1347  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWgpfp, t)
  1348  		v0.AddArg(x)
  1349  		v.AddArg(v0)
  1350  		return true
  1351  	}
  1352  }
  1353  func rewriteValue_OpCvt32to64F(v *ssa.Value) bool {
  1354  	v_0 := v.Args[0]
  1355  	b := v.Block
  1356  	// match: (Cvt32to64F <t> x)
  1357  	// result: (MOVWD (MOVWgpfp <t> x))
  1358  	for {
  1359  		t := v.Type
  1360  		x := v_0
  1361  		v.Reset(ssaop.OpLOONG64MOVWD)
  1362  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWgpfp, t)
  1363  		v0.AddArg(x)
  1364  		v.AddArg(v0)
  1365  		return true
  1366  	}
  1367  }
  1368  func rewriteValue_OpCvt64Fto32(v *ssa.Value) bool {
  1369  	v_0 := v.Args[0]
  1370  	b := v.Block
  1371  	// match: (Cvt64Fto32 <t> x)
  1372  	// result: (MOVWfpgp (TRUNCDW <t> x))
  1373  	for {
  1374  		t := v.Type
  1375  		x := v_0
  1376  		v.Reset(ssaop.OpLOONG64MOVWfpgp)
  1377  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64TRUNCDW, t)
  1378  		v0.AddArg(x)
  1379  		v.AddArg(v0)
  1380  		return true
  1381  	}
  1382  }
  1383  func rewriteValue_OpCvt64Fto64(v *ssa.Value) bool {
  1384  	v_0 := v.Args[0]
  1385  	b := v.Block
  1386  	// match: (Cvt64Fto64 <t> x)
  1387  	// result: (MOVVfpgp (TRUNCDV <t> x))
  1388  	for {
  1389  		t := v.Type
  1390  		x := v_0
  1391  		v.Reset(ssaop.OpLOONG64MOVVfpgp)
  1392  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64TRUNCDV, t)
  1393  		v0.AddArg(x)
  1394  		v.AddArg(v0)
  1395  		return true
  1396  	}
  1397  }
  1398  func rewriteValue_OpCvt64to32F(v *ssa.Value) bool {
  1399  	v_0 := v.Args[0]
  1400  	b := v.Block
  1401  	// match: (Cvt64to32F <t> x)
  1402  	// result: (MOVVF (MOVVgpfp <t> x))
  1403  	for {
  1404  		t := v.Type
  1405  		x := v_0
  1406  		v.Reset(ssaop.OpLOONG64MOVVF)
  1407  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVgpfp, t)
  1408  		v0.AddArg(x)
  1409  		v.AddArg(v0)
  1410  		return true
  1411  	}
  1412  }
  1413  func rewriteValue_OpCvt64to64F(v *ssa.Value) bool {
  1414  	v_0 := v.Args[0]
  1415  	b := v.Block
  1416  	// match: (Cvt64to64F <t> x)
  1417  	// result: (MOVVD (MOVVgpfp <t> x))
  1418  	for {
  1419  		t := v.Type
  1420  		x := v_0
  1421  		v.Reset(ssaop.OpLOONG64MOVVD)
  1422  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVgpfp, t)
  1423  		v0.AddArg(x)
  1424  		v.AddArg(v0)
  1425  		return true
  1426  	}
  1427  }
  1428  func rewriteValue_OpDiv16(v *ssa.Value) bool {
  1429  	v_1 := v.Args[1]
  1430  	v_0 := v.Args[0]
  1431  	b := v.Block
  1432  	typ := &b.Func.Config.Types
  1433  	// match: (Div16 x y)
  1434  	// result: (DIVV (SignExt16to64 x) (SignExt16to64 y))
  1435  	for {
  1436  		x := v_0
  1437  		y := v_1
  1438  		v.Reset(ssaop.OpLOONG64DIVV)
  1439  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  1440  		v0.AddArg(x)
  1441  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  1442  		v1.AddArg(y)
  1443  		v.AddArg2(v0, v1)
  1444  		return true
  1445  	}
  1446  }
  1447  func rewriteValue_OpDiv16u(v *ssa.Value) bool {
  1448  	v_1 := v.Args[1]
  1449  	v_0 := v.Args[0]
  1450  	b := v.Block
  1451  	typ := &b.Func.Config.Types
  1452  	// match: (Div16u x y)
  1453  	// result: (DIVVU (ZeroExt16to64 x) (ZeroExt16to64 y))
  1454  	for {
  1455  		x := v_0
  1456  		y := v_1
  1457  		v.Reset(ssaop.OpLOONG64DIVVU)
  1458  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1459  		v0.AddArg(x)
  1460  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1461  		v1.AddArg(y)
  1462  		v.AddArg2(v0, v1)
  1463  		return true
  1464  	}
  1465  }
  1466  func rewriteValue_OpDiv32(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: (Div32 x y)
  1472  	// result: (DIVV (SignExt32to64 x) (SignExt32to64 y))
  1473  	for {
  1474  		x := v_0
  1475  		y := v_1
  1476  		v.Reset(ssaop.OpLOONG64DIVV)
  1477  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1478  		v0.AddArg(x)
  1479  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1480  		v1.AddArg(y)
  1481  		v.AddArg2(v0, v1)
  1482  		return true
  1483  	}
  1484  }
  1485  func rewriteValue_OpDiv32u(v *ssa.Value) bool {
  1486  	v_1 := v.Args[1]
  1487  	v_0 := v.Args[0]
  1488  	b := v.Block
  1489  	typ := &b.Func.Config.Types
  1490  	// match: (Div32u x y)
  1491  	// result: (DIVVU (ZeroExt32to64 x) (ZeroExt32to64 y))
  1492  	for {
  1493  		x := v_0
  1494  		y := v_1
  1495  		v.Reset(ssaop.OpLOONG64DIVVU)
  1496  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1497  		v0.AddArg(x)
  1498  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1499  		v1.AddArg(y)
  1500  		v.AddArg2(v0, v1)
  1501  		return true
  1502  	}
  1503  }
  1504  func rewriteValue_OpDiv64(v *ssa.Value) bool {
  1505  	v_1 := v.Args[1]
  1506  	v_0 := v.Args[0]
  1507  	// match: (Div64 x y)
  1508  	// result: (DIVV x y)
  1509  	for {
  1510  		x := v_0
  1511  		y := v_1
  1512  		v.Reset(ssaop.OpLOONG64DIVV)
  1513  		v.AddArg2(x, y)
  1514  		return true
  1515  	}
  1516  }
  1517  func rewriteValue_OpDiv8(v *ssa.Value) bool {
  1518  	v_1 := v.Args[1]
  1519  	v_0 := v.Args[0]
  1520  	b := v.Block
  1521  	typ := &b.Func.Config.Types
  1522  	// match: (Div8 x y)
  1523  	// result: (DIVV (SignExt8to64 x) (SignExt8to64 y))
  1524  	for {
  1525  		x := v_0
  1526  		y := v_1
  1527  		v.Reset(ssaop.OpLOONG64DIVV)
  1528  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  1529  		v0.AddArg(x)
  1530  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  1531  		v1.AddArg(y)
  1532  		v.AddArg2(v0, v1)
  1533  		return true
  1534  	}
  1535  }
  1536  func rewriteValue_OpDiv8u(v *ssa.Value) bool {
  1537  	v_1 := v.Args[1]
  1538  	v_0 := v.Args[0]
  1539  	b := v.Block
  1540  	typ := &b.Func.Config.Types
  1541  	// match: (Div8u x y)
  1542  	// result: (DIVVU (ZeroExt8to64 x) (ZeroExt8to64 y))
  1543  	for {
  1544  		x := v_0
  1545  		y := v_1
  1546  		v.Reset(ssaop.OpLOONG64DIVVU)
  1547  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1548  		v0.AddArg(x)
  1549  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1550  		v1.AddArg(y)
  1551  		v.AddArg2(v0, v1)
  1552  		return true
  1553  	}
  1554  }
  1555  func rewriteValue_OpEq16(v *ssa.Value) bool {
  1556  	v_1 := v.Args[1]
  1557  	v_0 := v.Args[0]
  1558  	b := v.Block
  1559  	typ := &b.Func.Config.Types
  1560  	// match: (Eq16 x y)
  1561  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt16to64 x) (ZeroExt16to64 y)))
  1562  	for {
  1563  		x := v_0
  1564  		y := v_1
  1565  		v.Reset(ssaop.OpLOONG64SGTU)
  1566  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1567  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1568  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1569  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1570  		v2.AddArg(x)
  1571  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1572  		v3.AddArg(y)
  1573  		v1.AddArg2(v2, v3)
  1574  		v.AddArg2(v0, v1)
  1575  		return true
  1576  	}
  1577  }
  1578  func rewriteValue_OpEq32(v *ssa.Value) bool {
  1579  	v_1 := v.Args[1]
  1580  	v_0 := v.Args[0]
  1581  	b := v.Block
  1582  	typ := &b.Func.Config.Types
  1583  	// match: (Eq32 x y)
  1584  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt32to64 x) (ZeroExt32to64 y)))
  1585  	for {
  1586  		x := v_0
  1587  		y := v_1
  1588  		v.Reset(ssaop.OpLOONG64SGTU)
  1589  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1590  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1591  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1592  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1593  		v2.AddArg(x)
  1594  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1595  		v3.AddArg(y)
  1596  		v1.AddArg2(v2, v3)
  1597  		v.AddArg2(v0, v1)
  1598  		return true
  1599  	}
  1600  }
  1601  func rewriteValue_OpEq32F(v *ssa.Value) bool {
  1602  	v_1 := v.Args[1]
  1603  	v_0 := v.Args[0]
  1604  	b := v.Block
  1605  	// match: (Eq32F x y)
  1606  	// result: (FPFlagTrue (CMPEQF x y))
  1607  	for {
  1608  		x := v_0
  1609  		y := v_1
  1610  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  1611  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQF, types.TypeFlags)
  1612  		v0.AddArg2(x, y)
  1613  		v.AddArg(v0)
  1614  		return true
  1615  	}
  1616  }
  1617  func rewriteValue_OpEq64(v *ssa.Value) bool {
  1618  	v_1 := v.Args[1]
  1619  	v_0 := v.Args[0]
  1620  	b := v.Block
  1621  	typ := &b.Func.Config.Types
  1622  	// match: (Eq64 x y)
  1623  	// result: (SGTU (MOVVconst [1]) (XOR x y))
  1624  	for {
  1625  		x := v_0
  1626  		y := v_1
  1627  		v.Reset(ssaop.OpLOONG64SGTU)
  1628  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1629  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1630  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1631  		v1.AddArg2(x, y)
  1632  		v.AddArg2(v0, v1)
  1633  		return true
  1634  	}
  1635  }
  1636  func rewriteValue_OpEq64F(v *ssa.Value) bool {
  1637  	v_1 := v.Args[1]
  1638  	v_0 := v.Args[0]
  1639  	b := v.Block
  1640  	// match: (Eq64F x y)
  1641  	// result: (FPFlagTrue (CMPEQD x y))
  1642  	for {
  1643  		x := v_0
  1644  		y := v_1
  1645  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  1646  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQD, types.TypeFlags)
  1647  		v0.AddArg2(x, y)
  1648  		v.AddArg(v0)
  1649  		return true
  1650  	}
  1651  }
  1652  func rewriteValue_OpEq8(v *ssa.Value) bool {
  1653  	v_1 := v.Args[1]
  1654  	v_0 := v.Args[0]
  1655  	b := v.Block
  1656  	typ := &b.Func.Config.Types
  1657  	// match: (Eq8 x y)
  1658  	// result: (SGTU (MOVVconst [1]) (XOR (ZeroExt8to64 x) (ZeroExt8to64 y)))
  1659  	for {
  1660  		x := v_0
  1661  		y := v_1
  1662  		v.Reset(ssaop.OpLOONG64SGTU)
  1663  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1664  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1665  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1666  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1667  		v2.AddArg(x)
  1668  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1669  		v3.AddArg(y)
  1670  		v1.AddArg2(v2, v3)
  1671  		v.AddArg2(v0, v1)
  1672  		return true
  1673  	}
  1674  }
  1675  func rewriteValue_OpEqB(v *ssa.Value) bool {
  1676  	v_1 := v.Args[1]
  1677  	v_0 := v.Args[0]
  1678  	b := v.Block
  1679  	typ := &b.Func.Config.Types
  1680  	// match: (EqB x y)
  1681  	// result: (XOR (MOVVconst [1]) (XOR <typ.Bool> x y))
  1682  	for {
  1683  		x := v_0
  1684  		y := v_1
  1685  		v.Reset(ssaop.OpLOONG64XOR)
  1686  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1687  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1688  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.Bool)
  1689  		v1.AddArg2(x, y)
  1690  		v.AddArg2(v0, v1)
  1691  		return true
  1692  	}
  1693  }
  1694  func rewriteValue_OpEqPtr(v *ssa.Value) bool {
  1695  	v_1 := v.Args[1]
  1696  	v_0 := v.Args[0]
  1697  	b := v.Block
  1698  	typ := &b.Func.Config.Types
  1699  	// match: (EqPtr x y)
  1700  	// result: (SGTU (MOVVconst [1]) (XOR x y))
  1701  	for {
  1702  		x := v_0
  1703  		y := v_1
  1704  		v.Reset(ssaop.OpLOONG64SGTU)
  1705  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1706  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1707  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  1708  		v1.AddArg2(x, y)
  1709  		v.AddArg2(v0, v1)
  1710  		return true
  1711  	}
  1712  }
  1713  func rewriteValue_OpIsInBounds(v *ssa.Value) bool {
  1714  	v_1 := v.Args[1]
  1715  	v_0 := v.Args[0]
  1716  	// match: (IsInBounds idx len)
  1717  	// result: (SGTU len idx)
  1718  	for {
  1719  		idx := v_0
  1720  		len := v_1
  1721  		v.Reset(ssaop.OpLOONG64SGTU)
  1722  		v.AddArg2(len, idx)
  1723  		return true
  1724  	}
  1725  }
  1726  func rewriteValue_OpIsNonNil(v *ssa.Value) bool {
  1727  	v_0 := v.Args[0]
  1728  	b := v.Block
  1729  	typ := &b.Func.Config.Types
  1730  	// match: (IsNonNil ptr)
  1731  	// result: (SGTU ptr (MOVVconst [0]))
  1732  	for {
  1733  		ptr := v_0
  1734  		v.Reset(ssaop.OpLOONG64SGTU)
  1735  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1736  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1737  		v.AddArg2(ptr, v0)
  1738  		return true
  1739  	}
  1740  }
  1741  func rewriteValue_OpIsSliceInBounds(v *ssa.Value) bool {
  1742  	v_1 := v.Args[1]
  1743  	v_0 := v.Args[0]
  1744  	b := v.Block
  1745  	typ := &b.Func.Config.Types
  1746  	// match: (IsSliceInBounds idx len)
  1747  	// result: (XOR (MOVVconst [1]) (SGTU idx len))
  1748  	for {
  1749  		idx := v_0
  1750  		len := v_1
  1751  		v.Reset(ssaop.OpLOONG64XOR)
  1752  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  1753  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1754  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  1755  		v1.AddArg2(idx, len)
  1756  		v.AddArg2(v0, v1)
  1757  		return true
  1758  	}
  1759  }
  1760  func rewriteValue_OpLOONG64ADDD(v *ssa.Value) bool {
  1761  	v_1 := v.Args[1]
  1762  	v_0 := v.Args[0]
  1763  	// match: (ADDD (MULD x y) z)
  1764  	// cond: z.Block.Func.UseFMA(v)
  1765  	// result: (FMADDD x y z)
  1766  	for {
  1767  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1768  			if v_0.Op != ssaop.OpLOONG64MULD {
  1769  				continue
  1770  			}
  1771  			y := v_0.Args[1]
  1772  			x := v_0.Args[0]
  1773  			z := v_1
  1774  			if !(z.Block.Func.UseFMA(v)) {
  1775  				continue
  1776  			}
  1777  			v.Reset(ssaop.OpLOONG64FMADDD)
  1778  			v.AddArg3(x, y, z)
  1779  			return true
  1780  		}
  1781  		break
  1782  	}
  1783  	// match: (ADDD z (NEGD (MULD x y)))
  1784  	// cond: z.Block.Func.UseFMA(v)
  1785  	// result: (FNMSUBD x y z)
  1786  	for {
  1787  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1788  			z := v_0
  1789  			if v_1.Op != ssaop.OpLOONG64NEGD {
  1790  				continue
  1791  			}
  1792  			v_1_0 := v_1.Args[0]
  1793  			if v_1_0.Op != ssaop.OpLOONG64MULD {
  1794  				continue
  1795  			}
  1796  			y := v_1_0.Args[1]
  1797  			x := v_1_0.Args[0]
  1798  			if !(z.Block.Func.UseFMA(v)) {
  1799  				continue
  1800  			}
  1801  			v.Reset(ssaop.OpLOONG64FNMSUBD)
  1802  			v.AddArg3(x, y, z)
  1803  			return true
  1804  		}
  1805  		break
  1806  	}
  1807  	return false
  1808  }
  1809  func rewriteValue_OpLOONG64ADDF(v *ssa.Value) bool {
  1810  	v_1 := v.Args[1]
  1811  	v_0 := v.Args[0]
  1812  	// match: (ADDF (MULF x y) z)
  1813  	// cond: z.Block.Func.UseFMA(v)
  1814  	// result: (FMADDF x y z)
  1815  	for {
  1816  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1817  			if v_0.Op != ssaop.OpLOONG64MULF {
  1818  				continue
  1819  			}
  1820  			y := v_0.Args[1]
  1821  			x := v_0.Args[0]
  1822  			z := v_1
  1823  			if !(z.Block.Func.UseFMA(v)) {
  1824  				continue
  1825  			}
  1826  			v.Reset(ssaop.OpLOONG64FMADDF)
  1827  			v.AddArg3(x, y, z)
  1828  			return true
  1829  		}
  1830  		break
  1831  	}
  1832  	// match: (ADDF z (NEGF (MULF x y)))
  1833  	// cond: z.Block.Func.UseFMA(v)
  1834  	// result: (FNMSUBF x y z)
  1835  	for {
  1836  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1837  			z := v_0
  1838  			if v_1.Op != ssaop.OpLOONG64NEGF {
  1839  				continue
  1840  			}
  1841  			v_1_0 := v_1.Args[0]
  1842  			if v_1_0.Op != ssaop.OpLOONG64MULF {
  1843  				continue
  1844  			}
  1845  			y := v_1_0.Args[1]
  1846  			x := v_1_0.Args[0]
  1847  			if !(z.Block.Func.UseFMA(v)) {
  1848  				continue
  1849  			}
  1850  			v.Reset(ssaop.OpLOONG64FNMSUBF)
  1851  			v.AddArg3(x, y, z)
  1852  			return true
  1853  		}
  1854  		break
  1855  	}
  1856  	return false
  1857  }
  1858  func rewriteValue_OpLOONG64ADDV(v *ssa.Value) bool {
  1859  	v_1 := v.Args[1]
  1860  	v_0 := v.Args[0]
  1861  	b := v.Block
  1862  	typ := &b.Func.Config.Types
  1863  	// match: (ADDV <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  1864  	// result: (REVB2H x)
  1865  	for {
  1866  		if v.Type != typ.UInt16 {
  1867  			break
  1868  		}
  1869  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1870  			if v_0.Op != ssaop.OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1871  				continue
  1872  			}
  1873  			x := v_0.Args[0]
  1874  			if v_1.Op != ssaop.OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || ssa.AuxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  1875  				continue
  1876  			}
  1877  			v.Reset(ssaop.OpLOONG64REVB2H)
  1878  			v.AddArg(x)
  1879  			return true
  1880  		}
  1881  		break
  1882  	}
  1883  	// match: (ADDV (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  1884  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  1885  	// result: (REVB2H x)
  1886  	for {
  1887  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1888  			if v_0.Op != ssaop.OpLOONG64SRLconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1889  				continue
  1890  			}
  1891  			v_0_0 := v_0.Args[0]
  1892  			if v_0_0.Op != ssaop.OpLOONG64ANDconst {
  1893  				continue
  1894  			}
  1895  			c1 := ssa.AuxIntToInt64(v_0_0.AuxInt)
  1896  			x := v_0_0.Args[0]
  1897  			if v_1.Op != ssaop.OpLOONG64SLLconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  1898  				continue
  1899  			}
  1900  			v_1_0 := v_1.Args[0]
  1901  			if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  1902  				continue
  1903  			}
  1904  			c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  1905  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  1906  				continue
  1907  			}
  1908  			v.Reset(ssaop.OpLOONG64REVB2H)
  1909  			v.AddArg(x)
  1910  			return true
  1911  		}
  1912  		break
  1913  	}
  1914  	// match: (ADDV (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  1915  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  1916  	// result: (REVB4H x)
  1917  	for {
  1918  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1919  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1920  				continue
  1921  			}
  1922  			v_0_0 := v_0.Args[0]
  1923  			if v_0_0.Op != ssaop.OpLOONG64AND {
  1924  				continue
  1925  			}
  1926  			_ = v_0_0.Args[1]
  1927  			v_0_0_0 := v_0_0.Args[0]
  1928  			v_0_0_1 := v_0_0.Args[1]
  1929  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  1930  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  1931  					continue
  1932  				}
  1933  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  1934  				x := v_0_0_1
  1935  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  1936  					continue
  1937  				}
  1938  				v_1_0 := v_1.Args[0]
  1939  				if v_1_0.Op != ssaop.OpLOONG64AND {
  1940  					continue
  1941  				}
  1942  				_ = v_1_0.Args[1]
  1943  				v_1_0_0 := v_1_0.Args[0]
  1944  				v_1_0_1 := v_1_0.Args[1]
  1945  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  1946  					if v_1_0_0.Op != ssaop.OpLOONG64MOVVconst {
  1947  						continue
  1948  					}
  1949  					c2 := ssa.AuxIntToInt64(v_1_0_0.AuxInt)
  1950  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  1951  						continue
  1952  					}
  1953  					v.Reset(ssaop.OpLOONG64REVB4H)
  1954  					v.AddArg(x)
  1955  					return true
  1956  				}
  1957  			}
  1958  		}
  1959  		break
  1960  	}
  1961  	// match: (ADDV (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  1962  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  1963  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  1964  	for {
  1965  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1966  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  1967  				continue
  1968  			}
  1969  			v_0_0 := v_0.Args[0]
  1970  			if v_0_0.Op != ssaop.OpLOONG64AND {
  1971  				continue
  1972  			}
  1973  			_ = v_0_0.Args[1]
  1974  			v_0_0_0 := v_0_0.Args[0]
  1975  			v_0_0_1 := v_0_0.Args[1]
  1976  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  1977  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  1978  					continue
  1979  				}
  1980  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  1981  				x := v_0_0_1
  1982  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  1983  					continue
  1984  				}
  1985  				v_1_0 := v_1.Args[0]
  1986  				if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  1987  					continue
  1988  				}
  1989  				c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  1990  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  1991  					continue
  1992  				}
  1993  				v.Reset(ssaop.OpLOONG64REVB4H)
  1994  				v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, x.Type)
  1995  				v0.AuxInt = ssa.Int64ToAuxInt(0xffffffff)
  1996  				v0.AddArg(x)
  1997  				v.AddArg(v0)
  1998  				return true
  1999  			}
  2000  		}
  2001  		break
  2002  	}
  2003  	// match: (ADDV x (MOVVconst <t> [c]))
  2004  	// cond: ssa.Is32Bit(c) && !t.IsPtr()
  2005  	// result: (ADDVconst [c] x)
  2006  	for {
  2007  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2008  			x := v_0
  2009  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2010  				continue
  2011  			}
  2012  			t := v_1.Type
  2013  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  2014  			if !(ssa.Is32Bit(c) && !t.IsPtr()) {
  2015  				continue
  2016  			}
  2017  			v.Reset(ssaop.OpLOONG64ADDVconst)
  2018  			v.AuxInt = ssa.Int64ToAuxInt(c)
  2019  			v.AddArg(x)
  2020  			return true
  2021  		}
  2022  		break
  2023  	}
  2024  	// match: (ADDV x0 x1:(SLLVconst [c] y))
  2025  	// cond: x1.Uses == 1 && c > 0 && c <= 4
  2026  	// result: (ADDshiftLLV x0 y [c])
  2027  	for {
  2028  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2029  			x0 := v_0
  2030  			x1 := v_1
  2031  			if x1.Op != ssaop.OpLOONG64SLLVconst {
  2032  				continue
  2033  			}
  2034  			c := ssa.AuxIntToInt64(x1.AuxInt)
  2035  			y := x1.Args[0]
  2036  			if !(x1.Uses == 1 && c > 0 && c <= 4) {
  2037  				continue
  2038  			}
  2039  			v.Reset(ssaop.OpLOONG64ADDshiftLLV)
  2040  			v.AuxInt = ssa.Int64ToAuxInt(c)
  2041  			v.AddArg2(x0, y)
  2042  			return true
  2043  		}
  2044  		break
  2045  	}
  2046  	// match: (ADDV x (NEGV y))
  2047  	// result: (SUBV x y)
  2048  	for {
  2049  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2050  			x := v_0
  2051  			if v_1.Op != ssaop.OpLOONG64NEGV {
  2052  				continue
  2053  			}
  2054  			y := v_1.Args[0]
  2055  			v.Reset(ssaop.OpLOONG64SUBV)
  2056  			v.AddArg2(x, y)
  2057  			return true
  2058  		}
  2059  		break
  2060  	}
  2061  	return false
  2062  }
  2063  func rewriteValue_OpLOONG64ADDVconst(v *ssa.Value) bool {
  2064  	v_0 := v.Args[0]
  2065  	// match: (ADDVconst [off1] (MOVVaddr [off2] {sym} ptr))
  2066  	// cond: ssa.Is32Bit(off1+int64(off2))
  2067  	// result: (MOVVaddr [int32(off1)+int32(off2)] {sym} ptr)
  2068  	for {
  2069  		off1 := ssa.AuxIntToInt64(v.AuxInt)
  2070  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  2071  			break
  2072  		}
  2073  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2074  		sym := ssa.AuxToSym(v_0.Aux)
  2075  		ptr := v_0.Args[0]
  2076  		if !(ssa.Is32Bit(off1 + int64(off2))) {
  2077  			break
  2078  		}
  2079  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  2080  		v.AuxInt = ssa.Int32ToAuxInt(int32(off1) + int32(off2))
  2081  		v.Aux = ssa.SymToAux(sym)
  2082  		v.AddArg(ptr)
  2083  		return true
  2084  	}
  2085  	// match: (ADDVconst [0] x)
  2086  	// result: x
  2087  	for {
  2088  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  2089  			break
  2090  		}
  2091  		x := v_0
  2092  		v.CopyOf(x)
  2093  		return true
  2094  	}
  2095  	// match: (ADDVconst [c] (MOVVconst [d]))
  2096  	// result: (MOVVconst [c+d])
  2097  	for {
  2098  		c := ssa.AuxIntToInt64(v.AuxInt)
  2099  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2100  			break
  2101  		}
  2102  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2103  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2104  		v.AuxInt = ssa.Int64ToAuxInt(c + d)
  2105  		return true
  2106  	}
  2107  	// match: (ADDVconst [c] (ADDVconst [d] x))
  2108  	// cond: ssa.Is32Bit(c+d)
  2109  	// result: (ADDVconst [c+d] x)
  2110  	for {
  2111  		c := ssa.AuxIntToInt64(v.AuxInt)
  2112  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  2113  			break
  2114  		}
  2115  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2116  		x := v_0.Args[0]
  2117  		if !(ssa.Is32Bit(c + d)) {
  2118  			break
  2119  		}
  2120  		v.Reset(ssaop.OpLOONG64ADDVconst)
  2121  		v.AuxInt = ssa.Int64ToAuxInt(c + d)
  2122  		v.AddArg(x)
  2123  		return true
  2124  	}
  2125  	// match: (ADDVconst [c] (SUBVconst [d] x))
  2126  	// cond: ssa.Is32Bit(c-d)
  2127  	// result: (ADDVconst [c-d] x)
  2128  	for {
  2129  		c := ssa.AuxIntToInt64(v.AuxInt)
  2130  		if v_0.Op != ssaop.OpLOONG64SUBVconst {
  2131  			break
  2132  		}
  2133  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2134  		x := v_0.Args[0]
  2135  		if !(ssa.Is32Bit(c - d)) {
  2136  			break
  2137  		}
  2138  		v.Reset(ssaop.OpLOONG64ADDVconst)
  2139  		v.AuxInt = ssa.Int64ToAuxInt(c - d)
  2140  		v.AddArg(x)
  2141  		return true
  2142  	}
  2143  	// match: (ADDVconst [c] x)
  2144  	// cond: ssa.Is32Bit(c) && c&0xffff == 0 && c != 0
  2145  	// result: (ADDV16const [c] x)
  2146  	for {
  2147  		c := ssa.AuxIntToInt64(v.AuxInt)
  2148  		x := v_0
  2149  		if !(ssa.Is32Bit(c) && c&0xffff == 0 && c != 0) {
  2150  			break
  2151  		}
  2152  		v.Reset(ssaop.OpLOONG64ADDV16const)
  2153  		v.AuxInt = ssa.Int64ToAuxInt(c)
  2154  		v.AddArg(x)
  2155  		return true
  2156  	}
  2157  	return false
  2158  }
  2159  func rewriteValue_OpLOONG64ADDshiftLLV(v *ssa.Value) bool {
  2160  	v_1 := v.Args[1]
  2161  	v_0 := v.Args[0]
  2162  	// match: (ADDshiftLLV x (MOVVconst [c]) [d])
  2163  	// cond: ssa.Is12Bit(c<<d)
  2164  	// result: (ADDVconst x [c<<d])
  2165  	for {
  2166  		d := ssa.AuxIntToInt64(v.AuxInt)
  2167  		x := v_0
  2168  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2169  			break
  2170  		}
  2171  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2172  		if !(ssa.Is12Bit(c << d)) {
  2173  			break
  2174  		}
  2175  		v.Reset(ssaop.OpLOONG64ADDVconst)
  2176  		v.AuxInt = ssa.Int64ToAuxInt(c << d)
  2177  		v.AddArg(x)
  2178  		return true
  2179  	}
  2180  	return false
  2181  }
  2182  func rewriteValue_OpLOONG64AND(v *ssa.Value) bool {
  2183  	v_1 := v.Args[1]
  2184  	v_0 := v.Args[0]
  2185  	// match: (AND x (MOVVconst [c]))
  2186  	// cond: ssa.Is32Bit(c)
  2187  	// result: (ANDconst [c] x)
  2188  	for {
  2189  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2190  			x := v_0
  2191  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2192  				continue
  2193  			}
  2194  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  2195  			if !(ssa.Is32Bit(c)) {
  2196  				continue
  2197  			}
  2198  			v.Reset(ssaop.OpLOONG64ANDconst)
  2199  			v.AuxInt = ssa.Int64ToAuxInt(c)
  2200  			v.AddArg(x)
  2201  			return true
  2202  		}
  2203  		break
  2204  	}
  2205  	// match: (AND x x)
  2206  	// result: x
  2207  	for {
  2208  		x := v_0
  2209  		if x != v_1 {
  2210  			break
  2211  		}
  2212  		v.CopyOf(x)
  2213  		return true
  2214  	}
  2215  	// match: (AND x (NORconst [0] y))
  2216  	// result: (ANDN x y)
  2217  	for {
  2218  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2219  			x := v_0
  2220  			if v_1.Op != ssaop.OpLOONG64NORconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  2221  				continue
  2222  			}
  2223  			y := v_1.Args[0]
  2224  			v.Reset(ssaop.OpLOONG64ANDN)
  2225  			v.AddArg2(x, y)
  2226  			return true
  2227  		}
  2228  		break
  2229  	}
  2230  	return false
  2231  }
  2232  func rewriteValue_OpLOONG64ANDconst(v *ssa.Value) bool {
  2233  	v_0 := v.Args[0]
  2234  	// match: (ANDconst [0] _)
  2235  	// result: (MOVVconst [0])
  2236  	for {
  2237  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  2238  			break
  2239  		}
  2240  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2241  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2242  		return true
  2243  	}
  2244  	// match: (ANDconst [-1] x)
  2245  	// result: x
  2246  	for {
  2247  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
  2248  			break
  2249  		}
  2250  		x := v_0
  2251  		v.CopyOf(x)
  2252  		return true
  2253  	}
  2254  	// match: (ANDconst [0xffff] x)
  2255  	// result: (MOVHUreg x)
  2256  	for {
  2257  		if ssa.AuxIntToInt64(v.AuxInt) != 0xffff {
  2258  			break
  2259  		}
  2260  		x := v_0
  2261  		v.Reset(ssaop.OpLOONG64MOVHUreg)
  2262  		v.AddArg(x)
  2263  		return true
  2264  	}
  2265  	// match: (ANDconst [0xffffffff] x)
  2266  	// result: (MOVWUreg x)
  2267  	for {
  2268  		if ssa.AuxIntToInt64(v.AuxInt) != 0xffffffff {
  2269  			break
  2270  		}
  2271  		x := v_0
  2272  		v.Reset(ssaop.OpLOONG64MOVWUreg)
  2273  		v.AddArg(x)
  2274  		return true
  2275  	}
  2276  	// match: (ANDconst [c] (MOVVconst [d]))
  2277  	// result: (MOVVconst [c&d])
  2278  	for {
  2279  		c := ssa.AuxIntToInt64(v.AuxInt)
  2280  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2281  			break
  2282  		}
  2283  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2284  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2285  		v.AuxInt = ssa.Int64ToAuxInt(c & d)
  2286  		return true
  2287  	}
  2288  	// match: (ANDconst [c] (ANDconst [d] x))
  2289  	// result: (ANDconst [c&d] x)
  2290  	for {
  2291  		c := ssa.AuxIntToInt64(v.AuxInt)
  2292  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  2293  			break
  2294  		}
  2295  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  2296  		x := v_0.Args[0]
  2297  		v.Reset(ssaop.OpLOONG64ANDconst)
  2298  		v.AuxInt = ssa.Int64ToAuxInt(c & d)
  2299  		v.AddArg(x)
  2300  		return true
  2301  	}
  2302  	return false
  2303  }
  2304  func rewriteValue_OpLOONG64DIVV(v *ssa.Value) bool {
  2305  	v_1 := v.Args[1]
  2306  	v_0 := v.Args[0]
  2307  	// match: (DIVV (MOVVconst [c]) (MOVVconst [d]))
  2308  	// cond: d != 0
  2309  	// result: (MOVVconst [c/d])
  2310  	for {
  2311  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2312  			break
  2313  		}
  2314  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2315  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2316  			break
  2317  		}
  2318  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  2319  		if !(d != 0) {
  2320  			break
  2321  		}
  2322  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2323  		v.AuxInt = ssa.Int64ToAuxInt(c / d)
  2324  		return true
  2325  	}
  2326  	return false
  2327  }
  2328  func rewriteValue_OpLOONG64DIVVU(v *ssa.Value) bool {
  2329  	v_1 := v.Args[1]
  2330  	v_0 := v.Args[0]
  2331  	// match: (DIVVU x (MOVVconst [1]))
  2332  	// result: x
  2333  	for {
  2334  		x := v_0
  2335  		if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 1 {
  2336  			break
  2337  		}
  2338  		v.CopyOf(x)
  2339  		return true
  2340  	}
  2341  	// match: (DIVVU x (MOVVconst [c]))
  2342  	// cond: ssa.IsPowerOfTwo(c)
  2343  	// result: (SRLVconst [ssa.Log64(c)] x)
  2344  	for {
  2345  		x := v_0
  2346  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2347  			break
  2348  		}
  2349  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2350  		if !(ssa.IsPowerOfTwo(c)) {
  2351  			break
  2352  		}
  2353  		v.Reset(ssaop.OpLOONG64SRLVconst)
  2354  		v.AuxInt = ssa.Int64ToAuxInt(ssa.Log64(c))
  2355  		v.AddArg(x)
  2356  		return true
  2357  	}
  2358  	// match: (DIVVU (MOVVconst [c]) (MOVVconst [d]))
  2359  	// cond: d != 0
  2360  	// result: (MOVVconst [int64(uint64(c)/uint64(d))])
  2361  	for {
  2362  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2363  			break
  2364  		}
  2365  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2366  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2367  			break
  2368  		}
  2369  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  2370  		if !(d != 0) {
  2371  			break
  2372  		}
  2373  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2374  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint64(c) / uint64(d)))
  2375  		return true
  2376  	}
  2377  	return false
  2378  }
  2379  func rewriteValue_OpLOONG64LoweredPanicBoundsCR(v *ssa.Value) bool {
  2380  	v_1 := v.Args[1]
  2381  	v_0 := v.Args[0]
  2382  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVVconst [c]) mem)
  2383  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  2384  	for {
  2385  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2386  		p := ssa.AuxToPanicBoundsC(v.Aux)
  2387  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2388  			break
  2389  		}
  2390  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2391  		mem := v_1
  2392  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsCC)
  2393  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2394  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: p.C, Cy: c})
  2395  		v.AddArg(mem)
  2396  		return true
  2397  	}
  2398  	return false
  2399  }
  2400  func rewriteValue_OpLOONG64LoweredPanicBoundsRC(v *ssa.Value) bool {
  2401  	v_1 := v.Args[1]
  2402  	v_0 := v.Args[0]
  2403  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVVconst [c]) mem)
  2404  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  2405  	for {
  2406  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2407  		p := ssa.AuxToPanicBoundsC(v.Aux)
  2408  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2409  			break
  2410  		}
  2411  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2412  		mem := v_1
  2413  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsCC)
  2414  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2415  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: c, Cy: p.C})
  2416  		v.AddArg(mem)
  2417  		return true
  2418  	}
  2419  	return false
  2420  }
  2421  func rewriteValue_OpLOONG64LoweredPanicBoundsRR(v *ssa.Value) bool {
  2422  	v_2 := v.Args[2]
  2423  	v_1 := v.Args[1]
  2424  	v_0 := v.Args[0]
  2425  	// match: (LoweredPanicBoundsRR [kind] x (MOVVconst [c]) mem)
  2426  	// result: (LoweredPanicBoundsRC [kind] x {ssa.PanicBoundsC{C:c}} mem)
  2427  	for {
  2428  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2429  		x := v_0
  2430  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2431  			break
  2432  		}
  2433  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2434  		mem := v_2
  2435  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsRC)
  2436  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2437  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: c})
  2438  		v.AddArg2(x, mem)
  2439  		return true
  2440  	}
  2441  	// match: (LoweredPanicBoundsRR [kind] (MOVVconst [c]) y mem)
  2442  	// result: (LoweredPanicBoundsCR [kind] {ssa.PanicBoundsC{C:c}} y mem)
  2443  	for {
  2444  		kind := ssa.AuxIntToInt64(v.AuxInt)
  2445  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2446  			break
  2447  		}
  2448  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2449  		y := v_1
  2450  		mem := v_2
  2451  		v.Reset(ssaop.OpLOONG64LoweredPanicBoundsCR)
  2452  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  2453  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: c})
  2454  		v.AddArg2(y, mem)
  2455  		return true
  2456  	}
  2457  	return false
  2458  }
  2459  func rewriteValue_OpLOONG64MASKEQZ(v *ssa.Value) bool {
  2460  	v_1 := v.Args[1]
  2461  	v_0 := v.Args[0]
  2462  	// match: (MASKEQZ (MOVVconst [0]) cond)
  2463  	// result: (MOVVconst [0])
  2464  	for {
  2465  		if v_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
  2466  			break
  2467  		}
  2468  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2469  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2470  		return true
  2471  	}
  2472  	// match: (MASKEQZ x (MOVVconst [c]))
  2473  	// cond: c == 0
  2474  	// result: (MOVVconst [0])
  2475  	for {
  2476  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2477  			break
  2478  		}
  2479  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2480  		if !(c == 0) {
  2481  			break
  2482  		}
  2483  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2484  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2485  		return true
  2486  	}
  2487  	// match: (MASKEQZ x (MOVVconst [c]))
  2488  	// cond: c != 0
  2489  	// result: x
  2490  	for {
  2491  		x := v_0
  2492  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2493  			break
  2494  		}
  2495  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2496  		if !(c != 0) {
  2497  			break
  2498  		}
  2499  		v.CopyOf(x)
  2500  		return true
  2501  	}
  2502  	return false
  2503  }
  2504  func rewriteValue_OpLOONG64MASKNEZ(v *ssa.Value) bool {
  2505  	v_0 := v.Args[0]
  2506  	// match: (MASKNEZ (MOVVconst [0]) cond)
  2507  	// result: (MOVVconst [0])
  2508  	for {
  2509  		if v_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
  2510  			break
  2511  		}
  2512  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2513  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2514  		return true
  2515  	}
  2516  	return false
  2517  }
  2518  func rewriteValue_OpLOONG64MOVBUload(v *ssa.Value) bool {
  2519  	v_1 := v.Args[1]
  2520  	v_0 := v.Args[0]
  2521  	b := v.Block
  2522  	config := b.Func.Config
  2523  	typ := &b.Func.Config.Types
  2524  	// match: (MOVBUload [off] {sym} ptr (MOVBstore [off] {sym} ptr x _))
  2525  	// result: (MOVBUreg x)
  2526  	for {
  2527  		off := ssa.AuxIntToInt32(v.AuxInt)
  2528  		sym := ssa.AuxToSym(v.Aux)
  2529  		ptr := v_0
  2530  		if v_1.Op != ssaop.OpLOONG64MOVBstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  2531  			break
  2532  		}
  2533  		x := v_1.Args[1]
  2534  		if ptr != v_1.Args[0] {
  2535  			break
  2536  		}
  2537  		v.Reset(ssaop.OpLOONG64MOVBUreg)
  2538  		v.AddArg(x)
  2539  		return true
  2540  	}
  2541  	// match: (MOVBUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  2542  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2543  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
  2544  	for {
  2545  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2546  		sym := ssa.AuxToSym(v.Aux)
  2547  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  2548  			break
  2549  		}
  2550  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  2551  		ptr := v_0.Args[0]
  2552  		mem := v_1
  2553  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2554  			break
  2555  		}
  2556  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2557  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2558  		v.Aux = ssa.SymToAux(sym)
  2559  		v.AddArg2(ptr, mem)
  2560  		return true
  2561  	}
  2562  	// match: (MOVBUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  2563  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2564  	// result: (MOVBUload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  2565  	for {
  2566  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2567  		sym1 := ssa.AuxToSym(v.Aux)
  2568  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  2569  			break
  2570  		}
  2571  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2572  		sym2 := ssa.AuxToSym(v_0.Aux)
  2573  		ptr := v_0.Args[0]
  2574  		mem := v_1
  2575  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2576  			break
  2577  		}
  2578  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2579  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2580  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2581  		v.AddArg2(ptr, mem)
  2582  		return true
  2583  	}
  2584  	// match: (MOVBUload [off] {sym} (ADDV ptr idx) mem)
  2585  	// cond: off == 0 && sym == nil
  2586  	// result: (MOVBUloadidx ptr idx mem)
  2587  	for {
  2588  		off := ssa.AuxIntToInt32(v.AuxInt)
  2589  		sym := ssa.AuxToSym(v.Aux)
  2590  		if v_0.Op != ssaop.OpLOONG64ADDV {
  2591  			break
  2592  		}
  2593  		idx := v_0.Args[1]
  2594  		ptr := v_0.Args[0]
  2595  		mem := v_1
  2596  		if !(off == 0 && sym == nil) {
  2597  			break
  2598  		}
  2599  		v.Reset(ssaop.OpLOONG64MOVBUloadidx)
  2600  		v.AddArg3(ptr, idx, mem)
  2601  		return true
  2602  	}
  2603  	// match: (MOVBUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  2604  	// cond: off == 0 && sym == nil
  2605  	// result: (MOVBUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  2606  	for {
  2607  		off := ssa.AuxIntToInt32(v.AuxInt)
  2608  		sym := ssa.AuxToSym(v.Aux)
  2609  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  2610  			break
  2611  		}
  2612  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  2613  		idx := v_0.Args[1]
  2614  		ptr := v_0.Args[0]
  2615  		mem := v_1
  2616  		if !(off == 0 && sym == nil) {
  2617  			break
  2618  		}
  2619  		v.Reset(ssaop.OpLOONG64MOVBUloadidx)
  2620  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  2621  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  2622  		v0.AddArg(idx)
  2623  		v.AddArg3(ptr, v0, mem)
  2624  		return true
  2625  	}
  2626  	// match: (MOVBUload [off] {sym} (SB) _)
  2627  	// cond: ssa.SymIsRO(sym)
  2628  	// result: (MOVVconst [int64(ssa.Read8(sym, int64(off)))])
  2629  	for {
  2630  		off := ssa.AuxIntToInt32(v.AuxInt)
  2631  		sym := ssa.AuxToSym(v.Aux)
  2632  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  2633  			break
  2634  		}
  2635  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2636  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read8(sym, int64(off))))
  2637  		return true
  2638  	}
  2639  	return false
  2640  }
  2641  func rewriteValue_OpLOONG64MOVBUloadidx(v *ssa.Value) bool {
  2642  	v_2 := v.Args[2]
  2643  	v_1 := v.Args[1]
  2644  	v_0 := v.Args[0]
  2645  	// match: (MOVBUloadidx ptr (MOVVconst [c]) mem)
  2646  	// cond: ssa.Is32Bit(c)
  2647  	// result: (MOVBUload [int32(c)] ptr mem)
  2648  	for {
  2649  		ptr := v_0
  2650  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2651  			break
  2652  		}
  2653  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2654  		mem := v_2
  2655  		if !(ssa.Is32Bit(c)) {
  2656  			break
  2657  		}
  2658  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2659  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  2660  		v.AddArg2(ptr, mem)
  2661  		return true
  2662  	}
  2663  	// match: (MOVBUloadidx (MOVVconst [c]) ptr mem)
  2664  	// cond: ssa.Is32Bit(c)
  2665  	// result: (MOVBUload [int32(c)] ptr mem)
  2666  	for {
  2667  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2668  			break
  2669  		}
  2670  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2671  		ptr := v_1
  2672  		mem := v_2
  2673  		if !(ssa.Is32Bit(c)) {
  2674  			break
  2675  		}
  2676  		v.Reset(ssaop.OpLOONG64MOVBUload)
  2677  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  2678  		v.AddArg2(ptr, mem)
  2679  		return true
  2680  	}
  2681  	return false
  2682  }
  2683  func rewriteValue_OpLOONG64MOVBUreg(v *ssa.Value) bool {
  2684  	v_0 := v.Args[0]
  2685  	// match: (MOVBUreg (SRLVconst [rc] x))
  2686  	// cond: rc < 8
  2687  	// result: (BSTRPICKV [rc + (7+rc)<<6] x)
  2688  	for {
  2689  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  2690  			break
  2691  		}
  2692  		rc := ssa.AuxIntToInt64(v_0.AuxInt)
  2693  		x := v_0.Args[0]
  2694  		if !(rc < 8) {
  2695  			break
  2696  		}
  2697  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  2698  		v.AuxInt = ssa.Int64ToAuxInt(rc + (7+rc)<<6)
  2699  		v.AddArg(x)
  2700  		return true
  2701  	}
  2702  	// match: (MOVBUreg x:(SGT _ _))
  2703  	// result: x
  2704  	for {
  2705  		x := v_0
  2706  		if x.Op != ssaop.OpLOONG64SGT {
  2707  			break
  2708  		}
  2709  		v.CopyOf(x)
  2710  		return true
  2711  	}
  2712  	// match: (MOVBUreg x:(SGTU _ _))
  2713  	// result: x
  2714  	for {
  2715  		x := v_0
  2716  		if x.Op != ssaop.OpLOONG64SGTU {
  2717  			break
  2718  		}
  2719  		v.CopyOf(x)
  2720  		return true
  2721  	}
  2722  	// match: (MOVBUreg x:(XOR (MOVVconst [1]) (SGT _ _)))
  2723  	// result: x
  2724  	for {
  2725  		x := v_0
  2726  		if x.Op != ssaop.OpLOONG64XOR {
  2727  			break
  2728  		}
  2729  		_ = x.Args[1]
  2730  		x_0 := x.Args[0]
  2731  		x_1 := x.Args[1]
  2732  		for _i0 := 0; _i0 <= 1; _i0, x_0, x_1 = _i0+1, x_1, x_0 {
  2733  			if x_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(x_0.AuxInt) != 1 || x_1.Op != ssaop.OpLOONG64SGT {
  2734  				continue
  2735  			}
  2736  			v.CopyOf(x)
  2737  			return true
  2738  		}
  2739  		break
  2740  	}
  2741  	// match: (MOVBUreg x:(XOR (MOVVconst [1]) (SGTU _ _)))
  2742  	// result: x
  2743  	for {
  2744  		x := v_0
  2745  		if x.Op != ssaop.OpLOONG64XOR {
  2746  			break
  2747  		}
  2748  		_ = x.Args[1]
  2749  		x_0 := x.Args[0]
  2750  		x_1 := x.Args[1]
  2751  		for _i0 := 0; _i0 <= 1; _i0, x_0, x_1 = _i0+1, x_1, x_0 {
  2752  			if x_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(x_0.AuxInt) != 1 || x_1.Op != ssaop.OpLOONG64SGTU {
  2753  				continue
  2754  			}
  2755  			v.CopyOf(x)
  2756  			return true
  2757  		}
  2758  		break
  2759  	}
  2760  	// match: (MOVBUreg (SLLVconst [lc] x))
  2761  	// cond: lc >= 8
  2762  	// result: (MOVVconst [0])
  2763  	for {
  2764  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  2765  			break
  2766  		}
  2767  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  2768  		if !(lc >= 8) {
  2769  			break
  2770  		}
  2771  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2772  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2773  		return true
  2774  	}
  2775  	// match: (MOVBUreg (MOVVconst [c]))
  2776  	// result: (MOVVconst [int64(uint8(c))])
  2777  	for {
  2778  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2779  			break
  2780  		}
  2781  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2782  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2783  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint8(c)))
  2784  		return true
  2785  	}
  2786  	// match: (MOVBUreg (ANDconst [c] x))
  2787  	// result: (ANDconst [c&0xff] x)
  2788  	for {
  2789  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  2790  			break
  2791  		}
  2792  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2793  		x := v_0.Args[0]
  2794  		v.Reset(ssaop.OpLOONG64ANDconst)
  2795  		v.AuxInt = ssa.Int64ToAuxInt(c & 0xff)
  2796  		v.AddArg(x)
  2797  		return true
  2798  	}
  2799  	// match: (MOVBUreg x:(SRLconst [c] y))
  2800  	// cond: c >= 24
  2801  	// result: x
  2802  	for {
  2803  		x := v_0
  2804  		if x.Op != ssaop.OpLOONG64SRLconst {
  2805  			break
  2806  		}
  2807  		c := ssa.AuxIntToInt64(x.AuxInt)
  2808  		if !(c >= 24) {
  2809  			break
  2810  		}
  2811  		v.CopyOf(x)
  2812  		return true
  2813  	}
  2814  	// match: (MOVBUreg x:(ANDconst [c] y))
  2815  	// cond: c >= 0 && int64(uint8(c)) == c
  2816  	// result: x
  2817  	for {
  2818  		x := v_0
  2819  		if x.Op != ssaop.OpLOONG64ANDconst {
  2820  			break
  2821  		}
  2822  		c := ssa.AuxIntToInt64(x.AuxInt)
  2823  		if !(c >= 0 && int64(uint8(c)) == c) {
  2824  			break
  2825  		}
  2826  		v.CopyOf(x)
  2827  		return true
  2828  	}
  2829  	// match: (MOVBUreg x)
  2830  	// cond: v.Type.Size() <= 1
  2831  	// result: x
  2832  	for {
  2833  		x := v_0
  2834  		if !(v.Type.Size() <= 1) {
  2835  			break
  2836  		}
  2837  		v.CopyOf(x)
  2838  		return true
  2839  	}
  2840  	return false
  2841  }
  2842  func rewriteValue_OpLOONG64MOVBload(v *ssa.Value) bool {
  2843  	v_1 := v.Args[1]
  2844  	v_0 := v.Args[0]
  2845  	b := v.Block
  2846  	config := b.Func.Config
  2847  	typ := &b.Func.Config.Types
  2848  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off] {sym} ptr x _))
  2849  	// result: (MOVBreg x)
  2850  	for {
  2851  		off := ssa.AuxIntToInt32(v.AuxInt)
  2852  		sym := ssa.AuxToSym(v.Aux)
  2853  		ptr := v_0
  2854  		if v_1.Op != ssaop.OpLOONG64MOVBstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  2855  			break
  2856  		}
  2857  		x := v_1.Args[1]
  2858  		if ptr != v_1.Args[0] {
  2859  			break
  2860  		}
  2861  		v.Reset(ssaop.OpLOONG64MOVBreg)
  2862  		v.AddArg(x)
  2863  		return true
  2864  	}
  2865  	// match: (MOVBload [off1] {sym} (ADDVconst [off2] ptr) mem)
  2866  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2867  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
  2868  	for {
  2869  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2870  		sym := ssa.AuxToSym(v.Aux)
  2871  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  2872  			break
  2873  		}
  2874  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  2875  		ptr := v_0.Args[0]
  2876  		mem := v_1
  2877  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2878  			break
  2879  		}
  2880  		v.Reset(ssaop.OpLOONG64MOVBload)
  2881  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2882  		v.Aux = ssa.SymToAux(sym)
  2883  		v.AddArg2(ptr, mem)
  2884  		return true
  2885  	}
  2886  	// match: (MOVBload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  2887  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  2888  	// result: (MOVBload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  2889  	for {
  2890  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2891  		sym1 := ssa.AuxToSym(v.Aux)
  2892  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  2893  			break
  2894  		}
  2895  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2896  		sym2 := ssa.AuxToSym(v_0.Aux)
  2897  		ptr := v_0.Args[0]
  2898  		mem := v_1
  2899  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  2900  			break
  2901  		}
  2902  		v.Reset(ssaop.OpLOONG64MOVBload)
  2903  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  2904  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2905  		v.AddArg2(ptr, mem)
  2906  		return true
  2907  	}
  2908  	// match: (MOVBload [off] {sym} (ADDV ptr idx) mem)
  2909  	// cond: off == 0 && sym == nil
  2910  	// result: (MOVBloadidx ptr idx mem)
  2911  	for {
  2912  		off := ssa.AuxIntToInt32(v.AuxInt)
  2913  		sym := ssa.AuxToSym(v.Aux)
  2914  		if v_0.Op != ssaop.OpLOONG64ADDV {
  2915  			break
  2916  		}
  2917  		idx := v_0.Args[1]
  2918  		ptr := v_0.Args[0]
  2919  		mem := v_1
  2920  		if !(off == 0 && sym == nil) {
  2921  			break
  2922  		}
  2923  		v.Reset(ssaop.OpLOONG64MOVBloadidx)
  2924  		v.AddArg3(ptr, idx, mem)
  2925  		return true
  2926  	}
  2927  	// match: (MOVBload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  2928  	// cond: off == 0 && sym == nil
  2929  	// result: (MOVBloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  2930  	for {
  2931  		off := ssa.AuxIntToInt32(v.AuxInt)
  2932  		sym := ssa.AuxToSym(v.Aux)
  2933  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  2934  			break
  2935  		}
  2936  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  2937  		idx := v_0.Args[1]
  2938  		ptr := v_0.Args[0]
  2939  		mem := v_1
  2940  		if !(off == 0 && sym == nil) {
  2941  			break
  2942  		}
  2943  		v.Reset(ssaop.OpLOONG64MOVBloadidx)
  2944  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  2945  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  2946  		v0.AddArg(idx)
  2947  		v.AddArg3(ptr, v0, mem)
  2948  		return true
  2949  	}
  2950  	// match: (MOVBload [off] {sym} (SB) _)
  2951  	// cond: ssa.SymIsRO(sym)
  2952  	// result: (MOVVconst [int64(int8(ssa.Read8(sym, int64(off))))])
  2953  	for {
  2954  		off := ssa.AuxIntToInt32(v.AuxInt)
  2955  		sym := ssa.AuxToSym(v.Aux)
  2956  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  2957  			break
  2958  		}
  2959  		v.Reset(ssaop.OpLOONG64MOVVconst)
  2960  		v.AuxInt = ssa.Int64ToAuxInt(int64(int8(ssa.Read8(sym, int64(off)))))
  2961  		return true
  2962  	}
  2963  	return false
  2964  }
  2965  func rewriteValue_OpLOONG64MOVBloadidx(v *ssa.Value) bool {
  2966  	v_2 := v.Args[2]
  2967  	v_1 := v.Args[1]
  2968  	v_0 := v.Args[0]
  2969  	// match: (MOVBloadidx ptr (MOVVconst [c]) mem)
  2970  	// cond: ssa.Is32Bit(c)
  2971  	// result: (MOVBload [int32(c)] ptr mem)
  2972  	for {
  2973  		ptr := v_0
  2974  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  2975  			break
  2976  		}
  2977  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2978  		mem := v_2
  2979  		if !(ssa.Is32Bit(c)) {
  2980  			break
  2981  		}
  2982  		v.Reset(ssaop.OpLOONG64MOVBload)
  2983  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  2984  		v.AddArg2(ptr, mem)
  2985  		return true
  2986  	}
  2987  	// match: (MOVBloadidx (MOVVconst [c]) ptr mem)
  2988  	// cond: ssa.Is32Bit(c)
  2989  	// result: (MOVBload [int32(c)] ptr mem)
  2990  	for {
  2991  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  2992  			break
  2993  		}
  2994  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  2995  		ptr := v_1
  2996  		mem := v_2
  2997  		if !(ssa.Is32Bit(c)) {
  2998  			break
  2999  		}
  3000  		v.Reset(ssaop.OpLOONG64MOVBload)
  3001  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3002  		v.AddArg2(ptr, mem)
  3003  		return true
  3004  	}
  3005  	return false
  3006  }
  3007  func rewriteValue_OpLOONG64MOVBreg(v *ssa.Value) bool {
  3008  	v_0 := v.Args[0]
  3009  	// match: (MOVBreg (MOVVconst [c]))
  3010  	// result: (MOVVconst [int64(int8(c))])
  3011  	for {
  3012  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3013  			break
  3014  		}
  3015  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3016  		v.Reset(ssaop.OpLOONG64MOVVconst)
  3017  		v.AuxInt = ssa.Int64ToAuxInt(int64(int8(c)))
  3018  		return true
  3019  	}
  3020  	// match: (MOVBreg x:(ANDconst [c] y))
  3021  	// cond: c >= 0 && int64(int8(c)) == c
  3022  	// result: x
  3023  	for {
  3024  		x := v_0
  3025  		if x.Op != ssaop.OpLOONG64ANDconst {
  3026  			break
  3027  		}
  3028  		c := ssa.AuxIntToInt64(x.AuxInt)
  3029  		if !(c >= 0 && int64(int8(c)) == c) {
  3030  			break
  3031  		}
  3032  		v.CopyOf(x)
  3033  		return true
  3034  	}
  3035  	// match: (MOVBreg x)
  3036  	// cond: v.Type.Size() <= 1
  3037  	// result: x
  3038  	for {
  3039  		x := v_0
  3040  		if !(v.Type.Size() <= 1) {
  3041  			break
  3042  		}
  3043  		v.CopyOf(x)
  3044  		return true
  3045  	}
  3046  	return false
  3047  }
  3048  func rewriteValue_OpLOONG64MOVBstore(v *ssa.Value) bool {
  3049  	v_2 := v.Args[2]
  3050  	v_1 := v.Args[1]
  3051  	v_0 := v.Args[0]
  3052  	b := v.Block
  3053  	config := b.Func.Config
  3054  	typ := &b.Func.Config.Types
  3055  	// match: (MOVBstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  3056  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3057  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
  3058  	for {
  3059  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3060  		sym := ssa.AuxToSym(v.Aux)
  3061  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3062  			break
  3063  		}
  3064  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3065  		ptr := v_0.Args[0]
  3066  		val := v_1
  3067  		mem := v_2
  3068  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3069  			break
  3070  		}
  3071  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3072  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3073  		v.Aux = ssa.SymToAux(sym)
  3074  		v.AddArg3(ptr, val, mem)
  3075  		return true
  3076  	}
  3077  	// match: (MOVBstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  3078  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3079  	// result: (MOVBstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  3080  	for {
  3081  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3082  		sym1 := ssa.AuxToSym(v.Aux)
  3083  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3084  			break
  3085  		}
  3086  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3087  		sym2 := ssa.AuxToSym(v_0.Aux)
  3088  		ptr := v_0.Args[0]
  3089  		val := v_1
  3090  		mem := v_2
  3091  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3092  			break
  3093  		}
  3094  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3095  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3096  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3097  		v.AddArg3(ptr, val, mem)
  3098  		return true
  3099  	}
  3100  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  3101  	// result: (MOVBstore [off] {sym} ptr x mem)
  3102  	for {
  3103  		off := ssa.AuxIntToInt32(v.AuxInt)
  3104  		sym := ssa.AuxToSym(v.Aux)
  3105  		ptr := v_0
  3106  		if v_1.Op != ssaop.OpLOONG64MOVBreg {
  3107  			break
  3108  		}
  3109  		x := v_1.Args[0]
  3110  		mem := v_2
  3111  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3112  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3113  		v.Aux = ssa.SymToAux(sym)
  3114  		v.AddArg3(ptr, x, mem)
  3115  		return true
  3116  	}
  3117  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  3118  	// result: (MOVBstore [off] {sym} ptr x mem)
  3119  	for {
  3120  		off := ssa.AuxIntToInt32(v.AuxInt)
  3121  		sym := ssa.AuxToSym(v.Aux)
  3122  		ptr := v_0
  3123  		if v_1.Op != ssaop.OpLOONG64MOVBUreg {
  3124  			break
  3125  		}
  3126  		x := v_1.Args[0]
  3127  		mem := v_2
  3128  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3129  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3130  		v.Aux = ssa.SymToAux(sym)
  3131  		v.AddArg3(ptr, x, mem)
  3132  		return true
  3133  	}
  3134  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  3135  	// result: (MOVBstore [off] {sym} ptr x mem)
  3136  	for {
  3137  		off := ssa.AuxIntToInt32(v.AuxInt)
  3138  		sym := ssa.AuxToSym(v.Aux)
  3139  		ptr := v_0
  3140  		if v_1.Op != ssaop.OpLOONG64MOVHreg {
  3141  			break
  3142  		}
  3143  		x := v_1.Args[0]
  3144  		mem := v_2
  3145  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3146  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3147  		v.Aux = ssa.SymToAux(sym)
  3148  		v.AddArg3(ptr, x, mem)
  3149  		return true
  3150  	}
  3151  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  3152  	// result: (MOVBstore [off] {sym} ptr x mem)
  3153  	for {
  3154  		off := ssa.AuxIntToInt32(v.AuxInt)
  3155  		sym := ssa.AuxToSym(v.Aux)
  3156  		ptr := v_0
  3157  		if v_1.Op != ssaop.OpLOONG64MOVHUreg {
  3158  			break
  3159  		}
  3160  		x := v_1.Args[0]
  3161  		mem := v_2
  3162  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3163  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3164  		v.Aux = ssa.SymToAux(sym)
  3165  		v.AddArg3(ptr, x, mem)
  3166  		return true
  3167  	}
  3168  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  3169  	// result: (MOVBstore [off] {sym} ptr x mem)
  3170  	for {
  3171  		off := ssa.AuxIntToInt32(v.AuxInt)
  3172  		sym := ssa.AuxToSym(v.Aux)
  3173  		ptr := v_0
  3174  		if v_1.Op != ssaop.OpLOONG64MOVWreg {
  3175  			break
  3176  		}
  3177  		x := v_1.Args[0]
  3178  		mem := v_2
  3179  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3180  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3181  		v.Aux = ssa.SymToAux(sym)
  3182  		v.AddArg3(ptr, x, mem)
  3183  		return true
  3184  	}
  3185  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
  3186  	// result: (MOVBstore [off] {sym} ptr x mem)
  3187  	for {
  3188  		off := ssa.AuxIntToInt32(v.AuxInt)
  3189  		sym := ssa.AuxToSym(v.Aux)
  3190  		ptr := v_0
  3191  		if v_1.Op != ssaop.OpLOONG64MOVWUreg {
  3192  			break
  3193  		}
  3194  		x := v_1.Args[0]
  3195  		mem := v_2
  3196  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3197  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3198  		v.Aux = ssa.SymToAux(sym)
  3199  		v.AddArg3(ptr, x, mem)
  3200  		return true
  3201  	}
  3202  	// match: (MOVBstore [off] {sym} (ADDV ptr idx) val mem)
  3203  	// cond: off == 0 && sym == nil
  3204  	// result: (MOVBstoreidx ptr idx val mem)
  3205  	for {
  3206  		off := ssa.AuxIntToInt32(v.AuxInt)
  3207  		sym := ssa.AuxToSym(v.Aux)
  3208  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3209  			break
  3210  		}
  3211  		idx := v_0.Args[1]
  3212  		ptr := v_0.Args[0]
  3213  		val := v_1
  3214  		mem := v_2
  3215  		if !(off == 0 && sym == nil) {
  3216  			break
  3217  		}
  3218  		v.Reset(ssaop.OpLOONG64MOVBstoreidx)
  3219  		v.AddArg4(ptr, idx, val, mem)
  3220  		return true
  3221  	}
  3222  	// match: (MOVBstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3223  	// cond: off == 0 && sym == nil
  3224  	// result: (MOVBstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3225  	for {
  3226  		off := ssa.AuxIntToInt32(v.AuxInt)
  3227  		sym := ssa.AuxToSym(v.Aux)
  3228  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3229  			break
  3230  		}
  3231  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3232  		idx := v_0.Args[1]
  3233  		ptr := v_0.Args[0]
  3234  		val := v_1
  3235  		mem := v_2
  3236  		if !(off == 0 && sym == nil) {
  3237  			break
  3238  		}
  3239  		v.Reset(ssaop.OpLOONG64MOVBstoreidx)
  3240  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3241  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3242  		v0.AddArg(idx)
  3243  		v.AddArg4(ptr, v0, val, mem)
  3244  		return true
  3245  	}
  3246  	return false
  3247  }
  3248  func rewriteValue_OpLOONG64MOVBstoreidx(v *ssa.Value) bool {
  3249  	v_3 := v.Args[3]
  3250  	v_2 := v.Args[2]
  3251  	v_1 := v.Args[1]
  3252  	v_0 := v.Args[0]
  3253  	// match: (MOVBstoreidx ptr (MOVVconst [c]) val mem)
  3254  	// cond: ssa.Is32Bit(c)
  3255  	// result: (MOVBstore [int32(c)] ptr val mem)
  3256  	for {
  3257  		ptr := v_0
  3258  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3259  			break
  3260  		}
  3261  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3262  		val := v_2
  3263  		mem := v_3
  3264  		if !(ssa.Is32Bit(c)) {
  3265  			break
  3266  		}
  3267  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3268  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3269  		v.AddArg3(ptr, val, mem)
  3270  		return true
  3271  	}
  3272  	// match: (MOVBstoreidx (MOVVconst [c]) idx val mem)
  3273  	// cond: ssa.Is32Bit(c)
  3274  	// result: (MOVBstore [int32(c)] idx val mem)
  3275  	for {
  3276  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3277  			break
  3278  		}
  3279  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3280  		idx := v_1
  3281  		val := v_2
  3282  		mem := v_3
  3283  		if !(ssa.Is32Bit(c)) {
  3284  			break
  3285  		}
  3286  		v.Reset(ssaop.OpLOONG64MOVBstore)
  3287  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3288  		v.AddArg3(idx, val, mem)
  3289  		return true
  3290  	}
  3291  	return false
  3292  }
  3293  func rewriteValue_OpLOONG64MOVDF(v *ssa.Value) bool {
  3294  	v_0 := v.Args[0]
  3295  	// match: (MOVDF (ABSD (MOVFD x)))
  3296  	// result: (ABSF x)
  3297  	for {
  3298  		if v_0.Op != ssaop.OpLOONG64ABSD {
  3299  			break
  3300  		}
  3301  		v_0_0 := v_0.Args[0]
  3302  		if v_0_0.Op != ssaop.OpLOONG64MOVFD {
  3303  			break
  3304  		}
  3305  		x := v_0_0.Args[0]
  3306  		v.Reset(ssaop.OpLOONG64ABSF)
  3307  		v.AddArg(x)
  3308  		return true
  3309  	}
  3310  	// match: (MOVDF (SQRTD (MOVFD x)))
  3311  	// result: (SQRTF x)
  3312  	for {
  3313  		if v_0.Op != ssaop.OpLOONG64SQRTD {
  3314  			break
  3315  		}
  3316  		v_0_0 := v_0.Args[0]
  3317  		if v_0_0.Op != ssaop.OpLOONG64MOVFD {
  3318  			break
  3319  		}
  3320  		x := v_0_0.Args[0]
  3321  		v.Reset(ssaop.OpLOONG64SQRTF)
  3322  		v.AddArg(x)
  3323  		return true
  3324  	}
  3325  	return false
  3326  }
  3327  func rewriteValue_OpLOONG64MOVDload(v *ssa.Value) bool {
  3328  	v_1 := v.Args[1]
  3329  	v_0 := v.Args[0]
  3330  	b := v.Block
  3331  	config := b.Func.Config
  3332  	typ := &b.Func.Config.Types
  3333  	// match: (MOVDload [off] {sym} ptr (MOVVstore [off] {sym} ptr val _))
  3334  	// result: (MOVVgpfp val)
  3335  	for {
  3336  		off := ssa.AuxIntToInt32(v.AuxInt)
  3337  		sym := ssa.AuxToSym(v.Aux)
  3338  		ptr := v_0
  3339  		if v_1.Op != ssaop.OpLOONG64MOVVstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  3340  			break
  3341  		}
  3342  		val := v_1.Args[1]
  3343  		if ptr != v_1.Args[0] {
  3344  			break
  3345  		}
  3346  		v.Reset(ssaop.OpLOONG64MOVVgpfp)
  3347  		v.AddArg(val)
  3348  		return true
  3349  	}
  3350  	// match: (MOVDload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3351  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3352  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
  3353  	for {
  3354  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3355  		sym := ssa.AuxToSym(v.Aux)
  3356  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3357  			break
  3358  		}
  3359  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3360  		ptr := v_0.Args[0]
  3361  		mem := v_1
  3362  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3363  			break
  3364  		}
  3365  		v.Reset(ssaop.OpLOONG64MOVDload)
  3366  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3367  		v.Aux = ssa.SymToAux(sym)
  3368  		v.AddArg2(ptr, mem)
  3369  		return true
  3370  	}
  3371  	// match: (MOVDload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3372  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3373  	// result: (MOVDload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  3374  	for {
  3375  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3376  		sym1 := ssa.AuxToSym(v.Aux)
  3377  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3378  			break
  3379  		}
  3380  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3381  		sym2 := ssa.AuxToSym(v_0.Aux)
  3382  		ptr := v_0.Args[0]
  3383  		mem := v_1
  3384  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3385  			break
  3386  		}
  3387  		v.Reset(ssaop.OpLOONG64MOVDload)
  3388  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3389  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3390  		v.AddArg2(ptr, mem)
  3391  		return true
  3392  	}
  3393  	// match: (MOVDload [off] {sym} (ADDV ptr idx) mem)
  3394  	// cond: off == 0 && sym == nil
  3395  	// result: (MOVDloadidx ptr idx mem)
  3396  	for {
  3397  		off := ssa.AuxIntToInt32(v.AuxInt)
  3398  		sym := ssa.AuxToSym(v.Aux)
  3399  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3400  			break
  3401  		}
  3402  		idx := v_0.Args[1]
  3403  		ptr := v_0.Args[0]
  3404  		mem := v_1
  3405  		if !(off == 0 && sym == nil) {
  3406  			break
  3407  		}
  3408  		v.Reset(ssaop.OpLOONG64MOVDloadidx)
  3409  		v.AddArg3(ptr, idx, mem)
  3410  		return true
  3411  	}
  3412  	// match: (MOVDload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3413  	// cond: off == 0 && sym == nil
  3414  	// result: (MOVDloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3415  	for {
  3416  		off := ssa.AuxIntToInt32(v.AuxInt)
  3417  		sym := ssa.AuxToSym(v.Aux)
  3418  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3419  			break
  3420  		}
  3421  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3422  		idx := v_0.Args[1]
  3423  		ptr := v_0.Args[0]
  3424  		mem := v_1
  3425  		if !(off == 0 && sym == nil) {
  3426  			break
  3427  		}
  3428  		v.Reset(ssaop.OpLOONG64MOVDloadidx)
  3429  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3430  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3431  		v0.AddArg(idx)
  3432  		v.AddArg3(ptr, v0, mem)
  3433  		return true
  3434  	}
  3435  	return false
  3436  }
  3437  func rewriteValue_OpLOONG64MOVDloadidx(v *ssa.Value) bool {
  3438  	v_2 := v.Args[2]
  3439  	v_1 := v.Args[1]
  3440  	v_0 := v.Args[0]
  3441  	// match: (MOVDloadidx ptr (MOVVconst [c]) mem)
  3442  	// cond: ssa.Is32Bit(c)
  3443  	// result: (MOVDload [int32(c)] ptr mem)
  3444  	for {
  3445  		ptr := v_0
  3446  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3447  			break
  3448  		}
  3449  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3450  		mem := v_2
  3451  		if !(ssa.Is32Bit(c)) {
  3452  			break
  3453  		}
  3454  		v.Reset(ssaop.OpLOONG64MOVDload)
  3455  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3456  		v.AddArg2(ptr, mem)
  3457  		return true
  3458  	}
  3459  	// match: (MOVDloadidx (MOVVconst [c]) ptr mem)
  3460  	// cond: ssa.Is32Bit(c)
  3461  	// result: (MOVDload [int32(c)] ptr mem)
  3462  	for {
  3463  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3464  			break
  3465  		}
  3466  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3467  		ptr := v_1
  3468  		mem := v_2
  3469  		if !(ssa.Is32Bit(c)) {
  3470  			break
  3471  		}
  3472  		v.Reset(ssaop.OpLOONG64MOVDload)
  3473  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3474  		v.AddArg2(ptr, mem)
  3475  		return true
  3476  	}
  3477  	return false
  3478  }
  3479  func rewriteValue_OpLOONG64MOVDstore(v *ssa.Value) bool {
  3480  	v_2 := v.Args[2]
  3481  	v_1 := v.Args[1]
  3482  	v_0 := v.Args[0]
  3483  	b := v.Block
  3484  	config := b.Func.Config
  3485  	typ := &b.Func.Config.Types
  3486  	// match: (MOVDstore [off] {sym} ptr (MOVVgpfp val) mem)
  3487  	// result: (MOVVstore [off] {sym} ptr val mem)
  3488  	for {
  3489  		off := ssa.AuxIntToInt32(v.AuxInt)
  3490  		sym := ssa.AuxToSym(v.Aux)
  3491  		ptr := v_0
  3492  		if v_1.Op != ssaop.OpLOONG64MOVVgpfp {
  3493  			break
  3494  		}
  3495  		val := v_1.Args[0]
  3496  		mem := v_2
  3497  		v.Reset(ssaop.OpLOONG64MOVVstore)
  3498  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3499  		v.Aux = ssa.SymToAux(sym)
  3500  		v.AddArg3(ptr, val, mem)
  3501  		return true
  3502  	}
  3503  	// match: (MOVDstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  3504  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3505  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
  3506  	for {
  3507  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3508  		sym := ssa.AuxToSym(v.Aux)
  3509  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3510  			break
  3511  		}
  3512  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3513  		ptr := v_0.Args[0]
  3514  		val := v_1
  3515  		mem := v_2
  3516  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3517  			break
  3518  		}
  3519  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3520  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3521  		v.Aux = ssa.SymToAux(sym)
  3522  		v.AddArg3(ptr, val, mem)
  3523  		return true
  3524  	}
  3525  	// match: (MOVDstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  3526  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3527  	// result: (MOVDstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  3528  	for {
  3529  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3530  		sym1 := ssa.AuxToSym(v.Aux)
  3531  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3532  			break
  3533  		}
  3534  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3535  		sym2 := ssa.AuxToSym(v_0.Aux)
  3536  		ptr := v_0.Args[0]
  3537  		val := v_1
  3538  		mem := v_2
  3539  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3540  			break
  3541  		}
  3542  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3543  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3544  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3545  		v.AddArg3(ptr, val, mem)
  3546  		return true
  3547  	}
  3548  	// match: (MOVDstore [off] {sym} (ADDV ptr idx) val mem)
  3549  	// cond: off == 0 && sym == nil
  3550  	// result: (MOVDstoreidx ptr idx val mem)
  3551  	for {
  3552  		off := ssa.AuxIntToInt32(v.AuxInt)
  3553  		sym := ssa.AuxToSym(v.Aux)
  3554  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3555  			break
  3556  		}
  3557  		idx := v_0.Args[1]
  3558  		ptr := v_0.Args[0]
  3559  		val := v_1
  3560  		mem := v_2
  3561  		if !(off == 0 && sym == nil) {
  3562  			break
  3563  		}
  3564  		v.Reset(ssaop.OpLOONG64MOVDstoreidx)
  3565  		v.AddArg4(ptr, idx, val, mem)
  3566  		return true
  3567  	}
  3568  	// match: (MOVDstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3569  	// cond: off == 0 && sym == nil
  3570  	// result: (MOVDstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3571  	for {
  3572  		off := ssa.AuxIntToInt32(v.AuxInt)
  3573  		sym := ssa.AuxToSym(v.Aux)
  3574  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3575  			break
  3576  		}
  3577  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3578  		idx := v_0.Args[1]
  3579  		ptr := v_0.Args[0]
  3580  		val := v_1
  3581  		mem := v_2
  3582  		if !(off == 0 && sym == nil) {
  3583  			break
  3584  		}
  3585  		v.Reset(ssaop.OpLOONG64MOVDstoreidx)
  3586  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3587  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3588  		v0.AddArg(idx)
  3589  		v.AddArg4(ptr, v0, val, mem)
  3590  		return true
  3591  	}
  3592  	return false
  3593  }
  3594  func rewriteValue_OpLOONG64MOVDstoreidx(v *ssa.Value) bool {
  3595  	v_3 := v.Args[3]
  3596  	v_2 := v.Args[2]
  3597  	v_1 := v.Args[1]
  3598  	v_0 := v.Args[0]
  3599  	// match: (MOVDstoreidx ptr (MOVVconst [c]) val mem)
  3600  	// cond: ssa.Is32Bit(c)
  3601  	// result: (MOVDstore [int32(c)] ptr val mem)
  3602  	for {
  3603  		ptr := v_0
  3604  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3605  			break
  3606  		}
  3607  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3608  		val := v_2
  3609  		mem := v_3
  3610  		if !(ssa.Is32Bit(c)) {
  3611  			break
  3612  		}
  3613  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3614  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3615  		v.AddArg3(ptr, val, mem)
  3616  		return true
  3617  	}
  3618  	// match: (MOVDstoreidx (MOVVconst [c]) idx val mem)
  3619  	// cond: ssa.Is32Bit(c)
  3620  	// result: (MOVDstore [int32(c)] idx val mem)
  3621  	for {
  3622  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3623  			break
  3624  		}
  3625  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3626  		idx := v_1
  3627  		val := v_2
  3628  		mem := v_3
  3629  		if !(ssa.Is32Bit(c)) {
  3630  			break
  3631  		}
  3632  		v.Reset(ssaop.OpLOONG64MOVDstore)
  3633  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3634  		v.AddArg3(idx, val, mem)
  3635  		return true
  3636  	}
  3637  	return false
  3638  }
  3639  func rewriteValue_OpLOONG64MOVFload(v *ssa.Value) bool {
  3640  	v_1 := v.Args[1]
  3641  	v_0 := v.Args[0]
  3642  	b := v.Block
  3643  	config := b.Func.Config
  3644  	typ := &b.Func.Config.Types
  3645  	// match: (MOVFload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  3646  	// result: (MOVWgpfp val)
  3647  	for {
  3648  		off := ssa.AuxIntToInt32(v.AuxInt)
  3649  		sym := ssa.AuxToSym(v.Aux)
  3650  		ptr := v_0
  3651  		if v_1.Op != ssaop.OpLOONG64MOVWstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  3652  			break
  3653  		}
  3654  		val := v_1.Args[1]
  3655  		if ptr != v_1.Args[0] {
  3656  			break
  3657  		}
  3658  		v.Reset(ssaop.OpLOONG64MOVWgpfp)
  3659  		v.AddArg(val)
  3660  		return true
  3661  	}
  3662  	// match: (MOVFload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3663  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3664  	// result: (MOVFload [off1+int32(off2)] {sym} ptr mem)
  3665  	for {
  3666  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3667  		sym := ssa.AuxToSym(v.Aux)
  3668  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3669  			break
  3670  		}
  3671  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3672  		ptr := v_0.Args[0]
  3673  		mem := v_1
  3674  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3675  			break
  3676  		}
  3677  		v.Reset(ssaop.OpLOONG64MOVFload)
  3678  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3679  		v.Aux = ssa.SymToAux(sym)
  3680  		v.AddArg2(ptr, mem)
  3681  		return true
  3682  	}
  3683  	// match: (MOVFload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3684  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3685  	// result: (MOVFload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  3686  	for {
  3687  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3688  		sym1 := ssa.AuxToSym(v.Aux)
  3689  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3690  			break
  3691  		}
  3692  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3693  		sym2 := ssa.AuxToSym(v_0.Aux)
  3694  		ptr := v_0.Args[0]
  3695  		mem := v_1
  3696  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3697  			break
  3698  		}
  3699  		v.Reset(ssaop.OpLOONG64MOVFload)
  3700  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3701  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3702  		v.AddArg2(ptr, mem)
  3703  		return true
  3704  	}
  3705  	// match: (MOVFload [off] {sym} (ADDV ptr idx) mem)
  3706  	// cond: off == 0 && sym == nil
  3707  	// result: (MOVFloadidx ptr idx mem)
  3708  	for {
  3709  		off := ssa.AuxIntToInt32(v.AuxInt)
  3710  		sym := ssa.AuxToSym(v.Aux)
  3711  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3712  			break
  3713  		}
  3714  		idx := v_0.Args[1]
  3715  		ptr := v_0.Args[0]
  3716  		mem := v_1
  3717  		if !(off == 0 && sym == nil) {
  3718  			break
  3719  		}
  3720  		v.Reset(ssaop.OpLOONG64MOVFloadidx)
  3721  		v.AddArg3(ptr, idx, mem)
  3722  		return true
  3723  	}
  3724  	// match: (MOVFload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  3725  	// cond: off == 0 && sym == nil
  3726  	// result: (MOVFloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  3727  	for {
  3728  		off := ssa.AuxIntToInt32(v.AuxInt)
  3729  		sym := ssa.AuxToSym(v.Aux)
  3730  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3731  			break
  3732  		}
  3733  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3734  		idx := v_0.Args[1]
  3735  		ptr := v_0.Args[0]
  3736  		mem := v_1
  3737  		if !(off == 0 && sym == nil) {
  3738  			break
  3739  		}
  3740  		v.Reset(ssaop.OpLOONG64MOVFloadidx)
  3741  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3742  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3743  		v0.AddArg(idx)
  3744  		v.AddArg3(ptr, v0, mem)
  3745  		return true
  3746  	}
  3747  	return false
  3748  }
  3749  func rewriteValue_OpLOONG64MOVFloadidx(v *ssa.Value) bool {
  3750  	v_2 := v.Args[2]
  3751  	v_1 := v.Args[1]
  3752  	v_0 := v.Args[0]
  3753  	// match: (MOVFloadidx ptr (MOVVconst [c]) mem)
  3754  	// cond: ssa.Is32Bit(c)
  3755  	// result: (MOVFload [int32(c)] ptr mem)
  3756  	for {
  3757  		ptr := v_0
  3758  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3759  			break
  3760  		}
  3761  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3762  		mem := v_2
  3763  		if !(ssa.Is32Bit(c)) {
  3764  			break
  3765  		}
  3766  		v.Reset(ssaop.OpLOONG64MOVFload)
  3767  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3768  		v.AddArg2(ptr, mem)
  3769  		return true
  3770  	}
  3771  	// match: (MOVFloadidx (MOVVconst [c]) ptr mem)
  3772  	// cond: ssa.Is32Bit(c)
  3773  	// result: (MOVFload [int32(c)] ptr mem)
  3774  	for {
  3775  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3776  			break
  3777  		}
  3778  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3779  		ptr := v_1
  3780  		mem := v_2
  3781  		if !(ssa.Is32Bit(c)) {
  3782  			break
  3783  		}
  3784  		v.Reset(ssaop.OpLOONG64MOVFload)
  3785  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3786  		v.AddArg2(ptr, mem)
  3787  		return true
  3788  	}
  3789  	return false
  3790  }
  3791  func rewriteValue_OpLOONG64MOVFstore(v *ssa.Value) bool {
  3792  	v_2 := v.Args[2]
  3793  	v_1 := v.Args[1]
  3794  	v_0 := v.Args[0]
  3795  	b := v.Block
  3796  	config := b.Func.Config
  3797  	typ := &b.Func.Config.Types
  3798  	// match: (MOVFstore [off] {sym} ptr (MOVWgpfp val) mem)
  3799  	// result: (MOVWstore [off] {sym} ptr val mem)
  3800  	for {
  3801  		off := ssa.AuxIntToInt32(v.AuxInt)
  3802  		sym := ssa.AuxToSym(v.Aux)
  3803  		ptr := v_0
  3804  		if v_1.Op != ssaop.OpLOONG64MOVWgpfp {
  3805  			break
  3806  		}
  3807  		val := v_1.Args[0]
  3808  		mem := v_2
  3809  		v.Reset(ssaop.OpLOONG64MOVWstore)
  3810  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3811  		v.Aux = ssa.SymToAux(sym)
  3812  		v.AddArg3(ptr, val, mem)
  3813  		return true
  3814  	}
  3815  	// match: (MOVFstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  3816  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3817  	// result: (MOVFstore [off1+int32(off2)] {sym} ptr val mem)
  3818  	for {
  3819  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3820  		sym := ssa.AuxToSym(v.Aux)
  3821  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3822  			break
  3823  		}
  3824  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3825  		ptr := v_0.Args[0]
  3826  		val := v_1
  3827  		mem := v_2
  3828  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3829  			break
  3830  		}
  3831  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3832  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3833  		v.Aux = ssa.SymToAux(sym)
  3834  		v.AddArg3(ptr, val, mem)
  3835  		return true
  3836  	}
  3837  	// match: (MOVFstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  3838  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3839  	// result: (MOVFstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  3840  	for {
  3841  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3842  		sym1 := ssa.AuxToSym(v.Aux)
  3843  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  3844  			break
  3845  		}
  3846  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3847  		sym2 := ssa.AuxToSym(v_0.Aux)
  3848  		ptr := v_0.Args[0]
  3849  		val := v_1
  3850  		mem := v_2
  3851  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3852  			break
  3853  		}
  3854  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3855  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3856  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3857  		v.AddArg3(ptr, val, mem)
  3858  		return true
  3859  	}
  3860  	// match: (MOVFstore [off] {sym} (ADDV ptr idx) val mem)
  3861  	// cond: off == 0 && sym == nil
  3862  	// result: (MOVFstoreidx ptr idx val mem)
  3863  	for {
  3864  		off := ssa.AuxIntToInt32(v.AuxInt)
  3865  		sym := ssa.AuxToSym(v.Aux)
  3866  		if v_0.Op != ssaop.OpLOONG64ADDV {
  3867  			break
  3868  		}
  3869  		idx := v_0.Args[1]
  3870  		ptr := v_0.Args[0]
  3871  		val := v_1
  3872  		mem := v_2
  3873  		if !(off == 0 && sym == nil) {
  3874  			break
  3875  		}
  3876  		v.Reset(ssaop.OpLOONG64MOVFstoreidx)
  3877  		v.AddArg4(ptr, idx, val, mem)
  3878  		return true
  3879  	}
  3880  	// match: (MOVFstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  3881  	// cond: off == 0 && sym == nil
  3882  	// result: (MOVFstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  3883  	for {
  3884  		off := ssa.AuxIntToInt32(v.AuxInt)
  3885  		sym := ssa.AuxToSym(v.Aux)
  3886  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  3887  			break
  3888  		}
  3889  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  3890  		idx := v_0.Args[1]
  3891  		ptr := v_0.Args[0]
  3892  		val := v_1
  3893  		mem := v_2
  3894  		if !(off == 0 && sym == nil) {
  3895  			break
  3896  		}
  3897  		v.Reset(ssaop.OpLOONG64MOVFstoreidx)
  3898  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  3899  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  3900  		v0.AddArg(idx)
  3901  		v.AddArg4(ptr, v0, val, mem)
  3902  		return true
  3903  	}
  3904  	return false
  3905  }
  3906  func rewriteValue_OpLOONG64MOVFstoreidx(v *ssa.Value) bool {
  3907  	v_3 := v.Args[3]
  3908  	v_2 := v.Args[2]
  3909  	v_1 := v.Args[1]
  3910  	v_0 := v.Args[0]
  3911  	// match: (MOVFstoreidx ptr (MOVVconst [c]) val mem)
  3912  	// cond: ssa.Is32Bit(c)
  3913  	// result: (MOVFstore [int32(c)] ptr val mem)
  3914  	for {
  3915  		ptr := v_0
  3916  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  3917  			break
  3918  		}
  3919  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3920  		val := v_2
  3921  		mem := v_3
  3922  		if !(ssa.Is32Bit(c)) {
  3923  			break
  3924  		}
  3925  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3926  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3927  		v.AddArg3(ptr, val, mem)
  3928  		return true
  3929  	}
  3930  	// match: (MOVFstoreidx (MOVVconst [c]) idx val mem)
  3931  	// cond: ssa.Is32Bit(c)
  3932  	// result: (MOVFstore [int32(c)] idx val mem)
  3933  	for {
  3934  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  3935  			break
  3936  		}
  3937  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  3938  		idx := v_1
  3939  		val := v_2
  3940  		mem := v_3
  3941  		if !(ssa.Is32Bit(c)) {
  3942  			break
  3943  		}
  3944  		v.Reset(ssaop.OpLOONG64MOVFstore)
  3945  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  3946  		v.AddArg3(idx, val, mem)
  3947  		return true
  3948  	}
  3949  	return false
  3950  }
  3951  func rewriteValue_OpLOONG64MOVHUload(v *ssa.Value) bool {
  3952  	v_1 := v.Args[1]
  3953  	v_0 := v.Args[0]
  3954  	b := v.Block
  3955  	config := b.Func.Config
  3956  	typ := &b.Func.Config.Types
  3957  	// match: (MOVHUload [off] {sym} ptr (MOVHstore [off] {sym} ptr x _))
  3958  	// result: (MOVHUreg x)
  3959  	for {
  3960  		off := ssa.AuxIntToInt32(v.AuxInt)
  3961  		sym := ssa.AuxToSym(v.Aux)
  3962  		ptr := v_0
  3963  		if v_1.Op != ssaop.OpLOONG64MOVHstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  3964  			break
  3965  		}
  3966  		x := v_1.Args[1]
  3967  		if ptr != v_1.Args[0] {
  3968  			break
  3969  		}
  3970  		v.Reset(ssaop.OpLOONG64MOVHUreg)
  3971  		v.AddArg(x)
  3972  		return true
  3973  	}
  3974  	// match: (MOVHUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  3975  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3976  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
  3977  	for {
  3978  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3979  		sym := ssa.AuxToSym(v.Aux)
  3980  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  3981  			break
  3982  		}
  3983  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  3984  		ptr := v_0.Args[0]
  3985  		mem := v_1
  3986  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  3987  			break
  3988  		}
  3989  		v.Reset(ssaop.OpLOONG64MOVHUload)
  3990  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  3991  		v.Aux = ssa.SymToAux(sym)
  3992  		v.AddArg2(ptr, mem)
  3993  		return true
  3994  	}
  3995  	// match: (MOVHUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  3996  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  3997  	// result: (MOVHUload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  3998  	for {
  3999  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4000  		sym1 := ssa.AuxToSym(v.Aux)
  4001  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4002  			break
  4003  		}
  4004  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4005  		sym2 := ssa.AuxToSym(v_0.Aux)
  4006  		ptr := v_0.Args[0]
  4007  		mem := v_1
  4008  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4009  			break
  4010  		}
  4011  		v.Reset(ssaop.OpLOONG64MOVHUload)
  4012  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4013  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4014  		v.AddArg2(ptr, mem)
  4015  		return true
  4016  	}
  4017  	// match: (MOVHUload [off] {sym} (ADDV ptr idx) mem)
  4018  	// cond: off == 0 && sym == nil
  4019  	// result: (MOVHUloadidx ptr idx mem)
  4020  	for {
  4021  		off := ssa.AuxIntToInt32(v.AuxInt)
  4022  		sym := ssa.AuxToSym(v.Aux)
  4023  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4024  			break
  4025  		}
  4026  		idx := v_0.Args[1]
  4027  		ptr := v_0.Args[0]
  4028  		mem := v_1
  4029  		if !(off == 0 && sym == nil) {
  4030  			break
  4031  		}
  4032  		v.Reset(ssaop.OpLOONG64MOVHUloadidx)
  4033  		v.AddArg3(ptr, idx, mem)
  4034  		return true
  4035  	}
  4036  	// match: (MOVHUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4037  	// cond: off == 0 && sym == nil
  4038  	// result: (MOVHUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4039  	for {
  4040  		off := ssa.AuxIntToInt32(v.AuxInt)
  4041  		sym := ssa.AuxToSym(v.Aux)
  4042  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4043  			break
  4044  		}
  4045  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4046  		idx := v_0.Args[1]
  4047  		ptr := v_0.Args[0]
  4048  		mem := v_1
  4049  		if !(off == 0 && sym == nil) {
  4050  			break
  4051  		}
  4052  		v.Reset(ssaop.OpLOONG64MOVHUloadidx)
  4053  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4054  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4055  		v0.AddArg(idx)
  4056  		v.AddArg3(ptr, v0, mem)
  4057  		return true
  4058  	}
  4059  	// match: (MOVHUload [off] {sym} (SB) _)
  4060  	// cond: ssa.SymIsRO(sym)
  4061  	// result: (MOVVconst [int64(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder))])
  4062  	for {
  4063  		off := ssa.AuxIntToInt32(v.AuxInt)
  4064  		sym := ssa.AuxToSym(v.Aux)
  4065  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  4066  			break
  4067  		}
  4068  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4069  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder)))
  4070  		return true
  4071  	}
  4072  	return false
  4073  }
  4074  func rewriteValue_OpLOONG64MOVHUloadidx(v *ssa.Value) bool {
  4075  	v_2 := v.Args[2]
  4076  	v_1 := v.Args[1]
  4077  	v_0 := v.Args[0]
  4078  	// match: (MOVHUloadidx ptr (MOVVconst [c]) mem)
  4079  	// cond: ssa.Is32Bit(c)
  4080  	// result: (MOVHUload [int32(c)] ptr mem)
  4081  	for {
  4082  		ptr := v_0
  4083  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4084  			break
  4085  		}
  4086  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4087  		mem := v_2
  4088  		if !(ssa.Is32Bit(c)) {
  4089  			break
  4090  		}
  4091  		v.Reset(ssaop.OpLOONG64MOVHUload)
  4092  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4093  		v.AddArg2(ptr, mem)
  4094  		return true
  4095  	}
  4096  	// match: (MOVHUloadidx (MOVVconst [c]) ptr mem)
  4097  	// cond: ssa.Is32Bit(c)
  4098  	// result: (MOVHUload [int32(c)] ptr mem)
  4099  	for {
  4100  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4101  			break
  4102  		}
  4103  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4104  		ptr := v_1
  4105  		mem := v_2
  4106  		if !(ssa.Is32Bit(c)) {
  4107  			break
  4108  		}
  4109  		v.Reset(ssaop.OpLOONG64MOVHUload)
  4110  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4111  		v.AddArg2(ptr, mem)
  4112  		return true
  4113  	}
  4114  	return false
  4115  }
  4116  func rewriteValue_OpLOONG64MOVHUreg(v *ssa.Value) bool {
  4117  	v_0 := v.Args[0]
  4118  	// match: (MOVHUreg (SRLVconst [rc] x))
  4119  	// cond: rc < 16
  4120  	// result: (BSTRPICKV [rc + (15+rc)<<6] x)
  4121  	for {
  4122  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  4123  			break
  4124  		}
  4125  		rc := ssa.AuxIntToInt64(v_0.AuxInt)
  4126  		x := v_0.Args[0]
  4127  		if !(rc < 16) {
  4128  			break
  4129  		}
  4130  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  4131  		v.AuxInt = ssa.Int64ToAuxInt(rc + (15+rc)<<6)
  4132  		v.AddArg(x)
  4133  		return true
  4134  	}
  4135  	// match: (MOVHUreg (SLLVconst [lc] x))
  4136  	// cond: lc >= 16
  4137  	// result: (MOVVconst [0])
  4138  	for {
  4139  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  4140  			break
  4141  		}
  4142  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  4143  		if !(lc >= 16) {
  4144  			break
  4145  		}
  4146  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4147  		v.AuxInt = ssa.Int64ToAuxInt(0)
  4148  		return true
  4149  	}
  4150  	// match: (MOVHUreg (MOVVconst [c]))
  4151  	// result: (MOVVconst [int64(uint16(c))])
  4152  	for {
  4153  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4154  			break
  4155  		}
  4156  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4157  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4158  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint16(c)))
  4159  		return true
  4160  	}
  4161  	// match: (MOVHUreg x:(SRLconst [c] y))
  4162  	// cond: c >= 16
  4163  	// result: x
  4164  	for {
  4165  		x := v_0
  4166  		if x.Op != ssaop.OpLOONG64SRLconst {
  4167  			break
  4168  		}
  4169  		c := ssa.AuxIntToInt64(x.AuxInt)
  4170  		if !(c >= 16) {
  4171  			break
  4172  		}
  4173  		v.CopyOf(x)
  4174  		return true
  4175  	}
  4176  	// match: (MOVHUreg x:(ANDconst [c] y))
  4177  	// cond: c >= 0 && int64(uint16(c)) == c
  4178  	// result: x
  4179  	for {
  4180  		x := v_0
  4181  		if x.Op != ssaop.OpLOONG64ANDconst {
  4182  			break
  4183  		}
  4184  		c := ssa.AuxIntToInt64(x.AuxInt)
  4185  		if !(c >= 0 && int64(uint16(c)) == c) {
  4186  			break
  4187  		}
  4188  		v.CopyOf(x)
  4189  		return true
  4190  	}
  4191  	// match: (MOVHUreg x)
  4192  	// cond: v.Type.Size() <= 2
  4193  	// result: x
  4194  	for {
  4195  		x := v_0
  4196  		if !(v.Type.Size() <= 2) {
  4197  			break
  4198  		}
  4199  		v.CopyOf(x)
  4200  		return true
  4201  	}
  4202  	return false
  4203  }
  4204  func rewriteValue_OpLOONG64MOVHload(v *ssa.Value) bool {
  4205  	v_1 := v.Args[1]
  4206  	v_0 := v.Args[0]
  4207  	b := v.Block
  4208  	config := b.Func.Config
  4209  	typ := &b.Func.Config.Types
  4210  	// match: (MOVHload [off] {sym} ptr (MOVHstore [off] {sym} ptr x _))
  4211  	// result: (MOVHreg x)
  4212  	for {
  4213  		off := ssa.AuxIntToInt32(v.AuxInt)
  4214  		sym := ssa.AuxToSym(v.Aux)
  4215  		ptr := v_0
  4216  		if v_1.Op != ssaop.OpLOONG64MOVHstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4217  			break
  4218  		}
  4219  		x := v_1.Args[1]
  4220  		if ptr != v_1.Args[0] {
  4221  			break
  4222  		}
  4223  		v.Reset(ssaop.OpLOONG64MOVHreg)
  4224  		v.AddArg(x)
  4225  		return true
  4226  	}
  4227  	// match: (MOVHload [off1] {sym} (ADDVconst [off2] ptr) mem)
  4228  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4229  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
  4230  	for {
  4231  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4232  		sym := ssa.AuxToSym(v.Aux)
  4233  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4234  			break
  4235  		}
  4236  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4237  		ptr := v_0.Args[0]
  4238  		mem := v_1
  4239  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4240  			break
  4241  		}
  4242  		v.Reset(ssaop.OpLOONG64MOVHload)
  4243  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4244  		v.Aux = ssa.SymToAux(sym)
  4245  		v.AddArg2(ptr, mem)
  4246  		return true
  4247  	}
  4248  	// match: (MOVHload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  4249  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4250  	// result: (MOVHload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  4251  	for {
  4252  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4253  		sym1 := ssa.AuxToSym(v.Aux)
  4254  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4255  			break
  4256  		}
  4257  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4258  		sym2 := ssa.AuxToSym(v_0.Aux)
  4259  		ptr := v_0.Args[0]
  4260  		mem := v_1
  4261  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4262  			break
  4263  		}
  4264  		v.Reset(ssaop.OpLOONG64MOVHload)
  4265  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4266  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4267  		v.AddArg2(ptr, mem)
  4268  		return true
  4269  	}
  4270  	// match: (MOVHload [off] {sym} (ADDV ptr idx) mem)
  4271  	// cond: off == 0 && sym == nil
  4272  	// result: (MOVHloadidx ptr idx mem)
  4273  	for {
  4274  		off := ssa.AuxIntToInt32(v.AuxInt)
  4275  		sym := ssa.AuxToSym(v.Aux)
  4276  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4277  			break
  4278  		}
  4279  		idx := v_0.Args[1]
  4280  		ptr := v_0.Args[0]
  4281  		mem := v_1
  4282  		if !(off == 0 && sym == nil) {
  4283  			break
  4284  		}
  4285  		v.Reset(ssaop.OpLOONG64MOVHloadidx)
  4286  		v.AddArg3(ptr, idx, mem)
  4287  		return true
  4288  	}
  4289  	// match: (MOVHload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4290  	// cond: off == 0 && sym == nil
  4291  	// result: (MOVHloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4292  	for {
  4293  		off := ssa.AuxIntToInt32(v.AuxInt)
  4294  		sym := ssa.AuxToSym(v.Aux)
  4295  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4296  			break
  4297  		}
  4298  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4299  		idx := v_0.Args[1]
  4300  		ptr := v_0.Args[0]
  4301  		mem := v_1
  4302  		if !(off == 0 && sym == nil) {
  4303  			break
  4304  		}
  4305  		v.Reset(ssaop.OpLOONG64MOVHloadidx)
  4306  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4307  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4308  		v0.AddArg(idx)
  4309  		v.AddArg3(ptr, v0, mem)
  4310  		return true
  4311  	}
  4312  	// match: (MOVHload [off] {sym} (SB) _)
  4313  	// cond: ssa.SymIsRO(sym)
  4314  	// result: (MOVVconst [int64(int16(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder)))])
  4315  	for {
  4316  		off := ssa.AuxIntToInt32(v.AuxInt)
  4317  		sym := ssa.AuxToSym(v.Aux)
  4318  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  4319  			break
  4320  		}
  4321  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4322  		v.AuxInt = ssa.Int64ToAuxInt(int64(int16(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder))))
  4323  		return true
  4324  	}
  4325  	return false
  4326  }
  4327  func rewriteValue_OpLOONG64MOVHloadidx(v *ssa.Value) bool {
  4328  	v_2 := v.Args[2]
  4329  	v_1 := v.Args[1]
  4330  	v_0 := v.Args[0]
  4331  	// match: (MOVHloadidx ptr (MOVVconst [c]) mem)
  4332  	// cond: ssa.Is32Bit(c)
  4333  	// result: (MOVHload [int32(c)] ptr mem)
  4334  	for {
  4335  		ptr := v_0
  4336  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4337  			break
  4338  		}
  4339  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4340  		mem := v_2
  4341  		if !(ssa.Is32Bit(c)) {
  4342  			break
  4343  		}
  4344  		v.Reset(ssaop.OpLOONG64MOVHload)
  4345  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4346  		v.AddArg2(ptr, mem)
  4347  		return true
  4348  	}
  4349  	// match: (MOVHloadidx (MOVVconst [c]) ptr mem)
  4350  	// cond: ssa.Is32Bit(c)
  4351  	// result: (MOVHload [int32(c)] ptr mem)
  4352  	for {
  4353  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4354  			break
  4355  		}
  4356  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4357  		ptr := v_1
  4358  		mem := v_2
  4359  		if !(ssa.Is32Bit(c)) {
  4360  			break
  4361  		}
  4362  		v.Reset(ssaop.OpLOONG64MOVHload)
  4363  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4364  		v.AddArg2(ptr, mem)
  4365  		return true
  4366  	}
  4367  	return false
  4368  }
  4369  func rewriteValue_OpLOONG64MOVHreg(v *ssa.Value) bool {
  4370  	v_0 := v.Args[0]
  4371  	// match: (MOVHreg (MOVVconst [c]))
  4372  	// result: (MOVVconst [int64(int16(c))])
  4373  	for {
  4374  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4375  			break
  4376  		}
  4377  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4378  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4379  		v.AuxInt = ssa.Int64ToAuxInt(int64(int16(c)))
  4380  		return true
  4381  	}
  4382  	// match: (MOVHreg x:(ANDconst [c] y))
  4383  	// cond: c >= 0 && int64(int16(c)) == c
  4384  	// result: x
  4385  	for {
  4386  		x := v_0
  4387  		if x.Op != ssaop.OpLOONG64ANDconst {
  4388  			break
  4389  		}
  4390  		c := ssa.AuxIntToInt64(x.AuxInt)
  4391  		if !(c >= 0 && int64(int16(c)) == c) {
  4392  			break
  4393  		}
  4394  		v.CopyOf(x)
  4395  		return true
  4396  	}
  4397  	// match: (MOVHreg x)
  4398  	// cond: v.Type.Size() <= 2
  4399  	// result: x
  4400  	for {
  4401  		x := v_0
  4402  		if !(v.Type.Size() <= 2) {
  4403  			break
  4404  		}
  4405  		v.CopyOf(x)
  4406  		return true
  4407  	}
  4408  	return false
  4409  }
  4410  func rewriteValue_OpLOONG64MOVHstore(v *ssa.Value) bool {
  4411  	v_2 := v.Args[2]
  4412  	v_1 := v.Args[1]
  4413  	v_0 := v.Args[0]
  4414  	b := v.Block
  4415  	config := b.Func.Config
  4416  	typ := &b.Func.Config.Types
  4417  	// match: (MOVHstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  4418  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4419  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
  4420  	for {
  4421  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4422  		sym := ssa.AuxToSym(v.Aux)
  4423  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4424  			break
  4425  		}
  4426  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4427  		ptr := v_0.Args[0]
  4428  		val := v_1
  4429  		mem := v_2
  4430  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4431  			break
  4432  		}
  4433  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4434  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4435  		v.Aux = ssa.SymToAux(sym)
  4436  		v.AddArg3(ptr, val, mem)
  4437  		return true
  4438  	}
  4439  	// match: (MOVHstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  4440  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4441  	// result: (MOVHstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  4442  	for {
  4443  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4444  		sym1 := ssa.AuxToSym(v.Aux)
  4445  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4446  			break
  4447  		}
  4448  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4449  		sym2 := ssa.AuxToSym(v_0.Aux)
  4450  		ptr := v_0.Args[0]
  4451  		val := v_1
  4452  		mem := v_2
  4453  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4454  			break
  4455  		}
  4456  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4457  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4458  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4459  		v.AddArg3(ptr, val, mem)
  4460  		return true
  4461  	}
  4462  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  4463  	// result: (MOVHstore [off] {sym} ptr x mem)
  4464  	for {
  4465  		off := ssa.AuxIntToInt32(v.AuxInt)
  4466  		sym := ssa.AuxToSym(v.Aux)
  4467  		ptr := v_0
  4468  		if v_1.Op != ssaop.OpLOONG64MOVHreg {
  4469  			break
  4470  		}
  4471  		x := v_1.Args[0]
  4472  		mem := v_2
  4473  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4474  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4475  		v.Aux = ssa.SymToAux(sym)
  4476  		v.AddArg3(ptr, x, mem)
  4477  		return true
  4478  	}
  4479  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
  4480  	// result: (MOVHstore [off] {sym} ptr x mem)
  4481  	for {
  4482  		off := ssa.AuxIntToInt32(v.AuxInt)
  4483  		sym := ssa.AuxToSym(v.Aux)
  4484  		ptr := v_0
  4485  		if v_1.Op != ssaop.OpLOONG64MOVHUreg {
  4486  			break
  4487  		}
  4488  		x := v_1.Args[0]
  4489  		mem := v_2
  4490  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4491  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4492  		v.Aux = ssa.SymToAux(sym)
  4493  		v.AddArg3(ptr, x, mem)
  4494  		return true
  4495  	}
  4496  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
  4497  	// result: (MOVHstore [off] {sym} ptr x mem)
  4498  	for {
  4499  		off := ssa.AuxIntToInt32(v.AuxInt)
  4500  		sym := ssa.AuxToSym(v.Aux)
  4501  		ptr := v_0
  4502  		if v_1.Op != ssaop.OpLOONG64MOVWreg {
  4503  			break
  4504  		}
  4505  		x := v_1.Args[0]
  4506  		mem := v_2
  4507  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4508  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4509  		v.Aux = ssa.SymToAux(sym)
  4510  		v.AddArg3(ptr, x, mem)
  4511  		return true
  4512  	}
  4513  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
  4514  	// result: (MOVHstore [off] {sym} ptr x mem)
  4515  	for {
  4516  		off := ssa.AuxIntToInt32(v.AuxInt)
  4517  		sym := ssa.AuxToSym(v.Aux)
  4518  		ptr := v_0
  4519  		if v_1.Op != ssaop.OpLOONG64MOVWUreg {
  4520  			break
  4521  		}
  4522  		x := v_1.Args[0]
  4523  		mem := v_2
  4524  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4525  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4526  		v.Aux = ssa.SymToAux(sym)
  4527  		v.AddArg3(ptr, x, mem)
  4528  		return true
  4529  	}
  4530  	// match: (MOVHstore [off] {sym} (ADDV ptr idx) val mem)
  4531  	// cond: off == 0 && sym == nil
  4532  	// result: (MOVHstoreidx ptr idx val mem)
  4533  	for {
  4534  		off := ssa.AuxIntToInt32(v.AuxInt)
  4535  		sym := ssa.AuxToSym(v.Aux)
  4536  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4537  			break
  4538  		}
  4539  		idx := v_0.Args[1]
  4540  		ptr := v_0.Args[0]
  4541  		val := v_1
  4542  		mem := v_2
  4543  		if !(off == 0 && sym == nil) {
  4544  			break
  4545  		}
  4546  		v.Reset(ssaop.OpLOONG64MOVHstoreidx)
  4547  		v.AddArg4(ptr, idx, val, mem)
  4548  		return true
  4549  	}
  4550  	// match: (MOVHstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  4551  	// cond: off == 0 && sym == nil
  4552  	// result: (MOVHstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  4553  	for {
  4554  		off := ssa.AuxIntToInt32(v.AuxInt)
  4555  		sym := ssa.AuxToSym(v.Aux)
  4556  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4557  			break
  4558  		}
  4559  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4560  		idx := v_0.Args[1]
  4561  		ptr := v_0.Args[0]
  4562  		val := v_1
  4563  		mem := v_2
  4564  		if !(off == 0 && sym == nil) {
  4565  			break
  4566  		}
  4567  		v.Reset(ssaop.OpLOONG64MOVHstoreidx)
  4568  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4569  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4570  		v0.AddArg(idx)
  4571  		v.AddArg4(ptr, v0, val, mem)
  4572  		return true
  4573  	}
  4574  	return false
  4575  }
  4576  func rewriteValue_OpLOONG64MOVHstoreidx(v *ssa.Value) bool {
  4577  	v_3 := v.Args[3]
  4578  	v_2 := v.Args[2]
  4579  	v_1 := v.Args[1]
  4580  	v_0 := v.Args[0]
  4581  	// match: (MOVHstoreidx ptr (MOVVconst [c]) val mem)
  4582  	// cond: ssa.Is32Bit(c)
  4583  	// result: (MOVHstore [int32(c)] ptr val mem)
  4584  	for {
  4585  		ptr := v_0
  4586  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4587  			break
  4588  		}
  4589  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4590  		val := v_2
  4591  		mem := v_3
  4592  		if !(ssa.Is32Bit(c)) {
  4593  			break
  4594  		}
  4595  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4596  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4597  		v.AddArg3(ptr, val, mem)
  4598  		return true
  4599  	}
  4600  	// match: (MOVHstoreidx (MOVVconst [c]) idx val mem)
  4601  	// cond: ssa.Is32Bit(c)
  4602  	// result: (MOVHstore [int32(c)] idx val mem)
  4603  	for {
  4604  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4605  			break
  4606  		}
  4607  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4608  		idx := v_1
  4609  		val := v_2
  4610  		mem := v_3
  4611  		if !(ssa.Is32Bit(c)) {
  4612  			break
  4613  		}
  4614  		v.Reset(ssaop.OpLOONG64MOVHstore)
  4615  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4616  		v.AddArg3(idx, val, mem)
  4617  		return true
  4618  	}
  4619  	return false
  4620  }
  4621  func rewriteValue_OpLOONG64MOVVload(v *ssa.Value) bool {
  4622  	v_1 := v.Args[1]
  4623  	v_0 := v.Args[0]
  4624  	b := v.Block
  4625  	config := b.Func.Config
  4626  	typ := &b.Func.Config.Types
  4627  	// match: (MOVVload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  4628  	// result: (MOVVfpgp val)
  4629  	for {
  4630  		off := ssa.AuxIntToInt32(v.AuxInt)
  4631  		sym := ssa.AuxToSym(v.Aux)
  4632  		ptr := v_0
  4633  		if v_1.Op != ssaop.OpLOONG64MOVDstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4634  			break
  4635  		}
  4636  		val := v_1.Args[1]
  4637  		if ptr != v_1.Args[0] {
  4638  			break
  4639  		}
  4640  		v.Reset(ssaop.OpLOONG64MOVVfpgp)
  4641  		v.AddArg(val)
  4642  		return true
  4643  	}
  4644  	// match: (MOVVload [off] {sym} ptr (MOVVstore [off] {sym} ptr x _))
  4645  	// result: (MOVVreg x)
  4646  	for {
  4647  		off := ssa.AuxIntToInt32(v.AuxInt)
  4648  		sym := ssa.AuxToSym(v.Aux)
  4649  		ptr := v_0
  4650  		if v_1.Op != ssaop.OpLOONG64MOVVstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4651  			break
  4652  		}
  4653  		x := v_1.Args[1]
  4654  		if ptr != v_1.Args[0] {
  4655  			break
  4656  		}
  4657  		v.Reset(ssaop.OpLOONG64MOVVreg)
  4658  		v.AddArg(x)
  4659  		return true
  4660  	}
  4661  	// match: (MOVVload [off1] {sym} (ADDVconst [off2] ptr) mem)
  4662  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4663  	// result: (MOVVload [off1+int32(off2)] {sym} ptr mem)
  4664  	for {
  4665  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4666  		sym := ssa.AuxToSym(v.Aux)
  4667  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4668  			break
  4669  		}
  4670  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4671  		ptr := v_0.Args[0]
  4672  		mem := v_1
  4673  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4674  			break
  4675  		}
  4676  		v.Reset(ssaop.OpLOONG64MOVVload)
  4677  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4678  		v.Aux = ssa.SymToAux(sym)
  4679  		v.AddArg2(ptr, mem)
  4680  		return true
  4681  	}
  4682  	// match: (MOVVload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  4683  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4684  	// result: (MOVVload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  4685  	for {
  4686  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4687  		sym1 := ssa.AuxToSym(v.Aux)
  4688  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4689  			break
  4690  		}
  4691  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4692  		sym2 := ssa.AuxToSym(v_0.Aux)
  4693  		ptr := v_0.Args[0]
  4694  		mem := v_1
  4695  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4696  			break
  4697  		}
  4698  		v.Reset(ssaop.OpLOONG64MOVVload)
  4699  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4700  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4701  		v.AddArg2(ptr, mem)
  4702  		return true
  4703  	}
  4704  	// match: (MOVVload [off] {sym} (ADDV ptr idx) mem)
  4705  	// cond: off == 0 && sym == nil
  4706  	// result: (MOVVloadidx ptr idx mem)
  4707  	for {
  4708  		off := ssa.AuxIntToInt32(v.AuxInt)
  4709  		sym := ssa.AuxToSym(v.Aux)
  4710  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4711  			break
  4712  		}
  4713  		idx := v_0.Args[1]
  4714  		ptr := v_0.Args[0]
  4715  		mem := v_1
  4716  		if !(off == 0 && sym == nil) {
  4717  			break
  4718  		}
  4719  		v.Reset(ssaop.OpLOONG64MOVVloadidx)
  4720  		v.AddArg3(ptr, idx, mem)
  4721  		return true
  4722  	}
  4723  	// match: (MOVVload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  4724  	// cond: off == 0 && sym == nil
  4725  	// result: (MOVVloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  4726  	for {
  4727  		off := ssa.AuxIntToInt32(v.AuxInt)
  4728  		sym := ssa.AuxToSym(v.Aux)
  4729  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4730  			break
  4731  		}
  4732  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4733  		idx := v_0.Args[1]
  4734  		ptr := v_0.Args[0]
  4735  		mem := v_1
  4736  		if !(off == 0 && sym == nil) {
  4737  			break
  4738  		}
  4739  		v.Reset(ssaop.OpLOONG64MOVVloadidx)
  4740  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4741  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4742  		v0.AddArg(idx)
  4743  		v.AddArg3(ptr, v0, mem)
  4744  		return true
  4745  	}
  4746  	// match: (MOVVload [off] {sym} (SB) _)
  4747  	// cond: ssa.SymIsRO(sym)
  4748  	// result: (MOVVconst [int64(ssa.Read64(sym, int64(off), config.Ctxt.Arch.ByteOrder))])
  4749  	for {
  4750  		off := ssa.AuxIntToInt32(v.AuxInt)
  4751  		sym := ssa.AuxToSym(v.Aux)
  4752  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  4753  			break
  4754  		}
  4755  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4756  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read64(sym, int64(off), config.Ctxt.Arch.ByteOrder)))
  4757  		return true
  4758  	}
  4759  	return false
  4760  }
  4761  func rewriteValue_OpLOONG64MOVVloadidx(v *ssa.Value) bool {
  4762  	v_2 := v.Args[2]
  4763  	v_1 := v.Args[1]
  4764  	v_0 := v.Args[0]
  4765  	// match: (MOVVloadidx ptr (MOVVconst [c]) mem)
  4766  	// cond: ssa.Is32Bit(c)
  4767  	// result: (MOVVload [int32(c)] ptr mem)
  4768  	for {
  4769  		ptr := v_0
  4770  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4771  			break
  4772  		}
  4773  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4774  		mem := v_2
  4775  		if !(ssa.Is32Bit(c)) {
  4776  			break
  4777  		}
  4778  		v.Reset(ssaop.OpLOONG64MOVVload)
  4779  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4780  		v.AddArg2(ptr, mem)
  4781  		return true
  4782  	}
  4783  	// match: (MOVVloadidx (MOVVconst [c]) ptr mem)
  4784  	// cond: ssa.Is32Bit(c)
  4785  	// result: (MOVVload [int32(c)] ptr mem)
  4786  	for {
  4787  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4788  			break
  4789  		}
  4790  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4791  		ptr := v_1
  4792  		mem := v_2
  4793  		if !(ssa.Is32Bit(c)) {
  4794  			break
  4795  		}
  4796  		v.Reset(ssaop.OpLOONG64MOVVload)
  4797  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4798  		v.AddArg2(ptr, mem)
  4799  		return true
  4800  	}
  4801  	return false
  4802  }
  4803  func rewriteValue_OpLOONG64MOVVreg(v *ssa.Value) bool {
  4804  	v_0 := v.Args[0]
  4805  	// match: (MOVVreg (MOVVconst [c]))
  4806  	// result: (MOVVconst [c])
  4807  	for {
  4808  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4809  			break
  4810  		}
  4811  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4812  		v.Reset(ssaop.OpLOONG64MOVVconst)
  4813  		v.AuxInt = ssa.Int64ToAuxInt(c)
  4814  		return true
  4815  	}
  4816  	return false
  4817  }
  4818  func rewriteValue_OpLOONG64MOVVstore(v *ssa.Value) bool {
  4819  	v_2 := v.Args[2]
  4820  	v_1 := v.Args[1]
  4821  	v_0 := v.Args[0]
  4822  	b := v.Block
  4823  	config := b.Func.Config
  4824  	typ := &b.Func.Config.Types
  4825  	// match: (MOVVstore [off] {sym} ptr (MOVVfpgp val) mem)
  4826  	// result: (MOVDstore [off] {sym} ptr val mem)
  4827  	for {
  4828  		off := ssa.AuxIntToInt32(v.AuxInt)
  4829  		sym := ssa.AuxToSym(v.Aux)
  4830  		ptr := v_0
  4831  		if v_1.Op != ssaop.OpLOONG64MOVVfpgp {
  4832  			break
  4833  		}
  4834  		val := v_1.Args[0]
  4835  		mem := v_2
  4836  		v.Reset(ssaop.OpLOONG64MOVDstore)
  4837  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4838  		v.Aux = ssa.SymToAux(sym)
  4839  		v.AddArg3(ptr, val, mem)
  4840  		return true
  4841  	}
  4842  	// match: (MOVVstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  4843  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4844  	// result: (MOVVstore [off1+int32(off2)] {sym} ptr val mem)
  4845  	for {
  4846  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4847  		sym := ssa.AuxToSym(v.Aux)
  4848  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  4849  			break
  4850  		}
  4851  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  4852  		ptr := v_0.Args[0]
  4853  		val := v_1
  4854  		mem := v_2
  4855  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4856  			break
  4857  		}
  4858  		v.Reset(ssaop.OpLOONG64MOVVstore)
  4859  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4860  		v.Aux = ssa.SymToAux(sym)
  4861  		v.AddArg3(ptr, val, mem)
  4862  		return true
  4863  	}
  4864  	// match: (MOVVstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  4865  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  4866  	// result: (MOVVstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  4867  	for {
  4868  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4869  		sym1 := ssa.AuxToSym(v.Aux)
  4870  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  4871  			break
  4872  		}
  4873  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4874  		sym2 := ssa.AuxToSym(v_0.Aux)
  4875  		ptr := v_0.Args[0]
  4876  		val := v_1
  4877  		mem := v_2
  4878  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  4879  			break
  4880  		}
  4881  		v.Reset(ssaop.OpLOONG64MOVVstore)
  4882  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  4883  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4884  		v.AddArg3(ptr, val, mem)
  4885  		return true
  4886  	}
  4887  	// match: (MOVVstore [off] {sym} (ADDV ptr idx) val mem)
  4888  	// cond: off == 0 && sym == nil
  4889  	// result: (MOVVstoreidx ptr idx val mem)
  4890  	for {
  4891  		off := ssa.AuxIntToInt32(v.AuxInt)
  4892  		sym := ssa.AuxToSym(v.Aux)
  4893  		if v_0.Op != ssaop.OpLOONG64ADDV {
  4894  			break
  4895  		}
  4896  		idx := v_0.Args[1]
  4897  		ptr := v_0.Args[0]
  4898  		val := v_1
  4899  		mem := v_2
  4900  		if !(off == 0 && sym == nil) {
  4901  			break
  4902  		}
  4903  		v.Reset(ssaop.OpLOONG64MOVVstoreidx)
  4904  		v.AddArg4(ptr, idx, val, mem)
  4905  		return true
  4906  	}
  4907  	// match: (MOVVstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  4908  	// cond: off == 0 && sym == nil
  4909  	// result: (MOVVstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  4910  	for {
  4911  		off := ssa.AuxIntToInt32(v.AuxInt)
  4912  		sym := ssa.AuxToSym(v.Aux)
  4913  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  4914  			break
  4915  		}
  4916  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  4917  		idx := v_0.Args[1]
  4918  		ptr := v_0.Args[0]
  4919  		val := v_1
  4920  		mem := v_2
  4921  		if !(off == 0 && sym == nil) {
  4922  			break
  4923  		}
  4924  		v.Reset(ssaop.OpLOONG64MOVVstoreidx)
  4925  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  4926  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  4927  		v0.AddArg(idx)
  4928  		v.AddArg4(ptr, v0, val, mem)
  4929  		return true
  4930  	}
  4931  	return false
  4932  }
  4933  func rewriteValue_OpLOONG64MOVVstoreidx(v *ssa.Value) bool {
  4934  	v_3 := v.Args[3]
  4935  	v_2 := v.Args[2]
  4936  	v_1 := v.Args[1]
  4937  	v_0 := v.Args[0]
  4938  	// match: (MOVVstoreidx ptr (MOVVconst [c]) val mem)
  4939  	// cond: ssa.Is32Bit(c)
  4940  	// result: (MOVVstore [int32(c)] ptr val mem)
  4941  	for {
  4942  		ptr := v_0
  4943  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  4944  			break
  4945  		}
  4946  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4947  		val := v_2
  4948  		mem := v_3
  4949  		if !(ssa.Is32Bit(c)) {
  4950  			break
  4951  		}
  4952  		v.Reset(ssaop.OpLOONG64MOVVstore)
  4953  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4954  		v.AddArg3(ptr, val, mem)
  4955  		return true
  4956  	}
  4957  	// match: (MOVVstoreidx (MOVVconst [c]) idx val mem)
  4958  	// cond: ssa.Is32Bit(c)
  4959  	// result: (MOVVstore [int32(c)] idx val mem)
  4960  	for {
  4961  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  4962  			break
  4963  		}
  4964  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4965  		idx := v_1
  4966  		val := v_2
  4967  		mem := v_3
  4968  		if !(ssa.Is32Bit(c)) {
  4969  			break
  4970  		}
  4971  		v.Reset(ssaop.OpLOONG64MOVVstore)
  4972  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4973  		v.AddArg3(idx, val, mem)
  4974  		return true
  4975  	}
  4976  	return false
  4977  }
  4978  func rewriteValue_OpLOONG64MOVWUload(v *ssa.Value) bool {
  4979  	v_1 := v.Args[1]
  4980  	v_0 := v.Args[0]
  4981  	b := v.Block
  4982  	config := b.Func.Config
  4983  	typ := &b.Func.Config.Types
  4984  	// match: (MOVWUload [off] {sym} ptr (MOVFstore [off] {sym} ptr val _))
  4985  	// result: (ZeroExt32to64 (MOVWfpgp <typ.Float32> val))
  4986  	for {
  4987  		off := ssa.AuxIntToInt32(v.AuxInt)
  4988  		sym := ssa.AuxToSym(v.Aux)
  4989  		ptr := v_0
  4990  		if v_1.Op != ssaop.OpLOONG64MOVFstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  4991  			break
  4992  		}
  4993  		val := v_1.Args[1]
  4994  		if ptr != v_1.Args[0] {
  4995  			break
  4996  		}
  4997  		v.Reset(ssaop.OpZeroExt32to64)
  4998  		v0 := b.NewValue0(v_1.Pos, ssaop.OpLOONG64MOVWfpgp, typ.Float32)
  4999  		v0.AddArg(val)
  5000  		v.AddArg(v0)
  5001  		return true
  5002  	}
  5003  	// match: (MOVWUload [off] {sym} ptr (MOVWstore [off] {sym} ptr x _))
  5004  	// result: (MOVWUreg x)
  5005  	for {
  5006  		off := ssa.AuxIntToInt32(v.AuxInt)
  5007  		sym := ssa.AuxToSym(v.Aux)
  5008  		ptr := v_0
  5009  		if v_1.Op != ssaop.OpLOONG64MOVWstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  5010  			break
  5011  		}
  5012  		x := v_1.Args[1]
  5013  		if ptr != v_1.Args[0] {
  5014  			break
  5015  		}
  5016  		v.Reset(ssaop.OpLOONG64MOVWUreg)
  5017  		v.AddArg(x)
  5018  		return true
  5019  	}
  5020  	// match: (MOVWUload [off1] {sym} (ADDVconst [off2] ptr) mem)
  5021  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5022  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
  5023  	for {
  5024  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5025  		sym := ssa.AuxToSym(v.Aux)
  5026  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  5027  			break
  5028  		}
  5029  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  5030  		ptr := v_0.Args[0]
  5031  		mem := v_1
  5032  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5033  			break
  5034  		}
  5035  		v.Reset(ssaop.OpLOONG64MOVWUload)
  5036  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5037  		v.Aux = ssa.SymToAux(sym)
  5038  		v.AddArg2(ptr, mem)
  5039  		return true
  5040  	}
  5041  	// match: (MOVWUload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  5042  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5043  	// result: (MOVWUload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  5044  	for {
  5045  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5046  		sym1 := ssa.AuxToSym(v.Aux)
  5047  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  5048  			break
  5049  		}
  5050  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5051  		sym2 := ssa.AuxToSym(v_0.Aux)
  5052  		ptr := v_0.Args[0]
  5053  		mem := v_1
  5054  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5055  			break
  5056  		}
  5057  		v.Reset(ssaop.OpLOONG64MOVWUload)
  5058  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5059  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5060  		v.AddArg2(ptr, mem)
  5061  		return true
  5062  	}
  5063  	// match: (MOVWUload [off] {sym} (ADDV ptr idx) mem)
  5064  	// cond: off == 0 && sym == nil
  5065  	// result: (MOVWUloadidx ptr idx mem)
  5066  	for {
  5067  		off := ssa.AuxIntToInt32(v.AuxInt)
  5068  		sym := ssa.AuxToSym(v.Aux)
  5069  		if v_0.Op != ssaop.OpLOONG64ADDV {
  5070  			break
  5071  		}
  5072  		idx := v_0.Args[1]
  5073  		ptr := v_0.Args[0]
  5074  		mem := v_1
  5075  		if !(off == 0 && sym == nil) {
  5076  			break
  5077  		}
  5078  		v.Reset(ssaop.OpLOONG64MOVWUloadidx)
  5079  		v.AddArg3(ptr, idx, mem)
  5080  		return true
  5081  	}
  5082  	// match: (MOVWUload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  5083  	// cond: off == 0 && sym == nil
  5084  	// result: (MOVWUloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  5085  	for {
  5086  		off := ssa.AuxIntToInt32(v.AuxInt)
  5087  		sym := ssa.AuxToSym(v.Aux)
  5088  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  5089  			break
  5090  		}
  5091  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  5092  		idx := v_0.Args[1]
  5093  		ptr := v_0.Args[0]
  5094  		mem := v_1
  5095  		if !(off == 0 && sym == nil) {
  5096  			break
  5097  		}
  5098  		v.Reset(ssaop.OpLOONG64MOVWUloadidx)
  5099  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  5100  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  5101  		v0.AddArg(idx)
  5102  		v.AddArg3(ptr, v0, mem)
  5103  		return true
  5104  	}
  5105  	// match: (MOVWUload [off] {sym} (SB) _)
  5106  	// cond: ssa.SymIsRO(sym)
  5107  	// result: (MOVVconst [int64(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder))])
  5108  	for {
  5109  		off := ssa.AuxIntToInt32(v.AuxInt)
  5110  		sym := ssa.AuxToSym(v.Aux)
  5111  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  5112  			break
  5113  		}
  5114  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5115  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder)))
  5116  		return true
  5117  	}
  5118  	return false
  5119  }
  5120  func rewriteValue_OpLOONG64MOVWUloadidx(v *ssa.Value) bool {
  5121  	v_2 := v.Args[2]
  5122  	v_1 := v.Args[1]
  5123  	v_0 := v.Args[0]
  5124  	// match: (MOVWUloadidx ptr (MOVVconst [c]) mem)
  5125  	// cond: ssa.Is32Bit(c)
  5126  	// result: (MOVWUload [int32(c)] ptr mem)
  5127  	for {
  5128  		ptr := v_0
  5129  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5130  			break
  5131  		}
  5132  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5133  		mem := v_2
  5134  		if !(ssa.Is32Bit(c)) {
  5135  			break
  5136  		}
  5137  		v.Reset(ssaop.OpLOONG64MOVWUload)
  5138  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5139  		v.AddArg2(ptr, mem)
  5140  		return true
  5141  	}
  5142  	// match: (MOVWUloadidx (MOVVconst [c]) ptr mem)
  5143  	// cond: ssa.Is32Bit(c)
  5144  	// result: (MOVWUload [int32(c)] ptr mem)
  5145  	for {
  5146  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5147  			break
  5148  		}
  5149  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5150  		ptr := v_1
  5151  		mem := v_2
  5152  		if !(ssa.Is32Bit(c)) {
  5153  			break
  5154  		}
  5155  		v.Reset(ssaop.OpLOONG64MOVWUload)
  5156  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5157  		v.AddArg2(ptr, mem)
  5158  		return true
  5159  	}
  5160  	return false
  5161  }
  5162  func rewriteValue_OpLOONG64MOVWUreg(v *ssa.Value) bool {
  5163  	v_0 := v.Args[0]
  5164  	// match: (MOVWUreg (SRLVconst [rc] x))
  5165  	// cond: rc < 32
  5166  	// result: (BSTRPICKV [rc + (31+rc)<<6] x)
  5167  	for {
  5168  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  5169  			break
  5170  		}
  5171  		rc := ssa.AuxIntToInt64(v_0.AuxInt)
  5172  		x := v_0.Args[0]
  5173  		if !(rc < 32) {
  5174  			break
  5175  		}
  5176  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  5177  		v.AuxInt = ssa.Int64ToAuxInt(rc + (31+rc)<<6)
  5178  		v.AddArg(x)
  5179  		return true
  5180  	}
  5181  	// match: (MOVWUreg (SLLVconst [lc] x))
  5182  	// cond: lc >= 32
  5183  	// result: (MOVVconst [0])
  5184  	for {
  5185  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  5186  			break
  5187  		}
  5188  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  5189  		if !(lc >= 32) {
  5190  			break
  5191  		}
  5192  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5193  		v.AuxInt = ssa.Int64ToAuxInt(0)
  5194  		return true
  5195  	}
  5196  	// match: (MOVWUreg (MOVVconst [c]))
  5197  	// result: (MOVVconst [int64(uint32(c))])
  5198  	for {
  5199  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5200  			break
  5201  		}
  5202  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5203  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5204  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint32(c)))
  5205  		return true
  5206  	}
  5207  	// match: (MOVWUreg x:(SRLconst [c] y))
  5208  	// result: x
  5209  	for {
  5210  		x := v_0
  5211  		if x.Op != ssaop.OpLOONG64SRLconst {
  5212  			break
  5213  		}
  5214  		v.CopyOf(x)
  5215  		return true
  5216  	}
  5217  	// match: (MOVWUreg x:(ANDconst [c] y))
  5218  	// cond: c >= 0 && int64(uint32(c)) == c
  5219  	// result: x
  5220  	for {
  5221  		x := v_0
  5222  		if x.Op != ssaop.OpLOONG64ANDconst {
  5223  			break
  5224  		}
  5225  		c := ssa.AuxIntToInt64(x.AuxInt)
  5226  		if !(c >= 0 && int64(uint32(c)) == c) {
  5227  			break
  5228  		}
  5229  		v.CopyOf(x)
  5230  		return true
  5231  	}
  5232  	// match: (MOVWUreg x)
  5233  	// cond: v.Type.Size() <= 4
  5234  	// result: x
  5235  	for {
  5236  		x := v_0
  5237  		if !(v.Type.Size() <= 4) {
  5238  			break
  5239  		}
  5240  		v.CopyOf(x)
  5241  		return true
  5242  	}
  5243  	return false
  5244  }
  5245  func rewriteValue_OpLOONG64MOVWload(v *ssa.Value) bool {
  5246  	v_1 := v.Args[1]
  5247  	v_0 := v.Args[0]
  5248  	b := v.Block
  5249  	config := b.Func.Config
  5250  	typ := &b.Func.Config.Types
  5251  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off] {sym} ptr x _))
  5252  	// result: (MOVWreg x)
  5253  	for {
  5254  		off := ssa.AuxIntToInt32(v.AuxInt)
  5255  		sym := ssa.AuxToSym(v.Aux)
  5256  		ptr := v_0
  5257  		if v_1.Op != ssaop.OpLOONG64MOVWstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  5258  			break
  5259  		}
  5260  		x := v_1.Args[1]
  5261  		if ptr != v_1.Args[0] {
  5262  			break
  5263  		}
  5264  		v.Reset(ssaop.OpLOONG64MOVWreg)
  5265  		v.AddArg(x)
  5266  		return true
  5267  	}
  5268  	// match: (MOVWload [off1] {sym} (ADDVconst [off2] ptr) mem)
  5269  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5270  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
  5271  	for {
  5272  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5273  		sym := ssa.AuxToSym(v.Aux)
  5274  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  5275  			break
  5276  		}
  5277  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  5278  		ptr := v_0.Args[0]
  5279  		mem := v_1
  5280  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5281  			break
  5282  		}
  5283  		v.Reset(ssaop.OpLOONG64MOVWload)
  5284  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5285  		v.Aux = ssa.SymToAux(sym)
  5286  		v.AddArg2(ptr, mem)
  5287  		return true
  5288  	}
  5289  	// match: (MOVWload [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) mem)
  5290  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5291  	// result: (MOVWload [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr mem)
  5292  	for {
  5293  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5294  		sym1 := ssa.AuxToSym(v.Aux)
  5295  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  5296  			break
  5297  		}
  5298  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5299  		sym2 := ssa.AuxToSym(v_0.Aux)
  5300  		ptr := v_0.Args[0]
  5301  		mem := v_1
  5302  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5303  			break
  5304  		}
  5305  		v.Reset(ssaop.OpLOONG64MOVWload)
  5306  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5307  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5308  		v.AddArg2(ptr, mem)
  5309  		return true
  5310  	}
  5311  	// match: (MOVWload [off] {sym} (ADDV ptr idx) mem)
  5312  	// cond: off == 0 && sym == nil
  5313  	// result: (MOVWloadidx ptr idx mem)
  5314  	for {
  5315  		off := ssa.AuxIntToInt32(v.AuxInt)
  5316  		sym := ssa.AuxToSym(v.Aux)
  5317  		if v_0.Op != ssaop.OpLOONG64ADDV {
  5318  			break
  5319  		}
  5320  		idx := v_0.Args[1]
  5321  		ptr := v_0.Args[0]
  5322  		mem := v_1
  5323  		if !(off == 0 && sym == nil) {
  5324  			break
  5325  		}
  5326  		v.Reset(ssaop.OpLOONG64MOVWloadidx)
  5327  		v.AddArg3(ptr, idx, mem)
  5328  		return true
  5329  	}
  5330  	// match: (MOVWload [off] {sym} (ADDshiftLLV [shift] ptr idx) mem)
  5331  	// cond: off == 0 && sym == nil
  5332  	// result: (MOVWloadidx ptr (SLLVconst <typ.Int64> [shift] idx) mem)
  5333  	for {
  5334  		off := ssa.AuxIntToInt32(v.AuxInt)
  5335  		sym := ssa.AuxToSym(v.Aux)
  5336  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  5337  			break
  5338  		}
  5339  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  5340  		idx := v_0.Args[1]
  5341  		ptr := v_0.Args[0]
  5342  		mem := v_1
  5343  		if !(off == 0 && sym == nil) {
  5344  			break
  5345  		}
  5346  		v.Reset(ssaop.OpLOONG64MOVWloadidx)
  5347  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  5348  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  5349  		v0.AddArg(idx)
  5350  		v.AddArg3(ptr, v0, mem)
  5351  		return true
  5352  	}
  5353  	// match: (MOVWload [off] {sym} (SB) _)
  5354  	// cond: ssa.SymIsRO(sym)
  5355  	// result: (MOVVconst [int64(int32(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder)))])
  5356  	for {
  5357  		off := ssa.AuxIntToInt32(v.AuxInt)
  5358  		sym := ssa.AuxToSym(v.Aux)
  5359  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  5360  			break
  5361  		}
  5362  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5363  		v.AuxInt = ssa.Int64ToAuxInt(int64(int32(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder))))
  5364  		return true
  5365  	}
  5366  	return false
  5367  }
  5368  func rewriteValue_OpLOONG64MOVWloadidx(v *ssa.Value) bool {
  5369  	v_2 := v.Args[2]
  5370  	v_1 := v.Args[1]
  5371  	v_0 := v.Args[0]
  5372  	// match: (MOVWloadidx ptr (MOVVconst [c]) mem)
  5373  	// cond: ssa.Is32Bit(c)
  5374  	// result: (MOVWload [int32(c)] ptr mem)
  5375  	for {
  5376  		ptr := v_0
  5377  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5378  			break
  5379  		}
  5380  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5381  		mem := v_2
  5382  		if !(ssa.Is32Bit(c)) {
  5383  			break
  5384  		}
  5385  		v.Reset(ssaop.OpLOONG64MOVWload)
  5386  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5387  		v.AddArg2(ptr, mem)
  5388  		return true
  5389  	}
  5390  	// match: (MOVWloadidx (MOVVconst [c]) ptr mem)
  5391  	// cond: ssa.Is32Bit(c)
  5392  	// result: (MOVWload [int32(c)] ptr mem)
  5393  	for {
  5394  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5395  			break
  5396  		}
  5397  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5398  		ptr := v_1
  5399  		mem := v_2
  5400  		if !(ssa.Is32Bit(c)) {
  5401  			break
  5402  		}
  5403  		v.Reset(ssaop.OpLOONG64MOVWload)
  5404  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5405  		v.AddArg2(ptr, mem)
  5406  		return true
  5407  	}
  5408  	return false
  5409  }
  5410  func rewriteValue_OpLOONG64MOVWreg(v *ssa.Value) bool {
  5411  	v_0 := v.Args[0]
  5412  	// match: (MOVWreg (MOVVconst [c]))
  5413  	// result: (MOVVconst [int64(int32(c))])
  5414  	for {
  5415  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5416  			break
  5417  		}
  5418  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5419  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5420  		v.AuxInt = ssa.Int64ToAuxInt(int64(int32(c)))
  5421  		return true
  5422  	}
  5423  	// match: (MOVWreg x:(ANDconst [c] y))
  5424  	// cond: c >= 0 && int64(int32(c)) == c
  5425  	// result: x
  5426  	for {
  5427  		x := v_0
  5428  		if x.Op != ssaop.OpLOONG64ANDconst {
  5429  			break
  5430  		}
  5431  		c := ssa.AuxIntToInt64(x.AuxInt)
  5432  		if !(c >= 0 && int64(int32(c)) == c) {
  5433  			break
  5434  		}
  5435  		v.CopyOf(x)
  5436  		return true
  5437  	}
  5438  	// match: (MOVWreg x)
  5439  	// cond: v.Type.Size() <= 4
  5440  	// result: x
  5441  	for {
  5442  		x := v_0
  5443  		if !(v.Type.Size() <= 4) {
  5444  			break
  5445  		}
  5446  		v.CopyOf(x)
  5447  		return true
  5448  	}
  5449  	return false
  5450  }
  5451  func rewriteValue_OpLOONG64MOVWstore(v *ssa.Value) bool {
  5452  	v_2 := v.Args[2]
  5453  	v_1 := v.Args[1]
  5454  	v_0 := v.Args[0]
  5455  	b := v.Block
  5456  	config := b.Func.Config
  5457  	typ := &b.Func.Config.Types
  5458  	// match: (MOVWstore [off] {sym} ptr (MOVWfpgp val) mem)
  5459  	// result: (MOVFstore [off] {sym} ptr val mem)
  5460  	for {
  5461  		off := ssa.AuxIntToInt32(v.AuxInt)
  5462  		sym := ssa.AuxToSym(v.Aux)
  5463  		ptr := v_0
  5464  		if v_1.Op != ssaop.OpLOONG64MOVWfpgp {
  5465  			break
  5466  		}
  5467  		val := v_1.Args[0]
  5468  		mem := v_2
  5469  		v.Reset(ssaop.OpLOONG64MOVFstore)
  5470  		v.AuxInt = ssa.Int32ToAuxInt(off)
  5471  		v.Aux = ssa.SymToAux(sym)
  5472  		v.AddArg3(ptr, val, mem)
  5473  		return true
  5474  	}
  5475  	// match: (MOVWstore [off1] {sym} (ADDVconst [off2] ptr) val mem)
  5476  	// cond: ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5477  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
  5478  	for {
  5479  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5480  		sym := ssa.AuxToSym(v.Aux)
  5481  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  5482  			break
  5483  		}
  5484  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  5485  		ptr := v_0.Args[0]
  5486  		val := v_1
  5487  		mem := v_2
  5488  		if !(ssa.Is32Bit(int64(off1)+off2) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5489  			break
  5490  		}
  5491  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5492  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5493  		v.Aux = ssa.SymToAux(sym)
  5494  		v.AddArg3(ptr, val, mem)
  5495  		return true
  5496  	}
  5497  	// match: (MOVWstore [off1] {sym1} (MOVVaddr [off2] {sym2} ptr) val mem)
  5498  	// cond: ssa.CanMergeSym(sym1,sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)
  5499  	// result: (MOVWstore [off1+int32(off2)] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  5500  	for {
  5501  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5502  		sym1 := ssa.AuxToSym(v.Aux)
  5503  		if v_0.Op != ssaop.OpLOONG64MOVVaddr {
  5504  			break
  5505  		}
  5506  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5507  		sym2 := ssa.AuxToSym(v_0.Aux)
  5508  		ptr := v_0.Args[0]
  5509  		val := v_1
  5510  		mem := v_2
  5511  		if !(ssa.CanMergeSym(sym1, sym2) && ssa.Is32Bit(int64(off1)+int64(off2)) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_dynlink)) {
  5512  			break
  5513  		}
  5514  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5515  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  5516  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5517  		v.AddArg3(ptr, val, mem)
  5518  		return true
  5519  	}
  5520  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
  5521  	// result: (MOVWstore [off] {sym} ptr x mem)
  5522  	for {
  5523  		off := ssa.AuxIntToInt32(v.AuxInt)
  5524  		sym := ssa.AuxToSym(v.Aux)
  5525  		ptr := v_0
  5526  		if v_1.Op != ssaop.OpLOONG64MOVWreg {
  5527  			break
  5528  		}
  5529  		x := v_1.Args[0]
  5530  		mem := v_2
  5531  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5532  		v.AuxInt = ssa.Int32ToAuxInt(off)
  5533  		v.Aux = ssa.SymToAux(sym)
  5534  		v.AddArg3(ptr, x, mem)
  5535  		return true
  5536  	}
  5537  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
  5538  	// result: (MOVWstore [off] {sym} ptr x mem)
  5539  	for {
  5540  		off := ssa.AuxIntToInt32(v.AuxInt)
  5541  		sym := ssa.AuxToSym(v.Aux)
  5542  		ptr := v_0
  5543  		if v_1.Op != ssaop.OpLOONG64MOVWUreg {
  5544  			break
  5545  		}
  5546  		x := v_1.Args[0]
  5547  		mem := v_2
  5548  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5549  		v.AuxInt = ssa.Int32ToAuxInt(off)
  5550  		v.Aux = ssa.SymToAux(sym)
  5551  		v.AddArg3(ptr, x, mem)
  5552  		return true
  5553  	}
  5554  	// match: (MOVWstore [off] {sym} (ADDV ptr idx) val mem)
  5555  	// cond: off == 0 && sym == nil
  5556  	// result: (MOVWstoreidx ptr idx val mem)
  5557  	for {
  5558  		off := ssa.AuxIntToInt32(v.AuxInt)
  5559  		sym := ssa.AuxToSym(v.Aux)
  5560  		if v_0.Op != ssaop.OpLOONG64ADDV {
  5561  			break
  5562  		}
  5563  		idx := v_0.Args[1]
  5564  		ptr := v_0.Args[0]
  5565  		val := v_1
  5566  		mem := v_2
  5567  		if !(off == 0 && sym == nil) {
  5568  			break
  5569  		}
  5570  		v.Reset(ssaop.OpLOONG64MOVWstoreidx)
  5571  		v.AddArg4(ptr, idx, val, mem)
  5572  		return true
  5573  	}
  5574  	// match: (MOVWstore [off] {sym} (ADDshiftLLV [shift] ptr idx) val mem)
  5575  	// cond: off == 0 && sym == nil
  5576  	// result: (MOVWstoreidx ptr (SLLVconst <typ.Int64> [shift] idx) val mem)
  5577  	for {
  5578  		off := ssa.AuxIntToInt32(v.AuxInt)
  5579  		sym := ssa.AuxToSym(v.Aux)
  5580  		if v_0.Op != ssaop.OpLOONG64ADDshiftLLV {
  5581  			break
  5582  		}
  5583  		shift := ssa.AuxIntToInt64(v_0.AuxInt)
  5584  		idx := v_0.Args[1]
  5585  		ptr := v_0.Args[0]
  5586  		val := v_1
  5587  		mem := v_2
  5588  		if !(off == 0 && sym == nil) {
  5589  			break
  5590  		}
  5591  		v.Reset(ssaop.OpLOONG64MOVWstoreidx)
  5592  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, typ.Int64)
  5593  		v0.AuxInt = ssa.Int64ToAuxInt(shift)
  5594  		v0.AddArg(idx)
  5595  		v.AddArg4(ptr, v0, val, mem)
  5596  		return true
  5597  	}
  5598  	return false
  5599  }
  5600  func rewriteValue_OpLOONG64MOVWstoreidx(v *ssa.Value) bool {
  5601  	v_3 := v.Args[3]
  5602  	v_2 := v.Args[2]
  5603  	v_1 := v.Args[1]
  5604  	v_0 := v.Args[0]
  5605  	// match: (MOVWstoreidx ptr (MOVVconst [c]) val mem)
  5606  	// cond: ssa.Is32Bit(c)
  5607  	// result: (MOVWstore [int32(c)] ptr val mem)
  5608  	for {
  5609  		ptr := v_0
  5610  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5611  			break
  5612  		}
  5613  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5614  		val := v_2
  5615  		mem := v_3
  5616  		if !(ssa.Is32Bit(c)) {
  5617  			break
  5618  		}
  5619  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5620  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5621  		v.AddArg3(ptr, val, mem)
  5622  		return true
  5623  	}
  5624  	// match: (MOVWstoreidx (MOVVconst [c]) idx val mem)
  5625  	// cond: ssa.Is32Bit(c)
  5626  	// result: (MOVWstore [int32(c)] idx val mem)
  5627  	for {
  5628  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5629  			break
  5630  		}
  5631  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5632  		idx := v_1
  5633  		val := v_2
  5634  		mem := v_3
  5635  		if !(ssa.Is32Bit(c)) {
  5636  			break
  5637  		}
  5638  		v.Reset(ssaop.OpLOONG64MOVWstore)
  5639  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5640  		v.AddArg3(idx, val, mem)
  5641  		return true
  5642  	}
  5643  	return false
  5644  }
  5645  func rewriteValue_OpLOONG64MULV(v *ssa.Value) bool {
  5646  	v_1 := v.Args[1]
  5647  	v_0 := v.Args[0]
  5648  	b := v.Block
  5649  	config := b.Func.Config
  5650  	// match: (MULV r:(MOVWUreg x) s:(MOVWUreg y))
  5651  	// cond: r.Uses == 1 && s.Uses == 1
  5652  	// result: (MULWVWU x y)
  5653  	for {
  5654  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5655  			r := v_0
  5656  			if r.Op != ssaop.OpLOONG64MOVWUreg {
  5657  				continue
  5658  			}
  5659  			x := r.Args[0]
  5660  			s := v_1
  5661  			if s.Op != ssaop.OpLOONG64MOVWUreg {
  5662  				continue
  5663  			}
  5664  			y := s.Args[0]
  5665  			if !(r.Uses == 1 && s.Uses == 1) {
  5666  				continue
  5667  			}
  5668  			v.Reset(ssaop.OpLOONG64MULWVWU)
  5669  			v.AddArg2(x, y)
  5670  			return true
  5671  		}
  5672  		break
  5673  	}
  5674  	// match: (MULV r:(MOVWreg x) s:(MOVWreg y))
  5675  	// cond: r.Uses == 1 && s.Uses == 1
  5676  	// result: (MULWVW x y)
  5677  	for {
  5678  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5679  			r := v_0
  5680  			if r.Op != ssaop.OpLOONG64MOVWreg {
  5681  				continue
  5682  			}
  5683  			x := r.Args[0]
  5684  			s := v_1
  5685  			if s.Op != ssaop.OpLOONG64MOVWreg {
  5686  				continue
  5687  			}
  5688  			y := s.Args[0]
  5689  			if !(r.Uses == 1 && s.Uses == 1) {
  5690  				continue
  5691  			}
  5692  			v.Reset(ssaop.OpLOONG64MULWVW)
  5693  			v.AddArg2(x, y)
  5694  			return true
  5695  		}
  5696  		break
  5697  	}
  5698  	// match: (MULV _ (MOVVconst [0]))
  5699  	// result: (MOVVconst [0])
  5700  	for {
  5701  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5702  			if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  5703  				continue
  5704  			}
  5705  			v.Reset(ssaop.OpLOONG64MOVVconst)
  5706  			v.AuxInt = ssa.Int64ToAuxInt(0)
  5707  			return true
  5708  		}
  5709  		break
  5710  	}
  5711  	// match: (MULV x (MOVVconst [1]))
  5712  	// result: x
  5713  	for {
  5714  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5715  			x := v_0
  5716  			if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 1 {
  5717  				continue
  5718  			}
  5719  			v.CopyOf(x)
  5720  			return true
  5721  		}
  5722  		break
  5723  	}
  5724  	// match: (MULV x (MOVVconst [c]))
  5725  	// cond: ssa.CanMulStrengthReduce(config, c)
  5726  	// result: {ssa.MulStrengthReduce(v, x, c)}
  5727  	for {
  5728  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5729  			x := v_0
  5730  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5731  				continue
  5732  			}
  5733  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  5734  			if !(ssa.CanMulStrengthReduce(config, c)) {
  5735  				continue
  5736  			}
  5737  			v.CopyOf(ssa.MulStrengthReduce(v, x, c))
  5738  			return true
  5739  		}
  5740  		break
  5741  	}
  5742  	// match: (MULV (MOVVconst [c]) (MOVVconst [d]))
  5743  	// result: (MOVVconst [c*d])
  5744  	for {
  5745  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5746  			if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5747  				continue
  5748  			}
  5749  			c := ssa.AuxIntToInt64(v_0.AuxInt)
  5750  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5751  				continue
  5752  			}
  5753  			d := ssa.AuxIntToInt64(v_1.AuxInt)
  5754  			v.Reset(ssaop.OpLOONG64MOVVconst)
  5755  			v.AuxInt = ssa.Int64ToAuxInt(c * d)
  5756  			return true
  5757  		}
  5758  		break
  5759  	}
  5760  	return false
  5761  }
  5762  func rewriteValue_OpLOONG64NEGV(v *ssa.Value) bool {
  5763  	v_0 := v.Args[0]
  5764  	b := v.Block
  5765  	// match: (NEGV (SUBV x y))
  5766  	// result: (SUBV y x)
  5767  	for {
  5768  		if v_0.Op != ssaop.OpLOONG64SUBV {
  5769  			break
  5770  		}
  5771  		y := v_0.Args[1]
  5772  		x := v_0.Args[0]
  5773  		v.Reset(ssaop.OpLOONG64SUBV)
  5774  		v.AddArg2(y, x)
  5775  		return true
  5776  	}
  5777  	// match: (NEGV <t> s:(ADDVconst [c] (SUBV x y)))
  5778  	// cond: s.Uses == 1 && ssa.Is12Bit(-c)
  5779  	// result: (ADDVconst [-c] (SUBV <t> y x))
  5780  	for {
  5781  		t := v.Type
  5782  		s := v_0
  5783  		if s.Op != ssaop.OpLOONG64ADDVconst {
  5784  			break
  5785  		}
  5786  		c := ssa.AuxIntToInt64(s.AuxInt)
  5787  		s_0 := s.Args[0]
  5788  		if s_0.Op != ssaop.OpLOONG64SUBV {
  5789  			break
  5790  		}
  5791  		y := s_0.Args[1]
  5792  		x := s_0.Args[0]
  5793  		if !(s.Uses == 1 && ssa.Is12Bit(-c)) {
  5794  			break
  5795  		}
  5796  		v.Reset(ssaop.OpLOONG64ADDVconst)
  5797  		v.AuxInt = ssa.Int64ToAuxInt(-c)
  5798  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
  5799  		v0.AddArg2(y, x)
  5800  		v.AddArg(v0)
  5801  		return true
  5802  	}
  5803  	// match: (NEGV (NEGV x))
  5804  	// result: x
  5805  	for {
  5806  		if v_0.Op != ssaop.OpLOONG64NEGV {
  5807  			break
  5808  		}
  5809  		x := v_0.Args[0]
  5810  		v.CopyOf(x)
  5811  		return true
  5812  	}
  5813  	// match: (NEGV <t> s:(ADDVconst [c] (NEGV x)))
  5814  	// cond: s.Uses == 1 && ssa.Is12Bit(-c)
  5815  	// result: (ADDVconst [-c] x)
  5816  	for {
  5817  		s := v_0
  5818  		if s.Op != ssaop.OpLOONG64ADDVconst {
  5819  			break
  5820  		}
  5821  		c := ssa.AuxIntToInt64(s.AuxInt)
  5822  		s_0 := s.Args[0]
  5823  		if s_0.Op != ssaop.OpLOONG64NEGV {
  5824  			break
  5825  		}
  5826  		x := s_0.Args[0]
  5827  		if !(s.Uses == 1 && ssa.Is12Bit(-c)) {
  5828  			break
  5829  		}
  5830  		v.Reset(ssaop.OpLOONG64ADDVconst)
  5831  		v.AuxInt = ssa.Int64ToAuxInt(-c)
  5832  		v.AddArg(x)
  5833  		return true
  5834  	}
  5835  	// match: (NEGV (MOVVconst [c]))
  5836  	// result: (MOVVconst [-c])
  5837  	for {
  5838  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5839  			break
  5840  		}
  5841  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5842  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5843  		v.AuxInt = ssa.Int64ToAuxInt(-c)
  5844  		return true
  5845  	}
  5846  	return false
  5847  }
  5848  func rewriteValue_OpLOONG64NOR(v *ssa.Value) bool {
  5849  	v_1 := v.Args[1]
  5850  	v_0 := v.Args[0]
  5851  	// match: (NOR x (MOVVconst [c]))
  5852  	// cond: ssa.Is32Bit(c)
  5853  	// result: (NORconst [c] x)
  5854  	for {
  5855  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5856  			x := v_0
  5857  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  5858  				continue
  5859  			}
  5860  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  5861  			if !(ssa.Is32Bit(c)) {
  5862  				continue
  5863  			}
  5864  			v.Reset(ssaop.OpLOONG64NORconst)
  5865  			v.AuxInt = ssa.Int64ToAuxInt(c)
  5866  			v.AddArg(x)
  5867  			return true
  5868  		}
  5869  		break
  5870  	}
  5871  	return false
  5872  }
  5873  func rewriteValue_OpLOONG64NORconst(v *ssa.Value) bool {
  5874  	v_0 := v.Args[0]
  5875  	// match: (NORconst [c] (MOVVconst [d]))
  5876  	// result: (MOVVconst [^(c|d)])
  5877  	for {
  5878  		c := ssa.AuxIntToInt64(v.AuxInt)
  5879  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  5880  			break
  5881  		}
  5882  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  5883  		v.Reset(ssaop.OpLOONG64MOVVconst)
  5884  		v.AuxInt = ssa.Int64ToAuxInt(^(c | d))
  5885  		return true
  5886  	}
  5887  	return false
  5888  }
  5889  func rewriteValue_OpLOONG64OR(v *ssa.Value) bool {
  5890  	v_1 := v.Args[1]
  5891  	v_0 := v.Args[0]
  5892  	b := v.Block
  5893  	typ := &b.Func.Config.Types
  5894  	// match: (OR <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  5895  	// result: (REVB2H x)
  5896  	for {
  5897  		if v.Type != typ.UInt16 {
  5898  			break
  5899  		}
  5900  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5901  			if v_0.Op != ssaop.OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  5902  				continue
  5903  			}
  5904  			x := v_0.Args[0]
  5905  			if v_1.Op != ssaop.OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || ssa.AuxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  5906  				continue
  5907  			}
  5908  			v.Reset(ssaop.OpLOONG64REVB2H)
  5909  			v.AddArg(x)
  5910  			return true
  5911  		}
  5912  		break
  5913  	}
  5914  	// match: (OR (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  5915  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  5916  	// result: (REVB2H x)
  5917  	for {
  5918  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5919  			if v_0.Op != ssaop.OpLOONG64SRLconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  5920  				continue
  5921  			}
  5922  			v_0_0 := v_0.Args[0]
  5923  			if v_0_0.Op != ssaop.OpLOONG64ANDconst {
  5924  				continue
  5925  			}
  5926  			c1 := ssa.AuxIntToInt64(v_0_0.AuxInt)
  5927  			x := v_0_0.Args[0]
  5928  			if v_1.Op != ssaop.OpLOONG64SLLconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  5929  				continue
  5930  			}
  5931  			v_1_0 := v_1.Args[0]
  5932  			if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  5933  				continue
  5934  			}
  5935  			c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  5936  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  5937  				continue
  5938  			}
  5939  			v.Reset(ssaop.OpLOONG64REVB2H)
  5940  			v.AddArg(x)
  5941  			return true
  5942  		}
  5943  		break
  5944  	}
  5945  	// match: (OR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  5946  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  5947  	// result: (REVB4H x)
  5948  	for {
  5949  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5950  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  5951  				continue
  5952  			}
  5953  			v_0_0 := v_0.Args[0]
  5954  			if v_0_0.Op != ssaop.OpLOONG64AND {
  5955  				continue
  5956  			}
  5957  			_ = v_0_0.Args[1]
  5958  			v_0_0_0 := v_0_0.Args[0]
  5959  			v_0_0_1 := v_0_0.Args[1]
  5960  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  5961  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  5962  					continue
  5963  				}
  5964  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  5965  				x := v_0_0_1
  5966  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  5967  					continue
  5968  				}
  5969  				v_1_0 := v_1.Args[0]
  5970  				if v_1_0.Op != ssaop.OpLOONG64AND {
  5971  					continue
  5972  				}
  5973  				_ = v_1_0.Args[1]
  5974  				v_1_0_0 := v_1_0.Args[0]
  5975  				v_1_0_1 := v_1_0.Args[1]
  5976  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  5977  					if v_1_0_0.Op != ssaop.OpLOONG64MOVVconst {
  5978  						continue
  5979  					}
  5980  					c2 := ssa.AuxIntToInt64(v_1_0_0.AuxInt)
  5981  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  5982  						continue
  5983  					}
  5984  					v.Reset(ssaop.OpLOONG64REVB4H)
  5985  					v.AddArg(x)
  5986  					return true
  5987  				}
  5988  			}
  5989  		}
  5990  		break
  5991  	}
  5992  	// match: (OR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  5993  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  5994  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  5995  	for {
  5996  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5997  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  5998  				continue
  5999  			}
  6000  			v_0_0 := v_0.Args[0]
  6001  			if v_0_0.Op != ssaop.OpLOONG64AND {
  6002  				continue
  6003  			}
  6004  			_ = v_0_0.Args[1]
  6005  			v_0_0_0 := v_0_0.Args[0]
  6006  			v_0_0_1 := v_0_0.Args[1]
  6007  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  6008  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  6009  					continue
  6010  				}
  6011  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  6012  				x := v_0_0_1
  6013  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  6014  					continue
  6015  				}
  6016  				v_1_0 := v_1.Args[0]
  6017  				if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  6018  					continue
  6019  				}
  6020  				c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  6021  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  6022  					continue
  6023  				}
  6024  				v.Reset(ssaop.OpLOONG64REVB4H)
  6025  				v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, x.Type)
  6026  				v0.AuxInt = ssa.Int64ToAuxInt(0xffffffff)
  6027  				v0.AddArg(x)
  6028  				v.AddArg(v0)
  6029  				return true
  6030  			}
  6031  		}
  6032  		break
  6033  	}
  6034  	// match: (OR x (MOVVconst [c]))
  6035  	// cond: ssa.Is32Bit(c)
  6036  	// result: (ORconst [c] x)
  6037  	for {
  6038  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6039  			x := v_0
  6040  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6041  				continue
  6042  			}
  6043  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  6044  			if !(ssa.Is32Bit(c)) {
  6045  				continue
  6046  			}
  6047  			v.Reset(ssaop.OpLOONG64ORconst)
  6048  			v.AuxInt = ssa.Int64ToAuxInt(c)
  6049  			v.AddArg(x)
  6050  			return true
  6051  		}
  6052  		break
  6053  	}
  6054  	// match: (OR x x)
  6055  	// result: x
  6056  	for {
  6057  		x := v_0
  6058  		if x != v_1 {
  6059  			break
  6060  		}
  6061  		v.CopyOf(x)
  6062  		return true
  6063  	}
  6064  	// match: (OR x (NORconst [0] y))
  6065  	// result: (ORN x y)
  6066  	for {
  6067  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6068  			x := v_0
  6069  			if v_1.Op != ssaop.OpLOONG64NORconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  6070  				continue
  6071  			}
  6072  			y := v_1.Args[0]
  6073  			v.Reset(ssaop.OpLOONG64ORN)
  6074  			v.AddArg2(x, y)
  6075  			return true
  6076  		}
  6077  		break
  6078  	}
  6079  	return false
  6080  }
  6081  func rewriteValue_OpLOONG64ORN(v *ssa.Value) bool {
  6082  	v_1 := v.Args[1]
  6083  	v_0 := v.Args[0]
  6084  	// match: (ORN x (MOVVconst [-1]))
  6085  	// result: x
  6086  	for {
  6087  		x := v_0
  6088  		if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != -1 {
  6089  			break
  6090  		}
  6091  		v.CopyOf(x)
  6092  		return true
  6093  	}
  6094  	return false
  6095  }
  6096  func rewriteValue_OpLOONG64ORconst(v *ssa.Value) bool {
  6097  	v_0 := v.Args[0]
  6098  	// match: (ORconst [0] x)
  6099  	// result: x
  6100  	for {
  6101  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  6102  			break
  6103  		}
  6104  		x := v_0
  6105  		v.CopyOf(x)
  6106  		return true
  6107  	}
  6108  	// match: (ORconst [-1] _)
  6109  	// result: (MOVVconst [-1])
  6110  	for {
  6111  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
  6112  			break
  6113  		}
  6114  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6115  		v.AuxInt = ssa.Int64ToAuxInt(-1)
  6116  		return true
  6117  	}
  6118  	// match: (ORconst [c] (MOVVconst [d]))
  6119  	// result: (MOVVconst [c|d])
  6120  	for {
  6121  		c := ssa.AuxIntToInt64(v.AuxInt)
  6122  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6123  			break
  6124  		}
  6125  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6126  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6127  		v.AuxInt = ssa.Int64ToAuxInt(c | d)
  6128  		return true
  6129  	}
  6130  	// match: (ORconst [c] (ORconst [d] x))
  6131  	// cond: ssa.Is32Bit(c|d)
  6132  	// result: (ORconst [c|d] x)
  6133  	for {
  6134  		c := ssa.AuxIntToInt64(v.AuxInt)
  6135  		if v_0.Op != ssaop.OpLOONG64ORconst {
  6136  			break
  6137  		}
  6138  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6139  		x := v_0.Args[0]
  6140  		if !(ssa.Is32Bit(c | d)) {
  6141  			break
  6142  		}
  6143  		v.Reset(ssaop.OpLOONG64ORconst)
  6144  		v.AuxInt = ssa.Int64ToAuxInt(c | d)
  6145  		v.AddArg(x)
  6146  		return true
  6147  	}
  6148  	return false
  6149  }
  6150  func rewriteValue_OpLOONG64REMV(v *ssa.Value) bool {
  6151  	v_1 := v.Args[1]
  6152  	v_0 := v.Args[0]
  6153  	// match: (REMV (MOVVconst [c]) (MOVVconst [d]))
  6154  	// cond: d != 0
  6155  	// result: (MOVVconst [c%d])
  6156  	for {
  6157  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6158  			break
  6159  		}
  6160  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6161  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6162  			break
  6163  		}
  6164  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  6165  		if !(d != 0) {
  6166  			break
  6167  		}
  6168  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6169  		v.AuxInt = ssa.Int64ToAuxInt(c % d)
  6170  		return true
  6171  	}
  6172  	return false
  6173  }
  6174  func rewriteValue_OpLOONG64REMVU(v *ssa.Value) bool {
  6175  	v_1 := v.Args[1]
  6176  	v_0 := v.Args[0]
  6177  	// match: (REMVU _ (MOVVconst [1]))
  6178  	// result: (MOVVconst [0])
  6179  	for {
  6180  		if v_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 1 {
  6181  			break
  6182  		}
  6183  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6184  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6185  		return true
  6186  	}
  6187  	// match: (REMVU x (MOVVconst [c]))
  6188  	// cond: ssa.IsPowerOfTwo(c)
  6189  	// result: (ANDconst [c-1] x)
  6190  	for {
  6191  		x := v_0
  6192  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6193  			break
  6194  		}
  6195  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6196  		if !(ssa.IsPowerOfTwo(c)) {
  6197  			break
  6198  		}
  6199  		v.Reset(ssaop.OpLOONG64ANDconst)
  6200  		v.AuxInt = ssa.Int64ToAuxInt(c - 1)
  6201  		v.AddArg(x)
  6202  		return true
  6203  	}
  6204  	// match: (REMVU (MOVVconst [c]) (MOVVconst [d]))
  6205  	// cond: d != 0
  6206  	// result: (MOVVconst [int64(uint64(c)%uint64(d))])
  6207  	for {
  6208  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6209  			break
  6210  		}
  6211  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6212  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6213  			break
  6214  		}
  6215  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  6216  		if !(d != 0) {
  6217  			break
  6218  		}
  6219  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6220  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint64(c) % uint64(d)))
  6221  		return true
  6222  	}
  6223  	return false
  6224  }
  6225  func rewriteValue_OpLOONG64ROTR(v *ssa.Value) bool {
  6226  	v_1 := v.Args[1]
  6227  	v_0 := v.Args[0]
  6228  	// match: (ROTR x (MOVVconst [c]))
  6229  	// result: (ROTRconst x [c&31])
  6230  	for {
  6231  		x := v_0
  6232  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6233  			break
  6234  		}
  6235  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6236  		v.Reset(ssaop.OpLOONG64ROTRconst)
  6237  		v.AuxInt = ssa.Int64ToAuxInt(c & 31)
  6238  		v.AddArg(x)
  6239  		return true
  6240  	}
  6241  	return false
  6242  }
  6243  func rewriteValue_OpLOONG64ROTRV(v *ssa.Value) bool {
  6244  	v_1 := v.Args[1]
  6245  	v_0 := v.Args[0]
  6246  	// match: (ROTRV x (MOVVconst [c]))
  6247  	// result: (ROTRVconst x [c&63])
  6248  	for {
  6249  		x := v_0
  6250  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6251  			break
  6252  		}
  6253  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6254  		v.Reset(ssaop.OpLOONG64ROTRVconst)
  6255  		v.AuxInt = ssa.Int64ToAuxInt(c & 63)
  6256  		v.AddArg(x)
  6257  		return true
  6258  	}
  6259  	return false
  6260  }
  6261  func rewriteValue_OpLOONG64SGT(v *ssa.Value) bool {
  6262  	v_1 := v.Args[1]
  6263  	v_0 := v.Args[0]
  6264  	b := v.Block
  6265  	typ := &b.Func.Config.Types
  6266  	// match: (SGT (MOVVconst [c]) (NEGV (SUBVconst [d] x)))
  6267  	// cond: ssa.Is32Bit(d-c)
  6268  	// result: (SGT x (MOVVconst [d-c]))
  6269  	for {
  6270  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6271  			break
  6272  		}
  6273  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6274  		if v_1.Op != ssaop.OpLOONG64NEGV {
  6275  			break
  6276  		}
  6277  		v_1_0 := v_1.Args[0]
  6278  		if v_1_0.Op != ssaop.OpLOONG64SUBVconst {
  6279  			break
  6280  		}
  6281  		d := ssa.AuxIntToInt64(v_1_0.AuxInt)
  6282  		x := v_1_0.Args[0]
  6283  		if !(ssa.Is32Bit(d - c)) {
  6284  			break
  6285  		}
  6286  		v.Reset(ssaop.OpLOONG64SGT)
  6287  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  6288  		v0.AuxInt = ssa.Int64ToAuxInt(d - c)
  6289  		v.AddArg2(x, v0)
  6290  		return true
  6291  	}
  6292  	// match: (SGT (MOVVconst [c]) x)
  6293  	// cond: ssa.Is32Bit(c)
  6294  	// result: (SGTconst [c] x)
  6295  	for {
  6296  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6297  			break
  6298  		}
  6299  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6300  		x := v_1
  6301  		if !(ssa.Is32Bit(c)) {
  6302  			break
  6303  		}
  6304  		v.Reset(ssaop.OpLOONG64SGTconst)
  6305  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6306  		v.AddArg(x)
  6307  		return true
  6308  	}
  6309  	// match: (SGT x x)
  6310  	// result: (MOVVconst [0])
  6311  	for {
  6312  		x := v_0
  6313  		if x != v_1 {
  6314  			break
  6315  		}
  6316  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6317  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6318  		return true
  6319  	}
  6320  	return false
  6321  }
  6322  func rewriteValue_OpLOONG64SGTU(v *ssa.Value) bool {
  6323  	v_1 := v.Args[1]
  6324  	v_0 := v.Args[0]
  6325  	// match: (SGTU (MOVVconst [c]) x)
  6326  	// cond: ssa.Is32Bit(c)
  6327  	// result: (SGTUconst [c] x)
  6328  	for {
  6329  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6330  			break
  6331  		}
  6332  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6333  		x := v_1
  6334  		if !(ssa.Is32Bit(c)) {
  6335  			break
  6336  		}
  6337  		v.Reset(ssaop.OpLOONG64SGTUconst)
  6338  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6339  		v.AddArg(x)
  6340  		return true
  6341  	}
  6342  	// match: (SGTU x x)
  6343  	// result: (MOVVconst [0])
  6344  	for {
  6345  		x := v_0
  6346  		if x != v_1 {
  6347  			break
  6348  		}
  6349  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6350  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6351  		return true
  6352  	}
  6353  	return false
  6354  }
  6355  func rewriteValue_OpLOONG64SGTUconst(v *ssa.Value) bool {
  6356  	v_0 := v.Args[0]
  6357  	// match: (SGTUconst [c] (MOVVconst [d]))
  6358  	// cond: uint64(c)>uint64(d)
  6359  	// result: (MOVVconst [1])
  6360  	for {
  6361  		c := ssa.AuxIntToInt64(v.AuxInt)
  6362  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6363  			break
  6364  		}
  6365  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6366  		if !(uint64(c) > uint64(d)) {
  6367  			break
  6368  		}
  6369  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6370  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6371  		return true
  6372  	}
  6373  	// match: (SGTUconst [c] (MOVVconst [d]))
  6374  	// cond: uint64(c)<=uint64(d)
  6375  	// result: (MOVVconst [0])
  6376  	for {
  6377  		c := ssa.AuxIntToInt64(v.AuxInt)
  6378  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6379  			break
  6380  		}
  6381  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6382  		if !(uint64(c) <= uint64(d)) {
  6383  			break
  6384  		}
  6385  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6386  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6387  		return true
  6388  	}
  6389  	// match: (SGTUconst [c] (MOVBUreg _))
  6390  	// cond: 0xff < uint64(c)
  6391  	// result: (MOVVconst [1])
  6392  	for {
  6393  		c := ssa.AuxIntToInt64(v.AuxInt)
  6394  		if v_0.Op != ssaop.OpLOONG64MOVBUreg || !(0xff < uint64(c)) {
  6395  			break
  6396  		}
  6397  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6398  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6399  		return true
  6400  	}
  6401  	// match: (SGTUconst [c] (MOVHUreg _))
  6402  	// cond: 0xffff < uint64(c)
  6403  	// result: (MOVVconst [1])
  6404  	for {
  6405  		c := ssa.AuxIntToInt64(v.AuxInt)
  6406  		if v_0.Op != ssaop.OpLOONG64MOVHUreg || !(0xffff < uint64(c)) {
  6407  			break
  6408  		}
  6409  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6410  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6411  		return true
  6412  	}
  6413  	// match: (SGTUconst [c] (ANDconst [m] _))
  6414  	// cond: uint64(m) < uint64(c)
  6415  	// result: (MOVVconst [1])
  6416  	for {
  6417  		c := ssa.AuxIntToInt64(v.AuxInt)
  6418  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  6419  			break
  6420  		}
  6421  		m := ssa.AuxIntToInt64(v_0.AuxInt)
  6422  		if !(uint64(m) < uint64(c)) {
  6423  			break
  6424  		}
  6425  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6426  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6427  		return true
  6428  	}
  6429  	// match: (SGTUconst [c] (SRLVconst _ [d]))
  6430  	// cond: 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)
  6431  	// result: (MOVVconst [1])
  6432  	for {
  6433  		c := ssa.AuxIntToInt64(v.AuxInt)
  6434  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  6435  			break
  6436  		}
  6437  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6438  		if !(0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
  6439  			break
  6440  		}
  6441  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6442  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6443  		return true
  6444  	}
  6445  	return false
  6446  }
  6447  func rewriteValue_OpLOONG64SGTconst(v *ssa.Value) bool {
  6448  	v_0 := v.Args[0]
  6449  	// match: (SGTconst [c] (MOVVconst [d]))
  6450  	// cond: c>d
  6451  	// result: (MOVVconst [1])
  6452  	for {
  6453  		c := ssa.AuxIntToInt64(v.AuxInt)
  6454  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6455  			break
  6456  		}
  6457  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6458  		if !(c > d) {
  6459  			break
  6460  		}
  6461  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6462  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6463  		return true
  6464  	}
  6465  	// match: (SGTconst [c] (MOVVconst [d]))
  6466  	// cond: c<=d
  6467  	// result: (MOVVconst [0])
  6468  	for {
  6469  		c := ssa.AuxIntToInt64(v.AuxInt)
  6470  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6471  			break
  6472  		}
  6473  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6474  		if !(c <= d) {
  6475  			break
  6476  		}
  6477  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6478  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6479  		return true
  6480  	}
  6481  	// match: (SGTconst [c] (MOVBreg _))
  6482  	// cond: 0x7f < c
  6483  	// result: (MOVVconst [1])
  6484  	for {
  6485  		c := ssa.AuxIntToInt64(v.AuxInt)
  6486  		if v_0.Op != ssaop.OpLOONG64MOVBreg || !(0x7f < c) {
  6487  			break
  6488  		}
  6489  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6490  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6491  		return true
  6492  	}
  6493  	// match: (SGTconst [c] (MOVBreg _))
  6494  	// cond: c <= -0x80
  6495  	// result: (MOVVconst [0])
  6496  	for {
  6497  		c := ssa.AuxIntToInt64(v.AuxInt)
  6498  		if v_0.Op != ssaop.OpLOONG64MOVBreg || !(c <= -0x80) {
  6499  			break
  6500  		}
  6501  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6502  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6503  		return true
  6504  	}
  6505  	// match: (SGTconst [c] (MOVBUreg _))
  6506  	// cond: 0xff < c
  6507  	// result: (MOVVconst [1])
  6508  	for {
  6509  		c := ssa.AuxIntToInt64(v.AuxInt)
  6510  		if v_0.Op != ssaop.OpLOONG64MOVBUreg || !(0xff < c) {
  6511  			break
  6512  		}
  6513  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6514  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6515  		return true
  6516  	}
  6517  	// match: (SGTconst [c] (MOVBUreg _))
  6518  	// cond: c < 0
  6519  	// result: (MOVVconst [0])
  6520  	for {
  6521  		c := ssa.AuxIntToInt64(v.AuxInt)
  6522  		if v_0.Op != ssaop.OpLOONG64MOVBUreg || !(c < 0) {
  6523  			break
  6524  		}
  6525  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6526  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6527  		return true
  6528  	}
  6529  	// match: (SGTconst [c] (MOVHreg _))
  6530  	// cond: 0x7fff < c
  6531  	// result: (MOVVconst [1])
  6532  	for {
  6533  		c := ssa.AuxIntToInt64(v.AuxInt)
  6534  		if v_0.Op != ssaop.OpLOONG64MOVHreg || !(0x7fff < c) {
  6535  			break
  6536  		}
  6537  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6538  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6539  		return true
  6540  	}
  6541  	// match: (SGTconst [c] (MOVHreg _))
  6542  	// cond: c <= -0x8000
  6543  	// result: (MOVVconst [0])
  6544  	for {
  6545  		c := ssa.AuxIntToInt64(v.AuxInt)
  6546  		if v_0.Op != ssaop.OpLOONG64MOVHreg || !(c <= -0x8000) {
  6547  			break
  6548  		}
  6549  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6550  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6551  		return true
  6552  	}
  6553  	// match: (SGTconst [c] (MOVHUreg _))
  6554  	// cond: 0xffff < c
  6555  	// result: (MOVVconst [1])
  6556  	for {
  6557  		c := ssa.AuxIntToInt64(v.AuxInt)
  6558  		if v_0.Op != ssaop.OpLOONG64MOVHUreg || !(0xffff < c) {
  6559  			break
  6560  		}
  6561  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6562  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6563  		return true
  6564  	}
  6565  	// match: (SGTconst [c] (MOVHUreg _))
  6566  	// cond: c < 0
  6567  	// result: (MOVVconst [0])
  6568  	for {
  6569  		c := ssa.AuxIntToInt64(v.AuxInt)
  6570  		if v_0.Op != ssaop.OpLOONG64MOVHUreg || !(c < 0) {
  6571  			break
  6572  		}
  6573  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6574  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6575  		return true
  6576  	}
  6577  	// match: (SGTconst [c] (MOVWUreg _))
  6578  	// cond: c < 0
  6579  	// result: (MOVVconst [0])
  6580  	for {
  6581  		c := ssa.AuxIntToInt64(v.AuxInt)
  6582  		if v_0.Op != ssaop.OpLOONG64MOVWUreg || !(c < 0) {
  6583  			break
  6584  		}
  6585  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6586  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6587  		return true
  6588  	}
  6589  	// match: (SGTconst [c] (ANDconst [m] _))
  6590  	// cond: 0 <= m && m < c
  6591  	// result: (MOVVconst [1])
  6592  	for {
  6593  		c := ssa.AuxIntToInt64(v.AuxInt)
  6594  		if v_0.Op != ssaop.OpLOONG64ANDconst {
  6595  			break
  6596  		}
  6597  		m := ssa.AuxIntToInt64(v_0.AuxInt)
  6598  		if !(0 <= m && m < c) {
  6599  			break
  6600  		}
  6601  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6602  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6603  		return true
  6604  	}
  6605  	// match: (SGTconst [c] (SRLVconst _ [d]))
  6606  	// cond: 0 <= c && 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)
  6607  	// result: (MOVVconst [1])
  6608  	for {
  6609  		c := ssa.AuxIntToInt64(v.AuxInt)
  6610  		if v_0.Op != ssaop.OpLOONG64SRLVconst {
  6611  			break
  6612  		}
  6613  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6614  		if !(0 <= c && 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
  6615  			break
  6616  		}
  6617  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6618  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6619  		return true
  6620  	}
  6621  	return false
  6622  }
  6623  func rewriteValue_OpLOONG64SLL(v *ssa.Value) bool {
  6624  	v_1 := v.Args[1]
  6625  	v_0 := v.Args[0]
  6626  	// match: (SLL _ (MOVVconst [c]))
  6627  	// cond: uint64(c)>=32
  6628  	// result: (MOVVconst [0])
  6629  	for {
  6630  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6631  			break
  6632  		}
  6633  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6634  		if !(uint64(c) >= 32) {
  6635  			break
  6636  		}
  6637  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6638  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6639  		return true
  6640  	}
  6641  	// match: (SLL x (MOVVconst [c]))
  6642  	// cond: uint64(c) >=0 && uint64(c) <=31
  6643  	// result: (SLLconst x [c])
  6644  	for {
  6645  		x := v_0
  6646  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6647  			break
  6648  		}
  6649  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6650  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  6651  			break
  6652  		}
  6653  		v.Reset(ssaop.OpLOONG64SLLconst)
  6654  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6655  		v.AddArg(x)
  6656  		return true
  6657  	}
  6658  	// match: (SLL x (ANDconst [31] y))
  6659  	// result: (SLL x y)
  6660  	for {
  6661  		x := v_0
  6662  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 31 {
  6663  			break
  6664  		}
  6665  		y := v_1.Args[0]
  6666  		v.Reset(ssaop.OpLOONG64SLL)
  6667  		v.AddArg2(x, y)
  6668  		return true
  6669  	}
  6670  	return false
  6671  }
  6672  func rewriteValue_OpLOONG64SLLV(v *ssa.Value) bool {
  6673  	v_1 := v.Args[1]
  6674  	v_0 := v.Args[0]
  6675  	// match: (SLLV _ (MOVVconst [c]))
  6676  	// cond: uint64(c)>=64
  6677  	// result: (MOVVconst [0])
  6678  	for {
  6679  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6680  			break
  6681  		}
  6682  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6683  		if !(uint64(c) >= 64) {
  6684  			break
  6685  		}
  6686  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6687  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6688  		return true
  6689  	}
  6690  	// match: (SLLV x (MOVVconst [c]))
  6691  	// result: (SLLVconst x [c])
  6692  	for {
  6693  		x := v_0
  6694  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6695  			break
  6696  		}
  6697  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6698  		v.Reset(ssaop.OpLOONG64SLLVconst)
  6699  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6700  		v.AddArg(x)
  6701  		return true
  6702  	}
  6703  	// match: (SLLV x (ANDconst [63] y))
  6704  	// result: (SLLV x y)
  6705  	for {
  6706  		x := v_0
  6707  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 63 {
  6708  			break
  6709  		}
  6710  		y := v_1.Args[0]
  6711  		v.Reset(ssaop.OpLOONG64SLLV)
  6712  		v.AddArg2(x, y)
  6713  		return true
  6714  	}
  6715  	return false
  6716  }
  6717  func rewriteValue_OpLOONG64SLLVconst(v *ssa.Value) bool {
  6718  	v_0 := v.Args[0]
  6719  	// match: (SLLVconst <t> [c] (ADDV x x))
  6720  	// cond: c < t.Size() * 8 - 1
  6721  	// result: (SLLVconst [c+1] x)
  6722  	for {
  6723  		t := v.Type
  6724  		c := ssa.AuxIntToInt64(v.AuxInt)
  6725  		if v_0.Op != ssaop.OpLOONG64ADDV {
  6726  			break
  6727  		}
  6728  		x := v_0.Args[1]
  6729  		if x != v_0.Args[0] || !(c < t.Size()*8-1) {
  6730  			break
  6731  		}
  6732  		v.Reset(ssaop.OpLOONG64SLLVconst)
  6733  		v.AuxInt = ssa.Int64ToAuxInt(c + 1)
  6734  		v.AddArg(x)
  6735  		return true
  6736  	}
  6737  	// match: (SLLVconst <t> [c] (ADDV x x))
  6738  	// cond: c >= t.Size() * 8 - 1
  6739  	// result: (MOVVconst [0])
  6740  	for {
  6741  		t := v.Type
  6742  		c := ssa.AuxIntToInt64(v.AuxInt)
  6743  		if v_0.Op != ssaop.OpLOONG64ADDV {
  6744  			break
  6745  		}
  6746  		x := v_0.Args[1]
  6747  		if x != v_0.Args[0] || !(c >= t.Size()*8-1) {
  6748  			break
  6749  		}
  6750  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6751  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6752  		return true
  6753  	}
  6754  	// match: (SLLVconst [c] (MOVVconst [d]))
  6755  	// result: (MOVVconst [d<<uint64(c)])
  6756  	for {
  6757  		c := ssa.AuxIntToInt64(v.AuxInt)
  6758  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6759  			break
  6760  		}
  6761  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6762  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6763  		v.AuxInt = ssa.Int64ToAuxInt(d << uint64(c))
  6764  		return true
  6765  	}
  6766  	return false
  6767  }
  6768  func rewriteValue_OpLOONG64SLLconst(v *ssa.Value) bool {
  6769  	v_0 := v.Args[0]
  6770  	// match: (SLLconst <t> [c] (ADDV x x))
  6771  	// cond: c < t.Size() * 8 - 1
  6772  	// result: (SLLconst [c+1] x)
  6773  	for {
  6774  		t := v.Type
  6775  		c := ssa.AuxIntToInt64(v.AuxInt)
  6776  		if v_0.Op != ssaop.OpLOONG64ADDV {
  6777  			break
  6778  		}
  6779  		x := v_0.Args[1]
  6780  		if x != v_0.Args[0] || !(c < t.Size()*8-1) {
  6781  			break
  6782  		}
  6783  		v.Reset(ssaop.OpLOONG64SLLconst)
  6784  		v.AuxInt = ssa.Int64ToAuxInt(c + 1)
  6785  		v.AddArg(x)
  6786  		return true
  6787  	}
  6788  	// match: (SLLconst <t> [c] (ADDV x x))
  6789  	// cond: c >= t.Size() * 8 - 1
  6790  	// result: (MOVVconst [0])
  6791  	for {
  6792  		t := v.Type
  6793  		c := ssa.AuxIntToInt64(v.AuxInt)
  6794  		if v_0.Op != ssaop.OpLOONG64ADDV {
  6795  			break
  6796  		}
  6797  		x := v_0.Args[1]
  6798  		if x != v_0.Args[0] || !(c >= t.Size()*8-1) {
  6799  			break
  6800  		}
  6801  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6802  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6803  		return true
  6804  	}
  6805  	return false
  6806  }
  6807  func rewriteValue_OpLOONG64SRA(v *ssa.Value) bool {
  6808  	v_1 := v.Args[1]
  6809  	v_0 := v.Args[0]
  6810  	// match: (SRA x (MOVVconst [c]))
  6811  	// cond: uint64(c)>=32
  6812  	// result: (SRAconst x [31])
  6813  	for {
  6814  		x := v_0
  6815  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6816  			break
  6817  		}
  6818  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6819  		if !(uint64(c) >= 32) {
  6820  			break
  6821  		}
  6822  		v.Reset(ssaop.OpLOONG64SRAconst)
  6823  		v.AuxInt = ssa.Int64ToAuxInt(31)
  6824  		v.AddArg(x)
  6825  		return true
  6826  	}
  6827  	// match: (SRA x (MOVVconst [c]))
  6828  	// cond: uint64(c) >=0 && uint64(c) <=31
  6829  	// result: (SRAconst x [c])
  6830  	for {
  6831  		x := v_0
  6832  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6833  			break
  6834  		}
  6835  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6836  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  6837  			break
  6838  		}
  6839  		v.Reset(ssaop.OpLOONG64SRAconst)
  6840  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6841  		v.AddArg(x)
  6842  		return true
  6843  	}
  6844  	// match: (SRA x (ANDconst [31] y))
  6845  	// result: (SRA x y)
  6846  	for {
  6847  		x := v_0
  6848  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 31 {
  6849  			break
  6850  		}
  6851  		y := v_1.Args[0]
  6852  		v.Reset(ssaop.OpLOONG64SRA)
  6853  		v.AddArg2(x, y)
  6854  		return true
  6855  	}
  6856  	return false
  6857  }
  6858  func rewriteValue_OpLOONG64SRAV(v *ssa.Value) bool {
  6859  	v_1 := v.Args[1]
  6860  	v_0 := v.Args[0]
  6861  	// match: (SRAV x (MOVVconst [c]))
  6862  	// cond: uint64(c)>=64
  6863  	// result: (SRAVconst x [63])
  6864  	for {
  6865  		x := v_0
  6866  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6867  			break
  6868  		}
  6869  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6870  		if !(uint64(c) >= 64) {
  6871  			break
  6872  		}
  6873  		v.Reset(ssaop.OpLOONG64SRAVconst)
  6874  		v.AuxInt = ssa.Int64ToAuxInt(63)
  6875  		v.AddArg(x)
  6876  		return true
  6877  	}
  6878  	// match: (SRAV x (MOVVconst [c]))
  6879  	// result: (SRAVconst x [c])
  6880  	for {
  6881  		x := v_0
  6882  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  6883  			break
  6884  		}
  6885  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6886  		v.Reset(ssaop.OpLOONG64SRAVconst)
  6887  		v.AuxInt = ssa.Int64ToAuxInt(c)
  6888  		v.AddArg(x)
  6889  		return true
  6890  	}
  6891  	// match: (SRAV x (ANDconst [63] y))
  6892  	// result: (SRAV x y)
  6893  	for {
  6894  		x := v_0
  6895  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 63 {
  6896  			break
  6897  		}
  6898  		y := v_1.Args[0]
  6899  		v.Reset(ssaop.OpLOONG64SRAV)
  6900  		v.AddArg2(x, y)
  6901  		return true
  6902  	}
  6903  	return false
  6904  }
  6905  func rewriteValue_OpLOONG64SRAVconst(v *ssa.Value) bool {
  6906  	v_0 := v.Args[0]
  6907  	b := v.Block
  6908  	// match: (SRAVconst [rc] (MOVWreg y))
  6909  	// cond: rc >= 0 && rc <= 31
  6910  	// result: (SRAconst [int64(rc)] y)
  6911  	for {
  6912  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6913  		if v_0.Op != ssaop.OpLOONG64MOVWreg {
  6914  			break
  6915  		}
  6916  		y := v_0.Args[0]
  6917  		if !(rc >= 0 && rc <= 31) {
  6918  			break
  6919  		}
  6920  		v.Reset(ssaop.OpLOONG64SRAconst)
  6921  		v.AuxInt = ssa.Int64ToAuxInt(int64(rc))
  6922  		v.AddArg(y)
  6923  		return true
  6924  	}
  6925  	// match: (SRAVconst <t> [rc] (MOVBreg y))
  6926  	// cond: rc >= 8
  6927  	// result: (SRAVconst [63] (SLLVconst <t> [56] y))
  6928  	for {
  6929  		t := v.Type
  6930  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6931  		if v_0.Op != ssaop.OpLOONG64MOVBreg {
  6932  			break
  6933  		}
  6934  		y := v_0.Args[0]
  6935  		if !(rc >= 8) {
  6936  			break
  6937  		}
  6938  		v.Reset(ssaop.OpLOONG64SRAVconst)
  6939  		v.AuxInt = ssa.Int64ToAuxInt(63)
  6940  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, t)
  6941  		v0.AuxInt = ssa.Int64ToAuxInt(56)
  6942  		v0.AddArg(y)
  6943  		v.AddArg(v0)
  6944  		return true
  6945  	}
  6946  	// match: (SRAVconst <t> [rc] (MOVHreg y))
  6947  	// cond: rc >= 16
  6948  	// result: (SRAVconst [63] (SLLVconst <t> [48] y))
  6949  	for {
  6950  		t := v.Type
  6951  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6952  		if v_0.Op != ssaop.OpLOONG64MOVHreg {
  6953  			break
  6954  		}
  6955  		y := v_0.Args[0]
  6956  		if !(rc >= 16) {
  6957  			break
  6958  		}
  6959  		v.Reset(ssaop.OpLOONG64SRAVconst)
  6960  		v.AuxInt = ssa.Int64ToAuxInt(63)
  6961  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, t)
  6962  		v0.AuxInt = ssa.Int64ToAuxInt(48)
  6963  		v0.AddArg(y)
  6964  		v.AddArg(v0)
  6965  		return true
  6966  	}
  6967  	// match: (SRAVconst <t> [rc] (MOVWreg y))
  6968  	// cond: rc >= 32
  6969  	// result: (SRAconst [31] y)
  6970  	for {
  6971  		rc := ssa.AuxIntToInt64(v.AuxInt)
  6972  		if v_0.Op != ssaop.OpLOONG64MOVWreg {
  6973  			break
  6974  		}
  6975  		y := v_0.Args[0]
  6976  		if !(rc >= 32) {
  6977  			break
  6978  		}
  6979  		v.Reset(ssaop.OpLOONG64SRAconst)
  6980  		v.AuxInt = ssa.Int64ToAuxInt(31)
  6981  		v.AddArg(y)
  6982  		return true
  6983  	}
  6984  	// match: (SRAVconst [c] (MOVVconst [d]))
  6985  	// result: (MOVVconst [d>>uint64(c)])
  6986  	for {
  6987  		c := ssa.AuxIntToInt64(v.AuxInt)
  6988  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  6989  			break
  6990  		}
  6991  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6992  		v.Reset(ssaop.OpLOONG64MOVVconst)
  6993  		v.AuxInt = ssa.Int64ToAuxInt(d >> uint64(c))
  6994  		return true
  6995  	}
  6996  	return false
  6997  }
  6998  func rewriteValue_OpLOONG64SRL(v *ssa.Value) bool {
  6999  	v_1 := v.Args[1]
  7000  	v_0 := v.Args[0]
  7001  	// match: (SRL _ (MOVVconst [c]))
  7002  	// cond: uint64(c)>=32
  7003  	// result: (MOVVconst [0])
  7004  	for {
  7005  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7006  			break
  7007  		}
  7008  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7009  		if !(uint64(c) >= 32) {
  7010  			break
  7011  		}
  7012  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7013  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7014  		return true
  7015  	}
  7016  	// match: (SRL x (MOVVconst [c]))
  7017  	// cond: uint64(c) >=0 && uint64(c) <=31
  7018  	// result: (SRLconst x [c])
  7019  	for {
  7020  		x := v_0
  7021  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7022  			break
  7023  		}
  7024  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7025  		if !(uint64(c) >= 0 && uint64(c) <= 31) {
  7026  			break
  7027  		}
  7028  		v.Reset(ssaop.OpLOONG64SRLconst)
  7029  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7030  		v.AddArg(x)
  7031  		return true
  7032  	}
  7033  	// match: (SRL x (ANDconst [31] y))
  7034  	// result: (SRL x y)
  7035  	for {
  7036  		x := v_0
  7037  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 31 {
  7038  			break
  7039  		}
  7040  		y := v_1.Args[0]
  7041  		v.Reset(ssaop.OpLOONG64SRL)
  7042  		v.AddArg2(x, y)
  7043  		return true
  7044  	}
  7045  	return false
  7046  }
  7047  func rewriteValue_OpLOONG64SRLV(v *ssa.Value) bool {
  7048  	v_1 := v.Args[1]
  7049  	v_0 := v.Args[0]
  7050  	// match: (SRLV _ (MOVVconst [c]))
  7051  	// cond: uint64(c)>=64
  7052  	// result: (MOVVconst [0])
  7053  	for {
  7054  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7055  			break
  7056  		}
  7057  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7058  		if !(uint64(c) >= 64) {
  7059  			break
  7060  		}
  7061  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7062  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7063  		return true
  7064  	}
  7065  	// match: (SRLV x (MOVVconst [c]))
  7066  	// result: (SRLVconst x [c])
  7067  	for {
  7068  		x := v_0
  7069  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7070  			break
  7071  		}
  7072  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7073  		v.Reset(ssaop.OpLOONG64SRLVconst)
  7074  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7075  		v.AddArg(x)
  7076  		return true
  7077  	}
  7078  	// match: (SRLV x (ANDconst [63] y))
  7079  	// result: (SRLV x y)
  7080  	for {
  7081  		x := v_0
  7082  		if v_1.Op != ssaop.OpLOONG64ANDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 63 {
  7083  			break
  7084  		}
  7085  		y := v_1.Args[0]
  7086  		v.Reset(ssaop.OpLOONG64SRLV)
  7087  		v.AddArg2(x, y)
  7088  		return true
  7089  	}
  7090  	return false
  7091  }
  7092  func rewriteValue_OpLOONG64SRLVconst(v *ssa.Value) bool {
  7093  	v_0 := v.Args[0]
  7094  	// match: (SRLVconst [rc] (SLLVconst [lc] x))
  7095  	// cond: lc <= rc
  7096  	// result: (BSTRPICKV [rc-lc + ((64-lc)-1)<<6] x)
  7097  	for {
  7098  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7099  		if v_0.Op != ssaop.OpLOONG64SLLVconst {
  7100  			break
  7101  		}
  7102  		lc := ssa.AuxIntToInt64(v_0.AuxInt)
  7103  		x := v_0.Args[0]
  7104  		if !(lc <= rc) {
  7105  			break
  7106  		}
  7107  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  7108  		v.AuxInt = ssa.Int64ToAuxInt(rc - lc + ((64-lc)-1)<<6)
  7109  		v.AddArg(x)
  7110  		return true
  7111  	}
  7112  	// match: (SRLVconst [rc] (MOVWUreg x))
  7113  	// cond: rc < 32
  7114  	// result: (BSTRPICKV [rc + 31<<6] x)
  7115  	for {
  7116  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7117  		if v_0.Op != ssaop.OpLOONG64MOVWUreg {
  7118  			break
  7119  		}
  7120  		x := v_0.Args[0]
  7121  		if !(rc < 32) {
  7122  			break
  7123  		}
  7124  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  7125  		v.AuxInt = ssa.Int64ToAuxInt(rc + 31<<6)
  7126  		v.AddArg(x)
  7127  		return true
  7128  	}
  7129  	// match: (SRLVconst [rc] (MOVHUreg x))
  7130  	// cond: rc < 16
  7131  	// result: (BSTRPICKV [rc + 15<<6] x)
  7132  	for {
  7133  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7134  		if v_0.Op != ssaop.OpLOONG64MOVHUreg {
  7135  			break
  7136  		}
  7137  		x := v_0.Args[0]
  7138  		if !(rc < 16) {
  7139  			break
  7140  		}
  7141  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  7142  		v.AuxInt = ssa.Int64ToAuxInt(rc + 15<<6)
  7143  		v.AddArg(x)
  7144  		return true
  7145  	}
  7146  	// match: (SRLVconst [rc] (MOVBUreg x))
  7147  	// cond: rc < 8
  7148  	// result: (BSTRPICKV [rc + 7<<6] x)
  7149  	for {
  7150  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7151  		if v_0.Op != ssaop.OpLOONG64MOVBUreg {
  7152  			break
  7153  		}
  7154  		x := v_0.Args[0]
  7155  		if !(rc < 8) {
  7156  			break
  7157  		}
  7158  		v.Reset(ssaop.OpLOONG64BSTRPICKV)
  7159  		v.AuxInt = ssa.Int64ToAuxInt(rc + 7<<6)
  7160  		v.AddArg(x)
  7161  		return true
  7162  	}
  7163  	// match: (SRLVconst [rc] (MOVWUreg y))
  7164  	// cond: rc >= 0 && rc <= 31
  7165  	// result: (SRLconst [int64(rc)] y)
  7166  	for {
  7167  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7168  		if v_0.Op != ssaop.OpLOONG64MOVWUreg {
  7169  			break
  7170  		}
  7171  		y := v_0.Args[0]
  7172  		if !(rc >= 0 && rc <= 31) {
  7173  			break
  7174  		}
  7175  		v.Reset(ssaop.OpLOONG64SRLconst)
  7176  		v.AuxInt = ssa.Int64ToAuxInt(int64(rc))
  7177  		v.AddArg(y)
  7178  		return true
  7179  	}
  7180  	// match: (SRLVconst [rc] (MOVWUreg x))
  7181  	// cond: rc >= 32
  7182  	// result: (MOVVconst [0])
  7183  	for {
  7184  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7185  		if v_0.Op != ssaop.OpLOONG64MOVWUreg {
  7186  			break
  7187  		}
  7188  		if !(rc >= 32) {
  7189  			break
  7190  		}
  7191  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7192  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7193  		return true
  7194  	}
  7195  	// match: (SRLVconst [rc] (MOVHUreg x))
  7196  	// cond: rc >= 16
  7197  	// result: (MOVVconst [0])
  7198  	for {
  7199  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7200  		if v_0.Op != ssaop.OpLOONG64MOVHUreg {
  7201  			break
  7202  		}
  7203  		if !(rc >= 16) {
  7204  			break
  7205  		}
  7206  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7207  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7208  		return true
  7209  	}
  7210  	// match: (SRLVconst [rc] (MOVBUreg x))
  7211  	// cond: rc >= 8
  7212  	// result: (MOVVconst [0])
  7213  	for {
  7214  		rc := ssa.AuxIntToInt64(v.AuxInt)
  7215  		if v_0.Op != ssaop.OpLOONG64MOVBUreg {
  7216  			break
  7217  		}
  7218  		if !(rc >= 8) {
  7219  			break
  7220  		}
  7221  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7222  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7223  		return true
  7224  	}
  7225  	// match: (SRLVconst [c] (MOVVconst [d]))
  7226  	// result: (MOVVconst [int64(uint64(d)>>uint64(c))])
  7227  	for {
  7228  		c := ssa.AuxIntToInt64(v.AuxInt)
  7229  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7230  			break
  7231  		}
  7232  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7233  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7234  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint64(d) >> uint64(c)))
  7235  		return true
  7236  	}
  7237  	return false
  7238  }
  7239  func rewriteValue_OpLOONG64SUBD(v *ssa.Value) bool {
  7240  	v_1 := v.Args[1]
  7241  	v_0 := v.Args[0]
  7242  	// match: (SUBD (MULD x y) z)
  7243  	// cond: z.Block.Func.UseFMA(v)
  7244  	// result: (FMSUBD x y z)
  7245  	for {
  7246  		if v_0.Op != ssaop.OpLOONG64MULD {
  7247  			break
  7248  		}
  7249  		y := v_0.Args[1]
  7250  		x := v_0.Args[0]
  7251  		z := v_1
  7252  		if !(z.Block.Func.UseFMA(v)) {
  7253  			break
  7254  		}
  7255  		v.Reset(ssaop.OpLOONG64FMSUBD)
  7256  		v.AddArg3(x, y, z)
  7257  		return true
  7258  	}
  7259  	// match: (SUBD z (MULD x y))
  7260  	// cond: z.Block.Func.UseFMA(v)
  7261  	// result: (FNMSUBD x y z)
  7262  	for {
  7263  		z := v_0
  7264  		if v_1.Op != ssaop.OpLOONG64MULD {
  7265  			break
  7266  		}
  7267  		y := v_1.Args[1]
  7268  		x := v_1.Args[0]
  7269  		if !(z.Block.Func.UseFMA(v)) {
  7270  			break
  7271  		}
  7272  		v.Reset(ssaop.OpLOONG64FNMSUBD)
  7273  		v.AddArg3(x, y, z)
  7274  		return true
  7275  	}
  7276  	// match: (SUBD z (NEGD (MULD x y)))
  7277  	// cond: z.Block.Func.UseFMA(v)
  7278  	// result: (FMADDD x y z)
  7279  	for {
  7280  		z := v_0
  7281  		if v_1.Op != ssaop.OpLOONG64NEGD {
  7282  			break
  7283  		}
  7284  		v_1_0 := v_1.Args[0]
  7285  		if v_1_0.Op != ssaop.OpLOONG64MULD {
  7286  			break
  7287  		}
  7288  		y := v_1_0.Args[1]
  7289  		x := v_1_0.Args[0]
  7290  		if !(z.Block.Func.UseFMA(v)) {
  7291  			break
  7292  		}
  7293  		v.Reset(ssaop.OpLOONG64FMADDD)
  7294  		v.AddArg3(x, y, z)
  7295  		return true
  7296  	}
  7297  	// match: (SUBD (NEGD (MULD x y)) z)
  7298  	// cond: z.Block.Func.UseFMA(v)
  7299  	// result: (FNMADDD x y z)
  7300  	for {
  7301  		if v_0.Op != ssaop.OpLOONG64NEGD {
  7302  			break
  7303  		}
  7304  		v_0_0 := v_0.Args[0]
  7305  		if v_0_0.Op != ssaop.OpLOONG64MULD {
  7306  			break
  7307  		}
  7308  		y := v_0_0.Args[1]
  7309  		x := v_0_0.Args[0]
  7310  		z := v_1
  7311  		if !(z.Block.Func.UseFMA(v)) {
  7312  			break
  7313  		}
  7314  		v.Reset(ssaop.OpLOONG64FNMADDD)
  7315  		v.AddArg3(x, y, z)
  7316  		return true
  7317  	}
  7318  	return false
  7319  }
  7320  func rewriteValue_OpLOONG64SUBF(v *ssa.Value) bool {
  7321  	v_1 := v.Args[1]
  7322  	v_0 := v.Args[0]
  7323  	// match: (SUBF (MULF x y) z)
  7324  	// cond: z.Block.Func.UseFMA(v)
  7325  	// result: (FMSUBF x y z)
  7326  	for {
  7327  		if v_0.Op != ssaop.OpLOONG64MULF {
  7328  			break
  7329  		}
  7330  		y := v_0.Args[1]
  7331  		x := v_0.Args[0]
  7332  		z := v_1
  7333  		if !(z.Block.Func.UseFMA(v)) {
  7334  			break
  7335  		}
  7336  		v.Reset(ssaop.OpLOONG64FMSUBF)
  7337  		v.AddArg3(x, y, z)
  7338  		return true
  7339  	}
  7340  	// match: (SUBF z (MULF x y))
  7341  	// cond: z.Block.Func.UseFMA(v)
  7342  	// result: (FNMSUBF x y z)
  7343  	for {
  7344  		z := v_0
  7345  		if v_1.Op != ssaop.OpLOONG64MULF {
  7346  			break
  7347  		}
  7348  		y := v_1.Args[1]
  7349  		x := v_1.Args[0]
  7350  		if !(z.Block.Func.UseFMA(v)) {
  7351  			break
  7352  		}
  7353  		v.Reset(ssaop.OpLOONG64FNMSUBF)
  7354  		v.AddArg3(x, y, z)
  7355  		return true
  7356  	}
  7357  	// match: (SUBF z (NEGF (MULF x y)))
  7358  	// cond: z.Block.Func.UseFMA(v)
  7359  	// result: (FMADDF x y z)
  7360  	for {
  7361  		z := v_0
  7362  		if v_1.Op != ssaop.OpLOONG64NEGF {
  7363  			break
  7364  		}
  7365  		v_1_0 := v_1.Args[0]
  7366  		if v_1_0.Op != ssaop.OpLOONG64MULF {
  7367  			break
  7368  		}
  7369  		y := v_1_0.Args[1]
  7370  		x := v_1_0.Args[0]
  7371  		if !(z.Block.Func.UseFMA(v)) {
  7372  			break
  7373  		}
  7374  		v.Reset(ssaop.OpLOONG64FMADDF)
  7375  		v.AddArg3(x, y, z)
  7376  		return true
  7377  	}
  7378  	// match: (SUBF (NEGF (MULF x y)) z)
  7379  	// cond: z.Block.Func.UseFMA(v)
  7380  	// result: (FNMADDF x y z)
  7381  	for {
  7382  		if v_0.Op != ssaop.OpLOONG64NEGF {
  7383  			break
  7384  		}
  7385  		v_0_0 := v_0.Args[0]
  7386  		if v_0_0.Op != ssaop.OpLOONG64MULF {
  7387  			break
  7388  		}
  7389  		y := v_0_0.Args[1]
  7390  		x := v_0_0.Args[0]
  7391  		z := v_1
  7392  		if !(z.Block.Func.UseFMA(v)) {
  7393  			break
  7394  		}
  7395  		v.Reset(ssaop.OpLOONG64FNMADDF)
  7396  		v.AddArg3(x, y, z)
  7397  		return true
  7398  	}
  7399  	return false
  7400  }
  7401  func rewriteValue_OpLOONG64SUBV(v *ssa.Value) bool {
  7402  	v_1 := v.Args[1]
  7403  	v_0 := v.Args[0]
  7404  	// match: (SUBV x (MOVVconst [c]))
  7405  	// cond: ssa.Is32Bit(c)
  7406  	// result: (SUBVconst [c] x)
  7407  	for {
  7408  		x := v_0
  7409  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7410  			break
  7411  		}
  7412  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7413  		if !(ssa.Is32Bit(c)) {
  7414  			break
  7415  		}
  7416  		v.Reset(ssaop.OpLOONG64SUBVconst)
  7417  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7418  		v.AddArg(x)
  7419  		return true
  7420  	}
  7421  	// match: (SUBV x (NEGV y))
  7422  	// result: (ADDV x y)
  7423  	for {
  7424  		x := v_0
  7425  		if v_1.Op != ssaop.OpLOONG64NEGV {
  7426  			break
  7427  		}
  7428  		y := v_1.Args[0]
  7429  		v.Reset(ssaop.OpLOONG64ADDV)
  7430  		v.AddArg2(x, y)
  7431  		return true
  7432  	}
  7433  	// match: (SUBV x x)
  7434  	// result: (MOVVconst [0])
  7435  	for {
  7436  		x := v_0
  7437  		if x != v_1 {
  7438  			break
  7439  		}
  7440  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7441  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7442  		return true
  7443  	}
  7444  	// match: (SUBV (MOVVconst [0]) x)
  7445  	// result: (NEGV x)
  7446  	for {
  7447  		if v_0.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
  7448  			break
  7449  		}
  7450  		x := v_1
  7451  		v.Reset(ssaop.OpLOONG64NEGV)
  7452  		v.AddArg(x)
  7453  		return true
  7454  	}
  7455  	// match: (SUBV (MOVVconst [c]) (NEGV (SUBVconst [d] x)))
  7456  	// result: (ADDVconst [c-d] x)
  7457  	for {
  7458  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7459  			break
  7460  		}
  7461  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7462  		if v_1.Op != ssaop.OpLOONG64NEGV {
  7463  			break
  7464  		}
  7465  		v_1_0 := v_1.Args[0]
  7466  		if v_1_0.Op != ssaop.OpLOONG64SUBVconst {
  7467  			break
  7468  		}
  7469  		d := ssa.AuxIntToInt64(v_1_0.AuxInt)
  7470  		x := v_1_0.Args[0]
  7471  		v.Reset(ssaop.OpLOONG64ADDVconst)
  7472  		v.AuxInt = ssa.Int64ToAuxInt(c - d)
  7473  		v.AddArg(x)
  7474  		return true
  7475  	}
  7476  	return false
  7477  }
  7478  func rewriteValue_OpLOONG64SUBVconst(v *ssa.Value) bool {
  7479  	v_0 := v.Args[0]
  7480  	// match: (SUBVconst [0] x)
  7481  	// result: x
  7482  	for {
  7483  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  7484  			break
  7485  		}
  7486  		x := v_0
  7487  		v.CopyOf(x)
  7488  		return true
  7489  	}
  7490  	// match: (SUBVconst [c] (MOVVconst [d]))
  7491  	// result: (MOVVconst [d-c])
  7492  	for {
  7493  		c := ssa.AuxIntToInt64(v.AuxInt)
  7494  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7495  			break
  7496  		}
  7497  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7498  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7499  		v.AuxInt = ssa.Int64ToAuxInt(d - c)
  7500  		return true
  7501  	}
  7502  	// match: (SUBVconst [c] (SUBVconst [d] x))
  7503  	// cond: ssa.Is32Bit(-c-d)
  7504  	// result: (ADDVconst [-c-d] x)
  7505  	for {
  7506  		c := ssa.AuxIntToInt64(v.AuxInt)
  7507  		if v_0.Op != ssaop.OpLOONG64SUBVconst {
  7508  			break
  7509  		}
  7510  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7511  		x := v_0.Args[0]
  7512  		if !(ssa.Is32Bit(-c - d)) {
  7513  			break
  7514  		}
  7515  		v.Reset(ssaop.OpLOONG64ADDVconst)
  7516  		v.AuxInt = ssa.Int64ToAuxInt(-c - d)
  7517  		v.AddArg(x)
  7518  		return true
  7519  	}
  7520  	// match: (SUBVconst [c] (ADDVconst [d] x))
  7521  	// cond: ssa.Is32Bit(-c+d)
  7522  	// result: (ADDVconst [-c+d] x)
  7523  	for {
  7524  		c := ssa.AuxIntToInt64(v.AuxInt)
  7525  		if v_0.Op != ssaop.OpLOONG64ADDVconst {
  7526  			break
  7527  		}
  7528  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7529  		x := v_0.Args[0]
  7530  		if !(ssa.Is32Bit(-c + d)) {
  7531  			break
  7532  		}
  7533  		v.Reset(ssaop.OpLOONG64ADDVconst)
  7534  		v.AuxInt = ssa.Int64ToAuxInt(-c + d)
  7535  		v.AddArg(x)
  7536  		return true
  7537  	}
  7538  	return false
  7539  }
  7540  func rewriteValue_OpLOONG64XOR(v *ssa.Value) bool {
  7541  	v_1 := v.Args[1]
  7542  	v_0 := v.Args[0]
  7543  	b := v.Block
  7544  	typ := &b.Func.Config.Types
  7545  	// match: (XOR <typ.UInt16> (SRLVconst [8] <typ.UInt16> x) (SLLVconst [8] <typ.UInt16> x))
  7546  	// result: (REVB2H x)
  7547  	for {
  7548  		if v.Type != typ.UInt16 {
  7549  			break
  7550  		}
  7551  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7552  			if v_0.Op != ssaop.OpLOONG64SRLVconst || v_0.Type != typ.UInt16 || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7553  				continue
  7554  			}
  7555  			x := v_0.Args[0]
  7556  			if v_1.Op != ssaop.OpLOONG64SLLVconst || v_1.Type != typ.UInt16 || ssa.AuxIntToInt64(v_1.AuxInt) != 8 || x != v_1.Args[0] {
  7557  				continue
  7558  			}
  7559  			v.Reset(ssaop.OpLOONG64REVB2H)
  7560  			v.AddArg(x)
  7561  			return true
  7562  		}
  7563  		break
  7564  	}
  7565  	// match: (XOR (SRLconst [8] (ANDconst [c1] x)) (SLLconst [8] (ANDconst [c2] x)))
  7566  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  7567  	// result: (REVB2H x)
  7568  	for {
  7569  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7570  			if v_0.Op != ssaop.OpLOONG64SRLconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7571  				continue
  7572  			}
  7573  			v_0_0 := v_0.Args[0]
  7574  			if v_0_0.Op != ssaop.OpLOONG64ANDconst {
  7575  				continue
  7576  			}
  7577  			c1 := ssa.AuxIntToInt64(v_0_0.AuxInt)
  7578  			x := v_0_0.Args[0]
  7579  			if v_1.Op != ssaop.OpLOONG64SLLconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  7580  				continue
  7581  			}
  7582  			v_1_0 := v_1.Args[0]
  7583  			if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  7584  				continue
  7585  			}
  7586  			c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  7587  			if x != v_1_0.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  7588  				continue
  7589  			}
  7590  			v.Reset(ssaop.OpLOONG64REVB2H)
  7591  			v.AddArg(x)
  7592  			return true
  7593  		}
  7594  		break
  7595  	}
  7596  	// match: (XOR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (AND (MOVVconst [c2]) x)))
  7597  	// cond: uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff
  7598  	// result: (REVB4H x)
  7599  	for {
  7600  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7601  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7602  				continue
  7603  			}
  7604  			v_0_0 := v_0.Args[0]
  7605  			if v_0_0.Op != ssaop.OpLOONG64AND {
  7606  				continue
  7607  			}
  7608  			_ = v_0_0.Args[1]
  7609  			v_0_0_0 := v_0_0.Args[0]
  7610  			v_0_0_1 := v_0_0.Args[1]
  7611  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  7612  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  7613  					continue
  7614  				}
  7615  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  7616  				x := v_0_0_1
  7617  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  7618  					continue
  7619  				}
  7620  				v_1_0 := v_1.Args[0]
  7621  				if v_1_0.Op != ssaop.OpLOONG64AND {
  7622  					continue
  7623  				}
  7624  				_ = v_1_0.Args[1]
  7625  				v_1_0_0 := v_1_0.Args[0]
  7626  				v_1_0_1 := v_1_0.Args[1]
  7627  				for _i2 := 0; _i2 <= 1; _i2, v_1_0_0, v_1_0_1 = _i2+1, v_1_0_1, v_1_0_0 {
  7628  					if v_1_0_0.Op != ssaop.OpLOONG64MOVVconst {
  7629  						continue
  7630  					}
  7631  					c2 := ssa.AuxIntToInt64(v_1_0_0.AuxInt)
  7632  					if x != v_1_0_1 || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  7633  						continue
  7634  					}
  7635  					v.Reset(ssaop.OpLOONG64REVB4H)
  7636  					v.AddArg(x)
  7637  					return true
  7638  				}
  7639  			}
  7640  		}
  7641  		break
  7642  	}
  7643  	// match: (XOR (SRLVconst [8] (AND (MOVVconst [c1]) x)) (SLLVconst [8] (ANDconst [c2] x)))
  7644  	// cond: uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff
  7645  	// result: (REVB4H (ANDconst <x.Type> [0xffffffff] x))
  7646  	for {
  7647  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7648  			if v_0.Op != ssaop.OpLOONG64SRLVconst || ssa.AuxIntToInt64(v_0.AuxInt) != 8 {
  7649  				continue
  7650  			}
  7651  			v_0_0 := v_0.Args[0]
  7652  			if v_0_0.Op != ssaop.OpLOONG64AND {
  7653  				continue
  7654  			}
  7655  			_ = v_0_0.Args[1]
  7656  			v_0_0_0 := v_0_0.Args[0]
  7657  			v_0_0_1 := v_0_0.Args[1]
  7658  			for _i1 := 0; _i1 <= 1; _i1, v_0_0_0, v_0_0_1 = _i1+1, v_0_0_1, v_0_0_0 {
  7659  				if v_0_0_0.Op != ssaop.OpLOONG64MOVVconst {
  7660  					continue
  7661  				}
  7662  				c1 := ssa.AuxIntToInt64(v_0_0_0.AuxInt)
  7663  				x := v_0_0_1
  7664  				if v_1.Op != ssaop.OpLOONG64SLLVconst || ssa.AuxIntToInt64(v_1.AuxInt) != 8 {
  7665  					continue
  7666  				}
  7667  				v_1_0 := v_1.Args[0]
  7668  				if v_1_0.Op != ssaop.OpLOONG64ANDconst {
  7669  					continue
  7670  				}
  7671  				c2 := ssa.AuxIntToInt64(v_1_0.AuxInt)
  7672  				if x != v_1_0.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  7673  					continue
  7674  				}
  7675  				v.Reset(ssaop.OpLOONG64REVB4H)
  7676  				v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, x.Type)
  7677  				v0.AuxInt = ssa.Int64ToAuxInt(0xffffffff)
  7678  				v0.AddArg(x)
  7679  				v.AddArg(v0)
  7680  				return true
  7681  			}
  7682  		}
  7683  		break
  7684  	}
  7685  	// match: (XOR x (MOVVconst [c]))
  7686  	// cond: ssa.Is32Bit(c)
  7687  	// result: (XORconst [c] x)
  7688  	for {
  7689  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7690  			x := v_0
  7691  			if v_1.Op != ssaop.OpLOONG64MOVVconst {
  7692  				continue
  7693  			}
  7694  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  7695  			if !(ssa.Is32Bit(c)) {
  7696  				continue
  7697  			}
  7698  			v.Reset(ssaop.OpLOONG64XORconst)
  7699  			v.AuxInt = ssa.Int64ToAuxInt(c)
  7700  			v.AddArg(x)
  7701  			return true
  7702  		}
  7703  		break
  7704  	}
  7705  	// match: (XOR x x)
  7706  	// result: (MOVVconst [0])
  7707  	for {
  7708  		x := v_0
  7709  		if x != v_1 {
  7710  			break
  7711  		}
  7712  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7713  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7714  		return true
  7715  	}
  7716  	return false
  7717  }
  7718  func rewriteValue_OpLOONG64XORconst(v *ssa.Value) bool {
  7719  	v_0 := v.Args[0]
  7720  	// match: (XORconst [0] x)
  7721  	// result: x
  7722  	for {
  7723  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  7724  			break
  7725  		}
  7726  		x := v_0
  7727  		v.CopyOf(x)
  7728  		return true
  7729  	}
  7730  	// match: (XORconst [-1] x)
  7731  	// result: (NORconst [0] x)
  7732  	for {
  7733  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
  7734  			break
  7735  		}
  7736  		x := v_0
  7737  		v.Reset(ssaop.OpLOONG64NORconst)
  7738  		v.AuxInt = ssa.Int64ToAuxInt(0)
  7739  		v.AddArg(x)
  7740  		return true
  7741  	}
  7742  	// match: (XORconst [c] (MOVVconst [d]))
  7743  	// result: (MOVVconst [c^d])
  7744  	for {
  7745  		c := ssa.AuxIntToInt64(v.AuxInt)
  7746  		if v_0.Op != ssaop.OpLOONG64MOVVconst {
  7747  			break
  7748  		}
  7749  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7750  		v.Reset(ssaop.OpLOONG64MOVVconst)
  7751  		v.AuxInt = ssa.Int64ToAuxInt(c ^ d)
  7752  		return true
  7753  	}
  7754  	// match: (XORconst [c] (XORconst [d] x))
  7755  	// cond: ssa.Is32Bit(c^d)
  7756  	// result: (XORconst [c^d] x)
  7757  	for {
  7758  		c := ssa.AuxIntToInt64(v.AuxInt)
  7759  		if v_0.Op != ssaop.OpLOONG64XORconst {
  7760  			break
  7761  		}
  7762  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  7763  		x := v_0.Args[0]
  7764  		if !(ssa.Is32Bit(c ^ d)) {
  7765  			break
  7766  		}
  7767  		v.Reset(ssaop.OpLOONG64XORconst)
  7768  		v.AuxInt = ssa.Int64ToAuxInt(c ^ d)
  7769  		v.AddArg(x)
  7770  		return true
  7771  	}
  7772  	return false
  7773  }
  7774  func rewriteValue_OpLeq16(v *ssa.Value) bool {
  7775  	v_1 := v.Args[1]
  7776  	v_0 := v.Args[0]
  7777  	b := v.Block
  7778  	typ := &b.Func.Config.Types
  7779  	// match: (Leq16 x y)
  7780  	// result: (XOR (MOVVconst [1]) (SGT (SignExt16to64 x) (SignExt16to64 y)))
  7781  	for {
  7782  		x := v_0
  7783  		y := v_1
  7784  		v.Reset(ssaop.OpLOONG64XOR)
  7785  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7786  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7787  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  7788  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  7789  		v2.AddArg(x)
  7790  		v3 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  7791  		v3.AddArg(y)
  7792  		v1.AddArg2(v2, v3)
  7793  		v.AddArg2(v0, v1)
  7794  		return true
  7795  	}
  7796  }
  7797  func rewriteValue_OpLeq16U(v *ssa.Value) bool {
  7798  	v_1 := v.Args[1]
  7799  	v_0 := v.Args[0]
  7800  	b := v.Block
  7801  	typ := &b.Func.Config.Types
  7802  	// match: (Leq16U x y)
  7803  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt16to64 x) (ZeroExt16to64 y)))
  7804  	for {
  7805  		x := v_0
  7806  		y := v_1
  7807  		v.Reset(ssaop.OpLOONG64XOR)
  7808  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7809  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7810  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  7811  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  7812  		v2.AddArg(x)
  7813  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  7814  		v3.AddArg(y)
  7815  		v1.AddArg2(v2, v3)
  7816  		v.AddArg2(v0, v1)
  7817  		return true
  7818  	}
  7819  }
  7820  func rewriteValue_OpLeq32(v *ssa.Value) bool {
  7821  	v_1 := v.Args[1]
  7822  	v_0 := v.Args[0]
  7823  	b := v.Block
  7824  	typ := &b.Func.Config.Types
  7825  	// match: (Leq32 x y)
  7826  	// result: (XOR (MOVVconst [1]) (SGT (SignExt32to64 x) (SignExt32to64 y)))
  7827  	for {
  7828  		x := v_0
  7829  		y := v_1
  7830  		v.Reset(ssaop.OpLOONG64XOR)
  7831  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7832  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7833  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  7834  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  7835  		v2.AddArg(x)
  7836  		v3 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  7837  		v3.AddArg(y)
  7838  		v1.AddArg2(v2, v3)
  7839  		v.AddArg2(v0, v1)
  7840  		return true
  7841  	}
  7842  }
  7843  func rewriteValue_OpLeq32F(v *ssa.Value) bool {
  7844  	v_1 := v.Args[1]
  7845  	v_0 := v.Args[0]
  7846  	b := v.Block
  7847  	// match: (Leq32F x y)
  7848  	// result: (FPFlagTrue (CMPGEF y x))
  7849  	for {
  7850  		x := v_0
  7851  		y := v_1
  7852  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  7853  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGEF, types.TypeFlags)
  7854  		v0.AddArg2(y, x)
  7855  		v.AddArg(v0)
  7856  		return true
  7857  	}
  7858  }
  7859  func rewriteValue_OpLeq32U(v *ssa.Value) bool {
  7860  	v_1 := v.Args[1]
  7861  	v_0 := v.Args[0]
  7862  	b := v.Block
  7863  	typ := &b.Func.Config.Types
  7864  	// match: (Leq32U x y)
  7865  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt32to64 x) (ZeroExt32to64 y)))
  7866  	for {
  7867  		x := v_0
  7868  		y := v_1
  7869  		v.Reset(ssaop.OpLOONG64XOR)
  7870  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7871  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7872  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  7873  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  7874  		v2.AddArg(x)
  7875  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  7876  		v3.AddArg(y)
  7877  		v1.AddArg2(v2, v3)
  7878  		v.AddArg2(v0, v1)
  7879  		return true
  7880  	}
  7881  }
  7882  func rewriteValue_OpLeq64(v *ssa.Value) bool {
  7883  	v_1 := v.Args[1]
  7884  	v_0 := v.Args[0]
  7885  	b := v.Block
  7886  	typ := &b.Func.Config.Types
  7887  	// match: (Leq64 x y)
  7888  	// result: (XOR (MOVVconst [1]) (SGT x y))
  7889  	for {
  7890  		x := v_0
  7891  		y := v_1
  7892  		v.Reset(ssaop.OpLOONG64XOR)
  7893  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7894  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7895  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  7896  		v1.AddArg2(x, y)
  7897  		v.AddArg2(v0, v1)
  7898  		return true
  7899  	}
  7900  }
  7901  func rewriteValue_OpLeq64F(v *ssa.Value) bool {
  7902  	v_1 := v.Args[1]
  7903  	v_0 := v.Args[0]
  7904  	b := v.Block
  7905  	// match: (Leq64F x y)
  7906  	// result: (FPFlagTrue (CMPGED y x))
  7907  	for {
  7908  		x := v_0
  7909  		y := v_1
  7910  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  7911  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGED, types.TypeFlags)
  7912  		v0.AddArg2(y, x)
  7913  		v.AddArg(v0)
  7914  		return true
  7915  	}
  7916  }
  7917  func rewriteValue_OpLeq64U(v *ssa.Value) bool {
  7918  	v_1 := v.Args[1]
  7919  	v_0 := v.Args[0]
  7920  	b := v.Block
  7921  	typ := &b.Func.Config.Types
  7922  	// match: (Leq64U x y)
  7923  	// result: (XOR (MOVVconst [1]) (SGTU x y))
  7924  	for {
  7925  		x := v_0
  7926  		y := v_1
  7927  		v.Reset(ssaop.OpLOONG64XOR)
  7928  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7929  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7930  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  7931  		v1.AddArg2(x, y)
  7932  		v.AddArg2(v0, v1)
  7933  		return true
  7934  	}
  7935  }
  7936  func rewriteValue_OpLeq8(v *ssa.Value) bool {
  7937  	v_1 := v.Args[1]
  7938  	v_0 := v.Args[0]
  7939  	b := v.Block
  7940  	typ := &b.Func.Config.Types
  7941  	// match: (Leq8 x y)
  7942  	// result: (XOR (MOVVconst [1]) (SGT (SignExt8to64 x) (SignExt8to64 y)))
  7943  	for {
  7944  		x := v_0
  7945  		y := v_1
  7946  		v.Reset(ssaop.OpLOONG64XOR)
  7947  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7948  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7949  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGT, typ.Bool)
  7950  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  7951  		v2.AddArg(x)
  7952  		v3 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  7953  		v3.AddArg(y)
  7954  		v1.AddArg2(v2, v3)
  7955  		v.AddArg2(v0, v1)
  7956  		return true
  7957  	}
  7958  }
  7959  func rewriteValue_OpLeq8U(v *ssa.Value) bool {
  7960  	v_1 := v.Args[1]
  7961  	v_0 := v.Args[0]
  7962  	b := v.Block
  7963  	typ := &b.Func.Config.Types
  7964  	// match: (Leq8U x y)
  7965  	// result: (XOR (MOVVconst [1]) (SGTU (ZeroExt8to64 x) (ZeroExt8to64 y)))
  7966  	for {
  7967  		x := v_0
  7968  		y := v_1
  7969  		v.Reset(ssaop.OpLOONG64XOR)
  7970  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  7971  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  7972  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  7973  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  7974  		v2.AddArg(x)
  7975  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  7976  		v3.AddArg(y)
  7977  		v1.AddArg2(v2, v3)
  7978  		v.AddArg2(v0, v1)
  7979  		return true
  7980  	}
  7981  }
  7982  func rewriteValue_OpLess16(v *ssa.Value) bool {
  7983  	v_1 := v.Args[1]
  7984  	v_0 := v.Args[0]
  7985  	b := v.Block
  7986  	typ := &b.Func.Config.Types
  7987  	// match: (Less16 x y)
  7988  	// result: (SGT (SignExt16to64 y) (SignExt16to64 x))
  7989  	for {
  7990  		x := v_0
  7991  		y := v_1
  7992  		v.Reset(ssaop.OpLOONG64SGT)
  7993  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  7994  		v0.AddArg(y)
  7995  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  7996  		v1.AddArg(x)
  7997  		v.AddArg2(v0, v1)
  7998  		return true
  7999  	}
  8000  }
  8001  func rewriteValue_OpLess16U(v *ssa.Value) bool {
  8002  	v_1 := v.Args[1]
  8003  	v_0 := v.Args[0]
  8004  	b := v.Block
  8005  	typ := &b.Func.Config.Types
  8006  	// match: (Less16U x y)
  8007  	// result: (SGTU (ZeroExt16to64 y) (ZeroExt16to64 x))
  8008  	for {
  8009  		x := v_0
  8010  		y := v_1
  8011  		v.Reset(ssaop.OpLOONG64SGTU)
  8012  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8013  		v0.AddArg(y)
  8014  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8015  		v1.AddArg(x)
  8016  		v.AddArg2(v0, v1)
  8017  		return true
  8018  	}
  8019  }
  8020  func rewriteValue_OpLess32(v *ssa.Value) bool {
  8021  	v_1 := v.Args[1]
  8022  	v_0 := v.Args[0]
  8023  	b := v.Block
  8024  	typ := &b.Func.Config.Types
  8025  	// match: (Less32 x y)
  8026  	// result: (SGT (SignExt32to64 y) (SignExt32to64 x))
  8027  	for {
  8028  		x := v_0
  8029  		y := v_1
  8030  		v.Reset(ssaop.OpLOONG64SGT)
  8031  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  8032  		v0.AddArg(y)
  8033  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  8034  		v1.AddArg(x)
  8035  		v.AddArg2(v0, v1)
  8036  		return true
  8037  	}
  8038  }
  8039  func rewriteValue_OpLess32F(v *ssa.Value) bool {
  8040  	v_1 := v.Args[1]
  8041  	v_0 := v.Args[0]
  8042  	b := v.Block
  8043  	// match: (Less32F x y)
  8044  	// result: (FPFlagTrue (CMPGTF y x))
  8045  	for {
  8046  		x := v_0
  8047  		y := v_1
  8048  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  8049  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGTF, types.TypeFlags)
  8050  		v0.AddArg2(y, x)
  8051  		v.AddArg(v0)
  8052  		return true
  8053  	}
  8054  }
  8055  func rewriteValue_OpLess32U(v *ssa.Value) bool {
  8056  	v_1 := v.Args[1]
  8057  	v_0 := v.Args[0]
  8058  	b := v.Block
  8059  	typ := &b.Func.Config.Types
  8060  	// match: (Less32U x y)
  8061  	// result: (SGTU (ZeroExt32to64 y) (ZeroExt32to64 x))
  8062  	for {
  8063  		x := v_0
  8064  		y := v_1
  8065  		v.Reset(ssaop.OpLOONG64SGTU)
  8066  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8067  		v0.AddArg(y)
  8068  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8069  		v1.AddArg(x)
  8070  		v.AddArg2(v0, v1)
  8071  		return true
  8072  	}
  8073  }
  8074  func rewriteValue_OpLess64(v *ssa.Value) bool {
  8075  	v_1 := v.Args[1]
  8076  	v_0 := v.Args[0]
  8077  	// match: (Less64 x y)
  8078  	// result: (SGT y x)
  8079  	for {
  8080  		x := v_0
  8081  		y := v_1
  8082  		v.Reset(ssaop.OpLOONG64SGT)
  8083  		v.AddArg2(y, x)
  8084  		return true
  8085  	}
  8086  }
  8087  func rewriteValue_OpLess64F(v *ssa.Value) bool {
  8088  	v_1 := v.Args[1]
  8089  	v_0 := v.Args[0]
  8090  	b := v.Block
  8091  	// match: (Less64F x y)
  8092  	// result: (FPFlagTrue (CMPGTD y x))
  8093  	for {
  8094  		x := v_0
  8095  		y := v_1
  8096  		v.Reset(ssaop.OpLOONG64FPFlagTrue)
  8097  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPGTD, types.TypeFlags)
  8098  		v0.AddArg2(y, x)
  8099  		v.AddArg(v0)
  8100  		return true
  8101  	}
  8102  }
  8103  func rewriteValue_OpLess64U(v *ssa.Value) bool {
  8104  	v_1 := v.Args[1]
  8105  	v_0 := v.Args[0]
  8106  	// match: (Less64U x y)
  8107  	// result: (SGTU y x)
  8108  	for {
  8109  		x := v_0
  8110  		y := v_1
  8111  		v.Reset(ssaop.OpLOONG64SGTU)
  8112  		v.AddArg2(y, x)
  8113  		return true
  8114  	}
  8115  }
  8116  func rewriteValue_OpLess8(v *ssa.Value) bool {
  8117  	v_1 := v.Args[1]
  8118  	v_0 := v.Args[0]
  8119  	b := v.Block
  8120  	typ := &b.Func.Config.Types
  8121  	// match: (Less8 x y)
  8122  	// result: (SGT (SignExt8to64 y) (SignExt8to64 x))
  8123  	for {
  8124  		x := v_0
  8125  		y := v_1
  8126  		v.Reset(ssaop.OpLOONG64SGT)
  8127  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  8128  		v0.AddArg(y)
  8129  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  8130  		v1.AddArg(x)
  8131  		v.AddArg2(v0, v1)
  8132  		return true
  8133  	}
  8134  }
  8135  func rewriteValue_OpLess8U(v *ssa.Value) bool {
  8136  	v_1 := v.Args[1]
  8137  	v_0 := v.Args[0]
  8138  	b := v.Block
  8139  	typ := &b.Func.Config.Types
  8140  	// match: (Less8U x y)
  8141  	// result: (SGTU (ZeroExt8to64 y) (ZeroExt8to64 x))
  8142  	for {
  8143  		x := v_0
  8144  		y := v_1
  8145  		v.Reset(ssaop.OpLOONG64SGTU)
  8146  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8147  		v0.AddArg(y)
  8148  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8149  		v1.AddArg(x)
  8150  		v.AddArg2(v0, v1)
  8151  		return true
  8152  	}
  8153  }
  8154  func rewriteValue_OpLoad(v *ssa.Value) bool {
  8155  	v_1 := v.Args[1]
  8156  	v_0 := v.Args[0]
  8157  	// match: (Load <t> ptr mem)
  8158  	// cond: t.IsBoolean()
  8159  	// result: (MOVBUload ptr mem)
  8160  	for {
  8161  		t := v.Type
  8162  		ptr := v_0
  8163  		mem := v_1
  8164  		if !(t.IsBoolean()) {
  8165  			break
  8166  		}
  8167  		v.Reset(ssaop.OpLOONG64MOVBUload)
  8168  		v.AddArg2(ptr, mem)
  8169  		return true
  8170  	}
  8171  	// match: (Load <t> ptr mem)
  8172  	// cond: (ssa.Is8BitInt(t) && t.IsSigned())
  8173  	// result: (MOVBload ptr mem)
  8174  	for {
  8175  		t := v.Type
  8176  		ptr := v_0
  8177  		mem := v_1
  8178  		if !(ssa.Is8BitInt(t) && t.IsSigned()) {
  8179  			break
  8180  		}
  8181  		v.Reset(ssaop.OpLOONG64MOVBload)
  8182  		v.AddArg2(ptr, mem)
  8183  		return true
  8184  	}
  8185  	// match: (Load <t> ptr mem)
  8186  	// cond: (ssa.Is8BitInt(t) && !t.IsSigned())
  8187  	// result: (MOVBUload ptr mem)
  8188  	for {
  8189  		t := v.Type
  8190  		ptr := v_0
  8191  		mem := v_1
  8192  		if !(ssa.Is8BitInt(t) && !t.IsSigned()) {
  8193  			break
  8194  		}
  8195  		v.Reset(ssaop.OpLOONG64MOVBUload)
  8196  		v.AddArg2(ptr, mem)
  8197  		return true
  8198  	}
  8199  	// match: (Load <t> ptr mem)
  8200  	// cond: (ssa.Is16BitInt(t) && t.IsSigned())
  8201  	// result: (MOVHload ptr mem)
  8202  	for {
  8203  		t := v.Type
  8204  		ptr := v_0
  8205  		mem := v_1
  8206  		if !(ssa.Is16BitInt(t) && t.IsSigned()) {
  8207  			break
  8208  		}
  8209  		v.Reset(ssaop.OpLOONG64MOVHload)
  8210  		v.AddArg2(ptr, mem)
  8211  		return true
  8212  	}
  8213  	// match: (Load <t> ptr mem)
  8214  	// cond: (ssa.Is16BitInt(t) && !t.IsSigned())
  8215  	// result: (MOVHUload ptr mem)
  8216  	for {
  8217  		t := v.Type
  8218  		ptr := v_0
  8219  		mem := v_1
  8220  		if !(ssa.Is16BitInt(t) && !t.IsSigned()) {
  8221  			break
  8222  		}
  8223  		v.Reset(ssaop.OpLOONG64MOVHUload)
  8224  		v.AddArg2(ptr, mem)
  8225  		return true
  8226  	}
  8227  	// match: (Load <t> ptr mem)
  8228  	// cond: (ssa.Is32BitInt(t) && t.IsSigned())
  8229  	// result: (MOVWload ptr mem)
  8230  	for {
  8231  		t := v.Type
  8232  		ptr := v_0
  8233  		mem := v_1
  8234  		if !(ssa.Is32BitInt(t) && t.IsSigned()) {
  8235  			break
  8236  		}
  8237  		v.Reset(ssaop.OpLOONG64MOVWload)
  8238  		v.AddArg2(ptr, mem)
  8239  		return true
  8240  	}
  8241  	// match: (Load <t> ptr mem)
  8242  	// cond: (ssa.Is32BitInt(t) && !t.IsSigned())
  8243  	// result: (MOVWUload ptr mem)
  8244  	for {
  8245  		t := v.Type
  8246  		ptr := v_0
  8247  		mem := v_1
  8248  		if !(ssa.Is32BitInt(t) && !t.IsSigned()) {
  8249  			break
  8250  		}
  8251  		v.Reset(ssaop.OpLOONG64MOVWUload)
  8252  		v.AddArg2(ptr, mem)
  8253  		return true
  8254  	}
  8255  	// match: (Load <t> ptr mem)
  8256  	// cond: (ssa.Is64BitInt(t) ||ssa.IsPtr(t))
  8257  	// result: (MOVVload ptr mem)
  8258  	for {
  8259  		t := v.Type
  8260  		ptr := v_0
  8261  		mem := v_1
  8262  		if !(ssa.Is64BitInt(t) || ssa.IsPtr(t)) {
  8263  			break
  8264  		}
  8265  		v.Reset(ssaop.OpLOONG64MOVVload)
  8266  		v.AddArg2(ptr, mem)
  8267  		return true
  8268  	}
  8269  	// match: (Load <t> ptr mem)
  8270  	// cond: ssa.Is32BitFloat(t)
  8271  	// result: (MOVFload ptr mem)
  8272  	for {
  8273  		t := v.Type
  8274  		ptr := v_0
  8275  		mem := v_1
  8276  		if !(ssa.Is32BitFloat(t)) {
  8277  			break
  8278  		}
  8279  		v.Reset(ssaop.OpLOONG64MOVFload)
  8280  		v.AddArg2(ptr, mem)
  8281  		return true
  8282  	}
  8283  	// match: (Load <t> ptr mem)
  8284  	// cond: ssa.Is64BitFloat(t)
  8285  	// result: (MOVDload ptr mem)
  8286  	for {
  8287  		t := v.Type
  8288  		ptr := v_0
  8289  		mem := v_1
  8290  		if !(ssa.Is64BitFloat(t)) {
  8291  			break
  8292  		}
  8293  		v.Reset(ssaop.OpLOONG64MOVDload)
  8294  		v.AddArg2(ptr, mem)
  8295  		return true
  8296  	}
  8297  	return false
  8298  }
  8299  func rewriteValue_OpLocalAddr(v *ssa.Value) bool {
  8300  	v_1 := v.Args[1]
  8301  	v_0 := v.Args[0]
  8302  	b := v.Block
  8303  	typ := &b.Func.Config.Types
  8304  	// match: (LocalAddr <t> {sym} base mem)
  8305  	// cond: t.Elem().HasPointers()
  8306  	// result: (MOVVaddr {sym} (SPanchored base mem))
  8307  	for {
  8308  		t := v.Type
  8309  		sym := ssa.AuxToSym(v.Aux)
  8310  		base := v_0
  8311  		mem := v_1
  8312  		if !(t.Elem().HasPointers()) {
  8313  			break
  8314  		}
  8315  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  8316  		v.Aux = ssa.SymToAux(sym)
  8317  		v0 := b.NewValue0(v.Pos, ssaop.OpSPanchored, typ.Uintptr)
  8318  		v0.AddArg2(base, mem)
  8319  		v.AddArg(v0)
  8320  		return true
  8321  	}
  8322  	// match: (LocalAddr <t> {sym} base _)
  8323  	// cond: !t.Elem().HasPointers()
  8324  	// result: (MOVVaddr {sym} base)
  8325  	for {
  8326  		t := v.Type
  8327  		sym := ssa.AuxToSym(v.Aux)
  8328  		base := v_0
  8329  		if !(!t.Elem().HasPointers()) {
  8330  			break
  8331  		}
  8332  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  8333  		v.Aux = ssa.SymToAux(sym)
  8334  		v.AddArg(base)
  8335  		return true
  8336  	}
  8337  	return false
  8338  }
  8339  func rewriteValue_OpLsh16x16(v *ssa.Value) bool {
  8340  	v_1 := v.Args[1]
  8341  	v_0 := v.Args[0]
  8342  	b := v.Block
  8343  	typ := &b.Func.Config.Types
  8344  	// match: (Lsh16x16 x y)
  8345  	// cond: ssa.ShiftIsBounded(v)
  8346  	// result: (SLLV x y)
  8347  	for {
  8348  		x := v_0
  8349  		y := v_1
  8350  		if !(ssa.ShiftIsBounded(v)) {
  8351  			break
  8352  		}
  8353  		v.Reset(ssaop.OpLOONG64SLLV)
  8354  		v.AddArg2(x, y)
  8355  		return true
  8356  	}
  8357  	// match: (Lsh16x16 <t> x y)
  8358  	// cond: !ssa.ShiftIsBounded(v)
  8359  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  8360  	for {
  8361  		t := v.Type
  8362  		x := v_0
  8363  		y := v_1
  8364  		if !(!ssa.ShiftIsBounded(v)) {
  8365  			break
  8366  		}
  8367  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8368  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8369  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8370  		v1.AddArg(y)
  8371  		v0.AddArg2(x, v1)
  8372  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8373  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8374  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8375  		v2.AddArg2(v3, v1)
  8376  		v.AddArg2(v0, v2)
  8377  		return true
  8378  	}
  8379  	return false
  8380  }
  8381  func rewriteValue_OpLsh16x32(v *ssa.Value) bool {
  8382  	v_1 := v.Args[1]
  8383  	v_0 := v.Args[0]
  8384  	b := v.Block
  8385  	typ := &b.Func.Config.Types
  8386  	// match: (Lsh16x32 x y)
  8387  	// cond: ssa.ShiftIsBounded(v)
  8388  	// result: (SLLV x y)
  8389  	for {
  8390  		x := v_0
  8391  		y := v_1
  8392  		if !(ssa.ShiftIsBounded(v)) {
  8393  			break
  8394  		}
  8395  		v.Reset(ssaop.OpLOONG64SLLV)
  8396  		v.AddArg2(x, y)
  8397  		return true
  8398  	}
  8399  	// match: (Lsh16x32 <t> x y)
  8400  	// cond: !ssa.ShiftIsBounded(v)
  8401  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  8402  	for {
  8403  		t := v.Type
  8404  		x := v_0
  8405  		y := v_1
  8406  		if !(!ssa.ShiftIsBounded(v)) {
  8407  			break
  8408  		}
  8409  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8410  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8411  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8412  		v1.AddArg(y)
  8413  		v0.AddArg2(x, v1)
  8414  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8415  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8416  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8417  		v2.AddArg2(v3, v1)
  8418  		v.AddArg2(v0, v2)
  8419  		return true
  8420  	}
  8421  	return false
  8422  }
  8423  func rewriteValue_OpLsh16x64(v *ssa.Value) bool {
  8424  	v_1 := v.Args[1]
  8425  	v_0 := v.Args[0]
  8426  	b := v.Block
  8427  	typ := &b.Func.Config.Types
  8428  	// match: (Lsh16x64 x y)
  8429  	// cond: ssa.ShiftIsBounded(v)
  8430  	// result: (SLLV x y)
  8431  	for {
  8432  		x := v_0
  8433  		y := v_1
  8434  		if !(ssa.ShiftIsBounded(v)) {
  8435  			break
  8436  		}
  8437  		v.Reset(ssaop.OpLOONG64SLLV)
  8438  		v.AddArg2(x, y)
  8439  		return true
  8440  	}
  8441  	// match: (Lsh16x64 <t> x y)
  8442  	// cond: !ssa.ShiftIsBounded(v)
  8443  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  8444  	for {
  8445  		t := v.Type
  8446  		x := v_0
  8447  		y := v_1
  8448  		if !(!ssa.ShiftIsBounded(v)) {
  8449  			break
  8450  		}
  8451  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8452  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8453  		v0.AddArg2(x, y)
  8454  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8455  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8456  		v2.AuxInt = ssa.Int64ToAuxInt(64)
  8457  		v1.AddArg2(v2, y)
  8458  		v.AddArg2(v0, v1)
  8459  		return true
  8460  	}
  8461  	return false
  8462  }
  8463  func rewriteValue_OpLsh16x8(v *ssa.Value) bool {
  8464  	v_1 := v.Args[1]
  8465  	v_0 := v.Args[0]
  8466  	b := v.Block
  8467  	typ := &b.Func.Config.Types
  8468  	// match: (Lsh16x8 x y)
  8469  	// cond: ssa.ShiftIsBounded(v)
  8470  	// result: (SLLV x y)
  8471  	for {
  8472  		x := v_0
  8473  		y := v_1
  8474  		if !(ssa.ShiftIsBounded(v)) {
  8475  			break
  8476  		}
  8477  		v.Reset(ssaop.OpLOONG64SLLV)
  8478  		v.AddArg2(x, y)
  8479  		return true
  8480  	}
  8481  	// match: (Lsh16x8 <t> x y)
  8482  	// cond: !ssa.ShiftIsBounded(v)
  8483  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  8484  	for {
  8485  		t := v.Type
  8486  		x := v_0
  8487  		y := v_1
  8488  		if !(!ssa.ShiftIsBounded(v)) {
  8489  			break
  8490  		}
  8491  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8492  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8493  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8494  		v1.AddArg(y)
  8495  		v0.AddArg2(x, v1)
  8496  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8497  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8498  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8499  		v2.AddArg2(v3, v1)
  8500  		v.AddArg2(v0, v2)
  8501  		return true
  8502  	}
  8503  	return false
  8504  }
  8505  func rewriteValue_OpLsh32x16(v *ssa.Value) bool {
  8506  	v_1 := v.Args[1]
  8507  	v_0 := v.Args[0]
  8508  	b := v.Block
  8509  	typ := &b.Func.Config.Types
  8510  	// match: (Lsh32x16 x y)
  8511  	// cond: ssa.ShiftIsBounded(v)
  8512  	// result: (SLL x y)
  8513  	for {
  8514  		x := v_0
  8515  		y := v_1
  8516  		if !(ssa.ShiftIsBounded(v)) {
  8517  			break
  8518  		}
  8519  		v.Reset(ssaop.OpLOONG64SLL)
  8520  		v.AddArg2(x, y)
  8521  		return true
  8522  	}
  8523  	// match: (Lsh32x16 <t> x y)
  8524  	// cond: !ssa.ShiftIsBounded(v)
  8525  	// result: (MASKEQZ (SLL <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt16to64 y)))
  8526  	for {
  8527  		t := v.Type
  8528  		x := v_0
  8529  		y := v_1
  8530  		if !(!ssa.ShiftIsBounded(v)) {
  8531  			break
  8532  		}
  8533  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8534  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8535  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8536  		v1.AddArg(y)
  8537  		v0.AddArg2(x, v1)
  8538  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8539  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8540  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  8541  		v2.AddArg2(v3, v1)
  8542  		v.AddArg2(v0, v2)
  8543  		return true
  8544  	}
  8545  	return false
  8546  }
  8547  func rewriteValue_OpLsh32x32(v *ssa.Value) bool {
  8548  	v_1 := v.Args[1]
  8549  	v_0 := v.Args[0]
  8550  	b := v.Block
  8551  	typ := &b.Func.Config.Types
  8552  	// match: (Lsh32x32 x y)
  8553  	// cond: ssa.ShiftIsBounded(v)
  8554  	// result: (SLL x y)
  8555  	for {
  8556  		x := v_0
  8557  		y := v_1
  8558  		if !(ssa.ShiftIsBounded(v)) {
  8559  			break
  8560  		}
  8561  		v.Reset(ssaop.OpLOONG64SLL)
  8562  		v.AddArg2(x, y)
  8563  		return true
  8564  	}
  8565  	// match: (Lsh32x32 <t> x y)
  8566  	// cond: !ssa.ShiftIsBounded(v)
  8567  	// result: (MASKEQZ (SLL <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt32to64 y)))
  8568  	for {
  8569  		t := v.Type
  8570  		x := v_0
  8571  		y := v_1
  8572  		if !(!ssa.ShiftIsBounded(v)) {
  8573  			break
  8574  		}
  8575  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8576  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8577  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8578  		v1.AddArg(y)
  8579  		v0.AddArg2(x, v1)
  8580  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8581  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8582  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  8583  		v2.AddArg2(v3, v1)
  8584  		v.AddArg2(v0, v2)
  8585  		return true
  8586  	}
  8587  	return false
  8588  }
  8589  func rewriteValue_OpLsh32x64(v *ssa.Value) bool {
  8590  	v_1 := v.Args[1]
  8591  	v_0 := v.Args[0]
  8592  	b := v.Block
  8593  	typ := &b.Func.Config.Types
  8594  	// match: (Lsh32x64 x y)
  8595  	// cond: ssa.ShiftIsBounded(v)
  8596  	// result: (SLL x y)
  8597  	for {
  8598  		x := v_0
  8599  		y := v_1
  8600  		if !(ssa.ShiftIsBounded(v)) {
  8601  			break
  8602  		}
  8603  		v.Reset(ssaop.OpLOONG64SLL)
  8604  		v.AddArg2(x, y)
  8605  		return true
  8606  	}
  8607  	// match: (Lsh32x64 <t> x y)
  8608  	// cond: !ssa.ShiftIsBounded(v)
  8609  	// result: (MASKEQZ (SLL <t> x y) (SGTU (MOVVconst <typ.UInt64> [32]) y))
  8610  	for {
  8611  		t := v.Type
  8612  		x := v_0
  8613  		y := v_1
  8614  		if !(!ssa.ShiftIsBounded(v)) {
  8615  			break
  8616  		}
  8617  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8618  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8619  		v0.AddArg2(x, y)
  8620  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8621  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8622  		v2.AuxInt = ssa.Int64ToAuxInt(32)
  8623  		v1.AddArg2(v2, y)
  8624  		v.AddArg2(v0, v1)
  8625  		return true
  8626  	}
  8627  	return false
  8628  }
  8629  func rewriteValue_OpLsh32x8(v *ssa.Value) bool {
  8630  	v_1 := v.Args[1]
  8631  	v_0 := v.Args[0]
  8632  	b := v.Block
  8633  	typ := &b.Func.Config.Types
  8634  	// match: (Lsh32x8 x y)
  8635  	// cond: ssa.ShiftIsBounded(v)
  8636  	// result: (SLL x y)
  8637  	for {
  8638  		x := v_0
  8639  		y := v_1
  8640  		if !(ssa.ShiftIsBounded(v)) {
  8641  			break
  8642  		}
  8643  		v.Reset(ssaop.OpLOONG64SLL)
  8644  		v.AddArg2(x, y)
  8645  		return true
  8646  	}
  8647  	// match: (Lsh32x8 <t> x y)
  8648  	// cond: !ssa.ShiftIsBounded(v)
  8649  	// result: (MASKEQZ (SLL <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt8to64 y)))
  8650  	for {
  8651  		t := v.Type
  8652  		x := v_0
  8653  		y := v_1
  8654  		if !(!ssa.ShiftIsBounded(v)) {
  8655  			break
  8656  		}
  8657  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8658  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLL, t)
  8659  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8660  		v1.AddArg(y)
  8661  		v0.AddArg2(x, v1)
  8662  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8663  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8664  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  8665  		v2.AddArg2(v3, v1)
  8666  		v.AddArg2(v0, v2)
  8667  		return true
  8668  	}
  8669  	return false
  8670  }
  8671  func rewriteValue_OpLsh64x16(v *ssa.Value) bool {
  8672  	v_1 := v.Args[1]
  8673  	v_0 := v.Args[0]
  8674  	b := v.Block
  8675  	typ := &b.Func.Config.Types
  8676  	// match: (Lsh64x16 x y)
  8677  	// cond: ssa.ShiftIsBounded(v)
  8678  	// result: (SLLV x y)
  8679  	for {
  8680  		x := v_0
  8681  		y := v_1
  8682  		if !(ssa.ShiftIsBounded(v)) {
  8683  			break
  8684  		}
  8685  		v.Reset(ssaop.OpLOONG64SLLV)
  8686  		v.AddArg2(x, y)
  8687  		return true
  8688  	}
  8689  	// match: (Lsh64x16 <t> x y)
  8690  	// cond: !ssa.ShiftIsBounded(v)
  8691  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  8692  	for {
  8693  		t := v.Type
  8694  		x := v_0
  8695  		y := v_1
  8696  		if !(!ssa.ShiftIsBounded(v)) {
  8697  			break
  8698  		}
  8699  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8700  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8701  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8702  		v1.AddArg(y)
  8703  		v0.AddArg2(x, v1)
  8704  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8705  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8706  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8707  		v2.AddArg2(v3, v1)
  8708  		v.AddArg2(v0, v2)
  8709  		return true
  8710  	}
  8711  	return false
  8712  }
  8713  func rewriteValue_OpLsh64x32(v *ssa.Value) bool {
  8714  	v_1 := v.Args[1]
  8715  	v_0 := v.Args[0]
  8716  	b := v.Block
  8717  	typ := &b.Func.Config.Types
  8718  	// match: (Lsh64x32 x y)
  8719  	// cond: ssa.ShiftIsBounded(v)
  8720  	// result: (SLLV x y)
  8721  	for {
  8722  		x := v_0
  8723  		y := v_1
  8724  		if !(ssa.ShiftIsBounded(v)) {
  8725  			break
  8726  		}
  8727  		v.Reset(ssaop.OpLOONG64SLLV)
  8728  		v.AddArg2(x, y)
  8729  		return true
  8730  	}
  8731  	// match: (Lsh64x32 <t> x y)
  8732  	// cond: !ssa.ShiftIsBounded(v)
  8733  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  8734  	for {
  8735  		t := v.Type
  8736  		x := v_0
  8737  		y := v_1
  8738  		if !(!ssa.ShiftIsBounded(v)) {
  8739  			break
  8740  		}
  8741  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8742  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8743  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8744  		v1.AddArg(y)
  8745  		v0.AddArg2(x, v1)
  8746  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8747  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8748  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8749  		v2.AddArg2(v3, v1)
  8750  		v.AddArg2(v0, v2)
  8751  		return true
  8752  	}
  8753  	return false
  8754  }
  8755  func rewriteValue_OpLsh64x64(v *ssa.Value) bool {
  8756  	v_1 := v.Args[1]
  8757  	v_0 := v.Args[0]
  8758  	b := v.Block
  8759  	typ := &b.Func.Config.Types
  8760  	// match: (Lsh64x64 x y)
  8761  	// cond: ssa.ShiftIsBounded(v)
  8762  	// result: (SLLV x y)
  8763  	for {
  8764  		x := v_0
  8765  		y := v_1
  8766  		if !(ssa.ShiftIsBounded(v)) {
  8767  			break
  8768  		}
  8769  		v.Reset(ssaop.OpLOONG64SLLV)
  8770  		v.AddArg2(x, y)
  8771  		return true
  8772  	}
  8773  	// match: (Lsh64x64 <t> x y)
  8774  	// cond: !ssa.ShiftIsBounded(v)
  8775  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  8776  	for {
  8777  		t := v.Type
  8778  		x := v_0
  8779  		y := v_1
  8780  		if !(!ssa.ShiftIsBounded(v)) {
  8781  			break
  8782  		}
  8783  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8784  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8785  		v0.AddArg2(x, y)
  8786  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8787  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8788  		v2.AuxInt = ssa.Int64ToAuxInt(64)
  8789  		v1.AddArg2(v2, y)
  8790  		v.AddArg2(v0, v1)
  8791  		return true
  8792  	}
  8793  	return false
  8794  }
  8795  func rewriteValue_OpLsh64x8(v *ssa.Value) bool {
  8796  	v_1 := v.Args[1]
  8797  	v_0 := v.Args[0]
  8798  	b := v.Block
  8799  	typ := &b.Func.Config.Types
  8800  	// match: (Lsh64x8 x y)
  8801  	// cond: ssa.ShiftIsBounded(v)
  8802  	// result: (SLLV x y)
  8803  	for {
  8804  		x := v_0
  8805  		y := v_1
  8806  		if !(ssa.ShiftIsBounded(v)) {
  8807  			break
  8808  		}
  8809  		v.Reset(ssaop.OpLOONG64SLLV)
  8810  		v.AddArg2(x, y)
  8811  		return true
  8812  	}
  8813  	// match: (Lsh64x8 <t> x y)
  8814  	// cond: !ssa.ShiftIsBounded(v)
  8815  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  8816  	for {
  8817  		t := v.Type
  8818  		x := v_0
  8819  		y := v_1
  8820  		if !(!ssa.ShiftIsBounded(v)) {
  8821  			break
  8822  		}
  8823  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8824  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8825  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8826  		v1.AddArg(y)
  8827  		v0.AddArg2(x, v1)
  8828  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8829  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8830  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8831  		v2.AddArg2(v3, v1)
  8832  		v.AddArg2(v0, v2)
  8833  		return true
  8834  	}
  8835  	return false
  8836  }
  8837  func rewriteValue_OpLsh8x16(v *ssa.Value) bool {
  8838  	v_1 := v.Args[1]
  8839  	v_0 := v.Args[0]
  8840  	b := v.Block
  8841  	typ := &b.Func.Config.Types
  8842  	// match: (Lsh8x16 x y)
  8843  	// cond: ssa.ShiftIsBounded(v)
  8844  	// result: (SLLV x y)
  8845  	for {
  8846  		x := v_0
  8847  		y := v_1
  8848  		if !(ssa.ShiftIsBounded(v)) {
  8849  			break
  8850  		}
  8851  		v.Reset(ssaop.OpLOONG64SLLV)
  8852  		v.AddArg2(x, y)
  8853  		return true
  8854  	}
  8855  	// match: (Lsh8x16 <t> x y)
  8856  	// cond: !ssa.ShiftIsBounded(v)
  8857  	// result: (MASKEQZ (SLLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  8858  	for {
  8859  		t := v.Type
  8860  		x := v_0
  8861  		y := v_1
  8862  		if !(!ssa.ShiftIsBounded(v)) {
  8863  			break
  8864  		}
  8865  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8866  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8867  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  8868  		v1.AddArg(y)
  8869  		v0.AddArg2(x, v1)
  8870  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8871  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8872  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8873  		v2.AddArg2(v3, v1)
  8874  		v.AddArg2(v0, v2)
  8875  		return true
  8876  	}
  8877  	return false
  8878  }
  8879  func rewriteValue_OpLsh8x32(v *ssa.Value) bool {
  8880  	v_1 := v.Args[1]
  8881  	v_0 := v.Args[0]
  8882  	b := v.Block
  8883  	typ := &b.Func.Config.Types
  8884  	// match: (Lsh8x32 x y)
  8885  	// cond: ssa.ShiftIsBounded(v)
  8886  	// result: (SLLV x y)
  8887  	for {
  8888  		x := v_0
  8889  		y := v_1
  8890  		if !(ssa.ShiftIsBounded(v)) {
  8891  			break
  8892  		}
  8893  		v.Reset(ssaop.OpLOONG64SLLV)
  8894  		v.AddArg2(x, y)
  8895  		return true
  8896  	}
  8897  	// match: (Lsh8x32 <t> x y)
  8898  	// cond: !ssa.ShiftIsBounded(v)
  8899  	// result: (MASKEQZ (SLLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  8900  	for {
  8901  		t := v.Type
  8902  		x := v_0
  8903  		y := v_1
  8904  		if !(!ssa.ShiftIsBounded(v)) {
  8905  			break
  8906  		}
  8907  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8908  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8909  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  8910  		v1.AddArg(y)
  8911  		v0.AddArg2(x, v1)
  8912  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8913  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8914  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8915  		v2.AddArg2(v3, v1)
  8916  		v.AddArg2(v0, v2)
  8917  		return true
  8918  	}
  8919  	return false
  8920  }
  8921  func rewriteValue_OpLsh8x64(v *ssa.Value) bool {
  8922  	v_1 := v.Args[1]
  8923  	v_0 := v.Args[0]
  8924  	b := v.Block
  8925  	typ := &b.Func.Config.Types
  8926  	// match: (Lsh8x64 x y)
  8927  	// cond: ssa.ShiftIsBounded(v)
  8928  	// result: (SLLV x y)
  8929  	for {
  8930  		x := v_0
  8931  		y := v_1
  8932  		if !(ssa.ShiftIsBounded(v)) {
  8933  			break
  8934  		}
  8935  		v.Reset(ssaop.OpLOONG64SLLV)
  8936  		v.AddArg2(x, y)
  8937  		return true
  8938  	}
  8939  	// match: (Lsh8x64 <t> x y)
  8940  	// cond: !ssa.ShiftIsBounded(v)
  8941  	// result: (MASKEQZ (SLLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
  8942  	for {
  8943  		t := v.Type
  8944  		x := v_0
  8945  		y := v_1
  8946  		if !(!ssa.ShiftIsBounded(v)) {
  8947  			break
  8948  		}
  8949  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8950  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8951  		v0.AddArg2(x, y)
  8952  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8953  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8954  		v2.AuxInt = ssa.Int64ToAuxInt(64)
  8955  		v1.AddArg2(v2, y)
  8956  		v.AddArg2(v0, v1)
  8957  		return true
  8958  	}
  8959  	return false
  8960  }
  8961  func rewriteValue_OpLsh8x8(v *ssa.Value) bool {
  8962  	v_1 := v.Args[1]
  8963  	v_0 := v.Args[0]
  8964  	b := v.Block
  8965  	typ := &b.Func.Config.Types
  8966  	// match: (Lsh8x8 x y)
  8967  	// cond: ssa.ShiftIsBounded(v)
  8968  	// result: (SLLV x y)
  8969  	for {
  8970  		x := v_0
  8971  		y := v_1
  8972  		if !(ssa.ShiftIsBounded(v)) {
  8973  			break
  8974  		}
  8975  		v.Reset(ssaop.OpLOONG64SLLV)
  8976  		v.AddArg2(x, y)
  8977  		return true
  8978  	}
  8979  	// match: (Lsh8x8 <t> x y)
  8980  	// cond: !ssa.ShiftIsBounded(v)
  8981  	// result: (MASKEQZ (SLLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
  8982  	for {
  8983  		t := v.Type
  8984  		x := v_0
  8985  		y := v_1
  8986  		if !(!ssa.ShiftIsBounded(v)) {
  8987  			break
  8988  		}
  8989  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  8990  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  8991  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  8992  		v1.AddArg(y)
  8993  		v0.AddArg2(x, v1)
  8994  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  8995  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  8996  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  8997  		v2.AddArg2(v3, v1)
  8998  		v.AddArg2(v0, v2)
  8999  		return true
  9000  	}
  9001  	return false
  9002  }
  9003  func rewriteValue_OpMod16(v *ssa.Value) bool {
  9004  	v_1 := v.Args[1]
  9005  	v_0 := v.Args[0]
  9006  	b := v.Block
  9007  	typ := &b.Func.Config.Types
  9008  	// match: (Mod16 x y)
  9009  	// result: (REMV (SignExt16to64 x) (SignExt16to64 y))
  9010  	for {
  9011  		x := v_0
  9012  		y := v_1
  9013  		v.Reset(ssaop.OpLOONG64REMV)
  9014  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  9015  		v0.AddArg(x)
  9016  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  9017  		v1.AddArg(y)
  9018  		v.AddArg2(v0, v1)
  9019  		return true
  9020  	}
  9021  }
  9022  func rewriteValue_OpMod16u(v *ssa.Value) bool {
  9023  	v_1 := v.Args[1]
  9024  	v_0 := v.Args[0]
  9025  	b := v.Block
  9026  	typ := &b.Func.Config.Types
  9027  	// match: (Mod16u x y)
  9028  	// result: (REMVU (ZeroExt16to64 x) (ZeroExt16to64 y))
  9029  	for {
  9030  		x := v_0
  9031  		y := v_1
  9032  		v.Reset(ssaop.OpLOONG64REMVU)
  9033  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9034  		v0.AddArg(x)
  9035  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9036  		v1.AddArg(y)
  9037  		v.AddArg2(v0, v1)
  9038  		return true
  9039  	}
  9040  }
  9041  func rewriteValue_OpMod32(v *ssa.Value) bool {
  9042  	v_1 := v.Args[1]
  9043  	v_0 := v.Args[0]
  9044  	b := v.Block
  9045  	typ := &b.Func.Config.Types
  9046  	// match: (Mod32 x y)
  9047  	// result: (REMV (SignExt32to64 x) (SignExt32to64 y))
  9048  	for {
  9049  		x := v_0
  9050  		y := v_1
  9051  		v.Reset(ssaop.OpLOONG64REMV)
  9052  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  9053  		v0.AddArg(x)
  9054  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  9055  		v1.AddArg(y)
  9056  		v.AddArg2(v0, v1)
  9057  		return true
  9058  	}
  9059  }
  9060  func rewriteValue_OpMod32u(v *ssa.Value) bool {
  9061  	v_1 := v.Args[1]
  9062  	v_0 := v.Args[0]
  9063  	b := v.Block
  9064  	typ := &b.Func.Config.Types
  9065  	// match: (Mod32u x y)
  9066  	// result: (REMVU (ZeroExt32to64 x) (ZeroExt32to64 y))
  9067  	for {
  9068  		x := v_0
  9069  		y := v_1
  9070  		v.Reset(ssaop.OpLOONG64REMVU)
  9071  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9072  		v0.AddArg(x)
  9073  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9074  		v1.AddArg(y)
  9075  		v.AddArg2(v0, v1)
  9076  		return true
  9077  	}
  9078  }
  9079  func rewriteValue_OpMod64(v *ssa.Value) bool {
  9080  	v_1 := v.Args[1]
  9081  	v_0 := v.Args[0]
  9082  	// match: (Mod64 x y)
  9083  	// result: (REMV x y)
  9084  	for {
  9085  		x := v_0
  9086  		y := v_1
  9087  		v.Reset(ssaop.OpLOONG64REMV)
  9088  		v.AddArg2(x, y)
  9089  		return true
  9090  	}
  9091  }
  9092  func rewriteValue_OpMod8(v *ssa.Value) bool {
  9093  	v_1 := v.Args[1]
  9094  	v_0 := v.Args[0]
  9095  	b := v.Block
  9096  	typ := &b.Func.Config.Types
  9097  	// match: (Mod8 x y)
  9098  	// result: (REMV (SignExt8to64 x) (SignExt8to64 y))
  9099  	for {
  9100  		x := v_0
  9101  		y := v_1
  9102  		v.Reset(ssaop.OpLOONG64REMV)
  9103  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  9104  		v0.AddArg(x)
  9105  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  9106  		v1.AddArg(y)
  9107  		v.AddArg2(v0, v1)
  9108  		return true
  9109  	}
  9110  }
  9111  func rewriteValue_OpMod8u(v *ssa.Value) bool {
  9112  	v_1 := v.Args[1]
  9113  	v_0 := v.Args[0]
  9114  	b := v.Block
  9115  	typ := &b.Func.Config.Types
  9116  	// match: (Mod8u x y)
  9117  	// result: (REMVU (ZeroExt8to64 x) (ZeroExt8to64 y))
  9118  	for {
  9119  		x := v_0
  9120  		y := v_1
  9121  		v.Reset(ssaop.OpLOONG64REMVU)
  9122  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9123  		v0.AddArg(x)
  9124  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9125  		v1.AddArg(y)
  9126  		v.AddArg2(v0, v1)
  9127  		return true
  9128  	}
  9129  }
  9130  func rewriteValue_OpMove(v *ssa.Value) bool {
  9131  	v_2 := v.Args[2]
  9132  	v_1 := v.Args[1]
  9133  	v_0 := v.Args[0]
  9134  	b := v.Block
  9135  	typ := &b.Func.Config.Types
  9136  	// match: (Move [0] _ _ mem)
  9137  	// result: mem
  9138  	for {
  9139  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  9140  			break
  9141  		}
  9142  		mem := v_2
  9143  		v.CopyOf(mem)
  9144  		return true
  9145  	}
  9146  	// match: (Move [1] dst src mem)
  9147  	// result: (MOVBstore dst (MOVBUload src mem) mem)
  9148  	for {
  9149  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
  9150  			break
  9151  		}
  9152  		dst := v_0
  9153  		src := v_1
  9154  		mem := v_2
  9155  		v.Reset(ssaop.OpLOONG64MOVBstore)
  9156  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  9157  		v0.AddArg2(src, mem)
  9158  		v.AddArg3(dst, v0, mem)
  9159  		return true
  9160  	}
  9161  	// match: (Move [2] dst src mem)
  9162  	// result: (MOVHstore dst (MOVHUload src mem) mem)
  9163  	for {
  9164  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
  9165  			break
  9166  		}
  9167  		dst := v_0
  9168  		src := v_1
  9169  		mem := v_2
  9170  		v.Reset(ssaop.OpLOONG64MOVHstore)
  9171  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  9172  		v0.AddArg2(src, mem)
  9173  		v.AddArg3(dst, v0, mem)
  9174  		return true
  9175  	}
  9176  	// match: (Move [3] dst src mem)
  9177  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
  9178  	for {
  9179  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
  9180  			break
  9181  		}
  9182  		dst := v_0
  9183  		src := v_1
  9184  		mem := v_2
  9185  		v.Reset(ssaop.OpLOONG64MOVBstore)
  9186  		v.AuxInt = ssa.Int32ToAuxInt(2)
  9187  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  9188  		v0.AuxInt = ssa.Int32ToAuxInt(2)
  9189  		v0.AddArg2(src, mem)
  9190  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHstore, types.TypeMem)
  9191  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  9192  		v2.AddArg2(src, mem)
  9193  		v1.AddArg3(dst, v2, mem)
  9194  		v.AddArg3(dst, v0, v1)
  9195  		return true
  9196  	}
  9197  	// match: (Move [4] dst src mem)
  9198  	// result: (MOVWstore dst (MOVWUload src mem) mem)
  9199  	for {
  9200  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
  9201  			break
  9202  		}
  9203  		dst := v_0
  9204  		src := v_1
  9205  		mem := v_2
  9206  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9207  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9208  		v0.AddArg2(src, mem)
  9209  		v.AddArg3(dst, v0, mem)
  9210  		return true
  9211  	}
  9212  	// match: (Move [5] dst src mem)
  9213  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9214  	for {
  9215  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
  9216  			break
  9217  		}
  9218  		dst := v_0
  9219  		src := v_1
  9220  		mem := v_2
  9221  		v.Reset(ssaop.OpLOONG64MOVBstore)
  9222  		v.AuxInt = ssa.Int32ToAuxInt(4)
  9223  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  9224  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  9225  		v0.AddArg2(src, mem)
  9226  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
  9227  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9228  		v2.AddArg2(src, mem)
  9229  		v1.AddArg3(dst, v2, mem)
  9230  		v.AddArg3(dst, v0, v1)
  9231  		return true
  9232  	}
  9233  	// match: (Move [6] dst src mem)
  9234  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9235  	for {
  9236  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
  9237  			break
  9238  		}
  9239  		dst := v_0
  9240  		src := v_1
  9241  		mem := v_2
  9242  		v.Reset(ssaop.OpLOONG64MOVHstore)
  9243  		v.AuxInt = ssa.Int32ToAuxInt(4)
  9244  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  9245  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  9246  		v0.AddArg2(src, mem)
  9247  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
  9248  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9249  		v2.AddArg2(src, mem)
  9250  		v1.AddArg3(dst, v2, mem)
  9251  		v.AddArg3(dst, v0, v1)
  9252  		return true
  9253  	}
  9254  	// match: (Move [7] dst src mem)
  9255  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
  9256  	for {
  9257  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
  9258  			break
  9259  		}
  9260  		dst := v_0
  9261  		src := v_1
  9262  		mem := v_2
  9263  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9264  		v.AuxInt = ssa.Int32ToAuxInt(3)
  9265  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9266  		v0.AuxInt = ssa.Int32ToAuxInt(3)
  9267  		v0.AddArg2(src, mem)
  9268  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
  9269  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9270  		v2.AddArg2(src, mem)
  9271  		v1.AddArg3(dst, v2, mem)
  9272  		v.AddArg3(dst, v0, v1)
  9273  		return true
  9274  	}
  9275  	// match: (Move [8] dst src mem)
  9276  	// result: (MOVVstore dst (MOVVload src mem) mem)
  9277  	for {
  9278  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
  9279  			break
  9280  		}
  9281  		dst := v_0
  9282  		src := v_1
  9283  		mem := v_2
  9284  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9285  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9286  		v0.AddArg2(src, mem)
  9287  		v.AddArg3(dst, v0, mem)
  9288  		return true
  9289  	}
  9290  	// match: (Move [9] dst src mem)
  9291  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9292  	for {
  9293  		if ssa.AuxIntToInt64(v.AuxInt) != 9 {
  9294  			break
  9295  		}
  9296  		dst := v_0
  9297  		src := v_1
  9298  		mem := v_2
  9299  		v.Reset(ssaop.OpLOONG64MOVBstore)
  9300  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9301  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVBUload, typ.UInt8)
  9302  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9303  		v0.AddArg2(src, mem)
  9304  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9305  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9306  		v2.AddArg2(src, mem)
  9307  		v1.AddArg3(dst, v2, mem)
  9308  		v.AddArg3(dst, v0, v1)
  9309  		return true
  9310  	}
  9311  	// match: (Move [10] dst src mem)
  9312  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9313  	for {
  9314  		if ssa.AuxIntToInt64(v.AuxInt) != 10 {
  9315  			break
  9316  		}
  9317  		dst := v_0
  9318  		src := v_1
  9319  		mem := v_2
  9320  		v.Reset(ssaop.OpLOONG64MOVHstore)
  9321  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9322  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHUload, typ.UInt16)
  9323  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9324  		v0.AddArg2(src, mem)
  9325  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9326  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9327  		v2.AddArg2(src, mem)
  9328  		v1.AddArg3(dst, v2, mem)
  9329  		v.AddArg3(dst, v0, v1)
  9330  		return true
  9331  	}
  9332  	// match: (Move [11] dst src mem)
  9333  	// result: (MOVWstore [7] dst (MOVWload [7] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9334  	for {
  9335  		if ssa.AuxIntToInt64(v.AuxInt) != 11 {
  9336  			break
  9337  		}
  9338  		dst := v_0
  9339  		src := v_1
  9340  		mem := v_2
  9341  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9342  		v.AuxInt = ssa.Int32ToAuxInt(7)
  9343  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWload, typ.Int32)
  9344  		v0.AuxInt = ssa.Int32ToAuxInt(7)
  9345  		v0.AddArg2(src, mem)
  9346  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9347  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9348  		v2.AddArg2(src, mem)
  9349  		v1.AddArg3(dst, v2, mem)
  9350  		v.AddArg3(dst, v0, v1)
  9351  		return true
  9352  	}
  9353  	// match: (Move [12] dst src mem)
  9354  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9355  	for {
  9356  		if ssa.AuxIntToInt64(v.AuxInt) != 12 {
  9357  			break
  9358  		}
  9359  		dst := v_0
  9360  		src := v_1
  9361  		mem := v_2
  9362  		v.Reset(ssaop.OpLOONG64MOVWstore)
  9363  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9364  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWUload, typ.UInt32)
  9365  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9366  		v0.AddArg2(src, mem)
  9367  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9368  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9369  		v2.AddArg2(src, mem)
  9370  		v1.AddArg3(dst, v2, mem)
  9371  		v.AddArg3(dst, v0, v1)
  9372  		return true
  9373  	}
  9374  	// match: (Move [13] dst src mem)
  9375  	// result: (MOVVstore [5] dst (MOVVload [5] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9376  	for {
  9377  		if ssa.AuxIntToInt64(v.AuxInt) != 13 {
  9378  			break
  9379  		}
  9380  		dst := v_0
  9381  		src := v_1
  9382  		mem := v_2
  9383  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9384  		v.AuxInt = ssa.Int32ToAuxInt(5)
  9385  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9386  		v0.AuxInt = ssa.Int32ToAuxInt(5)
  9387  		v0.AddArg2(src, mem)
  9388  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9389  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9390  		v2.AddArg2(src, mem)
  9391  		v1.AddArg3(dst, v2, mem)
  9392  		v.AddArg3(dst, v0, v1)
  9393  		return true
  9394  	}
  9395  	// match: (Move [14] dst src mem)
  9396  	// result: (MOVVstore [6] dst (MOVVload [6] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9397  	for {
  9398  		if ssa.AuxIntToInt64(v.AuxInt) != 14 {
  9399  			break
  9400  		}
  9401  		dst := v_0
  9402  		src := v_1
  9403  		mem := v_2
  9404  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9405  		v.AuxInt = ssa.Int32ToAuxInt(6)
  9406  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9407  		v0.AuxInt = ssa.Int32ToAuxInt(6)
  9408  		v0.AddArg2(src, mem)
  9409  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9410  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9411  		v2.AddArg2(src, mem)
  9412  		v1.AddArg3(dst, v2, mem)
  9413  		v.AddArg3(dst, v0, v1)
  9414  		return true
  9415  	}
  9416  	// match: (Move [15] dst src mem)
  9417  	// result: (MOVVstore [7] dst (MOVVload [7] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9418  	for {
  9419  		if ssa.AuxIntToInt64(v.AuxInt) != 15 {
  9420  			break
  9421  		}
  9422  		dst := v_0
  9423  		src := v_1
  9424  		mem := v_2
  9425  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9426  		v.AuxInt = ssa.Int32ToAuxInt(7)
  9427  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9428  		v0.AuxInt = ssa.Int32ToAuxInt(7)
  9429  		v0.AddArg2(src, mem)
  9430  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9431  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9432  		v2.AddArg2(src, mem)
  9433  		v1.AddArg3(dst, v2, mem)
  9434  		v.AddArg3(dst, v0, v1)
  9435  		return true
  9436  	}
  9437  	// match: (Move [16] dst src mem)
  9438  	// result: (MOVVstore [8] dst (MOVVload [8] src mem) (MOVVstore dst (MOVVload src mem) mem))
  9439  	for {
  9440  		if ssa.AuxIntToInt64(v.AuxInt) != 16 {
  9441  			break
  9442  		}
  9443  		dst := v_0
  9444  		src := v_1
  9445  		mem := v_2
  9446  		v.Reset(ssaop.OpLOONG64MOVVstore)
  9447  		v.AuxInt = ssa.Int32ToAuxInt(8)
  9448  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9449  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  9450  		v0.AddArg2(src, mem)
  9451  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
  9452  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVload, typ.UInt64)
  9453  		v2.AddArg2(src, mem)
  9454  		v1.AddArg3(dst, v2, mem)
  9455  		v.AddArg3(dst, v0, v1)
  9456  		return true
  9457  	}
  9458  	// match: (Move [s] dst src mem)
  9459  	// cond: s > 16 && s < 192 && ssa.LogLargeCopyValue(v, s)
  9460  	// result: (LoweredMove [s] dst src mem)
  9461  	for {
  9462  		s := ssa.AuxIntToInt64(v.AuxInt)
  9463  		dst := v_0
  9464  		src := v_1
  9465  		mem := v_2
  9466  		if !(s > 16 && s < 192 && ssa.LogLargeCopyValue(v, s)) {
  9467  			break
  9468  		}
  9469  		v.Reset(ssaop.OpLOONG64LoweredMove)
  9470  		v.AuxInt = ssa.Int64ToAuxInt(s)
  9471  		v.AddArg3(dst, src, mem)
  9472  		return true
  9473  	}
  9474  	// match: (Move [s] dst src mem)
  9475  	// cond: s >= 192 && ssa.LogLargeCopyValue(v, s)
  9476  	// result: (LoweredMoveLoop [s] dst src mem)
  9477  	for {
  9478  		s := ssa.AuxIntToInt64(v.AuxInt)
  9479  		dst := v_0
  9480  		src := v_1
  9481  		mem := v_2
  9482  		if !(s >= 192 && ssa.LogLargeCopyValue(v, s)) {
  9483  			break
  9484  		}
  9485  		v.Reset(ssaop.OpLOONG64LoweredMoveLoop)
  9486  		v.AuxInt = ssa.Int64ToAuxInt(s)
  9487  		v.AddArg3(dst, src, mem)
  9488  		return true
  9489  	}
  9490  	return false
  9491  }
  9492  func rewriteValue_OpNeq16(v *ssa.Value) bool {
  9493  	v_1 := v.Args[1]
  9494  	v_0 := v.Args[0]
  9495  	b := v.Block
  9496  	typ := &b.Func.Config.Types
  9497  	// match: (Neq16 x y)
  9498  	// result: (SGTU (XOR (ZeroExt16to32 x) (ZeroExt16to64 y)) (MOVVconst [0]))
  9499  	for {
  9500  		x := v_0
  9501  		y := v_1
  9502  		v.Reset(ssaop.OpLOONG64SGTU)
  9503  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9504  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  9505  		v1.AddArg(x)
  9506  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9507  		v2.AddArg(y)
  9508  		v0.AddArg2(v1, v2)
  9509  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9510  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  9511  		v.AddArg2(v0, v3)
  9512  		return true
  9513  	}
  9514  }
  9515  func rewriteValue_OpNeq32(v *ssa.Value) bool {
  9516  	v_1 := v.Args[1]
  9517  	v_0 := v.Args[0]
  9518  	b := v.Block
  9519  	typ := &b.Func.Config.Types
  9520  	// match: (Neq32 x y)
  9521  	// result: (SGTU (XOR (ZeroExt32to64 x) (ZeroExt32to64 y)) (MOVVconst [0]))
  9522  	for {
  9523  		x := v_0
  9524  		y := v_1
  9525  		v.Reset(ssaop.OpLOONG64SGTU)
  9526  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9527  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9528  		v1.AddArg(x)
  9529  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9530  		v2.AddArg(y)
  9531  		v0.AddArg2(v1, v2)
  9532  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9533  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  9534  		v.AddArg2(v0, v3)
  9535  		return true
  9536  	}
  9537  }
  9538  func rewriteValue_OpNeq32F(v *ssa.Value) bool {
  9539  	v_1 := v.Args[1]
  9540  	v_0 := v.Args[0]
  9541  	b := v.Block
  9542  	// match: (Neq32F x y)
  9543  	// result: (FPFlagFalse (CMPEQF x y))
  9544  	for {
  9545  		x := v_0
  9546  		y := v_1
  9547  		v.Reset(ssaop.OpLOONG64FPFlagFalse)
  9548  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQF, types.TypeFlags)
  9549  		v0.AddArg2(x, y)
  9550  		v.AddArg(v0)
  9551  		return true
  9552  	}
  9553  }
  9554  func rewriteValue_OpNeq64(v *ssa.Value) bool {
  9555  	v_1 := v.Args[1]
  9556  	v_0 := v.Args[0]
  9557  	b := v.Block
  9558  	typ := &b.Func.Config.Types
  9559  	// match: (Neq64 x y)
  9560  	// result: (SGTU (XOR x y) (MOVVconst [0]))
  9561  	for {
  9562  		x := v_0
  9563  		y := v_1
  9564  		v.Reset(ssaop.OpLOONG64SGTU)
  9565  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9566  		v0.AddArg2(x, y)
  9567  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9568  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  9569  		v.AddArg2(v0, v1)
  9570  		return true
  9571  	}
  9572  }
  9573  func rewriteValue_OpNeq64F(v *ssa.Value) bool {
  9574  	v_1 := v.Args[1]
  9575  	v_0 := v.Args[0]
  9576  	b := v.Block
  9577  	// match: (Neq64F x y)
  9578  	// result: (FPFlagFalse (CMPEQD x y))
  9579  	for {
  9580  		x := v_0
  9581  		y := v_1
  9582  		v.Reset(ssaop.OpLOONG64FPFlagFalse)
  9583  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64CMPEQD, types.TypeFlags)
  9584  		v0.AddArg2(x, y)
  9585  		v.AddArg(v0)
  9586  		return true
  9587  	}
  9588  }
  9589  func rewriteValue_OpNeq8(v *ssa.Value) bool {
  9590  	v_1 := v.Args[1]
  9591  	v_0 := v.Args[0]
  9592  	b := v.Block
  9593  	typ := &b.Func.Config.Types
  9594  	// match: (Neq8 x y)
  9595  	// result: (SGTU (XOR (ZeroExt8to64 x) (ZeroExt8to64 y)) (MOVVconst [0]))
  9596  	for {
  9597  		x := v_0
  9598  		y := v_1
  9599  		v.Reset(ssaop.OpLOONG64SGTU)
  9600  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9601  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9602  		v1.AddArg(x)
  9603  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9604  		v2.AddArg(y)
  9605  		v0.AddArg2(v1, v2)
  9606  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9607  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  9608  		v.AddArg2(v0, v3)
  9609  		return true
  9610  	}
  9611  }
  9612  func rewriteValue_OpNeqPtr(v *ssa.Value) bool {
  9613  	v_1 := v.Args[1]
  9614  	v_0 := v.Args[0]
  9615  	b := v.Block
  9616  	typ := &b.Func.Config.Types
  9617  	// match: (NeqPtr x y)
  9618  	// result: (SGTU (XOR x y) (MOVVconst [0]))
  9619  	for {
  9620  		x := v_0
  9621  		y := v_1
  9622  		v.Reset(ssaop.OpLOONG64SGTU)
  9623  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64XOR, typ.UInt64)
  9624  		v0.AddArg2(x, y)
  9625  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9626  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  9627  		v.AddArg2(v0, v1)
  9628  		return true
  9629  	}
  9630  }
  9631  func rewriteValue_OpNot(v *ssa.Value) bool {
  9632  	v_0 := v.Args[0]
  9633  	// match: (Not x)
  9634  	// result: (XORconst [1] x)
  9635  	for {
  9636  		x := v_0
  9637  		v.Reset(ssaop.OpLOONG64XORconst)
  9638  		v.AuxInt = ssa.Int64ToAuxInt(1)
  9639  		v.AddArg(x)
  9640  		return true
  9641  	}
  9642  }
  9643  func rewriteValue_OpOffPtr(v *ssa.Value) bool {
  9644  	v_0 := v.Args[0]
  9645  	// match: (OffPtr [off] ptr:(SP))
  9646  	// result: (MOVVaddr [int32(off)] ptr)
  9647  	for {
  9648  		off := ssa.AuxIntToInt64(v.AuxInt)
  9649  		ptr := v_0
  9650  		if ptr.Op != ssaop.OpSP {
  9651  			break
  9652  		}
  9653  		v.Reset(ssaop.OpLOONG64MOVVaddr)
  9654  		v.AuxInt = ssa.Int32ToAuxInt(int32(off))
  9655  		v.AddArg(ptr)
  9656  		return true
  9657  	}
  9658  	// match: (OffPtr [off] ptr)
  9659  	// result: (ADDVconst [off] ptr)
  9660  	for {
  9661  		off := ssa.AuxIntToInt64(v.AuxInt)
  9662  		ptr := v_0
  9663  		v.Reset(ssaop.OpLOONG64ADDVconst)
  9664  		v.AuxInt = ssa.Int64ToAuxInt(off)
  9665  		v.AddArg(ptr)
  9666  		return true
  9667  	}
  9668  }
  9669  func rewriteValue_OpPopCount16(v *ssa.Value) bool {
  9670  	v_0 := v.Args[0]
  9671  	b := v.Block
  9672  	typ := &b.Func.Config.Types
  9673  	// match: (PopCount16 <t> x)
  9674  	// result: (MOVWfpgp <t> (VPCNT16 <typ.Float32> (MOVWgpfp <typ.Float32> (ZeroExt16to32 x))))
  9675  	for {
  9676  		t := v.Type
  9677  		x := v_0
  9678  		v.Reset(ssaop.OpLOONG64MOVWfpgp)
  9679  		v.Type = t
  9680  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64VPCNT16, typ.Float32)
  9681  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWgpfp, typ.Float32)
  9682  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  9683  		v2.AddArg(x)
  9684  		v1.AddArg(v2)
  9685  		v0.AddArg(v1)
  9686  		v.AddArg(v0)
  9687  		return true
  9688  	}
  9689  }
  9690  func rewriteValue_OpPopCount32(v *ssa.Value) bool {
  9691  	v_0 := v.Args[0]
  9692  	b := v.Block
  9693  	typ := &b.Func.Config.Types
  9694  	// match: (PopCount32 <t> x)
  9695  	// result: (MOVWfpgp <t> (VPCNT32 <typ.Float32> (MOVWgpfp <typ.Float32> x)))
  9696  	for {
  9697  		t := v.Type
  9698  		x := v_0
  9699  		v.Reset(ssaop.OpLOONG64MOVWfpgp)
  9700  		v.Type = t
  9701  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64VPCNT32, typ.Float32)
  9702  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWgpfp, typ.Float32)
  9703  		v1.AddArg(x)
  9704  		v0.AddArg(v1)
  9705  		v.AddArg(v0)
  9706  		return true
  9707  	}
  9708  }
  9709  func rewriteValue_OpPopCount64(v *ssa.Value) bool {
  9710  	v_0 := v.Args[0]
  9711  	b := v.Block
  9712  	typ := &b.Func.Config.Types
  9713  	// match: (PopCount64 <t> x)
  9714  	// result: (MOVVfpgp <t> (VPCNT64 <typ.Float64> (MOVVgpfp <typ.Float64> x)))
  9715  	for {
  9716  		t := v.Type
  9717  		x := v_0
  9718  		v.Reset(ssaop.OpLOONG64MOVVfpgp)
  9719  		v.Type = t
  9720  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64VPCNT64, typ.Float64)
  9721  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVgpfp, typ.Float64)
  9722  		v1.AddArg(x)
  9723  		v0.AddArg(v1)
  9724  		v.AddArg(v0)
  9725  		return true
  9726  	}
  9727  }
  9728  func rewriteValue_OpPrefetchCache(v *ssa.Value) bool {
  9729  	v_1 := v.Args[1]
  9730  	v_0 := v.Args[0]
  9731  	// match: (PrefetchCache addr mem)
  9732  	// result: (PRELD addr mem [0])
  9733  	for {
  9734  		addr := v_0
  9735  		mem := v_1
  9736  		v.Reset(ssaop.OpLOONG64PRELD)
  9737  		v.AuxInt = ssa.Int64ToAuxInt(0)
  9738  		v.AddArg2(addr, mem)
  9739  		return true
  9740  	}
  9741  }
  9742  func rewriteValue_OpPrefetchCacheStreamed(v *ssa.Value) bool {
  9743  	v_1 := v.Args[1]
  9744  	v_0 := v.Args[0]
  9745  	// match: (PrefetchCacheStreamed addr mem)
  9746  	// result: (PRELDX addr mem [(((512 << 1) + (1 << 12)) << 5) + 2])
  9747  	for {
  9748  		addr := v_0
  9749  		mem := v_1
  9750  		v.Reset(ssaop.OpLOONG64PRELDX)
  9751  		v.AuxInt = ssa.Int64ToAuxInt((((512 << 1) + (1 << 12)) << 5) + 2)
  9752  		v.AddArg2(addr, mem)
  9753  		return true
  9754  	}
  9755  }
  9756  func rewriteValue_OpRotateLeft16(v *ssa.Value) bool {
  9757  	v_1 := v.Args[1]
  9758  	v_0 := v.Args[0]
  9759  	b := v.Block
  9760  	typ := &b.Func.Config.Types
  9761  	// match: (RotateLeft16 <t> x (MOVVconst [c]))
  9762  	// result: (Or16 (Lsh16x64 <t> x (MOVVconst [c&15])) (Rsh16Ux64 <t> x (MOVVconst [-c&15])))
  9763  	for {
  9764  		t := v.Type
  9765  		x := v_0
  9766  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  9767  			break
  9768  		}
  9769  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9770  		v.Reset(ssaop.OpOr16)
  9771  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh16x64, t)
  9772  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9773  		v1.AuxInt = ssa.Int64ToAuxInt(c & 15)
  9774  		v0.AddArg2(x, v1)
  9775  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh16Ux64, t)
  9776  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9777  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 15)
  9778  		v2.AddArg2(x, v3)
  9779  		v.AddArg2(v0, v2)
  9780  		return true
  9781  	}
  9782  	// match: (RotateLeft16 <t> x y)
  9783  	// result: (ROTR <t> (OR <typ.UInt32> (ZeroExt16to32 x) (SLLVconst <t> (ZeroExt16to32 x) [16])) (NEGV <typ.Int64> y))
  9784  	for {
  9785  		t := v.Type
  9786  		x := v_0
  9787  		y := v_1
  9788  		v.Reset(ssaop.OpLOONG64ROTR)
  9789  		v.Type = t
  9790  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, typ.UInt32)
  9791  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  9792  		v1.AddArg(x)
  9793  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLVconst, t)
  9794  		v2.AuxInt = ssa.Int64ToAuxInt(16)
  9795  		v2.AddArg(v1)
  9796  		v0.AddArg2(v1, v2)
  9797  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, typ.Int64)
  9798  		v3.AddArg(y)
  9799  		v.AddArg2(v0, v3)
  9800  		return true
  9801  	}
  9802  }
  9803  func rewriteValue_OpRotateLeft32(v *ssa.Value) bool {
  9804  	v_1 := v.Args[1]
  9805  	v_0 := v.Args[0]
  9806  	b := v.Block
  9807  	// match: (RotateLeft32 x y)
  9808  	// result: (ROTR x (NEGV <y.Type> y))
  9809  	for {
  9810  		x := v_0
  9811  		y := v_1
  9812  		v.Reset(ssaop.OpLOONG64ROTR)
  9813  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, y.Type)
  9814  		v0.AddArg(y)
  9815  		v.AddArg2(x, v0)
  9816  		return true
  9817  	}
  9818  }
  9819  func rewriteValue_OpRotateLeft64(v *ssa.Value) bool {
  9820  	v_1 := v.Args[1]
  9821  	v_0 := v.Args[0]
  9822  	b := v.Block
  9823  	// match: (RotateLeft64 x y)
  9824  	// result: (ROTRV x (NEGV <y.Type> y))
  9825  	for {
  9826  		x := v_0
  9827  		y := v_1
  9828  		v.Reset(ssaop.OpLOONG64ROTRV)
  9829  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, y.Type)
  9830  		v0.AddArg(y)
  9831  		v.AddArg2(x, v0)
  9832  		return true
  9833  	}
  9834  }
  9835  func rewriteValue_OpRotateLeft8(v *ssa.Value) bool {
  9836  	v_1 := v.Args[1]
  9837  	v_0 := v.Args[0]
  9838  	b := v.Block
  9839  	typ := &b.Func.Config.Types
  9840  	// match: (RotateLeft8 <t> x (MOVVconst [c]))
  9841  	// result: (Or8 (Lsh8x64 <t> x (MOVVconst [c&7])) (Rsh8Ux64 <t> x (MOVVconst [-c&7])))
  9842  	for {
  9843  		t := v.Type
  9844  		x := v_0
  9845  		if v_1.Op != ssaop.OpLOONG64MOVVconst {
  9846  			break
  9847  		}
  9848  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9849  		v.Reset(ssaop.OpOr8)
  9850  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh8x64, t)
  9851  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9852  		v1.AuxInt = ssa.Int64ToAuxInt(c & 7)
  9853  		v0.AddArg2(x, v1)
  9854  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh8Ux64, t)
  9855  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9856  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 7)
  9857  		v2.AddArg2(x, v3)
  9858  		v.AddArg2(v0, v2)
  9859  		return true
  9860  	}
  9861  	// match: (RotateLeft8 <t> x y)
  9862  	// result: (OR <t> (SLLV <t> x (ANDconst <typ.Int64> [7] y)) (SRLV <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEGV <typ.Int64> y))))
  9863  	for {
  9864  		t := v.Type
  9865  		x := v_0
  9866  		y := v_1
  9867  		v.Reset(ssaop.OpLOONG64OR)
  9868  		v.Type = t
  9869  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SLLV, t)
  9870  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.Int64)
  9871  		v1.AuxInt = ssa.Int64ToAuxInt(7)
  9872  		v1.AddArg(y)
  9873  		v0.AddArg2(x, v1)
  9874  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
  9875  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  9876  		v3.AddArg(x)
  9877  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64ANDconst, typ.Int64)
  9878  		v4.AuxInt = ssa.Int64ToAuxInt(7)
  9879  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, typ.Int64)
  9880  		v5.AddArg(y)
  9881  		v4.AddArg(v5)
  9882  		v2.AddArg2(v3, v4)
  9883  		v.AddArg2(v0, v2)
  9884  		return true
  9885  	}
  9886  }
  9887  func rewriteValue_OpRsh16Ux16(v *ssa.Value) bool {
  9888  	v_1 := v.Args[1]
  9889  	v_0 := v.Args[0]
  9890  	b := v.Block
  9891  	typ := &b.Func.Config.Types
  9892  	// match: (Rsh16Ux16 x y)
  9893  	// cond: ssa.ShiftIsBounded(v)
  9894  	// result: (SRLV (ZeroExt16to64 x) y)
  9895  	for {
  9896  		x := v_0
  9897  		y := v_1
  9898  		if !(ssa.ShiftIsBounded(v)) {
  9899  			break
  9900  		}
  9901  		v.Reset(ssaop.OpLOONG64SRLV)
  9902  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9903  		v0.AddArg(x)
  9904  		v.AddArg2(v0, y)
  9905  		return true
  9906  	}
  9907  	// match: (Rsh16Ux16 <t> x y)
  9908  	// cond: !ssa.ShiftIsBounded(v)
  9909  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
  9910  	for {
  9911  		t := v.Type
  9912  		x := v_0
  9913  		y := v_1
  9914  		if !(!ssa.ShiftIsBounded(v)) {
  9915  			break
  9916  		}
  9917  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9918  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
  9919  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9920  		v1.AddArg(x)
  9921  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9922  		v2.AddArg(y)
  9923  		v0.AddArg2(v1, v2)
  9924  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9925  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9926  		v4.AuxInt = ssa.Int64ToAuxInt(64)
  9927  		v3.AddArg2(v4, v2)
  9928  		v.AddArg2(v0, v3)
  9929  		return true
  9930  	}
  9931  	return false
  9932  }
  9933  func rewriteValue_OpRsh16Ux32(v *ssa.Value) bool {
  9934  	v_1 := v.Args[1]
  9935  	v_0 := v.Args[0]
  9936  	b := v.Block
  9937  	typ := &b.Func.Config.Types
  9938  	// match: (Rsh16Ux32 x y)
  9939  	// cond: ssa.ShiftIsBounded(v)
  9940  	// result: (SRLV (ZeroExt16to64 x) y)
  9941  	for {
  9942  		x := v_0
  9943  		y := v_1
  9944  		if !(ssa.ShiftIsBounded(v)) {
  9945  			break
  9946  		}
  9947  		v.Reset(ssaop.OpLOONG64SRLV)
  9948  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9949  		v0.AddArg(x)
  9950  		v.AddArg2(v0, y)
  9951  		return true
  9952  	}
  9953  	// match: (Rsh16Ux32 <t> x y)
  9954  	// cond: !ssa.ShiftIsBounded(v)
  9955  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
  9956  	for {
  9957  		t := v.Type
  9958  		x := v_0
  9959  		y := v_1
  9960  		if !(!ssa.ShiftIsBounded(v)) {
  9961  			break
  9962  		}
  9963  		v.Reset(ssaop.OpLOONG64MASKEQZ)
  9964  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
  9965  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9966  		v1.AddArg(x)
  9967  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  9968  		v2.AddArg(y)
  9969  		v0.AddArg2(v1, v2)
  9970  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
  9971  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
  9972  		v4.AuxInt = ssa.Int64ToAuxInt(64)
  9973  		v3.AddArg2(v4, v2)
  9974  		v.AddArg2(v0, v3)
  9975  		return true
  9976  	}
  9977  	return false
  9978  }
  9979  func rewriteValue_OpRsh16Ux64(v *ssa.Value) bool {
  9980  	v_1 := v.Args[1]
  9981  	v_0 := v.Args[0]
  9982  	b := v.Block
  9983  	typ := &b.Func.Config.Types
  9984  	// match: (Rsh16Ux64 x y)
  9985  	// cond: ssa.ShiftIsBounded(v)
  9986  	// result: (SRLV (ZeroExt16to64 x) y)
  9987  	for {
  9988  		x := v_0
  9989  		y := v_1
  9990  		if !(ssa.ShiftIsBounded(v)) {
  9991  			break
  9992  		}
  9993  		v.Reset(ssaop.OpLOONG64SRLV)
  9994  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  9995  		v0.AddArg(x)
  9996  		v.AddArg2(v0, y)
  9997  		return true
  9998  	}
  9999  	// match: (Rsh16Ux64 <t> x y)
 10000  	// cond: !ssa.ShiftIsBounded(v)
 10001  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 10002  	for {
 10003  		t := v.Type
 10004  		x := v_0
 10005  		y := v_1
 10006  		if !(!ssa.ShiftIsBounded(v)) {
 10007  			break
 10008  		}
 10009  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10010  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10011  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10012  		v1.AddArg(x)
 10013  		v0.AddArg2(v1, y)
 10014  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10015  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10016  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 10017  		v2.AddArg2(v3, y)
 10018  		v.AddArg2(v0, v2)
 10019  		return true
 10020  	}
 10021  	return false
 10022  }
 10023  func rewriteValue_OpRsh16Ux8(v *ssa.Value) bool {
 10024  	v_1 := v.Args[1]
 10025  	v_0 := v.Args[0]
 10026  	b := v.Block
 10027  	typ := &b.Func.Config.Types
 10028  	// match: (Rsh16Ux8 x y)
 10029  	// cond: ssa.ShiftIsBounded(v)
 10030  	// result: (SRLV (ZeroExt16to64 x) y)
 10031  	for {
 10032  		x := v_0
 10033  		y := v_1
 10034  		if !(ssa.ShiftIsBounded(v)) {
 10035  			break
 10036  		}
 10037  		v.Reset(ssaop.OpLOONG64SRLV)
 10038  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10039  		v0.AddArg(x)
 10040  		v.AddArg2(v0, y)
 10041  		return true
 10042  	}
 10043  	// match: (Rsh16Ux8 <t> x y)
 10044  	// cond: !ssa.ShiftIsBounded(v)
 10045  	// result: (MASKEQZ (SRLV <t> (ZeroExt16to64 x) (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 10046  	for {
 10047  		t := v.Type
 10048  		x := v_0
 10049  		y := v_1
 10050  		if !(!ssa.ShiftIsBounded(v)) {
 10051  			break
 10052  		}
 10053  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10054  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10055  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10056  		v1.AddArg(x)
 10057  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10058  		v2.AddArg(y)
 10059  		v0.AddArg2(v1, v2)
 10060  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10061  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10062  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 10063  		v3.AddArg2(v4, v2)
 10064  		v.AddArg2(v0, v3)
 10065  		return true
 10066  	}
 10067  	return false
 10068  }
 10069  func rewriteValue_OpRsh16x16(v *ssa.Value) bool {
 10070  	v_1 := v.Args[1]
 10071  	v_0 := v.Args[0]
 10072  	b := v.Block
 10073  	typ := &b.Func.Config.Types
 10074  	// match: (Rsh16x16 x y)
 10075  	// cond: ssa.ShiftIsBounded(v)
 10076  	// result: (SRAV (SignExt16to64 x) y)
 10077  	for {
 10078  		x := v_0
 10079  		y := v_1
 10080  		if !(ssa.ShiftIsBounded(v)) {
 10081  			break
 10082  		}
 10083  		v.Reset(ssaop.OpLOONG64SRAV)
 10084  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10085  		v0.AddArg(x)
 10086  		v.AddArg2(v0, y)
 10087  		return true
 10088  	}
 10089  	// match: (Rsh16x16 <t> x y)
 10090  	// cond: !ssa.ShiftIsBounded(v)
 10091  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 10092  	for {
 10093  		t := v.Type
 10094  		x := v_0
 10095  		y := v_1
 10096  		if !(!ssa.ShiftIsBounded(v)) {
 10097  			break
 10098  		}
 10099  		v.Reset(ssaop.OpLOONG64SRAV)
 10100  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10101  		v0.AddArg(x)
 10102  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10103  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10104  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10105  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10106  		v4.AddArg(y)
 10107  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10108  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 10109  		v3.AddArg2(v4, v5)
 10110  		v2.AddArg(v3)
 10111  		v1.AddArg2(v2, v4)
 10112  		v.AddArg2(v0, v1)
 10113  		return true
 10114  	}
 10115  	return false
 10116  }
 10117  func rewriteValue_OpRsh16x32(v *ssa.Value) bool {
 10118  	v_1 := v.Args[1]
 10119  	v_0 := v.Args[0]
 10120  	b := v.Block
 10121  	typ := &b.Func.Config.Types
 10122  	// match: (Rsh16x32 x y)
 10123  	// cond: ssa.ShiftIsBounded(v)
 10124  	// result: (SRAV (SignExt16to64 x) y)
 10125  	for {
 10126  		x := v_0
 10127  		y := v_1
 10128  		if !(ssa.ShiftIsBounded(v)) {
 10129  			break
 10130  		}
 10131  		v.Reset(ssaop.OpLOONG64SRAV)
 10132  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10133  		v0.AddArg(x)
 10134  		v.AddArg2(v0, y)
 10135  		return true
 10136  	}
 10137  	// match: (Rsh16x32 <t> x y)
 10138  	// cond: !ssa.ShiftIsBounded(v)
 10139  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 10140  	for {
 10141  		t := v.Type
 10142  		x := v_0
 10143  		y := v_1
 10144  		if !(!ssa.ShiftIsBounded(v)) {
 10145  			break
 10146  		}
 10147  		v.Reset(ssaop.OpLOONG64SRAV)
 10148  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10149  		v0.AddArg(x)
 10150  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10151  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10152  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10153  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10154  		v4.AddArg(y)
 10155  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10156  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 10157  		v3.AddArg2(v4, v5)
 10158  		v2.AddArg(v3)
 10159  		v1.AddArg2(v2, v4)
 10160  		v.AddArg2(v0, v1)
 10161  		return true
 10162  	}
 10163  	return false
 10164  }
 10165  func rewriteValue_OpRsh16x64(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: (Rsh16x64 x y)
 10171  	// cond: ssa.ShiftIsBounded(v)
 10172  	// result: (SRAV (SignExt16to64 x) y)
 10173  	for {
 10174  		x := v_0
 10175  		y := v_1
 10176  		if !(ssa.ShiftIsBounded(v)) {
 10177  			break
 10178  		}
 10179  		v.Reset(ssaop.OpLOONG64SRAV)
 10180  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10181  		v0.AddArg(x)
 10182  		v.AddArg2(v0, y)
 10183  		return true
 10184  	}
 10185  	// match: (Rsh16x64 <t> x y)
 10186  	// cond: !ssa.ShiftIsBounded(v)
 10187  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 10188  	for {
 10189  		t := v.Type
 10190  		x := v_0
 10191  		y := v_1
 10192  		if !(!ssa.ShiftIsBounded(v)) {
 10193  			break
 10194  		}
 10195  		v.Reset(ssaop.OpLOONG64SRAV)
 10196  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10197  		v0.AddArg(x)
 10198  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10199  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10200  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10201  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10202  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 10203  		v3.AddArg2(y, v4)
 10204  		v2.AddArg(v3)
 10205  		v1.AddArg2(v2, y)
 10206  		v.AddArg2(v0, v1)
 10207  		return true
 10208  	}
 10209  	return false
 10210  }
 10211  func rewriteValue_OpRsh16x8(v *ssa.Value) bool {
 10212  	v_1 := v.Args[1]
 10213  	v_0 := v.Args[0]
 10214  	b := v.Block
 10215  	typ := &b.Func.Config.Types
 10216  	// match: (Rsh16x8 x y)
 10217  	// cond: ssa.ShiftIsBounded(v)
 10218  	// result: (SRAV (SignExt16to64 x) y)
 10219  	for {
 10220  		x := v_0
 10221  		y := v_1
 10222  		if !(ssa.ShiftIsBounded(v)) {
 10223  			break
 10224  		}
 10225  		v.Reset(ssaop.OpLOONG64SRAV)
 10226  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10227  		v0.AddArg(x)
 10228  		v.AddArg2(v0, y)
 10229  		return true
 10230  	}
 10231  	// match: (Rsh16x8 <t> x y)
 10232  	// cond: !ssa.ShiftIsBounded(v)
 10233  	// result: (SRAV (SignExt16to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 10234  	for {
 10235  		t := v.Type
 10236  		x := v_0
 10237  		y := v_1
 10238  		if !(!ssa.ShiftIsBounded(v)) {
 10239  			break
 10240  		}
 10241  		v.Reset(ssaop.OpLOONG64SRAV)
 10242  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
 10243  		v0.AddArg(x)
 10244  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10245  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10246  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10247  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10248  		v4.AddArg(y)
 10249  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10250  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 10251  		v3.AddArg2(v4, v5)
 10252  		v2.AddArg(v3)
 10253  		v1.AddArg2(v2, v4)
 10254  		v.AddArg2(v0, v1)
 10255  		return true
 10256  	}
 10257  	return false
 10258  }
 10259  func rewriteValue_OpRsh32Ux16(v *ssa.Value) bool {
 10260  	v_1 := v.Args[1]
 10261  	v_0 := v.Args[0]
 10262  	b := v.Block
 10263  	typ := &b.Func.Config.Types
 10264  	// match: (Rsh32Ux16 x y)
 10265  	// cond: ssa.ShiftIsBounded(v)
 10266  	// result: (SRL x y)
 10267  	for {
 10268  		x := v_0
 10269  		y := v_1
 10270  		if !(ssa.ShiftIsBounded(v)) {
 10271  			break
 10272  		}
 10273  		v.Reset(ssaop.OpLOONG64SRL)
 10274  		v.AddArg2(x, y)
 10275  		return true
 10276  	}
 10277  	// match: (Rsh32Ux16 <t> x y)
 10278  	// cond: !ssa.ShiftIsBounded(v)
 10279  	// result: (MASKEQZ (SRL <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt16to64 y)))
 10280  	for {
 10281  		t := v.Type
 10282  		x := v_0
 10283  		y := v_1
 10284  		if !(!ssa.ShiftIsBounded(v)) {
 10285  			break
 10286  		}
 10287  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10288  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10289  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10290  		v1.AddArg(y)
 10291  		v0.AddArg2(x, v1)
 10292  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10293  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10294  		v3.AuxInt = ssa.Int64ToAuxInt(32)
 10295  		v2.AddArg2(v3, v1)
 10296  		v.AddArg2(v0, v2)
 10297  		return true
 10298  	}
 10299  	return false
 10300  }
 10301  func rewriteValue_OpRsh32Ux32(v *ssa.Value) bool {
 10302  	v_1 := v.Args[1]
 10303  	v_0 := v.Args[0]
 10304  	b := v.Block
 10305  	typ := &b.Func.Config.Types
 10306  	// match: (Rsh32Ux32 x y)
 10307  	// cond: ssa.ShiftIsBounded(v)
 10308  	// result: (SRL x y)
 10309  	for {
 10310  		x := v_0
 10311  		y := v_1
 10312  		if !(ssa.ShiftIsBounded(v)) {
 10313  			break
 10314  		}
 10315  		v.Reset(ssaop.OpLOONG64SRL)
 10316  		v.AddArg2(x, y)
 10317  		return true
 10318  	}
 10319  	// match: (Rsh32Ux32 <t> x y)
 10320  	// cond: !ssa.ShiftIsBounded(v)
 10321  	// result: (MASKEQZ (SRL <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt32to64 y)))
 10322  	for {
 10323  		t := v.Type
 10324  		x := v_0
 10325  		y := v_1
 10326  		if !(!ssa.ShiftIsBounded(v)) {
 10327  			break
 10328  		}
 10329  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10330  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10331  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10332  		v1.AddArg(y)
 10333  		v0.AddArg2(x, v1)
 10334  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10335  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10336  		v3.AuxInt = ssa.Int64ToAuxInt(32)
 10337  		v2.AddArg2(v3, v1)
 10338  		v.AddArg2(v0, v2)
 10339  		return true
 10340  	}
 10341  	return false
 10342  }
 10343  func rewriteValue_OpRsh32Ux64(v *ssa.Value) bool {
 10344  	v_1 := v.Args[1]
 10345  	v_0 := v.Args[0]
 10346  	b := v.Block
 10347  	typ := &b.Func.Config.Types
 10348  	// match: (Rsh32Ux64 x y)
 10349  	// cond: ssa.ShiftIsBounded(v)
 10350  	// result: (SRL x y)
 10351  	for {
 10352  		x := v_0
 10353  		y := v_1
 10354  		if !(ssa.ShiftIsBounded(v)) {
 10355  			break
 10356  		}
 10357  		v.Reset(ssaop.OpLOONG64SRL)
 10358  		v.AddArg2(x, y)
 10359  		return true
 10360  	}
 10361  	// match: (Rsh32Ux64 <t> x y)
 10362  	// cond: !ssa.ShiftIsBounded(v)
 10363  	// result: (MASKEQZ (SRL <t> x y) (SGTU (MOVVconst <typ.UInt64> [32]) y))
 10364  	for {
 10365  		t := v.Type
 10366  		x := v_0
 10367  		y := v_1
 10368  		if !(!ssa.ShiftIsBounded(v)) {
 10369  			break
 10370  		}
 10371  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10372  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10373  		v0.AddArg2(x, y)
 10374  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10375  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10376  		v2.AuxInt = ssa.Int64ToAuxInt(32)
 10377  		v1.AddArg2(v2, y)
 10378  		v.AddArg2(v0, v1)
 10379  		return true
 10380  	}
 10381  	return false
 10382  }
 10383  func rewriteValue_OpRsh32Ux8(v *ssa.Value) bool {
 10384  	v_1 := v.Args[1]
 10385  	v_0 := v.Args[0]
 10386  	b := v.Block
 10387  	typ := &b.Func.Config.Types
 10388  	// match: (Rsh32Ux8 x y)
 10389  	// cond: ssa.ShiftIsBounded(v)
 10390  	// result: (SRL x y)
 10391  	for {
 10392  		x := v_0
 10393  		y := v_1
 10394  		if !(ssa.ShiftIsBounded(v)) {
 10395  			break
 10396  		}
 10397  		v.Reset(ssaop.OpLOONG64SRL)
 10398  		v.AddArg2(x, y)
 10399  		return true
 10400  	}
 10401  	// match: (Rsh32Ux8 <t> x y)
 10402  	// cond: !ssa.ShiftIsBounded(v)
 10403  	// result: (MASKEQZ (SRL <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [32]) (ZeroExt8to64 y)))
 10404  	for {
 10405  		t := v.Type
 10406  		x := v_0
 10407  		y := v_1
 10408  		if !(!ssa.ShiftIsBounded(v)) {
 10409  			break
 10410  		}
 10411  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10412  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRL, t)
 10413  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10414  		v1.AddArg(y)
 10415  		v0.AddArg2(x, v1)
 10416  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10417  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10418  		v3.AuxInt = ssa.Int64ToAuxInt(32)
 10419  		v2.AddArg2(v3, v1)
 10420  		v.AddArg2(v0, v2)
 10421  		return true
 10422  	}
 10423  	return false
 10424  }
 10425  func rewriteValue_OpRsh32x16(v *ssa.Value) bool {
 10426  	v_1 := v.Args[1]
 10427  	v_0 := v.Args[0]
 10428  	b := v.Block
 10429  	typ := &b.Func.Config.Types
 10430  	// match: (Rsh32x16 x y)
 10431  	// cond: ssa.ShiftIsBounded(v)
 10432  	// result: (SRA x y)
 10433  	for {
 10434  		x := v_0
 10435  		y := v_1
 10436  		if !(ssa.ShiftIsBounded(v)) {
 10437  			break
 10438  		}
 10439  		v.Reset(ssaop.OpLOONG64SRA)
 10440  		v.AddArg2(x, y)
 10441  		return true
 10442  	}
 10443  	// match: (Rsh32x16 <t> x y)
 10444  	// cond: !ssa.ShiftIsBounded(v)
 10445  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt16to64 y)))
 10446  	for {
 10447  		t := v.Type
 10448  		x := v_0
 10449  		y := v_1
 10450  		if !(!ssa.ShiftIsBounded(v)) {
 10451  			break
 10452  		}
 10453  		v.Reset(ssaop.OpLOONG64SRA)
 10454  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10455  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10456  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10457  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10458  		v3.AddArg(y)
 10459  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10460  		v4.AuxInt = ssa.Int64ToAuxInt(31)
 10461  		v2.AddArg2(v3, v4)
 10462  		v1.AddArg(v2)
 10463  		v0.AddArg2(v1, v3)
 10464  		v.AddArg2(x, v0)
 10465  		return true
 10466  	}
 10467  	return false
 10468  }
 10469  func rewriteValue_OpRsh32x32(v *ssa.Value) bool {
 10470  	v_1 := v.Args[1]
 10471  	v_0 := v.Args[0]
 10472  	b := v.Block
 10473  	typ := &b.Func.Config.Types
 10474  	// match: (Rsh32x32 x y)
 10475  	// cond: ssa.ShiftIsBounded(v)
 10476  	// result: (SRA x y)
 10477  	for {
 10478  		x := v_0
 10479  		y := v_1
 10480  		if !(ssa.ShiftIsBounded(v)) {
 10481  			break
 10482  		}
 10483  		v.Reset(ssaop.OpLOONG64SRA)
 10484  		v.AddArg2(x, y)
 10485  		return true
 10486  	}
 10487  	// match: (Rsh32x32 <t> x y)
 10488  	// cond: !ssa.ShiftIsBounded(v)
 10489  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt32to64 y)))
 10490  	for {
 10491  		t := v.Type
 10492  		x := v_0
 10493  		y := v_1
 10494  		if !(!ssa.ShiftIsBounded(v)) {
 10495  			break
 10496  		}
 10497  		v.Reset(ssaop.OpLOONG64SRA)
 10498  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10499  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10500  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10501  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10502  		v3.AddArg(y)
 10503  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10504  		v4.AuxInt = ssa.Int64ToAuxInt(31)
 10505  		v2.AddArg2(v3, v4)
 10506  		v1.AddArg(v2)
 10507  		v0.AddArg2(v1, v3)
 10508  		v.AddArg2(x, v0)
 10509  		return true
 10510  	}
 10511  	return false
 10512  }
 10513  func rewriteValue_OpRsh32x64(v *ssa.Value) bool {
 10514  	v_1 := v.Args[1]
 10515  	v_0 := v.Args[0]
 10516  	b := v.Block
 10517  	typ := &b.Func.Config.Types
 10518  	// match: (Rsh32x64 x y)
 10519  	// cond: ssa.ShiftIsBounded(v)
 10520  	// result: (SRA x y)
 10521  	for {
 10522  		x := v_0
 10523  		y := v_1
 10524  		if !(ssa.ShiftIsBounded(v)) {
 10525  			break
 10526  		}
 10527  		v.Reset(ssaop.OpLOONG64SRA)
 10528  		v.AddArg2(x, y)
 10529  		return true
 10530  	}
 10531  	// match: (Rsh32x64 <t> x y)
 10532  	// cond: !ssa.ShiftIsBounded(v)
 10533  	// result: (SRA x (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [31]))) y))
 10534  	for {
 10535  		t := v.Type
 10536  		x := v_0
 10537  		y := v_1
 10538  		if !(!ssa.ShiftIsBounded(v)) {
 10539  			break
 10540  		}
 10541  		v.Reset(ssaop.OpLOONG64SRA)
 10542  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10543  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10544  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10545  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10546  		v3.AuxInt = ssa.Int64ToAuxInt(31)
 10547  		v2.AddArg2(y, v3)
 10548  		v1.AddArg(v2)
 10549  		v0.AddArg2(v1, y)
 10550  		v.AddArg2(x, v0)
 10551  		return true
 10552  	}
 10553  	return false
 10554  }
 10555  func rewriteValue_OpRsh32x8(v *ssa.Value) bool {
 10556  	v_1 := v.Args[1]
 10557  	v_0 := v.Args[0]
 10558  	b := v.Block
 10559  	typ := &b.Func.Config.Types
 10560  	// match: (Rsh32x8 x y)
 10561  	// cond: ssa.ShiftIsBounded(v)
 10562  	// result: (SRA x y)
 10563  	for {
 10564  		x := v_0
 10565  		y := v_1
 10566  		if !(ssa.ShiftIsBounded(v)) {
 10567  			break
 10568  		}
 10569  		v.Reset(ssaop.OpLOONG64SRA)
 10570  		v.AddArg2(x, y)
 10571  		return true
 10572  	}
 10573  	// match: (Rsh32x8 <t> x y)
 10574  	// cond: !ssa.ShiftIsBounded(v)
 10575  	// result: (SRA x (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [31]))) (ZeroExt8to64 y)))
 10576  	for {
 10577  		t := v.Type
 10578  		x := v_0
 10579  		y := v_1
 10580  		if !(!ssa.ShiftIsBounded(v)) {
 10581  			break
 10582  		}
 10583  		v.Reset(ssaop.OpLOONG64SRA)
 10584  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10585  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10586  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10587  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10588  		v3.AddArg(y)
 10589  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10590  		v4.AuxInt = ssa.Int64ToAuxInt(31)
 10591  		v2.AddArg2(v3, v4)
 10592  		v1.AddArg(v2)
 10593  		v0.AddArg2(v1, v3)
 10594  		v.AddArg2(x, v0)
 10595  		return true
 10596  	}
 10597  	return false
 10598  }
 10599  func rewriteValue_OpRsh64Ux16(v *ssa.Value) bool {
 10600  	v_1 := v.Args[1]
 10601  	v_0 := v.Args[0]
 10602  	b := v.Block
 10603  	typ := &b.Func.Config.Types
 10604  	// match: (Rsh64Ux16 x y)
 10605  	// cond: ssa.ShiftIsBounded(v)
 10606  	// result: (SRLV x y)
 10607  	for {
 10608  		x := v_0
 10609  		y := v_1
 10610  		if !(ssa.ShiftIsBounded(v)) {
 10611  			break
 10612  		}
 10613  		v.Reset(ssaop.OpLOONG64SRLV)
 10614  		v.AddArg2(x, y)
 10615  		return true
 10616  	}
 10617  	// match: (Rsh64Ux16 <t> x y)
 10618  	// cond: !ssa.ShiftIsBounded(v)
 10619  	// result: (MASKEQZ (SRLV <t> x (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 10620  	for {
 10621  		t := v.Type
 10622  		x := v_0
 10623  		y := v_1
 10624  		if !(!ssa.ShiftIsBounded(v)) {
 10625  			break
 10626  		}
 10627  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10628  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10629  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10630  		v1.AddArg(y)
 10631  		v0.AddArg2(x, v1)
 10632  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10633  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10634  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 10635  		v2.AddArg2(v3, v1)
 10636  		v.AddArg2(v0, v2)
 10637  		return true
 10638  	}
 10639  	return false
 10640  }
 10641  func rewriteValue_OpRsh64Ux32(v *ssa.Value) bool {
 10642  	v_1 := v.Args[1]
 10643  	v_0 := v.Args[0]
 10644  	b := v.Block
 10645  	typ := &b.Func.Config.Types
 10646  	// match: (Rsh64Ux32 x y)
 10647  	// cond: ssa.ShiftIsBounded(v)
 10648  	// result: (SRLV x y)
 10649  	for {
 10650  		x := v_0
 10651  		y := v_1
 10652  		if !(ssa.ShiftIsBounded(v)) {
 10653  			break
 10654  		}
 10655  		v.Reset(ssaop.OpLOONG64SRLV)
 10656  		v.AddArg2(x, y)
 10657  		return true
 10658  	}
 10659  	// match: (Rsh64Ux32 <t> x y)
 10660  	// cond: !ssa.ShiftIsBounded(v)
 10661  	// result: (MASKEQZ (SRLV <t> x (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 10662  	for {
 10663  		t := v.Type
 10664  		x := v_0
 10665  		y := v_1
 10666  		if !(!ssa.ShiftIsBounded(v)) {
 10667  			break
 10668  		}
 10669  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10670  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10671  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10672  		v1.AddArg(y)
 10673  		v0.AddArg2(x, v1)
 10674  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10675  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10676  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 10677  		v2.AddArg2(v3, v1)
 10678  		v.AddArg2(v0, v2)
 10679  		return true
 10680  	}
 10681  	return false
 10682  }
 10683  func rewriteValue_OpRsh64Ux64(v *ssa.Value) bool {
 10684  	v_1 := v.Args[1]
 10685  	v_0 := v.Args[0]
 10686  	b := v.Block
 10687  	typ := &b.Func.Config.Types
 10688  	// match: (Rsh64Ux64 x y)
 10689  	// cond: ssa.ShiftIsBounded(v)
 10690  	// result: (SRLV x y)
 10691  	for {
 10692  		x := v_0
 10693  		y := v_1
 10694  		if !(ssa.ShiftIsBounded(v)) {
 10695  			break
 10696  		}
 10697  		v.Reset(ssaop.OpLOONG64SRLV)
 10698  		v.AddArg2(x, y)
 10699  		return true
 10700  	}
 10701  	// match: (Rsh64Ux64 <t> x y)
 10702  	// cond: !ssa.ShiftIsBounded(v)
 10703  	// result: (MASKEQZ (SRLV <t> x y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 10704  	for {
 10705  		t := v.Type
 10706  		x := v_0
 10707  		y := v_1
 10708  		if !(!ssa.ShiftIsBounded(v)) {
 10709  			break
 10710  		}
 10711  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10712  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10713  		v0.AddArg2(x, y)
 10714  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10715  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10716  		v2.AuxInt = ssa.Int64ToAuxInt(64)
 10717  		v1.AddArg2(v2, y)
 10718  		v.AddArg2(v0, v1)
 10719  		return true
 10720  	}
 10721  	return false
 10722  }
 10723  func rewriteValue_OpRsh64Ux8(v *ssa.Value) bool {
 10724  	v_1 := v.Args[1]
 10725  	v_0 := v.Args[0]
 10726  	b := v.Block
 10727  	typ := &b.Func.Config.Types
 10728  	// match: (Rsh64Ux8 x y)
 10729  	// cond: ssa.ShiftIsBounded(v)
 10730  	// result: (SRLV x y)
 10731  	for {
 10732  		x := v_0
 10733  		y := v_1
 10734  		if !(ssa.ShiftIsBounded(v)) {
 10735  			break
 10736  		}
 10737  		v.Reset(ssaop.OpLOONG64SRLV)
 10738  		v.AddArg2(x, y)
 10739  		return true
 10740  	}
 10741  	// match: (Rsh64Ux8 <t> x y)
 10742  	// cond: !ssa.ShiftIsBounded(v)
 10743  	// result: (MASKEQZ (SRLV <t> x (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 10744  	for {
 10745  		t := v.Type
 10746  		x := v_0
 10747  		y := v_1
 10748  		if !(!ssa.ShiftIsBounded(v)) {
 10749  			break
 10750  		}
 10751  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10752  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10753  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10754  		v1.AddArg(y)
 10755  		v0.AddArg2(x, v1)
 10756  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10757  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10758  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 10759  		v2.AddArg2(v3, v1)
 10760  		v.AddArg2(v0, v2)
 10761  		return true
 10762  	}
 10763  	return false
 10764  }
 10765  func rewriteValue_OpRsh64x16(v *ssa.Value) bool {
 10766  	v_1 := v.Args[1]
 10767  	v_0 := v.Args[0]
 10768  	b := v.Block
 10769  	typ := &b.Func.Config.Types
 10770  	// match: (Rsh64x16 x y)
 10771  	// cond: ssa.ShiftIsBounded(v)
 10772  	// result: (SRAV x y)
 10773  	for {
 10774  		x := v_0
 10775  		y := v_1
 10776  		if !(ssa.ShiftIsBounded(v)) {
 10777  			break
 10778  		}
 10779  		v.Reset(ssaop.OpLOONG64SRAV)
 10780  		v.AddArg2(x, y)
 10781  		return true
 10782  	}
 10783  	// match: (Rsh64x16 <t> x y)
 10784  	// cond: !ssa.ShiftIsBounded(v)
 10785  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 10786  	for {
 10787  		t := v.Type
 10788  		x := v_0
 10789  		y := v_1
 10790  		if !(!ssa.ShiftIsBounded(v)) {
 10791  			break
 10792  		}
 10793  		v.Reset(ssaop.OpLOONG64SRAV)
 10794  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10795  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10796  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10797  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10798  		v3.AddArg(y)
 10799  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10800  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 10801  		v2.AddArg2(v3, v4)
 10802  		v1.AddArg(v2)
 10803  		v0.AddArg2(v1, v3)
 10804  		v.AddArg2(x, v0)
 10805  		return true
 10806  	}
 10807  	return false
 10808  }
 10809  func rewriteValue_OpRsh64x32(v *ssa.Value) bool {
 10810  	v_1 := v.Args[1]
 10811  	v_0 := v.Args[0]
 10812  	b := v.Block
 10813  	typ := &b.Func.Config.Types
 10814  	// match: (Rsh64x32 x y)
 10815  	// cond: ssa.ShiftIsBounded(v)
 10816  	// result: (SRAV x y)
 10817  	for {
 10818  		x := v_0
 10819  		y := v_1
 10820  		if !(ssa.ShiftIsBounded(v)) {
 10821  			break
 10822  		}
 10823  		v.Reset(ssaop.OpLOONG64SRAV)
 10824  		v.AddArg2(x, y)
 10825  		return true
 10826  	}
 10827  	// match: (Rsh64x32 <t> x y)
 10828  	// cond: !ssa.ShiftIsBounded(v)
 10829  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (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.OpLOONG64SRAV)
 10838  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10839  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10840  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10841  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 10842  		v3.AddArg(y)
 10843  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10844  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 10845  		v2.AddArg2(v3, v4)
 10846  		v1.AddArg(v2)
 10847  		v0.AddArg2(v1, v3)
 10848  		v.AddArg2(x, v0)
 10849  		return true
 10850  	}
 10851  	return false
 10852  }
 10853  func rewriteValue_OpRsh64x64(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: (Rsh64x64 x y)
 10859  	// cond: ssa.ShiftIsBounded(v)
 10860  	// result: (SRAV x y)
 10861  	for {
 10862  		x := v_0
 10863  		y := v_1
 10864  		if !(ssa.ShiftIsBounded(v)) {
 10865  			break
 10866  		}
 10867  		v.Reset(ssaop.OpLOONG64SRAV)
 10868  		v.AddArg2(x, y)
 10869  		return true
 10870  	}
 10871  	// match: (Rsh64x64 <t> x y)
 10872  	// cond: !ssa.ShiftIsBounded(v)
 10873  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 10874  	for {
 10875  		t := v.Type
 10876  		x := v_0
 10877  		y := v_1
 10878  		if !(!ssa.ShiftIsBounded(v)) {
 10879  			break
 10880  		}
 10881  		v.Reset(ssaop.OpLOONG64SRAV)
 10882  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10883  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10884  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10885  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10886  		v3.AuxInt = ssa.Int64ToAuxInt(63)
 10887  		v2.AddArg2(y, v3)
 10888  		v1.AddArg(v2)
 10889  		v0.AddArg2(v1, y)
 10890  		v.AddArg2(x, v0)
 10891  		return true
 10892  	}
 10893  	return false
 10894  }
 10895  func rewriteValue_OpRsh64x8(v *ssa.Value) bool {
 10896  	v_1 := v.Args[1]
 10897  	v_0 := v.Args[0]
 10898  	b := v.Block
 10899  	typ := &b.Func.Config.Types
 10900  	// match: (Rsh64x8 x y)
 10901  	// cond: ssa.ShiftIsBounded(v)
 10902  	// result: (SRAV x y)
 10903  	for {
 10904  		x := v_0
 10905  		y := v_1
 10906  		if !(ssa.ShiftIsBounded(v)) {
 10907  			break
 10908  		}
 10909  		v.Reset(ssaop.OpLOONG64SRAV)
 10910  		v.AddArg2(x, y)
 10911  		return true
 10912  	}
 10913  	// match: (Rsh64x8 <t> x y)
 10914  	// cond: !ssa.ShiftIsBounded(v)
 10915  	// result: (SRAV x (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 10916  	for {
 10917  		t := v.Type
 10918  		x := v_0
 10919  		y := v_1
 10920  		if !(!ssa.ShiftIsBounded(v)) {
 10921  			break
 10922  		}
 10923  		v.Reset(ssaop.OpLOONG64SRAV)
 10924  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 10925  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 10926  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10927  		v3 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10928  		v3.AddArg(y)
 10929  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10930  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 10931  		v2.AddArg2(v3, v4)
 10932  		v1.AddArg(v2)
 10933  		v0.AddArg2(v1, v3)
 10934  		v.AddArg2(x, v0)
 10935  		return true
 10936  	}
 10937  	return false
 10938  }
 10939  func rewriteValue_OpRsh8Ux16(v *ssa.Value) bool {
 10940  	v_1 := v.Args[1]
 10941  	v_0 := v.Args[0]
 10942  	b := v.Block
 10943  	typ := &b.Func.Config.Types
 10944  	// match: (Rsh8Ux16 x y)
 10945  	// cond: ssa.ShiftIsBounded(v)
 10946  	// result: (SRLV (ZeroExt8to64 x) y)
 10947  	for {
 10948  		x := v_0
 10949  		y := v_1
 10950  		if !(ssa.ShiftIsBounded(v)) {
 10951  			break
 10952  		}
 10953  		v.Reset(ssaop.OpLOONG64SRLV)
 10954  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10955  		v0.AddArg(x)
 10956  		v.AddArg2(v0, y)
 10957  		return true
 10958  	}
 10959  	// match: (Rsh8Ux16 <t> x y)
 10960  	// cond: !ssa.ShiftIsBounded(v)
 10961  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt16to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt16to64 y)))
 10962  	for {
 10963  		t := v.Type
 10964  		x := v_0
 10965  		y := v_1
 10966  		if !(!ssa.ShiftIsBounded(v)) {
 10967  			break
 10968  		}
 10969  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 10970  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 10971  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 10972  		v1.AddArg(x)
 10973  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 10974  		v2.AddArg(y)
 10975  		v0.AddArg2(v1, v2)
 10976  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 10977  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 10978  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 10979  		v3.AddArg2(v4, v2)
 10980  		v.AddArg2(v0, v3)
 10981  		return true
 10982  	}
 10983  	return false
 10984  }
 10985  func rewriteValue_OpRsh8Ux32(v *ssa.Value) bool {
 10986  	v_1 := v.Args[1]
 10987  	v_0 := v.Args[0]
 10988  	b := v.Block
 10989  	typ := &b.Func.Config.Types
 10990  	// match: (Rsh8Ux32 x y)
 10991  	// cond: ssa.ShiftIsBounded(v)
 10992  	// result: (SRLV (ZeroExt8to64 x) y)
 10993  	for {
 10994  		x := v_0
 10995  		y := v_1
 10996  		if !(ssa.ShiftIsBounded(v)) {
 10997  			break
 10998  		}
 10999  		v.Reset(ssaop.OpLOONG64SRLV)
 11000  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11001  		v0.AddArg(x)
 11002  		v.AddArg2(v0, y)
 11003  		return true
 11004  	}
 11005  	// match: (Rsh8Ux32 <t> x y)
 11006  	// cond: !ssa.ShiftIsBounded(v)
 11007  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt32to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt32to64 y)))
 11008  	for {
 11009  		t := v.Type
 11010  		x := v_0
 11011  		y := v_1
 11012  		if !(!ssa.ShiftIsBounded(v)) {
 11013  			break
 11014  		}
 11015  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 11016  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 11017  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11018  		v1.AddArg(x)
 11019  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 11020  		v2.AddArg(y)
 11021  		v0.AddArg2(v1, v2)
 11022  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11023  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11024  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 11025  		v3.AddArg2(v4, v2)
 11026  		v.AddArg2(v0, v3)
 11027  		return true
 11028  	}
 11029  	return false
 11030  }
 11031  func rewriteValue_OpRsh8Ux64(v *ssa.Value) bool {
 11032  	v_1 := v.Args[1]
 11033  	v_0 := v.Args[0]
 11034  	b := v.Block
 11035  	typ := &b.Func.Config.Types
 11036  	// match: (Rsh8Ux64 x y)
 11037  	// cond: ssa.ShiftIsBounded(v)
 11038  	// result: (SRLV (ZeroExt8to64 x) y)
 11039  	for {
 11040  		x := v_0
 11041  		y := v_1
 11042  		if !(ssa.ShiftIsBounded(v)) {
 11043  			break
 11044  		}
 11045  		v.Reset(ssaop.OpLOONG64SRLV)
 11046  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11047  		v0.AddArg(x)
 11048  		v.AddArg2(v0, y)
 11049  		return true
 11050  	}
 11051  	// match: (Rsh8Ux64 <t> x y)
 11052  	// cond: !ssa.ShiftIsBounded(v)
 11053  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) y) (SGTU (MOVVconst <typ.UInt64> [64]) y))
 11054  	for {
 11055  		t := v.Type
 11056  		x := v_0
 11057  		y := v_1
 11058  		if !(!ssa.ShiftIsBounded(v)) {
 11059  			break
 11060  		}
 11061  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 11062  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 11063  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11064  		v1.AddArg(x)
 11065  		v0.AddArg2(v1, y)
 11066  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11067  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11068  		v3.AuxInt = ssa.Int64ToAuxInt(64)
 11069  		v2.AddArg2(v3, y)
 11070  		v.AddArg2(v0, v2)
 11071  		return true
 11072  	}
 11073  	return false
 11074  }
 11075  func rewriteValue_OpRsh8Ux8(v *ssa.Value) bool {
 11076  	v_1 := v.Args[1]
 11077  	v_0 := v.Args[0]
 11078  	b := v.Block
 11079  	typ := &b.Func.Config.Types
 11080  	// match: (Rsh8Ux8 x y)
 11081  	// cond: ssa.ShiftIsBounded(v)
 11082  	// result: (SRLV (ZeroExt8to64 x) y)
 11083  	for {
 11084  		x := v_0
 11085  		y := v_1
 11086  		if !(ssa.ShiftIsBounded(v)) {
 11087  			break
 11088  		}
 11089  		v.Reset(ssaop.OpLOONG64SRLV)
 11090  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11091  		v0.AddArg(x)
 11092  		v.AddArg2(v0, y)
 11093  		return true
 11094  	}
 11095  	// match: (Rsh8Ux8 <t> x y)
 11096  	// cond: !ssa.ShiftIsBounded(v)
 11097  	// result: (MASKEQZ (SRLV <t> (ZeroExt8to64 x) (ZeroExt8to64 y)) (SGTU (MOVVconst <typ.UInt64> [64]) (ZeroExt8to64 y)))
 11098  	for {
 11099  		t := v.Type
 11100  		x := v_0
 11101  		y := v_1
 11102  		if !(!ssa.ShiftIsBounded(v)) {
 11103  			break
 11104  		}
 11105  		v.Reset(ssaop.OpLOONG64MASKEQZ)
 11106  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SRLV, t)
 11107  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11108  		v1.AddArg(x)
 11109  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11110  		v2.AddArg(y)
 11111  		v0.AddArg2(v1, v2)
 11112  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11113  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11114  		v4.AuxInt = ssa.Int64ToAuxInt(64)
 11115  		v3.AddArg2(v4, v2)
 11116  		v.AddArg2(v0, v3)
 11117  		return true
 11118  	}
 11119  	return false
 11120  }
 11121  func rewriteValue_OpRsh8x16(v *ssa.Value) bool {
 11122  	v_1 := v.Args[1]
 11123  	v_0 := v.Args[0]
 11124  	b := v.Block
 11125  	typ := &b.Func.Config.Types
 11126  	// match: (Rsh8x16 x y)
 11127  	// cond: ssa.ShiftIsBounded(v)
 11128  	// result: (SRAV (SignExt8to64 x) y)
 11129  	for {
 11130  		x := v_0
 11131  		y := v_1
 11132  		if !(ssa.ShiftIsBounded(v)) {
 11133  			break
 11134  		}
 11135  		v.Reset(ssaop.OpLOONG64SRAV)
 11136  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11137  		v0.AddArg(x)
 11138  		v.AddArg2(v0, y)
 11139  		return true
 11140  	}
 11141  	// match: (Rsh8x16 <t> x y)
 11142  	// cond: !ssa.ShiftIsBounded(v)
 11143  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt16to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt16to64 y)))
 11144  	for {
 11145  		t := v.Type
 11146  		x := v_0
 11147  		y := v_1
 11148  		if !(!ssa.ShiftIsBounded(v)) {
 11149  			break
 11150  		}
 11151  		v.Reset(ssaop.OpLOONG64SRAV)
 11152  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11153  		v0.AddArg(x)
 11154  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11155  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11156  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11157  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
 11158  		v4.AddArg(y)
 11159  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11160  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 11161  		v3.AddArg2(v4, v5)
 11162  		v2.AddArg(v3)
 11163  		v1.AddArg2(v2, v4)
 11164  		v.AddArg2(v0, v1)
 11165  		return true
 11166  	}
 11167  	return false
 11168  }
 11169  func rewriteValue_OpRsh8x32(v *ssa.Value) bool {
 11170  	v_1 := v.Args[1]
 11171  	v_0 := v.Args[0]
 11172  	b := v.Block
 11173  	typ := &b.Func.Config.Types
 11174  	// match: (Rsh8x32 x y)
 11175  	// cond: ssa.ShiftIsBounded(v)
 11176  	// result: (SRAV (SignExt8to64 x) y)
 11177  	for {
 11178  		x := v_0
 11179  		y := v_1
 11180  		if !(ssa.ShiftIsBounded(v)) {
 11181  			break
 11182  		}
 11183  		v.Reset(ssaop.OpLOONG64SRAV)
 11184  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11185  		v0.AddArg(x)
 11186  		v.AddArg2(v0, y)
 11187  		return true
 11188  	}
 11189  	// match: (Rsh8x32 <t> x y)
 11190  	// cond: !ssa.ShiftIsBounded(v)
 11191  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt32to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt32to64 y)))
 11192  	for {
 11193  		t := v.Type
 11194  		x := v_0
 11195  		y := v_1
 11196  		if !(!ssa.ShiftIsBounded(v)) {
 11197  			break
 11198  		}
 11199  		v.Reset(ssaop.OpLOONG64SRAV)
 11200  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11201  		v0.AddArg(x)
 11202  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11203  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11204  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11205  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
 11206  		v4.AddArg(y)
 11207  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11208  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 11209  		v3.AddArg2(v4, v5)
 11210  		v2.AddArg(v3)
 11211  		v1.AddArg2(v2, v4)
 11212  		v.AddArg2(v0, v1)
 11213  		return true
 11214  	}
 11215  	return false
 11216  }
 11217  func rewriteValue_OpRsh8x64(v *ssa.Value) bool {
 11218  	v_1 := v.Args[1]
 11219  	v_0 := v.Args[0]
 11220  	b := v.Block
 11221  	typ := &b.Func.Config.Types
 11222  	// match: (Rsh8x64 x y)
 11223  	// cond: ssa.ShiftIsBounded(v)
 11224  	// result: (SRAV (SignExt8to64 x) y)
 11225  	for {
 11226  		x := v_0
 11227  		y := v_1
 11228  		if !(ssa.ShiftIsBounded(v)) {
 11229  			break
 11230  		}
 11231  		v.Reset(ssaop.OpLOONG64SRAV)
 11232  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11233  		v0.AddArg(x)
 11234  		v.AddArg2(v0, y)
 11235  		return true
 11236  	}
 11237  	// match: (Rsh8x64 <t> x y)
 11238  	// cond: !ssa.ShiftIsBounded(v)
 11239  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU y (MOVVconst <typ.UInt64> [63]))) y))
 11240  	for {
 11241  		t := v.Type
 11242  		x := v_0
 11243  		y := v_1
 11244  		if !(!ssa.ShiftIsBounded(v)) {
 11245  			break
 11246  		}
 11247  		v.Reset(ssaop.OpLOONG64SRAV)
 11248  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11249  		v0.AddArg(x)
 11250  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11251  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11252  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11253  		v4 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11254  		v4.AuxInt = ssa.Int64ToAuxInt(63)
 11255  		v3.AddArg2(y, v4)
 11256  		v2.AddArg(v3)
 11257  		v1.AddArg2(v2, y)
 11258  		v.AddArg2(v0, v1)
 11259  		return true
 11260  	}
 11261  	return false
 11262  }
 11263  func rewriteValue_OpRsh8x8(v *ssa.Value) bool {
 11264  	v_1 := v.Args[1]
 11265  	v_0 := v.Args[0]
 11266  	b := v.Block
 11267  	typ := &b.Func.Config.Types
 11268  	// match: (Rsh8x8 x y)
 11269  	// cond: ssa.ShiftIsBounded(v)
 11270  	// result: (SRAV (SignExt8to64 x) y)
 11271  	for {
 11272  		x := v_0
 11273  		y := v_1
 11274  		if !(ssa.ShiftIsBounded(v)) {
 11275  			break
 11276  		}
 11277  		v.Reset(ssaop.OpLOONG64SRAV)
 11278  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11279  		v0.AddArg(x)
 11280  		v.AddArg2(v0, y)
 11281  		return true
 11282  	}
 11283  	// match: (Rsh8x8 <t> x y)
 11284  	// cond: !ssa.ShiftIsBounded(v)
 11285  	// result: (SRAV (SignExt8to64 x) (OR <t> (NEGV <t> (SGTU (ZeroExt8to64 y) (MOVVconst <typ.UInt64> [63]))) (ZeroExt8to64 y)))
 11286  	for {
 11287  		t := v.Type
 11288  		x := v_0
 11289  		y := v_1
 11290  		if !(!ssa.ShiftIsBounded(v)) {
 11291  			break
 11292  		}
 11293  		v.Reset(ssaop.OpLOONG64SRAV)
 11294  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
 11295  		v0.AddArg(x)
 11296  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64OR, t)
 11297  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11298  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, typ.Bool)
 11299  		v4 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
 11300  		v4.AddArg(y)
 11301  		v5 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11302  		v5.AuxInt = ssa.Int64ToAuxInt(63)
 11303  		v3.AddArg2(v4, v5)
 11304  		v2.AddArg(v3)
 11305  		v1.AddArg2(v2, v4)
 11306  		v.AddArg2(v0, v1)
 11307  		return true
 11308  	}
 11309  	return false
 11310  }
 11311  func rewriteValue_OpSelect0(v *ssa.Value) bool {
 11312  	v_0 := v.Args[0]
 11313  	b := v.Block
 11314  	// match: (Select0 (Mul64uhilo x y))
 11315  	// result: (MULHVU x y)
 11316  	for {
 11317  		if v_0.Op != ssaop.OpMul64uhilo {
 11318  			break
 11319  		}
 11320  		y := v_0.Args[1]
 11321  		x := v_0.Args[0]
 11322  		v.Reset(ssaop.OpLOONG64MULHVU)
 11323  		v.AddArg2(x, y)
 11324  		return true
 11325  	}
 11326  	// match: (Select0 (Mul64uover x y))
 11327  	// result: (MULV x y)
 11328  	for {
 11329  		if v_0.Op != ssaop.OpMul64uover {
 11330  			break
 11331  		}
 11332  		y := v_0.Args[1]
 11333  		x := v_0.Args[0]
 11334  		v.Reset(ssaop.OpLOONG64MULV)
 11335  		v.AddArg2(x, y)
 11336  		return true
 11337  	}
 11338  	// match: (Select0 <t> (Add64carry x y c))
 11339  	// result: (ADDV (ADDV <t> x y) c)
 11340  	for {
 11341  		t := v.Type
 11342  		if v_0.Op != ssaop.OpAdd64carry {
 11343  			break
 11344  		}
 11345  		c := v_0.Args[2]
 11346  		x := v_0.Args[0]
 11347  		y := v_0.Args[1]
 11348  		v.Reset(ssaop.OpLOONG64ADDV)
 11349  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64ADDV, t)
 11350  		v0.AddArg2(x, y)
 11351  		v.AddArg2(v0, c)
 11352  		return true
 11353  	}
 11354  	// match: (Select0 <t> (Sub64borrow x y c))
 11355  	// result: (SUBV (SUBV <t> x y) c)
 11356  	for {
 11357  		t := v.Type
 11358  		if v_0.Op != ssaop.OpSub64borrow {
 11359  			break
 11360  		}
 11361  		c := v_0.Args[2]
 11362  		x := v_0.Args[0]
 11363  		y := v_0.Args[1]
 11364  		v.Reset(ssaop.OpLOONG64SUBV)
 11365  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
 11366  		v0.AddArg2(x, y)
 11367  		v.AddArg2(v0, c)
 11368  		return true
 11369  	}
 11370  	return false
 11371  }
 11372  func rewriteValue_OpSelect1(v *ssa.Value) bool {
 11373  	v_0 := v.Args[0]
 11374  	b := v.Block
 11375  	typ := &b.Func.Config.Types
 11376  	// match: (Select1 (Mul64uhilo x y))
 11377  	// result: (MULV x y)
 11378  	for {
 11379  		if v_0.Op != ssaop.OpMul64uhilo {
 11380  			break
 11381  		}
 11382  		y := v_0.Args[1]
 11383  		x := v_0.Args[0]
 11384  		v.Reset(ssaop.OpLOONG64MULV)
 11385  		v.AddArg2(x, y)
 11386  		return true
 11387  	}
 11388  	// match: (Select1 (Mul64uover x y))
 11389  	// result: (SGTU <typ.Bool> (MULHVU x y) (MOVVconst <typ.UInt64> [0]))
 11390  	for {
 11391  		if v_0.Op != ssaop.OpMul64uover {
 11392  			break
 11393  		}
 11394  		y := v_0.Args[1]
 11395  		x := v_0.Args[0]
 11396  		v.Reset(ssaop.OpLOONG64SGTU)
 11397  		v.Type = typ.Bool
 11398  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MULHVU, typ.UInt64)
 11399  		v0.AddArg2(x, y)
 11400  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11401  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 11402  		v.AddArg2(v0, v1)
 11403  		return true
 11404  	}
 11405  	// match: (Select1 <t> (Add64carry x y c))
 11406  	// result: (OR (SGTU <t> x s:(ADDV <t> x y)) (SGTU <t> s (ADDV <t> s c)))
 11407  	for {
 11408  		t := v.Type
 11409  		if v_0.Op != ssaop.OpAdd64carry {
 11410  			break
 11411  		}
 11412  		c := v_0.Args[2]
 11413  		x := v_0.Args[0]
 11414  		y := v_0.Args[1]
 11415  		v.Reset(ssaop.OpLOONG64OR)
 11416  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11417  		s := b.NewValue0(v.Pos, ssaop.OpLOONG64ADDV, t)
 11418  		s.AddArg2(x, y)
 11419  		v0.AddArg2(x, s)
 11420  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11421  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64ADDV, t)
 11422  		v3.AddArg2(s, c)
 11423  		v2.AddArg2(s, v3)
 11424  		v.AddArg2(v0, v2)
 11425  		return true
 11426  	}
 11427  	// match: (Select1 <t> (Sub64borrow x y c))
 11428  	// result: (OR (SGTU <t> s:(SUBV <t> x y) x) (SGTU <t> (SUBV <t> s c) s))
 11429  	for {
 11430  		t := v.Type
 11431  		if v_0.Op != ssaop.OpSub64borrow {
 11432  			break
 11433  		}
 11434  		c := v_0.Args[2]
 11435  		x := v_0.Args[0]
 11436  		y := v_0.Args[1]
 11437  		v.Reset(ssaop.OpLOONG64OR)
 11438  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11439  		s := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
 11440  		s.AddArg2(x, y)
 11441  		v0.AddArg2(s, x)
 11442  		v2 := b.NewValue0(v.Pos, ssaop.OpLOONG64SGTU, t)
 11443  		v3 := b.NewValue0(v.Pos, ssaop.OpLOONG64SUBV, t)
 11444  		v3.AddArg2(s, c)
 11445  		v2.AddArg2(v3, s)
 11446  		v.AddArg2(v0, v2)
 11447  		return true
 11448  	}
 11449  	return false
 11450  }
 11451  func rewriteValue_OpSelectN(v *ssa.Value) bool {
 11452  	v_0 := v.Args[0]
 11453  	b := v.Block
 11454  	config := b.Func.Config
 11455  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVVconst [sz]) mem))
 11456  	// cond: sz >= 0 && ssa.IsSameCall(sym, "runtime.memmove") && call.Uses == 1 && ssa.IsInlinableMemmove(dst, src, sz, config) && ssa.Clobber(call)
 11457  	// result: (Move [sz] dst src mem)
 11458  	for {
 11459  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 11460  			break
 11461  		}
 11462  		call := v_0
 11463  		if call.Op != ssaop.OpLOONG64CALLstatic || len(call.Args) != 4 {
 11464  			break
 11465  		}
 11466  		sym := ssa.AuxToCall(call.Aux)
 11467  		mem := call.Args[3]
 11468  		dst := call.Args[0]
 11469  		src := call.Args[1]
 11470  		call_2 := call.Args[2]
 11471  		if call_2.Op != ssaop.OpLOONG64MOVVconst {
 11472  			break
 11473  		}
 11474  		sz := ssa.AuxIntToInt64(call_2.AuxInt)
 11475  		if !(sz >= 0 && ssa.IsSameCall(sym, "runtime.memmove") && call.Uses == 1 && ssa.IsInlinableMemmove(dst, src, sz, config) && ssa.Clobber(call)) {
 11476  			break
 11477  		}
 11478  		v.Reset(ssaop.OpMove)
 11479  		v.AuxInt = ssa.Int64ToAuxInt(sz)
 11480  		v.AddArg3(dst, src, mem)
 11481  		return true
 11482  	}
 11483  	return false
 11484  }
 11485  func rewriteValue_OpSlicemask(v *ssa.Value) bool {
 11486  	v_0 := v.Args[0]
 11487  	b := v.Block
 11488  	// match: (Slicemask <t> x)
 11489  	// result: (SRAVconst (NEGV <t> x) [63])
 11490  	for {
 11491  		t := v.Type
 11492  		x := v_0
 11493  		v.Reset(ssaop.OpLOONG64SRAVconst)
 11494  		v.AuxInt = ssa.Int64ToAuxInt(63)
 11495  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64NEGV, t)
 11496  		v0.AddArg(x)
 11497  		v.AddArg(v0)
 11498  		return true
 11499  	}
 11500  }
 11501  func rewriteValue_OpStore(v *ssa.Value) bool {
 11502  	v_2 := v.Args[2]
 11503  	v_1 := v.Args[1]
 11504  	v_0 := v.Args[0]
 11505  	// match: (Store {t} ptr val mem)
 11506  	// cond: t.Size() == 1
 11507  	// result: (MOVBstore ptr val mem)
 11508  	for {
 11509  		t := ssa.AuxToType(v.Aux)
 11510  		ptr := v_0
 11511  		val := v_1
 11512  		mem := v_2
 11513  		if !(t.Size() == 1) {
 11514  			break
 11515  		}
 11516  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11517  		v.AddArg3(ptr, val, mem)
 11518  		return true
 11519  	}
 11520  	// match: (Store {t} ptr val mem)
 11521  	// cond: t.Size() == 2
 11522  	// result: (MOVHstore ptr val mem)
 11523  	for {
 11524  		t := ssa.AuxToType(v.Aux)
 11525  		ptr := v_0
 11526  		val := v_1
 11527  		mem := v_2
 11528  		if !(t.Size() == 2) {
 11529  			break
 11530  		}
 11531  		v.Reset(ssaop.OpLOONG64MOVHstore)
 11532  		v.AddArg3(ptr, val, mem)
 11533  		return true
 11534  	}
 11535  	// match: (Store {t} ptr val mem)
 11536  	// cond: t.Size() == 4 && !t.IsFloat()
 11537  	// result: (MOVWstore ptr val mem)
 11538  	for {
 11539  		t := ssa.AuxToType(v.Aux)
 11540  		ptr := v_0
 11541  		val := v_1
 11542  		mem := v_2
 11543  		if !(t.Size() == 4 && !t.IsFloat()) {
 11544  			break
 11545  		}
 11546  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11547  		v.AddArg3(ptr, val, mem)
 11548  		return true
 11549  	}
 11550  	// match: (Store {t} ptr val mem)
 11551  	// cond: t.Size() == 8 && !t.IsFloat()
 11552  	// result: (MOVVstore ptr val mem)
 11553  	for {
 11554  		t := ssa.AuxToType(v.Aux)
 11555  		ptr := v_0
 11556  		val := v_1
 11557  		mem := v_2
 11558  		if !(t.Size() == 8 && !t.IsFloat()) {
 11559  			break
 11560  		}
 11561  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11562  		v.AddArg3(ptr, val, mem)
 11563  		return true
 11564  	}
 11565  	// match: (Store {t} ptr val mem)
 11566  	// cond: t.Size() == 4 && t.IsFloat()
 11567  	// result: (MOVFstore ptr val mem)
 11568  	for {
 11569  		t := ssa.AuxToType(v.Aux)
 11570  		ptr := v_0
 11571  		val := v_1
 11572  		mem := v_2
 11573  		if !(t.Size() == 4 && t.IsFloat()) {
 11574  			break
 11575  		}
 11576  		v.Reset(ssaop.OpLOONG64MOVFstore)
 11577  		v.AddArg3(ptr, val, mem)
 11578  		return true
 11579  	}
 11580  	// match: (Store {t} ptr val mem)
 11581  	// cond: t.Size() == 8 && t.IsFloat()
 11582  	// result: (MOVDstore ptr val mem)
 11583  	for {
 11584  		t := ssa.AuxToType(v.Aux)
 11585  		ptr := v_0
 11586  		val := v_1
 11587  		mem := v_2
 11588  		if !(t.Size() == 8 && t.IsFloat()) {
 11589  			break
 11590  		}
 11591  		v.Reset(ssaop.OpLOONG64MOVDstore)
 11592  		v.AddArg3(ptr, val, mem)
 11593  		return true
 11594  	}
 11595  	return false
 11596  }
 11597  func rewriteValue_OpZero(v *ssa.Value) bool {
 11598  	v_1 := v.Args[1]
 11599  	v_0 := v.Args[0]
 11600  	b := v.Block
 11601  	typ := &b.Func.Config.Types
 11602  	// match: (Zero [0] _ mem)
 11603  	// result: mem
 11604  	for {
 11605  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 11606  			break
 11607  		}
 11608  		mem := v_1
 11609  		v.CopyOf(mem)
 11610  		return true
 11611  	}
 11612  	// match: (Zero [1] ptr mem)
 11613  	// result: (MOVBstore ptr (MOVVconst [0]) mem)
 11614  	for {
 11615  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
 11616  			break
 11617  		}
 11618  		ptr := v_0
 11619  		mem := v_1
 11620  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11621  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11622  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11623  		v.AddArg3(ptr, v0, mem)
 11624  		return true
 11625  	}
 11626  	// match: (Zero [2] ptr mem)
 11627  	// result: (MOVHstore ptr (MOVVconst [0]) mem)
 11628  	for {
 11629  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
 11630  			break
 11631  		}
 11632  		ptr := v_0
 11633  		mem := v_1
 11634  		v.Reset(ssaop.OpLOONG64MOVHstore)
 11635  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11636  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11637  		v.AddArg3(ptr, v0, mem)
 11638  		return true
 11639  	}
 11640  	// match: (Zero [3] ptr mem)
 11641  	// result: (MOVBstore [2] ptr (MOVVconst [0]) (MOVHstore ptr (MOVVconst [0]) mem))
 11642  	for {
 11643  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
 11644  			break
 11645  		}
 11646  		ptr := v_0
 11647  		mem := v_1
 11648  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11649  		v.AuxInt = ssa.Int32ToAuxInt(2)
 11650  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11651  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11652  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVHstore, types.TypeMem)
 11653  		v1.AddArg3(ptr, v0, mem)
 11654  		v.AddArg3(ptr, v0, v1)
 11655  		return true
 11656  	}
 11657  	// match: (Zero [4] {t} ptr mem)
 11658  	// result: (MOVWstore ptr (MOVVconst [0]) mem)
 11659  	for {
 11660  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
 11661  			break
 11662  		}
 11663  		ptr := v_0
 11664  		mem := v_1
 11665  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11666  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11667  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11668  		v.AddArg3(ptr, v0, mem)
 11669  		return true
 11670  	}
 11671  	// match: (Zero [5] ptr mem)
 11672  	// result: (MOVBstore [4] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11673  	for {
 11674  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
 11675  			break
 11676  		}
 11677  		ptr := v_0
 11678  		mem := v_1
 11679  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11680  		v.AuxInt = ssa.Int32ToAuxInt(4)
 11681  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11682  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11683  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
 11684  		v1.AddArg3(ptr, v0, mem)
 11685  		v.AddArg3(ptr, v0, v1)
 11686  		return true
 11687  	}
 11688  	// match: (Zero [6] ptr mem)
 11689  	// result: (MOVHstore [4] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11690  	for {
 11691  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
 11692  			break
 11693  		}
 11694  		ptr := v_0
 11695  		mem := v_1
 11696  		v.Reset(ssaop.OpLOONG64MOVHstore)
 11697  		v.AuxInt = ssa.Int32ToAuxInt(4)
 11698  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11699  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11700  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
 11701  		v1.AddArg3(ptr, v0, mem)
 11702  		v.AddArg3(ptr, v0, v1)
 11703  		return true
 11704  	}
 11705  	// match: (Zero [7] ptr mem)
 11706  	// result: (MOVWstore [3] ptr (MOVVconst [0]) (MOVWstore ptr (MOVVconst [0]) mem))
 11707  	for {
 11708  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
 11709  			break
 11710  		}
 11711  		ptr := v_0
 11712  		mem := v_1
 11713  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11714  		v.AuxInt = ssa.Int32ToAuxInt(3)
 11715  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11716  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11717  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVWstore, types.TypeMem)
 11718  		v1.AddArg3(ptr, v0, mem)
 11719  		v.AddArg3(ptr, v0, v1)
 11720  		return true
 11721  	}
 11722  	// match: (Zero [8] {t} ptr mem)
 11723  	// result: (MOVVstore ptr (MOVVconst [0]) mem)
 11724  	for {
 11725  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
 11726  			break
 11727  		}
 11728  		ptr := v_0
 11729  		mem := v_1
 11730  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11731  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11732  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11733  		v.AddArg3(ptr, v0, mem)
 11734  		return true
 11735  	}
 11736  	// match: (Zero [9] ptr mem)
 11737  	// result: (MOVBstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11738  	for {
 11739  		if ssa.AuxIntToInt64(v.AuxInt) != 9 {
 11740  			break
 11741  		}
 11742  		ptr := v_0
 11743  		mem := v_1
 11744  		v.Reset(ssaop.OpLOONG64MOVBstore)
 11745  		v.AuxInt = ssa.Int32ToAuxInt(8)
 11746  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11747  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11748  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11749  		v1.AddArg3(ptr, v0, mem)
 11750  		v.AddArg3(ptr, v0, v1)
 11751  		return true
 11752  	}
 11753  	// match: (Zero [10] ptr mem)
 11754  	// result: (MOVHstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11755  	for {
 11756  		if ssa.AuxIntToInt64(v.AuxInt) != 10 {
 11757  			break
 11758  		}
 11759  		ptr := v_0
 11760  		mem := v_1
 11761  		v.Reset(ssaop.OpLOONG64MOVHstore)
 11762  		v.AuxInt = ssa.Int32ToAuxInt(8)
 11763  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11764  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11765  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11766  		v1.AddArg3(ptr, v0, mem)
 11767  		v.AddArg3(ptr, v0, v1)
 11768  		return true
 11769  	}
 11770  	// match: (Zero [11] ptr mem)
 11771  	// result: (MOVWstore [7] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11772  	for {
 11773  		if ssa.AuxIntToInt64(v.AuxInt) != 11 {
 11774  			break
 11775  		}
 11776  		ptr := v_0
 11777  		mem := v_1
 11778  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11779  		v.AuxInt = ssa.Int32ToAuxInt(7)
 11780  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11781  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11782  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11783  		v1.AddArg3(ptr, v0, mem)
 11784  		v.AddArg3(ptr, v0, v1)
 11785  		return true
 11786  	}
 11787  	// match: (Zero [12] ptr mem)
 11788  	// result: (MOVWstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11789  	for {
 11790  		if ssa.AuxIntToInt64(v.AuxInt) != 12 {
 11791  			break
 11792  		}
 11793  		ptr := v_0
 11794  		mem := v_1
 11795  		v.Reset(ssaop.OpLOONG64MOVWstore)
 11796  		v.AuxInt = ssa.Int32ToAuxInt(8)
 11797  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11798  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11799  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11800  		v1.AddArg3(ptr, v0, mem)
 11801  		v.AddArg3(ptr, v0, v1)
 11802  		return true
 11803  	}
 11804  	// match: (Zero [13] ptr mem)
 11805  	// result: (MOVVstore [5] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11806  	for {
 11807  		if ssa.AuxIntToInt64(v.AuxInt) != 13 {
 11808  			break
 11809  		}
 11810  		ptr := v_0
 11811  		mem := v_1
 11812  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11813  		v.AuxInt = ssa.Int32ToAuxInt(5)
 11814  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11815  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11816  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11817  		v1.AddArg3(ptr, v0, mem)
 11818  		v.AddArg3(ptr, v0, v1)
 11819  		return true
 11820  	}
 11821  	// match: (Zero [14] ptr mem)
 11822  	// result: (MOVVstore [6] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11823  	for {
 11824  		if ssa.AuxIntToInt64(v.AuxInt) != 14 {
 11825  			break
 11826  		}
 11827  		ptr := v_0
 11828  		mem := v_1
 11829  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11830  		v.AuxInt = ssa.Int32ToAuxInt(6)
 11831  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11832  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11833  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11834  		v1.AddArg3(ptr, v0, mem)
 11835  		v.AddArg3(ptr, v0, v1)
 11836  		return true
 11837  	}
 11838  	// match: (Zero [15] ptr mem)
 11839  	// result: (MOVVstore [7] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11840  	for {
 11841  		if ssa.AuxIntToInt64(v.AuxInt) != 15 {
 11842  			break
 11843  		}
 11844  		ptr := v_0
 11845  		mem := v_1
 11846  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11847  		v.AuxInt = ssa.Int32ToAuxInt(7)
 11848  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11849  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11850  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11851  		v1.AddArg3(ptr, v0, mem)
 11852  		v.AddArg3(ptr, v0, v1)
 11853  		return true
 11854  	}
 11855  	// match: (Zero [16] ptr mem)
 11856  	// result: (MOVVstore [8] ptr (MOVVconst [0]) (MOVVstore ptr (MOVVconst [0]) mem))
 11857  	for {
 11858  		if ssa.AuxIntToInt64(v.AuxInt) != 16 {
 11859  			break
 11860  		}
 11861  		ptr := v_0
 11862  		mem := v_1
 11863  		v.Reset(ssaop.OpLOONG64MOVVstore)
 11864  		v.AuxInt = ssa.Int32ToAuxInt(8)
 11865  		v0 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 11866  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 11867  		v1 := b.NewValue0(v.Pos, ssaop.OpLOONG64MOVVstore, types.TypeMem)
 11868  		v1.AddArg3(ptr, v0, mem)
 11869  		v.AddArg3(ptr, v0, v1)
 11870  		return true
 11871  	}
 11872  	// match: (Zero [s] ptr mem)
 11873  	// cond: s > 16 && s < 192
 11874  	// result: (LoweredZero [s] ptr mem)
 11875  	for {
 11876  		s := ssa.AuxIntToInt64(v.AuxInt)
 11877  		ptr := v_0
 11878  		mem := v_1
 11879  		if !(s > 16 && s < 192) {
 11880  			break
 11881  		}
 11882  		v.Reset(ssaop.OpLOONG64LoweredZero)
 11883  		v.AuxInt = ssa.Int64ToAuxInt(s)
 11884  		v.AddArg2(ptr, mem)
 11885  		return true
 11886  	}
 11887  	// match: (Zero [s] ptr mem)
 11888  	// cond: s >= 192
 11889  	// result: (LoweredZeroLoop [s] ptr mem)
 11890  	for {
 11891  		s := ssa.AuxIntToInt64(v.AuxInt)
 11892  		ptr := v_0
 11893  		mem := v_1
 11894  		if !(s >= 192) {
 11895  			break
 11896  		}
 11897  		v.Reset(ssaop.OpLOONG64LoweredZeroLoop)
 11898  		v.AuxInt = ssa.Int64ToAuxInt(s)
 11899  		v.AddArg2(ptr, mem)
 11900  		return true
 11901  	}
 11902  	return false
 11903  }
 11904  func RewriteBlock(b *ssa.Block) bool {
 11905  	typ := &b.Func.Config.Types
 11906  	switch b.Kind {
 11907  	case block.BlockLOONG64BEQ:
 11908  		// match: (BEQ (MOVVconst [0]) cond yes no)
 11909  		// result: (EQZ cond yes no)
 11910  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 11911  			v_0 := b.Controls[0]
 11912  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11913  				break
 11914  			}
 11915  			cond := b.Controls[1]
 11916  			b.ResetWithControl(block.BlockLOONG64EQZ, cond)
 11917  			return true
 11918  		}
 11919  		// match: (BEQ cond (MOVVconst [0]) yes no)
 11920  		// result: (EQZ cond yes no)
 11921  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 11922  			cond := b.Controls[0]
 11923  			v_1 := b.Controls[1]
 11924  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 11925  				break
 11926  			}
 11927  			b.ResetWithControl(block.BlockLOONG64EQZ, cond)
 11928  			return true
 11929  		}
 11930  	case block.BlockLOONG64BGE:
 11931  		// match: (BGE (MOVVconst [0]) cond yes no)
 11932  		// result: (LEZ cond yes no)
 11933  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 11934  			v_0 := b.Controls[0]
 11935  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11936  				break
 11937  			}
 11938  			cond := b.Controls[1]
 11939  			b.ResetWithControl(block.BlockLOONG64LEZ, cond)
 11940  			return true
 11941  		}
 11942  		// match: (BGE cond (MOVVconst [0]) yes no)
 11943  		// result: (GEZ cond yes no)
 11944  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 11945  			cond := b.Controls[0]
 11946  			v_1 := b.Controls[1]
 11947  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 11948  				break
 11949  			}
 11950  			b.ResetWithControl(block.BlockLOONG64GEZ, cond)
 11951  			return true
 11952  		}
 11953  	case block.BlockLOONG64BGEU:
 11954  		// match: (BGEU (MOVVconst [0]) cond yes no)
 11955  		// result: (EQZ cond yes no)
 11956  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 11957  			v_0 := b.Controls[0]
 11958  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11959  				break
 11960  			}
 11961  			cond := b.Controls[1]
 11962  			b.ResetWithControl(block.BlockLOONG64EQZ, cond)
 11963  			return true
 11964  		}
 11965  	case block.BlockLOONG64BLT:
 11966  		// match: (BLT (MOVVconst [0]) cond yes no)
 11967  		// result: (GTZ cond yes no)
 11968  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 11969  			v_0 := b.Controls[0]
 11970  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11971  				break
 11972  			}
 11973  			cond := b.Controls[1]
 11974  			b.ResetWithControl(block.BlockLOONG64GTZ, cond)
 11975  			return true
 11976  		}
 11977  		// match: (BLT cond (MOVVconst [0]) yes no)
 11978  		// result: (LTZ cond yes no)
 11979  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 11980  			cond := b.Controls[0]
 11981  			v_1 := b.Controls[1]
 11982  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 11983  				break
 11984  			}
 11985  			b.ResetWithControl(block.BlockLOONG64LTZ, cond)
 11986  			return true
 11987  		}
 11988  	case block.BlockLOONG64BLTU:
 11989  		// match: (BLTU (MOVVconst [0]) cond yes no)
 11990  		// result: (NEZ cond yes no)
 11991  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 11992  			v_0 := b.Controls[0]
 11993  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 11994  				break
 11995  			}
 11996  			cond := b.Controls[1]
 11997  			b.ResetWithControl(block.BlockLOONG64NEZ, cond)
 11998  			return true
 11999  		}
 12000  	case block.BlockLOONG64BNE:
 12001  		// match: (BNE (MOVVconst [0]) cond yes no)
 12002  		// result: (NEZ cond yes no)
 12003  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12004  			v_0 := b.Controls[0]
 12005  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12006  				break
 12007  			}
 12008  			cond := b.Controls[1]
 12009  			b.ResetWithControl(block.BlockLOONG64NEZ, cond)
 12010  			return true
 12011  		}
 12012  		// match: (BNE cond (MOVVconst [0]) yes no)
 12013  		// result: (NEZ cond yes no)
 12014  		for b.Controls[1].Op == ssaop.OpLOONG64MOVVconst {
 12015  			cond := b.Controls[0]
 12016  			v_1 := b.Controls[1]
 12017  			if ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 12018  				break
 12019  			}
 12020  			b.ResetWithControl(block.BlockLOONG64NEZ, cond)
 12021  			return true
 12022  		}
 12023  	case block.BlockLOONG64EQZ:
 12024  		// match: (EQZ (FPFlagTrue cmp) yes no)
 12025  		// result: (FPF cmp yes no)
 12026  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagTrue {
 12027  			v_0 := b.Controls[0]
 12028  			cmp := v_0.Args[0]
 12029  			b.ResetWithControl(block.BlockLOONG64FPF, cmp)
 12030  			return true
 12031  		}
 12032  		// match: (EQZ (FPFlagFalse cmp) yes no)
 12033  		// result: (FPT cmp yes no)
 12034  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagFalse {
 12035  			v_0 := b.Controls[0]
 12036  			cmp := v_0.Args[0]
 12037  			b.ResetWithControl(block.BlockLOONG64FPT, cmp)
 12038  			return true
 12039  		}
 12040  		// match: (EQZ (XORconst [1] cmp:(SGT _ _)) yes no)
 12041  		// result: (NEZ cmp yes no)
 12042  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12043  			v_0 := b.Controls[0]
 12044  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12045  				break
 12046  			}
 12047  			cmp := v_0.Args[0]
 12048  			if cmp.Op != ssaop.OpLOONG64SGT {
 12049  				break
 12050  			}
 12051  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 12052  			return true
 12053  		}
 12054  		// match: (EQZ (XORconst [1] cmp:(SGTU _ _)) yes no)
 12055  		// result: (NEZ cmp yes no)
 12056  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12057  			v_0 := b.Controls[0]
 12058  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12059  				break
 12060  			}
 12061  			cmp := v_0.Args[0]
 12062  			if cmp.Op != ssaop.OpLOONG64SGTU {
 12063  				break
 12064  			}
 12065  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 12066  			return true
 12067  		}
 12068  		// match: (EQZ (XORconst [1] cmp:(SGTconst _)) yes no)
 12069  		// result: (NEZ cmp yes no)
 12070  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12071  			v_0 := b.Controls[0]
 12072  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12073  				break
 12074  			}
 12075  			cmp := v_0.Args[0]
 12076  			if cmp.Op != ssaop.OpLOONG64SGTconst {
 12077  				break
 12078  			}
 12079  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 12080  			return true
 12081  		}
 12082  		// match: (EQZ (XORconst [1] cmp:(SGTUconst _)) yes no)
 12083  		// result: (NEZ cmp yes no)
 12084  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12085  			v_0 := b.Controls[0]
 12086  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12087  				break
 12088  			}
 12089  			cmp := v_0.Args[0]
 12090  			if cmp.Op != ssaop.OpLOONG64SGTUconst {
 12091  				break
 12092  			}
 12093  			b.ResetWithControl(block.BlockLOONG64NEZ, cmp)
 12094  			return true
 12095  		}
 12096  		// match: (EQZ (SGTUconst [1] x) yes no)
 12097  		// result: (NEZ x yes no)
 12098  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 12099  			v_0 := b.Controls[0]
 12100  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12101  				break
 12102  			}
 12103  			x := v_0.Args[0]
 12104  			b.ResetWithControl(block.BlockLOONG64NEZ, x)
 12105  			return true
 12106  		}
 12107  		// match: (EQZ (SGTU x (MOVVconst [0])) yes no)
 12108  		// result: (EQZ x yes no)
 12109  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12110  			v_0 := b.Controls[0]
 12111  			_ = v_0.Args[1]
 12112  			x := v_0.Args[0]
 12113  			v_0_1 := v_0.Args[1]
 12114  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 12115  				break
 12116  			}
 12117  			b.ResetWithControl(block.BlockLOONG64EQZ, x)
 12118  			return true
 12119  		}
 12120  		// match: (EQZ (SGTconst [0] x) yes no)
 12121  		// result: (GEZ x yes no)
 12122  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 12123  			v_0 := b.Controls[0]
 12124  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12125  				break
 12126  			}
 12127  			x := v_0.Args[0]
 12128  			b.ResetWithControl(block.BlockLOONG64GEZ, x)
 12129  			return true
 12130  		}
 12131  		// match: (EQZ (SGT x (MOVVconst [0])) yes no)
 12132  		// result: (LEZ x yes no)
 12133  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 12134  			v_0 := b.Controls[0]
 12135  			_ = v_0.Args[1]
 12136  			x := v_0.Args[0]
 12137  			v_0_1 := v_0.Args[1]
 12138  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 12139  				break
 12140  			}
 12141  			b.ResetWithControl(block.BlockLOONG64LEZ, x)
 12142  			return true
 12143  		}
 12144  		// match: (EQZ (SGTU (MOVVconst [c]) y) yes no)
 12145  		// cond: c >= -2048 && c <= 2047
 12146  		// result: (EQZ (SGTUconst [c] y) yes no)
 12147  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12148  			v_0 := b.Controls[0]
 12149  			y := v_0.Args[1]
 12150  			v_0_0 := v_0.Args[0]
 12151  			if v_0_0.Op != ssaop.OpLOONG64MOVVconst {
 12152  				break
 12153  			}
 12154  			c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 12155  			if !(c >= -2048 && c <= 2047) {
 12156  				break
 12157  			}
 12158  			v0 := b.NewValue0(v_0.Pos, ssaop.OpLOONG64SGTUconst, typ.Bool)
 12159  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12160  			v0.AddArg(y)
 12161  			b.ResetWithControl(block.BlockLOONG64EQZ, v0)
 12162  			return true
 12163  		}
 12164  		// match: (EQZ (SUBV x y) yes no)
 12165  		// result: (BEQ x y yes no)
 12166  		for b.Controls[0].Op == ssaop.OpLOONG64SUBV {
 12167  			v_0 := b.Controls[0]
 12168  			y := v_0.Args[1]
 12169  			x := v_0.Args[0]
 12170  			b.ResetWithControl2(block.BlockLOONG64BEQ, x, y)
 12171  			return true
 12172  		}
 12173  		// match: (EQZ (SGT x y) yes no)
 12174  		// result: (BGE y x yes no)
 12175  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 12176  			v_0 := b.Controls[0]
 12177  			y := v_0.Args[1]
 12178  			x := v_0.Args[0]
 12179  			b.ResetWithControl2(block.BlockLOONG64BGE, y, x)
 12180  			return true
 12181  		}
 12182  		// match: (EQZ (SGTU x y) yes no)
 12183  		// result: (BGEU y x yes no)
 12184  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12185  			v_0 := b.Controls[0]
 12186  			y := v_0.Args[1]
 12187  			x := v_0.Args[0]
 12188  			b.ResetWithControl2(block.BlockLOONG64BGEU, y, x)
 12189  			return true
 12190  		}
 12191  		// match: (EQZ (SGTconst [c] y) yes no)
 12192  		// result: (BGE y (MOVVconst [c]) yes no)
 12193  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 12194  			v_0 := b.Controls[0]
 12195  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12196  			y := v_0.Args[0]
 12197  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12198  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12199  			b.ResetWithControl2(block.BlockLOONG64BGE, y, v0)
 12200  			return true
 12201  		}
 12202  		// match: (EQZ (SGTUconst [c] y) yes no)
 12203  		// result: (BGEU y (MOVVconst [c]) yes no)
 12204  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 12205  			v_0 := b.Controls[0]
 12206  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12207  			y := v_0.Args[0]
 12208  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12209  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12210  			b.ResetWithControl2(block.BlockLOONG64BGEU, y, v0)
 12211  			return true
 12212  		}
 12213  		// match: (EQZ (MOVVconst [0]) yes no)
 12214  		// result: (First yes no)
 12215  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12216  			v_0 := b.Controls[0]
 12217  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12218  				break
 12219  			}
 12220  			b.Reset(block.BlockFirst)
 12221  			return true
 12222  		}
 12223  		// match: (EQZ (MOVVconst [c]) yes no)
 12224  		// cond: c != 0
 12225  		// result: (First no yes)
 12226  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12227  			v_0 := b.Controls[0]
 12228  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12229  			if !(c != 0) {
 12230  				break
 12231  			}
 12232  			b.Reset(block.BlockFirst)
 12233  			b.SwapSuccessors()
 12234  			return true
 12235  		}
 12236  		// match: (EQZ (NEGV x) yes no)
 12237  		// result: (EQZ x yes no)
 12238  		for b.Controls[0].Op == ssaop.OpLOONG64NEGV {
 12239  			v_0 := b.Controls[0]
 12240  			x := v_0.Args[0]
 12241  			b.ResetWithControl(block.BlockLOONG64EQZ, x)
 12242  			return true
 12243  		}
 12244  	case block.BlockLOONG64GEZ:
 12245  		// match: (GEZ (MOVVconst [c]) yes no)
 12246  		// cond: c >= 0
 12247  		// result: (First yes no)
 12248  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12249  			v_0 := b.Controls[0]
 12250  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12251  			if !(c >= 0) {
 12252  				break
 12253  			}
 12254  			b.Reset(block.BlockFirst)
 12255  			return true
 12256  		}
 12257  		// match: (GEZ (MOVVconst [c]) yes no)
 12258  		// cond: c < 0
 12259  		// result: (First no yes)
 12260  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12261  			v_0 := b.Controls[0]
 12262  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12263  			if !(c < 0) {
 12264  				break
 12265  			}
 12266  			b.Reset(block.BlockFirst)
 12267  			b.SwapSuccessors()
 12268  			return true
 12269  		}
 12270  	case block.BlockLOONG64GTZ:
 12271  		// match: (GTZ (MOVVconst [c]) yes no)
 12272  		// cond: c > 0
 12273  		// result: (First yes no)
 12274  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12275  			v_0 := b.Controls[0]
 12276  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12277  			if !(c > 0) {
 12278  				break
 12279  			}
 12280  			b.Reset(block.BlockFirst)
 12281  			return true
 12282  		}
 12283  		// match: (GTZ (MOVVconst [c]) yes no)
 12284  		// cond: c <= 0
 12285  		// result: (First no yes)
 12286  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12287  			v_0 := b.Controls[0]
 12288  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12289  			if !(c <= 0) {
 12290  				break
 12291  			}
 12292  			b.Reset(block.BlockFirst)
 12293  			b.SwapSuccessors()
 12294  			return true
 12295  		}
 12296  	case block.BlockIf:
 12297  		// match: (If cond yes no)
 12298  		// result: (NEZ (MOVBUreg <typ.UInt64> cond) yes no)
 12299  		for {
 12300  			cond := b.Controls[0]
 12301  			v0 := b.NewValue0(cond.Pos, ssaop.OpLOONG64MOVBUreg, typ.UInt64)
 12302  			v0.AddArg(cond)
 12303  			b.ResetWithControl(block.BlockLOONG64NEZ, v0)
 12304  			return true
 12305  		}
 12306  	case block.BlockJumpTable:
 12307  		// match: (JumpTable idx)
 12308  		// result: (JUMPTABLE {ssa.MakeJumpTableSym(b)} idx (MOVVaddr <typ.Uintptr> {ssa.MakeJumpTableSym(b)} (SB)))
 12309  		for {
 12310  			idx := b.Controls[0]
 12311  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVaddr, typ.Uintptr)
 12312  			v0.Aux = ssa.SymToAux(ssa.MakeJumpTableSym(b))
 12313  			v1 := b.NewValue0(b.Pos, ssaop.OpSB, typ.Uintptr)
 12314  			v0.AddArg(v1)
 12315  			b.ResetWithControl2(block.BlockLOONG64JUMPTABLE, idx, v0)
 12316  			b.Aux = ssa.SymToAux(ssa.MakeJumpTableSym(b))
 12317  			return true
 12318  		}
 12319  	case block.BlockLOONG64LEZ:
 12320  		// match: (LEZ (MOVVconst [c]) yes no)
 12321  		// cond: c <= 0
 12322  		// result: (First yes no)
 12323  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12324  			v_0 := b.Controls[0]
 12325  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12326  			if !(c <= 0) {
 12327  				break
 12328  			}
 12329  			b.Reset(block.BlockFirst)
 12330  			return true
 12331  		}
 12332  		// match: (LEZ (MOVVconst [c]) yes no)
 12333  		// cond: c > 0
 12334  		// result: (First no yes)
 12335  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12336  			v_0 := b.Controls[0]
 12337  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12338  			if !(c > 0) {
 12339  				break
 12340  			}
 12341  			b.Reset(block.BlockFirst)
 12342  			b.SwapSuccessors()
 12343  			return true
 12344  		}
 12345  	case block.BlockLOONG64LTZ:
 12346  		// match: (LTZ (MOVVconst [c]) yes no)
 12347  		// cond: c < 0
 12348  		// result: (First yes no)
 12349  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12350  			v_0 := b.Controls[0]
 12351  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12352  			if !(c < 0) {
 12353  				break
 12354  			}
 12355  			b.Reset(block.BlockFirst)
 12356  			return true
 12357  		}
 12358  		// match: (LTZ (MOVVconst [c]) yes no)
 12359  		// cond: c >= 0
 12360  		// result: (First no yes)
 12361  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12362  			v_0 := b.Controls[0]
 12363  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12364  			if !(c >= 0) {
 12365  				break
 12366  			}
 12367  			b.Reset(block.BlockFirst)
 12368  			b.SwapSuccessors()
 12369  			return true
 12370  		}
 12371  	case block.BlockLOONG64NEZ:
 12372  		// match: (NEZ (FPFlagTrue cmp) yes no)
 12373  		// result: (FPT cmp yes no)
 12374  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagTrue {
 12375  			v_0 := b.Controls[0]
 12376  			cmp := v_0.Args[0]
 12377  			b.ResetWithControl(block.BlockLOONG64FPT, cmp)
 12378  			return true
 12379  		}
 12380  		// match: (NEZ (FPFlagFalse cmp) yes no)
 12381  		// result: (FPF cmp yes no)
 12382  		for b.Controls[0].Op == ssaop.OpLOONG64FPFlagFalse {
 12383  			v_0 := b.Controls[0]
 12384  			cmp := v_0.Args[0]
 12385  			b.ResetWithControl(block.BlockLOONG64FPF, cmp)
 12386  			return true
 12387  		}
 12388  		// match: (NEZ (XORconst [1] cmp:(SGT _ _)) yes no)
 12389  		// result: (EQZ cmp yes no)
 12390  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12391  			v_0 := b.Controls[0]
 12392  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12393  				break
 12394  			}
 12395  			cmp := v_0.Args[0]
 12396  			if cmp.Op != ssaop.OpLOONG64SGT {
 12397  				break
 12398  			}
 12399  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12400  			return true
 12401  		}
 12402  		// match: (NEZ (XORconst [1] cmp:(SGTU _ _)) yes no)
 12403  		// result: (EQZ cmp yes no)
 12404  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12405  			v_0 := b.Controls[0]
 12406  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12407  				break
 12408  			}
 12409  			cmp := v_0.Args[0]
 12410  			if cmp.Op != ssaop.OpLOONG64SGTU {
 12411  				break
 12412  			}
 12413  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12414  			return true
 12415  		}
 12416  		// match: (NEZ (XORconst [1] cmp:(SGTconst _)) yes no)
 12417  		// result: (EQZ cmp yes no)
 12418  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12419  			v_0 := b.Controls[0]
 12420  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12421  				break
 12422  			}
 12423  			cmp := v_0.Args[0]
 12424  			if cmp.Op != ssaop.OpLOONG64SGTconst {
 12425  				break
 12426  			}
 12427  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12428  			return true
 12429  		}
 12430  		// match: (NEZ (XORconst [1] cmp:(SGTUconst _)) yes no)
 12431  		// result: (EQZ cmp yes no)
 12432  		for b.Controls[0].Op == ssaop.OpLOONG64XORconst {
 12433  			v_0 := b.Controls[0]
 12434  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12435  				break
 12436  			}
 12437  			cmp := v_0.Args[0]
 12438  			if cmp.Op != ssaop.OpLOONG64SGTUconst {
 12439  				break
 12440  			}
 12441  			b.ResetWithControl(block.BlockLOONG64EQZ, cmp)
 12442  			return true
 12443  		}
 12444  		// match: (NEZ (SGTUconst [1] x) yes no)
 12445  		// result: (EQZ x yes no)
 12446  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 12447  			v_0 := b.Controls[0]
 12448  			if ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
 12449  				break
 12450  			}
 12451  			x := v_0.Args[0]
 12452  			b.ResetWithControl(block.BlockLOONG64EQZ, x)
 12453  			return true
 12454  		}
 12455  		// match: (NEZ (SGTU x (MOVVconst [0])) yes no)
 12456  		// result: (NEZ x yes no)
 12457  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12458  			v_0 := b.Controls[0]
 12459  			_ = v_0.Args[1]
 12460  			x := v_0.Args[0]
 12461  			v_0_1 := v_0.Args[1]
 12462  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 12463  				break
 12464  			}
 12465  			b.ResetWithControl(block.BlockLOONG64NEZ, x)
 12466  			return true
 12467  		}
 12468  		// match: (NEZ (SGTconst [0] x) yes no)
 12469  		// result: (LTZ x yes no)
 12470  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 12471  			v_0 := b.Controls[0]
 12472  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12473  				break
 12474  			}
 12475  			x := v_0.Args[0]
 12476  			b.ResetWithControl(block.BlockLOONG64LTZ, x)
 12477  			return true
 12478  		}
 12479  		// match: (NEZ (SGT x (MOVVconst [0])) yes no)
 12480  		// result: (GTZ x yes no)
 12481  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 12482  			v_0 := b.Controls[0]
 12483  			_ = v_0.Args[1]
 12484  			x := v_0.Args[0]
 12485  			v_0_1 := v_0.Args[1]
 12486  			if v_0_1.Op != ssaop.OpLOONG64MOVVconst || ssa.AuxIntToInt64(v_0_1.AuxInt) != 0 {
 12487  				break
 12488  			}
 12489  			b.ResetWithControl(block.BlockLOONG64GTZ, x)
 12490  			return true
 12491  		}
 12492  		// match: (NEZ (SGTU (MOVVconst [c]) y) yes no)
 12493  		// cond: c >= -2048 && c <= 2047
 12494  		// result: (NEZ (SGTUconst [c] y) yes no)
 12495  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12496  			v_0 := b.Controls[0]
 12497  			y := v_0.Args[1]
 12498  			v_0_0 := v_0.Args[0]
 12499  			if v_0_0.Op != ssaop.OpLOONG64MOVVconst {
 12500  				break
 12501  			}
 12502  			c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 12503  			if !(c >= -2048 && c <= 2047) {
 12504  				break
 12505  			}
 12506  			v0 := b.NewValue0(v_0.Pos, ssaop.OpLOONG64SGTUconst, typ.Bool)
 12507  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12508  			v0.AddArg(y)
 12509  			b.ResetWithControl(block.BlockLOONG64NEZ, v0)
 12510  			return true
 12511  		}
 12512  		// match: (NEZ (SUBV x y) yes no)
 12513  		// result: (BNE x y yes no)
 12514  		for b.Controls[0].Op == ssaop.OpLOONG64SUBV {
 12515  			v_0 := b.Controls[0]
 12516  			y := v_0.Args[1]
 12517  			x := v_0.Args[0]
 12518  			b.ResetWithControl2(block.BlockLOONG64BNE, x, y)
 12519  			return true
 12520  		}
 12521  		// match: (NEZ (SGT x y) yes no)
 12522  		// result: (BLT y x yes no)
 12523  		for b.Controls[0].Op == ssaop.OpLOONG64SGT {
 12524  			v_0 := b.Controls[0]
 12525  			y := v_0.Args[1]
 12526  			x := v_0.Args[0]
 12527  			b.ResetWithControl2(block.BlockLOONG64BLT, y, x)
 12528  			return true
 12529  		}
 12530  		// match: (NEZ (SGTU x y) yes no)
 12531  		// result: (BLTU y x yes no)
 12532  		for b.Controls[0].Op == ssaop.OpLOONG64SGTU {
 12533  			v_0 := b.Controls[0]
 12534  			y := v_0.Args[1]
 12535  			x := v_0.Args[0]
 12536  			b.ResetWithControl2(block.BlockLOONG64BLTU, y, x)
 12537  			return true
 12538  		}
 12539  		// match: (NEZ (SGTconst [c] y) yes no)
 12540  		// result: (BLT y (MOVVconst [c]) yes no)
 12541  		for b.Controls[0].Op == ssaop.OpLOONG64SGTconst {
 12542  			v_0 := b.Controls[0]
 12543  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12544  			y := v_0.Args[0]
 12545  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12546  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12547  			b.ResetWithControl2(block.BlockLOONG64BLT, y, v0)
 12548  			return true
 12549  		}
 12550  		// match: (NEZ (SGTUconst [c] y) yes no)
 12551  		// result: (BLTU y (MOVVconst [c]) yes no)
 12552  		for b.Controls[0].Op == ssaop.OpLOONG64SGTUconst {
 12553  			v_0 := b.Controls[0]
 12554  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12555  			y := v_0.Args[0]
 12556  			v0 := b.NewValue0(b.Pos, ssaop.OpLOONG64MOVVconst, typ.UInt64)
 12557  			v0.AuxInt = ssa.Int64ToAuxInt(c)
 12558  			b.ResetWithControl2(block.BlockLOONG64BLTU, y, v0)
 12559  			return true
 12560  		}
 12561  		// match: (NEZ (MOVVconst [0]) yes no)
 12562  		// result: (First no yes)
 12563  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12564  			v_0 := b.Controls[0]
 12565  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12566  				break
 12567  			}
 12568  			b.Reset(block.BlockFirst)
 12569  			b.SwapSuccessors()
 12570  			return true
 12571  		}
 12572  		// match: (NEZ (MOVVconst [c]) yes no)
 12573  		// cond: c != 0
 12574  		// result: (First yes no)
 12575  		for b.Controls[0].Op == ssaop.OpLOONG64MOVVconst {
 12576  			v_0 := b.Controls[0]
 12577  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 12578  			if !(c != 0) {
 12579  				break
 12580  			}
 12581  			b.Reset(block.BlockFirst)
 12582  			return true
 12583  		}
 12584  		// match: (NEZ (NEGV x) yes no)
 12585  		// result: (NEZ x yes no)
 12586  		for b.Controls[0].Op == ssaop.OpLOONG64NEGV {
 12587  			v_0 := b.Controls[0]
 12588  			x := v_0.Args[0]
 12589  			b.ResetWithControl(block.BlockLOONG64NEZ, x)
 12590  			return true
 12591  		}
 12592  	}
 12593  	return false
 12594  }
 12595  

View as plain text