Black Lives Matter. Support the Equal Justice Initiative.

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

Documentation: cmd/compile/internal/ssa

     1  // Code generated from gen/ARM.rules; DO NOT EDIT.
     2  // generated with: cd gen; go run *.go
     3  
     4  package ssa
     5  
     6  import "cmd/internal/objabi"
     7  import "cmd/compile/internal/types"
     8  
     9  func rewriteValueARM(v *Value) bool {
    10  	switch v.Op {
    11  	case OpARMADC:
    12  		return rewriteValueARM_OpARMADC_0(v) || rewriteValueARM_OpARMADC_10(v) || rewriteValueARM_OpARMADC_20(v)
    13  	case OpARMADCconst:
    14  		return rewriteValueARM_OpARMADCconst_0(v)
    15  	case OpARMADCshiftLL:
    16  		return rewriteValueARM_OpARMADCshiftLL_0(v)
    17  	case OpARMADCshiftLLreg:
    18  		return rewriteValueARM_OpARMADCshiftLLreg_0(v)
    19  	case OpARMADCshiftRA:
    20  		return rewriteValueARM_OpARMADCshiftRA_0(v)
    21  	case OpARMADCshiftRAreg:
    22  		return rewriteValueARM_OpARMADCshiftRAreg_0(v)
    23  	case OpARMADCshiftRL:
    24  		return rewriteValueARM_OpARMADCshiftRL_0(v)
    25  	case OpARMADCshiftRLreg:
    26  		return rewriteValueARM_OpARMADCshiftRLreg_0(v)
    27  	case OpARMADD:
    28  		return rewriteValueARM_OpARMADD_0(v) || rewriteValueARM_OpARMADD_10(v)
    29  	case OpARMADDD:
    30  		return rewriteValueARM_OpARMADDD_0(v)
    31  	case OpARMADDF:
    32  		return rewriteValueARM_OpARMADDF_0(v)
    33  	case OpARMADDS:
    34  		return rewriteValueARM_OpARMADDS_0(v) || rewriteValueARM_OpARMADDS_10(v)
    35  	case OpARMADDSshiftLL:
    36  		return rewriteValueARM_OpARMADDSshiftLL_0(v)
    37  	case OpARMADDSshiftLLreg:
    38  		return rewriteValueARM_OpARMADDSshiftLLreg_0(v)
    39  	case OpARMADDSshiftRA:
    40  		return rewriteValueARM_OpARMADDSshiftRA_0(v)
    41  	case OpARMADDSshiftRAreg:
    42  		return rewriteValueARM_OpARMADDSshiftRAreg_0(v)
    43  	case OpARMADDSshiftRL:
    44  		return rewriteValueARM_OpARMADDSshiftRL_0(v)
    45  	case OpARMADDSshiftRLreg:
    46  		return rewriteValueARM_OpARMADDSshiftRLreg_0(v)
    47  	case OpARMADDconst:
    48  		return rewriteValueARM_OpARMADDconst_0(v)
    49  	case OpARMADDshiftLL:
    50  		return rewriteValueARM_OpARMADDshiftLL_0(v)
    51  	case OpARMADDshiftLLreg:
    52  		return rewriteValueARM_OpARMADDshiftLLreg_0(v)
    53  	case OpARMADDshiftRA:
    54  		return rewriteValueARM_OpARMADDshiftRA_0(v)
    55  	case OpARMADDshiftRAreg:
    56  		return rewriteValueARM_OpARMADDshiftRAreg_0(v)
    57  	case OpARMADDshiftRL:
    58  		return rewriteValueARM_OpARMADDshiftRL_0(v)
    59  	case OpARMADDshiftRLreg:
    60  		return rewriteValueARM_OpARMADDshiftRLreg_0(v)
    61  	case OpARMAND:
    62  		return rewriteValueARM_OpARMAND_0(v) || rewriteValueARM_OpARMAND_10(v) || rewriteValueARM_OpARMAND_20(v)
    63  	case OpARMANDconst:
    64  		return rewriteValueARM_OpARMANDconst_0(v)
    65  	case OpARMANDshiftLL:
    66  		return rewriteValueARM_OpARMANDshiftLL_0(v)
    67  	case OpARMANDshiftLLreg:
    68  		return rewriteValueARM_OpARMANDshiftLLreg_0(v)
    69  	case OpARMANDshiftRA:
    70  		return rewriteValueARM_OpARMANDshiftRA_0(v)
    71  	case OpARMANDshiftRAreg:
    72  		return rewriteValueARM_OpARMANDshiftRAreg_0(v)
    73  	case OpARMANDshiftRL:
    74  		return rewriteValueARM_OpARMANDshiftRL_0(v)
    75  	case OpARMANDshiftRLreg:
    76  		return rewriteValueARM_OpARMANDshiftRLreg_0(v)
    77  	case OpARMBFX:
    78  		return rewriteValueARM_OpARMBFX_0(v)
    79  	case OpARMBFXU:
    80  		return rewriteValueARM_OpARMBFXU_0(v)
    81  	case OpARMBIC:
    82  		return rewriteValueARM_OpARMBIC_0(v)
    83  	case OpARMBICconst:
    84  		return rewriteValueARM_OpARMBICconst_0(v)
    85  	case OpARMBICshiftLL:
    86  		return rewriteValueARM_OpARMBICshiftLL_0(v)
    87  	case OpARMBICshiftLLreg:
    88  		return rewriteValueARM_OpARMBICshiftLLreg_0(v)
    89  	case OpARMBICshiftRA:
    90  		return rewriteValueARM_OpARMBICshiftRA_0(v)
    91  	case OpARMBICshiftRAreg:
    92  		return rewriteValueARM_OpARMBICshiftRAreg_0(v)
    93  	case OpARMBICshiftRL:
    94  		return rewriteValueARM_OpARMBICshiftRL_0(v)
    95  	case OpARMBICshiftRLreg:
    96  		return rewriteValueARM_OpARMBICshiftRLreg_0(v)
    97  	case OpARMCMN:
    98  		return rewriteValueARM_OpARMCMN_0(v) || rewriteValueARM_OpARMCMN_10(v)
    99  	case OpARMCMNconst:
   100  		return rewriteValueARM_OpARMCMNconst_0(v)
   101  	case OpARMCMNshiftLL:
   102  		return rewriteValueARM_OpARMCMNshiftLL_0(v)
   103  	case OpARMCMNshiftLLreg:
   104  		return rewriteValueARM_OpARMCMNshiftLLreg_0(v)
   105  	case OpARMCMNshiftRA:
   106  		return rewriteValueARM_OpARMCMNshiftRA_0(v)
   107  	case OpARMCMNshiftRAreg:
   108  		return rewriteValueARM_OpARMCMNshiftRAreg_0(v)
   109  	case OpARMCMNshiftRL:
   110  		return rewriteValueARM_OpARMCMNshiftRL_0(v)
   111  	case OpARMCMNshiftRLreg:
   112  		return rewriteValueARM_OpARMCMNshiftRLreg_0(v)
   113  	case OpARMCMOVWHSconst:
   114  		return rewriteValueARM_OpARMCMOVWHSconst_0(v)
   115  	case OpARMCMOVWLSconst:
   116  		return rewriteValueARM_OpARMCMOVWLSconst_0(v)
   117  	case OpARMCMP:
   118  		return rewriteValueARM_OpARMCMP_0(v) || rewriteValueARM_OpARMCMP_10(v)
   119  	case OpARMCMPD:
   120  		return rewriteValueARM_OpARMCMPD_0(v)
   121  	case OpARMCMPF:
   122  		return rewriteValueARM_OpARMCMPF_0(v)
   123  	case OpARMCMPconst:
   124  		return rewriteValueARM_OpARMCMPconst_0(v)
   125  	case OpARMCMPshiftLL:
   126  		return rewriteValueARM_OpARMCMPshiftLL_0(v)
   127  	case OpARMCMPshiftLLreg:
   128  		return rewriteValueARM_OpARMCMPshiftLLreg_0(v)
   129  	case OpARMCMPshiftRA:
   130  		return rewriteValueARM_OpARMCMPshiftRA_0(v)
   131  	case OpARMCMPshiftRAreg:
   132  		return rewriteValueARM_OpARMCMPshiftRAreg_0(v)
   133  	case OpARMCMPshiftRL:
   134  		return rewriteValueARM_OpARMCMPshiftRL_0(v)
   135  	case OpARMCMPshiftRLreg:
   136  		return rewriteValueARM_OpARMCMPshiftRLreg_0(v)
   137  	case OpARMEqual:
   138  		return rewriteValueARM_OpARMEqual_0(v)
   139  	case OpARMGreaterEqual:
   140  		return rewriteValueARM_OpARMGreaterEqual_0(v)
   141  	case OpARMGreaterEqualU:
   142  		return rewriteValueARM_OpARMGreaterEqualU_0(v)
   143  	case OpARMGreaterThan:
   144  		return rewriteValueARM_OpARMGreaterThan_0(v)
   145  	case OpARMGreaterThanU:
   146  		return rewriteValueARM_OpARMGreaterThanU_0(v)
   147  	case OpARMLessEqual:
   148  		return rewriteValueARM_OpARMLessEqual_0(v)
   149  	case OpARMLessEqualU:
   150  		return rewriteValueARM_OpARMLessEqualU_0(v)
   151  	case OpARMLessThan:
   152  		return rewriteValueARM_OpARMLessThan_0(v)
   153  	case OpARMLessThanU:
   154  		return rewriteValueARM_OpARMLessThanU_0(v)
   155  	case OpARMMOVBUload:
   156  		return rewriteValueARM_OpARMMOVBUload_0(v)
   157  	case OpARMMOVBUloadidx:
   158  		return rewriteValueARM_OpARMMOVBUloadidx_0(v)
   159  	case OpARMMOVBUreg:
   160  		return rewriteValueARM_OpARMMOVBUreg_0(v)
   161  	case OpARMMOVBload:
   162  		return rewriteValueARM_OpARMMOVBload_0(v)
   163  	case OpARMMOVBloadidx:
   164  		return rewriteValueARM_OpARMMOVBloadidx_0(v)
   165  	case OpARMMOVBreg:
   166  		return rewriteValueARM_OpARMMOVBreg_0(v)
   167  	case OpARMMOVBstore:
   168  		return rewriteValueARM_OpARMMOVBstore_0(v)
   169  	case OpARMMOVBstoreidx:
   170  		return rewriteValueARM_OpARMMOVBstoreidx_0(v)
   171  	case OpARMMOVDload:
   172  		return rewriteValueARM_OpARMMOVDload_0(v)
   173  	case OpARMMOVDstore:
   174  		return rewriteValueARM_OpARMMOVDstore_0(v)
   175  	case OpARMMOVFload:
   176  		return rewriteValueARM_OpARMMOVFload_0(v)
   177  	case OpARMMOVFstore:
   178  		return rewriteValueARM_OpARMMOVFstore_0(v)
   179  	case OpARMMOVHUload:
   180  		return rewriteValueARM_OpARMMOVHUload_0(v)
   181  	case OpARMMOVHUloadidx:
   182  		return rewriteValueARM_OpARMMOVHUloadidx_0(v)
   183  	case OpARMMOVHUreg:
   184  		return rewriteValueARM_OpARMMOVHUreg_0(v)
   185  	case OpARMMOVHload:
   186  		return rewriteValueARM_OpARMMOVHload_0(v)
   187  	case OpARMMOVHloadidx:
   188  		return rewriteValueARM_OpARMMOVHloadidx_0(v)
   189  	case OpARMMOVHreg:
   190  		return rewriteValueARM_OpARMMOVHreg_0(v)
   191  	case OpARMMOVHstore:
   192  		return rewriteValueARM_OpARMMOVHstore_0(v)
   193  	case OpARMMOVHstoreidx:
   194  		return rewriteValueARM_OpARMMOVHstoreidx_0(v)
   195  	case OpARMMOVWload:
   196  		return rewriteValueARM_OpARMMOVWload_0(v)
   197  	case OpARMMOVWloadidx:
   198  		return rewriteValueARM_OpARMMOVWloadidx_0(v)
   199  	case OpARMMOVWloadshiftLL:
   200  		return rewriteValueARM_OpARMMOVWloadshiftLL_0(v)
   201  	case OpARMMOVWloadshiftRA:
   202  		return rewriteValueARM_OpARMMOVWloadshiftRA_0(v)
   203  	case OpARMMOVWloadshiftRL:
   204  		return rewriteValueARM_OpARMMOVWloadshiftRL_0(v)
   205  	case OpARMMOVWreg:
   206  		return rewriteValueARM_OpARMMOVWreg_0(v)
   207  	case OpARMMOVWstore:
   208  		return rewriteValueARM_OpARMMOVWstore_0(v)
   209  	case OpARMMOVWstoreidx:
   210  		return rewriteValueARM_OpARMMOVWstoreidx_0(v)
   211  	case OpARMMOVWstoreshiftLL:
   212  		return rewriteValueARM_OpARMMOVWstoreshiftLL_0(v)
   213  	case OpARMMOVWstoreshiftRA:
   214  		return rewriteValueARM_OpARMMOVWstoreshiftRA_0(v)
   215  	case OpARMMOVWstoreshiftRL:
   216  		return rewriteValueARM_OpARMMOVWstoreshiftRL_0(v)
   217  	case OpARMMUL:
   218  		return rewriteValueARM_OpARMMUL_0(v) || rewriteValueARM_OpARMMUL_10(v) || rewriteValueARM_OpARMMUL_20(v)
   219  	case OpARMMULA:
   220  		return rewriteValueARM_OpARMMULA_0(v) || rewriteValueARM_OpARMMULA_10(v) || rewriteValueARM_OpARMMULA_20(v)
   221  	case OpARMMULD:
   222  		return rewriteValueARM_OpARMMULD_0(v)
   223  	case OpARMMULF:
   224  		return rewriteValueARM_OpARMMULF_0(v)
   225  	case OpARMMULS:
   226  		return rewriteValueARM_OpARMMULS_0(v) || rewriteValueARM_OpARMMULS_10(v) || rewriteValueARM_OpARMMULS_20(v)
   227  	case OpARMMVN:
   228  		return rewriteValueARM_OpARMMVN_0(v)
   229  	case OpARMMVNshiftLL:
   230  		return rewriteValueARM_OpARMMVNshiftLL_0(v)
   231  	case OpARMMVNshiftLLreg:
   232  		return rewriteValueARM_OpARMMVNshiftLLreg_0(v)
   233  	case OpARMMVNshiftRA:
   234  		return rewriteValueARM_OpARMMVNshiftRA_0(v)
   235  	case OpARMMVNshiftRAreg:
   236  		return rewriteValueARM_OpARMMVNshiftRAreg_0(v)
   237  	case OpARMMVNshiftRL:
   238  		return rewriteValueARM_OpARMMVNshiftRL_0(v)
   239  	case OpARMMVNshiftRLreg:
   240  		return rewriteValueARM_OpARMMVNshiftRLreg_0(v)
   241  	case OpARMNEGD:
   242  		return rewriteValueARM_OpARMNEGD_0(v)
   243  	case OpARMNEGF:
   244  		return rewriteValueARM_OpARMNEGF_0(v)
   245  	case OpARMNMULD:
   246  		return rewriteValueARM_OpARMNMULD_0(v)
   247  	case OpARMNMULF:
   248  		return rewriteValueARM_OpARMNMULF_0(v)
   249  	case OpARMNotEqual:
   250  		return rewriteValueARM_OpARMNotEqual_0(v)
   251  	case OpARMOR:
   252  		return rewriteValueARM_OpARMOR_0(v) || rewriteValueARM_OpARMOR_10(v)
   253  	case OpARMORconst:
   254  		return rewriteValueARM_OpARMORconst_0(v)
   255  	case OpARMORshiftLL:
   256  		return rewriteValueARM_OpARMORshiftLL_0(v)
   257  	case OpARMORshiftLLreg:
   258  		return rewriteValueARM_OpARMORshiftLLreg_0(v)
   259  	case OpARMORshiftRA:
   260  		return rewriteValueARM_OpARMORshiftRA_0(v)
   261  	case OpARMORshiftRAreg:
   262  		return rewriteValueARM_OpARMORshiftRAreg_0(v)
   263  	case OpARMORshiftRL:
   264  		return rewriteValueARM_OpARMORshiftRL_0(v)
   265  	case OpARMORshiftRLreg:
   266  		return rewriteValueARM_OpARMORshiftRLreg_0(v)
   267  	case OpARMRSB:
   268  		return rewriteValueARM_OpARMRSB_0(v) || rewriteValueARM_OpARMRSB_10(v)
   269  	case OpARMRSBSshiftLL:
   270  		return rewriteValueARM_OpARMRSBSshiftLL_0(v)
   271  	case OpARMRSBSshiftLLreg:
   272  		return rewriteValueARM_OpARMRSBSshiftLLreg_0(v)
   273  	case OpARMRSBSshiftRA:
   274  		return rewriteValueARM_OpARMRSBSshiftRA_0(v)
   275  	case OpARMRSBSshiftRAreg:
   276  		return rewriteValueARM_OpARMRSBSshiftRAreg_0(v)
   277  	case OpARMRSBSshiftRL:
   278  		return rewriteValueARM_OpARMRSBSshiftRL_0(v)
   279  	case OpARMRSBSshiftRLreg:
   280  		return rewriteValueARM_OpARMRSBSshiftRLreg_0(v)
   281  	case OpARMRSBconst:
   282  		return rewriteValueARM_OpARMRSBconst_0(v)
   283  	case OpARMRSBshiftLL:
   284  		return rewriteValueARM_OpARMRSBshiftLL_0(v)
   285  	case OpARMRSBshiftLLreg:
   286  		return rewriteValueARM_OpARMRSBshiftLLreg_0(v)
   287  	case OpARMRSBshiftRA:
   288  		return rewriteValueARM_OpARMRSBshiftRA_0(v)
   289  	case OpARMRSBshiftRAreg:
   290  		return rewriteValueARM_OpARMRSBshiftRAreg_0(v)
   291  	case OpARMRSBshiftRL:
   292  		return rewriteValueARM_OpARMRSBshiftRL_0(v)
   293  	case OpARMRSBshiftRLreg:
   294  		return rewriteValueARM_OpARMRSBshiftRLreg_0(v)
   295  	case OpARMRSCconst:
   296  		return rewriteValueARM_OpARMRSCconst_0(v)
   297  	case OpARMRSCshiftLL:
   298  		return rewriteValueARM_OpARMRSCshiftLL_0(v)
   299  	case OpARMRSCshiftLLreg:
   300  		return rewriteValueARM_OpARMRSCshiftLLreg_0(v)
   301  	case OpARMRSCshiftRA:
   302  		return rewriteValueARM_OpARMRSCshiftRA_0(v)
   303  	case OpARMRSCshiftRAreg:
   304  		return rewriteValueARM_OpARMRSCshiftRAreg_0(v)
   305  	case OpARMRSCshiftRL:
   306  		return rewriteValueARM_OpARMRSCshiftRL_0(v)
   307  	case OpARMRSCshiftRLreg:
   308  		return rewriteValueARM_OpARMRSCshiftRLreg_0(v)
   309  	case OpARMSBC:
   310  		return rewriteValueARM_OpARMSBC_0(v) || rewriteValueARM_OpARMSBC_10(v)
   311  	case OpARMSBCconst:
   312  		return rewriteValueARM_OpARMSBCconst_0(v)
   313  	case OpARMSBCshiftLL:
   314  		return rewriteValueARM_OpARMSBCshiftLL_0(v)
   315  	case OpARMSBCshiftLLreg:
   316  		return rewriteValueARM_OpARMSBCshiftLLreg_0(v)
   317  	case OpARMSBCshiftRA:
   318  		return rewriteValueARM_OpARMSBCshiftRA_0(v)
   319  	case OpARMSBCshiftRAreg:
   320  		return rewriteValueARM_OpARMSBCshiftRAreg_0(v)
   321  	case OpARMSBCshiftRL:
   322  		return rewriteValueARM_OpARMSBCshiftRL_0(v)
   323  	case OpARMSBCshiftRLreg:
   324  		return rewriteValueARM_OpARMSBCshiftRLreg_0(v)
   325  	case OpARMSLL:
   326  		return rewriteValueARM_OpARMSLL_0(v)
   327  	case OpARMSLLconst:
   328  		return rewriteValueARM_OpARMSLLconst_0(v)
   329  	case OpARMSRA:
   330  		return rewriteValueARM_OpARMSRA_0(v)
   331  	case OpARMSRAcond:
   332  		return rewriteValueARM_OpARMSRAcond_0(v)
   333  	case OpARMSRAconst:
   334  		return rewriteValueARM_OpARMSRAconst_0(v)
   335  	case OpARMSRL:
   336  		return rewriteValueARM_OpARMSRL_0(v)
   337  	case OpARMSRLconst:
   338  		return rewriteValueARM_OpARMSRLconst_0(v)
   339  	case OpARMSUB:
   340  		return rewriteValueARM_OpARMSUB_0(v) || rewriteValueARM_OpARMSUB_10(v)
   341  	case OpARMSUBD:
   342  		return rewriteValueARM_OpARMSUBD_0(v)
   343  	case OpARMSUBF:
   344  		return rewriteValueARM_OpARMSUBF_0(v)
   345  	case OpARMSUBS:
   346  		return rewriteValueARM_OpARMSUBS_0(v) || rewriteValueARM_OpARMSUBS_10(v)
   347  	case OpARMSUBSshiftLL:
   348  		return rewriteValueARM_OpARMSUBSshiftLL_0(v)
   349  	case OpARMSUBSshiftLLreg:
   350  		return rewriteValueARM_OpARMSUBSshiftLLreg_0(v)
   351  	case OpARMSUBSshiftRA:
   352  		return rewriteValueARM_OpARMSUBSshiftRA_0(v)
   353  	case OpARMSUBSshiftRAreg:
   354  		return rewriteValueARM_OpARMSUBSshiftRAreg_0(v)
   355  	case OpARMSUBSshiftRL:
   356  		return rewriteValueARM_OpARMSUBSshiftRL_0(v)
   357  	case OpARMSUBSshiftRLreg:
   358  		return rewriteValueARM_OpARMSUBSshiftRLreg_0(v)
   359  	case OpARMSUBconst:
   360  		return rewriteValueARM_OpARMSUBconst_0(v)
   361  	case OpARMSUBshiftLL:
   362  		return rewriteValueARM_OpARMSUBshiftLL_0(v)
   363  	case OpARMSUBshiftLLreg:
   364  		return rewriteValueARM_OpARMSUBshiftLLreg_0(v)
   365  	case OpARMSUBshiftRA:
   366  		return rewriteValueARM_OpARMSUBshiftRA_0(v)
   367  	case OpARMSUBshiftRAreg:
   368  		return rewriteValueARM_OpARMSUBshiftRAreg_0(v)
   369  	case OpARMSUBshiftRL:
   370  		return rewriteValueARM_OpARMSUBshiftRL_0(v)
   371  	case OpARMSUBshiftRLreg:
   372  		return rewriteValueARM_OpARMSUBshiftRLreg_0(v)
   373  	case OpARMTEQ:
   374  		return rewriteValueARM_OpARMTEQ_0(v) || rewriteValueARM_OpARMTEQ_10(v)
   375  	case OpARMTEQconst:
   376  		return rewriteValueARM_OpARMTEQconst_0(v)
   377  	case OpARMTEQshiftLL:
   378  		return rewriteValueARM_OpARMTEQshiftLL_0(v)
   379  	case OpARMTEQshiftLLreg:
   380  		return rewriteValueARM_OpARMTEQshiftLLreg_0(v)
   381  	case OpARMTEQshiftRA:
   382  		return rewriteValueARM_OpARMTEQshiftRA_0(v)
   383  	case OpARMTEQshiftRAreg:
   384  		return rewriteValueARM_OpARMTEQshiftRAreg_0(v)
   385  	case OpARMTEQshiftRL:
   386  		return rewriteValueARM_OpARMTEQshiftRL_0(v)
   387  	case OpARMTEQshiftRLreg:
   388  		return rewriteValueARM_OpARMTEQshiftRLreg_0(v)
   389  	case OpARMTST:
   390  		return rewriteValueARM_OpARMTST_0(v) || rewriteValueARM_OpARMTST_10(v)
   391  	case OpARMTSTconst:
   392  		return rewriteValueARM_OpARMTSTconst_0(v)
   393  	case OpARMTSTshiftLL:
   394  		return rewriteValueARM_OpARMTSTshiftLL_0(v)
   395  	case OpARMTSTshiftLLreg:
   396  		return rewriteValueARM_OpARMTSTshiftLLreg_0(v)
   397  	case OpARMTSTshiftRA:
   398  		return rewriteValueARM_OpARMTSTshiftRA_0(v)
   399  	case OpARMTSTshiftRAreg:
   400  		return rewriteValueARM_OpARMTSTshiftRAreg_0(v)
   401  	case OpARMTSTshiftRL:
   402  		return rewriteValueARM_OpARMTSTshiftRL_0(v)
   403  	case OpARMTSTshiftRLreg:
   404  		return rewriteValueARM_OpARMTSTshiftRLreg_0(v)
   405  	case OpARMXOR:
   406  		return rewriteValueARM_OpARMXOR_0(v) || rewriteValueARM_OpARMXOR_10(v)
   407  	case OpARMXORconst:
   408  		return rewriteValueARM_OpARMXORconst_0(v)
   409  	case OpARMXORshiftLL:
   410  		return rewriteValueARM_OpARMXORshiftLL_0(v)
   411  	case OpARMXORshiftLLreg:
   412  		return rewriteValueARM_OpARMXORshiftLLreg_0(v)
   413  	case OpARMXORshiftRA:
   414  		return rewriteValueARM_OpARMXORshiftRA_0(v)
   415  	case OpARMXORshiftRAreg:
   416  		return rewriteValueARM_OpARMXORshiftRAreg_0(v)
   417  	case OpARMXORshiftRL:
   418  		return rewriteValueARM_OpARMXORshiftRL_0(v)
   419  	case OpARMXORshiftRLreg:
   420  		return rewriteValueARM_OpARMXORshiftRLreg_0(v)
   421  	case OpARMXORshiftRR:
   422  		return rewriteValueARM_OpARMXORshiftRR_0(v)
   423  	case OpAbs:
   424  		return rewriteValueARM_OpAbs_0(v)
   425  	case OpAdd16:
   426  		return rewriteValueARM_OpAdd16_0(v)
   427  	case OpAdd32:
   428  		return rewriteValueARM_OpAdd32_0(v)
   429  	case OpAdd32F:
   430  		return rewriteValueARM_OpAdd32F_0(v)
   431  	case OpAdd32carry:
   432  		return rewriteValueARM_OpAdd32carry_0(v)
   433  	case OpAdd32withcarry:
   434  		return rewriteValueARM_OpAdd32withcarry_0(v)
   435  	case OpAdd64F:
   436  		return rewriteValueARM_OpAdd64F_0(v)
   437  	case OpAdd8:
   438  		return rewriteValueARM_OpAdd8_0(v)
   439  	case OpAddPtr:
   440  		return rewriteValueARM_OpAddPtr_0(v)
   441  	case OpAddr:
   442  		return rewriteValueARM_OpAddr_0(v)
   443  	case OpAnd16:
   444  		return rewriteValueARM_OpAnd16_0(v)
   445  	case OpAnd32:
   446  		return rewriteValueARM_OpAnd32_0(v)
   447  	case OpAnd8:
   448  		return rewriteValueARM_OpAnd8_0(v)
   449  	case OpAndB:
   450  		return rewriteValueARM_OpAndB_0(v)
   451  	case OpAvg32u:
   452  		return rewriteValueARM_OpAvg32u_0(v)
   453  	case OpBitLen32:
   454  		return rewriteValueARM_OpBitLen32_0(v)
   455  	case OpBswap32:
   456  		return rewriteValueARM_OpBswap32_0(v)
   457  	case OpClosureCall:
   458  		return rewriteValueARM_OpClosureCall_0(v)
   459  	case OpCom16:
   460  		return rewriteValueARM_OpCom16_0(v)
   461  	case OpCom32:
   462  		return rewriteValueARM_OpCom32_0(v)
   463  	case OpCom8:
   464  		return rewriteValueARM_OpCom8_0(v)
   465  	case OpConst16:
   466  		return rewriteValueARM_OpConst16_0(v)
   467  	case OpConst32:
   468  		return rewriteValueARM_OpConst32_0(v)
   469  	case OpConst32F:
   470  		return rewriteValueARM_OpConst32F_0(v)
   471  	case OpConst64F:
   472  		return rewriteValueARM_OpConst64F_0(v)
   473  	case OpConst8:
   474  		return rewriteValueARM_OpConst8_0(v)
   475  	case OpConstBool:
   476  		return rewriteValueARM_OpConstBool_0(v)
   477  	case OpConstNil:
   478  		return rewriteValueARM_OpConstNil_0(v)
   479  	case OpCtz16:
   480  		return rewriteValueARM_OpCtz16_0(v)
   481  	case OpCtz16NonZero:
   482  		return rewriteValueARM_OpCtz16NonZero_0(v)
   483  	case OpCtz32:
   484  		return rewriteValueARM_OpCtz32_0(v)
   485  	case OpCtz32NonZero:
   486  		return rewriteValueARM_OpCtz32NonZero_0(v)
   487  	case OpCtz8:
   488  		return rewriteValueARM_OpCtz8_0(v)
   489  	case OpCtz8NonZero:
   490  		return rewriteValueARM_OpCtz8NonZero_0(v)
   491  	case OpCvt32Fto32:
   492  		return rewriteValueARM_OpCvt32Fto32_0(v)
   493  	case OpCvt32Fto32U:
   494  		return rewriteValueARM_OpCvt32Fto32U_0(v)
   495  	case OpCvt32Fto64F:
   496  		return rewriteValueARM_OpCvt32Fto64F_0(v)
   497  	case OpCvt32Uto32F:
   498  		return rewriteValueARM_OpCvt32Uto32F_0(v)
   499  	case OpCvt32Uto64F:
   500  		return rewriteValueARM_OpCvt32Uto64F_0(v)
   501  	case OpCvt32to32F:
   502  		return rewriteValueARM_OpCvt32to32F_0(v)
   503  	case OpCvt32to64F:
   504  		return rewriteValueARM_OpCvt32to64F_0(v)
   505  	case OpCvt64Fto32:
   506  		return rewriteValueARM_OpCvt64Fto32_0(v)
   507  	case OpCvt64Fto32F:
   508  		return rewriteValueARM_OpCvt64Fto32F_0(v)
   509  	case OpCvt64Fto32U:
   510  		return rewriteValueARM_OpCvt64Fto32U_0(v)
   511  	case OpDiv16:
   512  		return rewriteValueARM_OpDiv16_0(v)
   513  	case OpDiv16u:
   514  		return rewriteValueARM_OpDiv16u_0(v)
   515  	case OpDiv32:
   516  		return rewriteValueARM_OpDiv32_0(v)
   517  	case OpDiv32F:
   518  		return rewriteValueARM_OpDiv32F_0(v)
   519  	case OpDiv32u:
   520  		return rewriteValueARM_OpDiv32u_0(v)
   521  	case OpDiv64F:
   522  		return rewriteValueARM_OpDiv64F_0(v)
   523  	case OpDiv8:
   524  		return rewriteValueARM_OpDiv8_0(v)
   525  	case OpDiv8u:
   526  		return rewriteValueARM_OpDiv8u_0(v)
   527  	case OpEq16:
   528  		return rewriteValueARM_OpEq16_0(v)
   529  	case OpEq32:
   530  		return rewriteValueARM_OpEq32_0(v)
   531  	case OpEq32F:
   532  		return rewriteValueARM_OpEq32F_0(v)
   533  	case OpEq64F:
   534  		return rewriteValueARM_OpEq64F_0(v)
   535  	case OpEq8:
   536  		return rewriteValueARM_OpEq8_0(v)
   537  	case OpEqB:
   538  		return rewriteValueARM_OpEqB_0(v)
   539  	case OpEqPtr:
   540  		return rewriteValueARM_OpEqPtr_0(v)
   541  	case OpFMA:
   542  		return rewriteValueARM_OpFMA_0(v)
   543  	case OpGeq16:
   544  		return rewriteValueARM_OpGeq16_0(v)
   545  	case OpGeq16U:
   546  		return rewriteValueARM_OpGeq16U_0(v)
   547  	case OpGeq32:
   548  		return rewriteValueARM_OpGeq32_0(v)
   549  	case OpGeq32F:
   550  		return rewriteValueARM_OpGeq32F_0(v)
   551  	case OpGeq32U:
   552  		return rewriteValueARM_OpGeq32U_0(v)
   553  	case OpGeq64F:
   554  		return rewriteValueARM_OpGeq64F_0(v)
   555  	case OpGeq8:
   556  		return rewriteValueARM_OpGeq8_0(v)
   557  	case OpGeq8U:
   558  		return rewriteValueARM_OpGeq8U_0(v)
   559  	case OpGetCallerPC:
   560  		return rewriteValueARM_OpGetCallerPC_0(v)
   561  	case OpGetCallerSP:
   562  		return rewriteValueARM_OpGetCallerSP_0(v)
   563  	case OpGetClosurePtr:
   564  		return rewriteValueARM_OpGetClosurePtr_0(v)
   565  	case OpGreater16:
   566  		return rewriteValueARM_OpGreater16_0(v)
   567  	case OpGreater16U:
   568  		return rewriteValueARM_OpGreater16U_0(v)
   569  	case OpGreater32:
   570  		return rewriteValueARM_OpGreater32_0(v)
   571  	case OpGreater32F:
   572  		return rewriteValueARM_OpGreater32F_0(v)
   573  	case OpGreater32U:
   574  		return rewriteValueARM_OpGreater32U_0(v)
   575  	case OpGreater64F:
   576  		return rewriteValueARM_OpGreater64F_0(v)
   577  	case OpGreater8:
   578  		return rewriteValueARM_OpGreater8_0(v)
   579  	case OpGreater8U:
   580  		return rewriteValueARM_OpGreater8U_0(v)
   581  	case OpHmul32:
   582  		return rewriteValueARM_OpHmul32_0(v)
   583  	case OpHmul32u:
   584  		return rewriteValueARM_OpHmul32u_0(v)
   585  	case OpInterCall:
   586  		return rewriteValueARM_OpInterCall_0(v)
   587  	case OpIsInBounds:
   588  		return rewriteValueARM_OpIsInBounds_0(v)
   589  	case OpIsNonNil:
   590  		return rewriteValueARM_OpIsNonNil_0(v)
   591  	case OpIsSliceInBounds:
   592  		return rewriteValueARM_OpIsSliceInBounds_0(v)
   593  	case OpLeq16:
   594  		return rewriteValueARM_OpLeq16_0(v)
   595  	case OpLeq16U:
   596  		return rewriteValueARM_OpLeq16U_0(v)
   597  	case OpLeq32:
   598  		return rewriteValueARM_OpLeq32_0(v)
   599  	case OpLeq32F:
   600  		return rewriteValueARM_OpLeq32F_0(v)
   601  	case OpLeq32U:
   602  		return rewriteValueARM_OpLeq32U_0(v)
   603  	case OpLeq64F:
   604  		return rewriteValueARM_OpLeq64F_0(v)
   605  	case OpLeq8:
   606  		return rewriteValueARM_OpLeq8_0(v)
   607  	case OpLeq8U:
   608  		return rewriteValueARM_OpLeq8U_0(v)
   609  	case OpLess16:
   610  		return rewriteValueARM_OpLess16_0(v)
   611  	case OpLess16U:
   612  		return rewriteValueARM_OpLess16U_0(v)
   613  	case OpLess32:
   614  		return rewriteValueARM_OpLess32_0(v)
   615  	case OpLess32F:
   616  		return rewriteValueARM_OpLess32F_0(v)
   617  	case OpLess32U:
   618  		return rewriteValueARM_OpLess32U_0(v)
   619  	case OpLess64F:
   620  		return rewriteValueARM_OpLess64F_0(v)
   621  	case OpLess8:
   622  		return rewriteValueARM_OpLess8_0(v)
   623  	case OpLess8U:
   624  		return rewriteValueARM_OpLess8U_0(v)
   625  	case OpLoad:
   626  		return rewriteValueARM_OpLoad_0(v)
   627  	case OpLocalAddr:
   628  		return rewriteValueARM_OpLocalAddr_0(v)
   629  	case OpLsh16x16:
   630  		return rewriteValueARM_OpLsh16x16_0(v)
   631  	case OpLsh16x32:
   632  		return rewriteValueARM_OpLsh16x32_0(v)
   633  	case OpLsh16x64:
   634  		return rewriteValueARM_OpLsh16x64_0(v)
   635  	case OpLsh16x8:
   636  		return rewriteValueARM_OpLsh16x8_0(v)
   637  	case OpLsh32x16:
   638  		return rewriteValueARM_OpLsh32x16_0(v)
   639  	case OpLsh32x32:
   640  		return rewriteValueARM_OpLsh32x32_0(v)
   641  	case OpLsh32x64:
   642  		return rewriteValueARM_OpLsh32x64_0(v)
   643  	case OpLsh32x8:
   644  		return rewriteValueARM_OpLsh32x8_0(v)
   645  	case OpLsh8x16:
   646  		return rewriteValueARM_OpLsh8x16_0(v)
   647  	case OpLsh8x32:
   648  		return rewriteValueARM_OpLsh8x32_0(v)
   649  	case OpLsh8x64:
   650  		return rewriteValueARM_OpLsh8x64_0(v)
   651  	case OpLsh8x8:
   652  		return rewriteValueARM_OpLsh8x8_0(v)
   653  	case OpMod16:
   654  		return rewriteValueARM_OpMod16_0(v)
   655  	case OpMod16u:
   656  		return rewriteValueARM_OpMod16u_0(v)
   657  	case OpMod32:
   658  		return rewriteValueARM_OpMod32_0(v)
   659  	case OpMod32u:
   660  		return rewriteValueARM_OpMod32u_0(v)
   661  	case OpMod8:
   662  		return rewriteValueARM_OpMod8_0(v)
   663  	case OpMod8u:
   664  		return rewriteValueARM_OpMod8u_0(v)
   665  	case OpMove:
   666  		return rewriteValueARM_OpMove_0(v)
   667  	case OpMul16:
   668  		return rewriteValueARM_OpMul16_0(v)
   669  	case OpMul32:
   670  		return rewriteValueARM_OpMul32_0(v)
   671  	case OpMul32F:
   672  		return rewriteValueARM_OpMul32F_0(v)
   673  	case OpMul32uhilo:
   674  		return rewriteValueARM_OpMul32uhilo_0(v)
   675  	case OpMul64F:
   676  		return rewriteValueARM_OpMul64F_0(v)
   677  	case OpMul8:
   678  		return rewriteValueARM_OpMul8_0(v)
   679  	case OpNeg16:
   680  		return rewriteValueARM_OpNeg16_0(v)
   681  	case OpNeg32:
   682  		return rewriteValueARM_OpNeg32_0(v)
   683  	case OpNeg32F:
   684  		return rewriteValueARM_OpNeg32F_0(v)
   685  	case OpNeg64F:
   686  		return rewriteValueARM_OpNeg64F_0(v)
   687  	case OpNeg8:
   688  		return rewriteValueARM_OpNeg8_0(v)
   689  	case OpNeq16:
   690  		return rewriteValueARM_OpNeq16_0(v)
   691  	case OpNeq32:
   692  		return rewriteValueARM_OpNeq32_0(v)
   693  	case OpNeq32F:
   694  		return rewriteValueARM_OpNeq32F_0(v)
   695  	case OpNeq64F:
   696  		return rewriteValueARM_OpNeq64F_0(v)
   697  	case OpNeq8:
   698  		return rewriteValueARM_OpNeq8_0(v)
   699  	case OpNeqB:
   700  		return rewriteValueARM_OpNeqB_0(v)
   701  	case OpNeqPtr:
   702  		return rewriteValueARM_OpNeqPtr_0(v)
   703  	case OpNilCheck:
   704  		return rewriteValueARM_OpNilCheck_0(v)
   705  	case OpNot:
   706  		return rewriteValueARM_OpNot_0(v)
   707  	case OpOffPtr:
   708  		return rewriteValueARM_OpOffPtr_0(v)
   709  	case OpOr16:
   710  		return rewriteValueARM_OpOr16_0(v)
   711  	case OpOr32:
   712  		return rewriteValueARM_OpOr32_0(v)
   713  	case OpOr8:
   714  		return rewriteValueARM_OpOr8_0(v)
   715  	case OpOrB:
   716  		return rewriteValueARM_OpOrB_0(v)
   717  	case OpPanicBounds:
   718  		return rewriteValueARM_OpPanicBounds_0(v)
   719  	case OpPanicExtend:
   720  		return rewriteValueARM_OpPanicExtend_0(v)
   721  	case OpRotateLeft16:
   722  		return rewriteValueARM_OpRotateLeft16_0(v)
   723  	case OpRotateLeft32:
   724  		return rewriteValueARM_OpRotateLeft32_0(v)
   725  	case OpRotateLeft8:
   726  		return rewriteValueARM_OpRotateLeft8_0(v)
   727  	case OpRound32F:
   728  		return rewriteValueARM_OpRound32F_0(v)
   729  	case OpRound64F:
   730  		return rewriteValueARM_OpRound64F_0(v)
   731  	case OpRsh16Ux16:
   732  		return rewriteValueARM_OpRsh16Ux16_0(v)
   733  	case OpRsh16Ux32:
   734  		return rewriteValueARM_OpRsh16Ux32_0(v)
   735  	case OpRsh16Ux64:
   736  		return rewriteValueARM_OpRsh16Ux64_0(v)
   737  	case OpRsh16Ux8:
   738  		return rewriteValueARM_OpRsh16Ux8_0(v)
   739  	case OpRsh16x16:
   740  		return rewriteValueARM_OpRsh16x16_0(v)
   741  	case OpRsh16x32:
   742  		return rewriteValueARM_OpRsh16x32_0(v)
   743  	case OpRsh16x64:
   744  		return rewriteValueARM_OpRsh16x64_0(v)
   745  	case OpRsh16x8:
   746  		return rewriteValueARM_OpRsh16x8_0(v)
   747  	case OpRsh32Ux16:
   748  		return rewriteValueARM_OpRsh32Ux16_0(v)
   749  	case OpRsh32Ux32:
   750  		return rewriteValueARM_OpRsh32Ux32_0(v)
   751  	case OpRsh32Ux64:
   752  		return rewriteValueARM_OpRsh32Ux64_0(v)
   753  	case OpRsh32Ux8:
   754  		return rewriteValueARM_OpRsh32Ux8_0(v)
   755  	case OpRsh32x16:
   756  		return rewriteValueARM_OpRsh32x16_0(v)
   757  	case OpRsh32x32:
   758  		return rewriteValueARM_OpRsh32x32_0(v)
   759  	case OpRsh32x64:
   760  		return rewriteValueARM_OpRsh32x64_0(v)
   761  	case OpRsh32x8:
   762  		return rewriteValueARM_OpRsh32x8_0(v)
   763  	case OpRsh8Ux16:
   764  		return rewriteValueARM_OpRsh8Ux16_0(v)
   765  	case OpRsh8Ux32:
   766  		return rewriteValueARM_OpRsh8Ux32_0(v)
   767  	case OpRsh8Ux64:
   768  		return rewriteValueARM_OpRsh8Ux64_0(v)
   769  	case OpRsh8Ux8:
   770  		return rewriteValueARM_OpRsh8Ux8_0(v)
   771  	case OpRsh8x16:
   772  		return rewriteValueARM_OpRsh8x16_0(v)
   773  	case OpRsh8x32:
   774  		return rewriteValueARM_OpRsh8x32_0(v)
   775  	case OpRsh8x64:
   776  		return rewriteValueARM_OpRsh8x64_0(v)
   777  	case OpRsh8x8:
   778  		return rewriteValueARM_OpRsh8x8_0(v)
   779  	case OpSelect0:
   780  		return rewriteValueARM_OpSelect0_0(v)
   781  	case OpSelect1:
   782  		return rewriteValueARM_OpSelect1_0(v)
   783  	case OpSignExt16to32:
   784  		return rewriteValueARM_OpSignExt16to32_0(v)
   785  	case OpSignExt8to16:
   786  		return rewriteValueARM_OpSignExt8to16_0(v)
   787  	case OpSignExt8to32:
   788  		return rewriteValueARM_OpSignExt8to32_0(v)
   789  	case OpSignmask:
   790  		return rewriteValueARM_OpSignmask_0(v)
   791  	case OpSlicemask:
   792  		return rewriteValueARM_OpSlicemask_0(v)
   793  	case OpSqrt:
   794  		return rewriteValueARM_OpSqrt_0(v)
   795  	case OpStaticCall:
   796  		return rewriteValueARM_OpStaticCall_0(v)
   797  	case OpStore:
   798  		return rewriteValueARM_OpStore_0(v)
   799  	case OpSub16:
   800  		return rewriteValueARM_OpSub16_0(v)
   801  	case OpSub32:
   802  		return rewriteValueARM_OpSub32_0(v)
   803  	case OpSub32F:
   804  		return rewriteValueARM_OpSub32F_0(v)
   805  	case OpSub32carry:
   806  		return rewriteValueARM_OpSub32carry_0(v)
   807  	case OpSub32withcarry:
   808  		return rewriteValueARM_OpSub32withcarry_0(v)
   809  	case OpSub64F:
   810  		return rewriteValueARM_OpSub64F_0(v)
   811  	case OpSub8:
   812  		return rewriteValueARM_OpSub8_0(v)
   813  	case OpSubPtr:
   814  		return rewriteValueARM_OpSubPtr_0(v)
   815  	case OpTrunc16to8:
   816  		return rewriteValueARM_OpTrunc16to8_0(v)
   817  	case OpTrunc32to16:
   818  		return rewriteValueARM_OpTrunc32to16_0(v)
   819  	case OpTrunc32to8:
   820  		return rewriteValueARM_OpTrunc32to8_0(v)
   821  	case OpWB:
   822  		return rewriteValueARM_OpWB_0(v)
   823  	case OpXor16:
   824  		return rewriteValueARM_OpXor16_0(v)
   825  	case OpXor32:
   826  		return rewriteValueARM_OpXor32_0(v)
   827  	case OpXor8:
   828  		return rewriteValueARM_OpXor8_0(v)
   829  	case OpZero:
   830  		return rewriteValueARM_OpZero_0(v)
   831  	case OpZeroExt16to32:
   832  		return rewriteValueARM_OpZeroExt16to32_0(v)
   833  	case OpZeroExt8to16:
   834  		return rewriteValueARM_OpZeroExt8to16_0(v)
   835  	case OpZeroExt8to32:
   836  		return rewriteValueARM_OpZeroExt8to32_0(v)
   837  	case OpZeromask:
   838  		return rewriteValueARM_OpZeromask_0(v)
   839  	}
   840  	return false
   841  }
   842  func rewriteValueARM_OpARMADC_0(v *Value) bool {
   843  	// match: (ADC (MOVWconst [c]) x flags)
   844  	// result: (ADCconst [c] x flags)
   845  	for {
   846  		flags := v.Args[2]
   847  		v_0 := v.Args[0]
   848  		if v_0.Op != OpARMMOVWconst {
   849  			break
   850  		}
   851  		c := v_0.AuxInt
   852  		x := v.Args[1]
   853  		v.reset(OpARMADCconst)
   854  		v.AuxInt = c
   855  		v.AddArg(x)
   856  		v.AddArg(flags)
   857  		return true
   858  	}
   859  	// match: (ADC x (MOVWconst [c]) flags)
   860  	// result: (ADCconst [c] x flags)
   861  	for {
   862  		flags := v.Args[2]
   863  		x := v.Args[0]
   864  		v_1 := v.Args[1]
   865  		if v_1.Op != OpARMMOVWconst {
   866  			break
   867  		}
   868  		c := v_1.AuxInt
   869  		v.reset(OpARMADCconst)
   870  		v.AuxInt = c
   871  		v.AddArg(x)
   872  		v.AddArg(flags)
   873  		return true
   874  	}
   875  	// match: (ADC x (MOVWconst [c]) flags)
   876  	// result: (ADCconst [c] x flags)
   877  	for {
   878  		flags := v.Args[2]
   879  		x := v.Args[0]
   880  		v_1 := v.Args[1]
   881  		if v_1.Op != OpARMMOVWconst {
   882  			break
   883  		}
   884  		c := v_1.AuxInt
   885  		v.reset(OpARMADCconst)
   886  		v.AuxInt = c
   887  		v.AddArg(x)
   888  		v.AddArg(flags)
   889  		return true
   890  	}
   891  	// match: (ADC (MOVWconst [c]) x flags)
   892  	// result: (ADCconst [c] x flags)
   893  	for {
   894  		flags := v.Args[2]
   895  		v_0 := v.Args[0]
   896  		if v_0.Op != OpARMMOVWconst {
   897  			break
   898  		}
   899  		c := v_0.AuxInt
   900  		x := v.Args[1]
   901  		v.reset(OpARMADCconst)
   902  		v.AuxInt = c
   903  		v.AddArg(x)
   904  		v.AddArg(flags)
   905  		return true
   906  	}
   907  	// match: (ADC x (SLLconst [c] y) flags)
   908  	// result: (ADCshiftLL x y [c] flags)
   909  	for {
   910  		flags := v.Args[2]
   911  		x := v.Args[0]
   912  		v_1 := v.Args[1]
   913  		if v_1.Op != OpARMSLLconst {
   914  			break
   915  		}
   916  		c := v_1.AuxInt
   917  		y := v_1.Args[0]
   918  		v.reset(OpARMADCshiftLL)
   919  		v.AuxInt = c
   920  		v.AddArg(x)
   921  		v.AddArg(y)
   922  		v.AddArg(flags)
   923  		return true
   924  	}
   925  	// match: (ADC (SLLconst [c] y) x flags)
   926  	// result: (ADCshiftLL x y [c] flags)
   927  	for {
   928  		flags := v.Args[2]
   929  		v_0 := v.Args[0]
   930  		if v_0.Op != OpARMSLLconst {
   931  			break
   932  		}
   933  		c := v_0.AuxInt
   934  		y := v_0.Args[0]
   935  		x := v.Args[1]
   936  		v.reset(OpARMADCshiftLL)
   937  		v.AuxInt = c
   938  		v.AddArg(x)
   939  		v.AddArg(y)
   940  		v.AddArg(flags)
   941  		return true
   942  	}
   943  	// match: (ADC (SLLconst [c] y) x flags)
   944  	// result: (ADCshiftLL x y [c] flags)
   945  	for {
   946  		flags := v.Args[2]
   947  		v_0 := v.Args[0]
   948  		if v_0.Op != OpARMSLLconst {
   949  			break
   950  		}
   951  		c := v_0.AuxInt
   952  		y := v_0.Args[0]
   953  		x := v.Args[1]
   954  		v.reset(OpARMADCshiftLL)
   955  		v.AuxInt = c
   956  		v.AddArg(x)
   957  		v.AddArg(y)
   958  		v.AddArg(flags)
   959  		return true
   960  	}
   961  	// match: (ADC x (SLLconst [c] y) flags)
   962  	// result: (ADCshiftLL x y [c] flags)
   963  	for {
   964  		flags := v.Args[2]
   965  		x := v.Args[0]
   966  		v_1 := v.Args[1]
   967  		if v_1.Op != OpARMSLLconst {
   968  			break
   969  		}
   970  		c := v_1.AuxInt
   971  		y := v_1.Args[0]
   972  		v.reset(OpARMADCshiftLL)
   973  		v.AuxInt = c
   974  		v.AddArg(x)
   975  		v.AddArg(y)
   976  		v.AddArg(flags)
   977  		return true
   978  	}
   979  	// match: (ADC x (SRLconst [c] y) flags)
   980  	// result: (ADCshiftRL x y [c] flags)
   981  	for {
   982  		flags := v.Args[2]
   983  		x := v.Args[0]
   984  		v_1 := v.Args[1]
   985  		if v_1.Op != OpARMSRLconst {
   986  			break
   987  		}
   988  		c := v_1.AuxInt
   989  		y := v_1.Args[0]
   990  		v.reset(OpARMADCshiftRL)
   991  		v.AuxInt = c
   992  		v.AddArg(x)
   993  		v.AddArg(y)
   994  		v.AddArg(flags)
   995  		return true
   996  	}
   997  	// match: (ADC (SRLconst [c] y) x flags)
   998  	// result: (ADCshiftRL x y [c] flags)
   999  	for {
  1000  		flags := v.Args[2]
  1001  		v_0 := v.Args[0]
  1002  		if v_0.Op != OpARMSRLconst {
  1003  			break
  1004  		}
  1005  		c := v_0.AuxInt
  1006  		y := v_0.Args[0]
  1007  		x := v.Args[1]
  1008  		v.reset(OpARMADCshiftRL)
  1009  		v.AuxInt = c
  1010  		v.AddArg(x)
  1011  		v.AddArg(y)
  1012  		v.AddArg(flags)
  1013  		return true
  1014  	}
  1015  	return false
  1016  }
  1017  func rewriteValueARM_OpARMADC_10(v *Value) bool {
  1018  	// match: (ADC (SRLconst [c] y) x flags)
  1019  	// result: (ADCshiftRL x y [c] flags)
  1020  	for {
  1021  		flags := v.Args[2]
  1022  		v_0 := v.Args[0]
  1023  		if v_0.Op != OpARMSRLconst {
  1024  			break
  1025  		}
  1026  		c := v_0.AuxInt
  1027  		y := v_0.Args[0]
  1028  		x := v.Args[1]
  1029  		v.reset(OpARMADCshiftRL)
  1030  		v.AuxInt = c
  1031  		v.AddArg(x)
  1032  		v.AddArg(y)
  1033  		v.AddArg(flags)
  1034  		return true
  1035  	}
  1036  	// match: (ADC x (SRLconst [c] y) flags)
  1037  	// result: (ADCshiftRL x y [c] flags)
  1038  	for {
  1039  		flags := v.Args[2]
  1040  		x := v.Args[0]
  1041  		v_1 := v.Args[1]
  1042  		if v_1.Op != OpARMSRLconst {
  1043  			break
  1044  		}
  1045  		c := v_1.AuxInt
  1046  		y := v_1.Args[0]
  1047  		v.reset(OpARMADCshiftRL)
  1048  		v.AuxInt = c
  1049  		v.AddArg(x)
  1050  		v.AddArg(y)
  1051  		v.AddArg(flags)
  1052  		return true
  1053  	}
  1054  	// match: (ADC x (SRAconst [c] y) flags)
  1055  	// result: (ADCshiftRA x y [c] flags)
  1056  	for {
  1057  		flags := v.Args[2]
  1058  		x := v.Args[0]
  1059  		v_1 := v.Args[1]
  1060  		if v_1.Op != OpARMSRAconst {
  1061  			break
  1062  		}
  1063  		c := v_1.AuxInt
  1064  		y := v_1.Args[0]
  1065  		v.reset(OpARMADCshiftRA)
  1066  		v.AuxInt = c
  1067  		v.AddArg(x)
  1068  		v.AddArg(y)
  1069  		v.AddArg(flags)
  1070  		return true
  1071  	}
  1072  	// match: (ADC (SRAconst [c] y) x flags)
  1073  	// result: (ADCshiftRA x y [c] flags)
  1074  	for {
  1075  		flags := v.Args[2]
  1076  		v_0 := v.Args[0]
  1077  		if v_0.Op != OpARMSRAconst {
  1078  			break
  1079  		}
  1080  		c := v_0.AuxInt
  1081  		y := v_0.Args[0]
  1082  		x := v.Args[1]
  1083  		v.reset(OpARMADCshiftRA)
  1084  		v.AuxInt = c
  1085  		v.AddArg(x)
  1086  		v.AddArg(y)
  1087  		v.AddArg(flags)
  1088  		return true
  1089  	}
  1090  	// match: (ADC (SRAconst [c] y) x flags)
  1091  	// result: (ADCshiftRA x y [c] flags)
  1092  	for {
  1093  		flags := v.Args[2]
  1094  		v_0 := v.Args[0]
  1095  		if v_0.Op != OpARMSRAconst {
  1096  			break
  1097  		}
  1098  		c := v_0.AuxInt
  1099  		y := v_0.Args[0]
  1100  		x := v.Args[1]
  1101  		v.reset(OpARMADCshiftRA)
  1102  		v.AuxInt = c
  1103  		v.AddArg(x)
  1104  		v.AddArg(y)
  1105  		v.AddArg(flags)
  1106  		return true
  1107  	}
  1108  	// match: (ADC x (SRAconst [c] y) flags)
  1109  	// result: (ADCshiftRA x y [c] flags)
  1110  	for {
  1111  		flags := v.Args[2]
  1112  		x := v.Args[0]
  1113  		v_1 := v.Args[1]
  1114  		if v_1.Op != OpARMSRAconst {
  1115  			break
  1116  		}
  1117  		c := v_1.AuxInt
  1118  		y := v_1.Args[0]
  1119  		v.reset(OpARMADCshiftRA)
  1120  		v.AuxInt = c
  1121  		v.AddArg(x)
  1122  		v.AddArg(y)
  1123  		v.AddArg(flags)
  1124  		return true
  1125  	}
  1126  	// match: (ADC x (SLL y z) flags)
  1127  	// result: (ADCshiftLLreg x y z flags)
  1128  	for {
  1129  		flags := v.Args[2]
  1130  		x := v.Args[0]
  1131  		v_1 := v.Args[1]
  1132  		if v_1.Op != OpARMSLL {
  1133  			break
  1134  		}
  1135  		z := v_1.Args[1]
  1136  		y := v_1.Args[0]
  1137  		v.reset(OpARMADCshiftLLreg)
  1138  		v.AddArg(x)
  1139  		v.AddArg(y)
  1140  		v.AddArg(z)
  1141  		v.AddArg(flags)
  1142  		return true
  1143  	}
  1144  	// match: (ADC (SLL y z) x flags)
  1145  	// result: (ADCshiftLLreg x y z flags)
  1146  	for {
  1147  		flags := v.Args[2]
  1148  		v_0 := v.Args[0]
  1149  		if v_0.Op != OpARMSLL {
  1150  			break
  1151  		}
  1152  		z := v_0.Args[1]
  1153  		y := v_0.Args[0]
  1154  		x := v.Args[1]
  1155  		v.reset(OpARMADCshiftLLreg)
  1156  		v.AddArg(x)
  1157  		v.AddArg(y)
  1158  		v.AddArg(z)
  1159  		v.AddArg(flags)
  1160  		return true
  1161  	}
  1162  	// match: (ADC (SLL y z) x flags)
  1163  	// result: (ADCshiftLLreg x y z flags)
  1164  	for {
  1165  		flags := v.Args[2]
  1166  		v_0 := v.Args[0]
  1167  		if v_0.Op != OpARMSLL {
  1168  			break
  1169  		}
  1170  		z := v_0.Args[1]
  1171  		y := v_0.Args[0]
  1172  		x := v.Args[1]
  1173  		v.reset(OpARMADCshiftLLreg)
  1174  		v.AddArg(x)
  1175  		v.AddArg(y)
  1176  		v.AddArg(z)
  1177  		v.AddArg(flags)
  1178  		return true
  1179  	}
  1180  	// match: (ADC x (SLL y z) flags)
  1181  	// result: (ADCshiftLLreg x y z flags)
  1182  	for {
  1183  		flags := v.Args[2]
  1184  		x := v.Args[0]
  1185  		v_1 := v.Args[1]
  1186  		if v_1.Op != OpARMSLL {
  1187  			break
  1188  		}
  1189  		z := v_1.Args[1]
  1190  		y := v_1.Args[0]
  1191  		v.reset(OpARMADCshiftLLreg)
  1192  		v.AddArg(x)
  1193  		v.AddArg(y)
  1194  		v.AddArg(z)
  1195  		v.AddArg(flags)
  1196  		return true
  1197  	}
  1198  	return false
  1199  }
  1200  func rewriteValueARM_OpARMADC_20(v *Value) bool {
  1201  	// match: (ADC x (SRL y z) flags)
  1202  	// result: (ADCshiftRLreg x y z flags)
  1203  	for {
  1204  		flags := v.Args[2]
  1205  		x := v.Args[0]
  1206  		v_1 := v.Args[1]
  1207  		if v_1.Op != OpARMSRL {
  1208  			break
  1209  		}
  1210  		z := v_1.Args[1]
  1211  		y := v_1.Args[0]
  1212  		v.reset(OpARMADCshiftRLreg)
  1213  		v.AddArg(x)
  1214  		v.AddArg(y)
  1215  		v.AddArg(z)
  1216  		v.AddArg(flags)
  1217  		return true
  1218  	}
  1219  	// match: (ADC (SRL y z) x flags)
  1220  	// result: (ADCshiftRLreg x y z flags)
  1221  	for {
  1222  		flags := v.Args[2]
  1223  		v_0 := v.Args[0]
  1224  		if v_0.Op != OpARMSRL {
  1225  			break
  1226  		}
  1227  		z := v_0.Args[1]
  1228  		y := v_0.Args[0]
  1229  		x := v.Args[1]
  1230  		v.reset(OpARMADCshiftRLreg)
  1231  		v.AddArg(x)
  1232  		v.AddArg(y)
  1233  		v.AddArg(z)
  1234  		v.AddArg(flags)
  1235  		return true
  1236  	}
  1237  	// match: (ADC (SRL y z) x flags)
  1238  	// result: (ADCshiftRLreg x y z flags)
  1239  	for {
  1240  		flags := v.Args[2]
  1241  		v_0 := v.Args[0]
  1242  		if v_0.Op != OpARMSRL {
  1243  			break
  1244  		}
  1245  		z := v_0.Args[1]
  1246  		y := v_0.Args[0]
  1247  		x := v.Args[1]
  1248  		v.reset(OpARMADCshiftRLreg)
  1249  		v.AddArg(x)
  1250  		v.AddArg(y)
  1251  		v.AddArg(z)
  1252  		v.AddArg(flags)
  1253  		return true
  1254  	}
  1255  	// match: (ADC x (SRL y z) flags)
  1256  	// result: (ADCshiftRLreg x y z flags)
  1257  	for {
  1258  		flags := v.Args[2]
  1259  		x := v.Args[0]
  1260  		v_1 := v.Args[1]
  1261  		if v_1.Op != OpARMSRL {
  1262  			break
  1263  		}
  1264  		z := v_1.Args[1]
  1265  		y := v_1.Args[0]
  1266  		v.reset(OpARMADCshiftRLreg)
  1267  		v.AddArg(x)
  1268  		v.AddArg(y)
  1269  		v.AddArg(z)
  1270  		v.AddArg(flags)
  1271  		return true
  1272  	}
  1273  	// match: (ADC x (SRA y z) flags)
  1274  	// result: (ADCshiftRAreg x y z flags)
  1275  	for {
  1276  		flags := v.Args[2]
  1277  		x := v.Args[0]
  1278  		v_1 := v.Args[1]
  1279  		if v_1.Op != OpARMSRA {
  1280  			break
  1281  		}
  1282  		z := v_1.Args[1]
  1283  		y := v_1.Args[0]
  1284  		v.reset(OpARMADCshiftRAreg)
  1285  		v.AddArg(x)
  1286  		v.AddArg(y)
  1287  		v.AddArg(z)
  1288  		v.AddArg(flags)
  1289  		return true
  1290  	}
  1291  	// match: (ADC (SRA y z) x flags)
  1292  	// result: (ADCshiftRAreg x y z flags)
  1293  	for {
  1294  		flags := v.Args[2]
  1295  		v_0 := v.Args[0]
  1296  		if v_0.Op != OpARMSRA {
  1297  			break
  1298  		}
  1299  		z := v_0.Args[1]
  1300  		y := v_0.Args[0]
  1301  		x := v.Args[1]
  1302  		v.reset(OpARMADCshiftRAreg)
  1303  		v.AddArg(x)
  1304  		v.AddArg(y)
  1305  		v.AddArg(z)
  1306  		v.AddArg(flags)
  1307  		return true
  1308  	}
  1309  	// match: (ADC (SRA y z) x flags)
  1310  	// result: (ADCshiftRAreg x y z flags)
  1311  	for {
  1312  		flags := v.Args[2]
  1313  		v_0 := v.Args[0]
  1314  		if v_0.Op != OpARMSRA {
  1315  			break
  1316  		}
  1317  		z := v_0.Args[1]
  1318  		y := v_0.Args[0]
  1319  		x := v.Args[1]
  1320  		v.reset(OpARMADCshiftRAreg)
  1321  		v.AddArg(x)
  1322  		v.AddArg(y)
  1323  		v.AddArg(z)
  1324  		v.AddArg(flags)
  1325  		return true
  1326  	}
  1327  	// match: (ADC x (SRA y z) flags)
  1328  	// result: (ADCshiftRAreg x y z flags)
  1329  	for {
  1330  		flags := v.Args[2]
  1331  		x := v.Args[0]
  1332  		v_1 := v.Args[1]
  1333  		if v_1.Op != OpARMSRA {
  1334  			break
  1335  		}
  1336  		z := v_1.Args[1]
  1337  		y := v_1.Args[0]
  1338  		v.reset(OpARMADCshiftRAreg)
  1339  		v.AddArg(x)
  1340  		v.AddArg(y)
  1341  		v.AddArg(z)
  1342  		v.AddArg(flags)
  1343  		return true
  1344  	}
  1345  	return false
  1346  }
  1347  func rewriteValueARM_OpARMADCconst_0(v *Value) bool {
  1348  	// match: (ADCconst [c] (ADDconst [d] x) flags)
  1349  	// result: (ADCconst [int64(int32(c+d))] x flags)
  1350  	for {
  1351  		c := v.AuxInt
  1352  		flags := v.Args[1]
  1353  		v_0 := v.Args[0]
  1354  		if v_0.Op != OpARMADDconst {
  1355  			break
  1356  		}
  1357  		d := v_0.AuxInt
  1358  		x := v_0.Args[0]
  1359  		v.reset(OpARMADCconst)
  1360  		v.AuxInt = int64(int32(c + d))
  1361  		v.AddArg(x)
  1362  		v.AddArg(flags)
  1363  		return true
  1364  	}
  1365  	// match: (ADCconst [c] (SUBconst [d] x) flags)
  1366  	// result: (ADCconst [int64(int32(c-d))] x flags)
  1367  	for {
  1368  		c := v.AuxInt
  1369  		flags := v.Args[1]
  1370  		v_0 := v.Args[0]
  1371  		if v_0.Op != OpARMSUBconst {
  1372  			break
  1373  		}
  1374  		d := v_0.AuxInt
  1375  		x := v_0.Args[0]
  1376  		v.reset(OpARMADCconst)
  1377  		v.AuxInt = int64(int32(c - d))
  1378  		v.AddArg(x)
  1379  		v.AddArg(flags)
  1380  		return true
  1381  	}
  1382  	return false
  1383  }
  1384  func rewriteValueARM_OpARMADCshiftLL_0(v *Value) bool {
  1385  	b := v.Block
  1386  	// match: (ADCshiftLL (MOVWconst [c]) x [d] flags)
  1387  	// result: (ADCconst [c] (SLLconst <x.Type> x [d]) flags)
  1388  	for {
  1389  		d := v.AuxInt
  1390  		flags := v.Args[2]
  1391  		v_0 := v.Args[0]
  1392  		if v_0.Op != OpARMMOVWconst {
  1393  			break
  1394  		}
  1395  		c := v_0.AuxInt
  1396  		x := v.Args[1]
  1397  		v.reset(OpARMADCconst)
  1398  		v.AuxInt = c
  1399  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  1400  		v0.AuxInt = d
  1401  		v0.AddArg(x)
  1402  		v.AddArg(v0)
  1403  		v.AddArg(flags)
  1404  		return true
  1405  	}
  1406  	// match: (ADCshiftLL x (MOVWconst [c]) [d] flags)
  1407  	// result: (ADCconst x [int64(int32(uint32(c)<<uint64(d)))] flags)
  1408  	for {
  1409  		d := v.AuxInt
  1410  		flags := v.Args[2]
  1411  		x := v.Args[0]
  1412  		v_1 := v.Args[1]
  1413  		if v_1.Op != OpARMMOVWconst {
  1414  			break
  1415  		}
  1416  		c := v_1.AuxInt
  1417  		v.reset(OpARMADCconst)
  1418  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  1419  		v.AddArg(x)
  1420  		v.AddArg(flags)
  1421  		return true
  1422  	}
  1423  	return false
  1424  }
  1425  func rewriteValueARM_OpARMADCshiftLLreg_0(v *Value) bool {
  1426  	b := v.Block
  1427  	// match: (ADCshiftLLreg (MOVWconst [c]) x y flags)
  1428  	// result: (ADCconst [c] (SLL <x.Type> x y) flags)
  1429  	for {
  1430  		flags := v.Args[3]
  1431  		v_0 := v.Args[0]
  1432  		if v_0.Op != OpARMMOVWconst {
  1433  			break
  1434  		}
  1435  		c := v_0.AuxInt
  1436  		x := v.Args[1]
  1437  		y := v.Args[2]
  1438  		v.reset(OpARMADCconst)
  1439  		v.AuxInt = c
  1440  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  1441  		v0.AddArg(x)
  1442  		v0.AddArg(y)
  1443  		v.AddArg(v0)
  1444  		v.AddArg(flags)
  1445  		return true
  1446  	}
  1447  	// match: (ADCshiftLLreg x y (MOVWconst [c]) flags)
  1448  	// result: (ADCshiftLL x y [c] flags)
  1449  	for {
  1450  		flags := v.Args[3]
  1451  		x := v.Args[0]
  1452  		y := v.Args[1]
  1453  		v_2 := v.Args[2]
  1454  		if v_2.Op != OpARMMOVWconst {
  1455  			break
  1456  		}
  1457  		c := v_2.AuxInt
  1458  		v.reset(OpARMADCshiftLL)
  1459  		v.AuxInt = c
  1460  		v.AddArg(x)
  1461  		v.AddArg(y)
  1462  		v.AddArg(flags)
  1463  		return true
  1464  	}
  1465  	return false
  1466  }
  1467  func rewriteValueARM_OpARMADCshiftRA_0(v *Value) bool {
  1468  	b := v.Block
  1469  	// match: (ADCshiftRA (MOVWconst [c]) x [d] flags)
  1470  	// result: (ADCconst [c] (SRAconst <x.Type> x [d]) flags)
  1471  	for {
  1472  		d := v.AuxInt
  1473  		flags := v.Args[2]
  1474  		v_0 := v.Args[0]
  1475  		if v_0.Op != OpARMMOVWconst {
  1476  			break
  1477  		}
  1478  		c := v_0.AuxInt
  1479  		x := v.Args[1]
  1480  		v.reset(OpARMADCconst)
  1481  		v.AuxInt = c
  1482  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  1483  		v0.AuxInt = d
  1484  		v0.AddArg(x)
  1485  		v.AddArg(v0)
  1486  		v.AddArg(flags)
  1487  		return true
  1488  	}
  1489  	// match: (ADCshiftRA x (MOVWconst [c]) [d] flags)
  1490  	// result: (ADCconst x [int64(int32(c)>>uint64(d))] flags)
  1491  	for {
  1492  		d := v.AuxInt
  1493  		flags := v.Args[2]
  1494  		x := v.Args[0]
  1495  		v_1 := v.Args[1]
  1496  		if v_1.Op != OpARMMOVWconst {
  1497  			break
  1498  		}
  1499  		c := v_1.AuxInt
  1500  		v.reset(OpARMADCconst)
  1501  		v.AuxInt = int64(int32(c) >> uint64(d))
  1502  		v.AddArg(x)
  1503  		v.AddArg(flags)
  1504  		return true
  1505  	}
  1506  	return false
  1507  }
  1508  func rewriteValueARM_OpARMADCshiftRAreg_0(v *Value) bool {
  1509  	b := v.Block
  1510  	// match: (ADCshiftRAreg (MOVWconst [c]) x y flags)
  1511  	// result: (ADCconst [c] (SRA <x.Type> x y) flags)
  1512  	for {
  1513  		flags := v.Args[3]
  1514  		v_0 := v.Args[0]
  1515  		if v_0.Op != OpARMMOVWconst {
  1516  			break
  1517  		}
  1518  		c := v_0.AuxInt
  1519  		x := v.Args[1]
  1520  		y := v.Args[2]
  1521  		v.reset(OpARMADCconst)
  1522  		v.AuxInt = c
  1523  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  1524  		v0.AddArg(x)
  1525  		v0.AddArg(y)
  1526  		v.AddArg(v0)
  1527  		v.AddArg(flags)
  1528  		return true
  1529  	}
  1530  	// match: (ADCshiftRAreg x y (MOVWconst [c]) flags)
  1531  	// result: (ADCshiftRA x y [c] flags)
  1532  	for {
  1533  		flags := v.Args[3]
  1534  		x := v.Args[0]
  1535  		y := v.Args[1]
  1536  		v_2 := v.Args[2]
  1537  		if v_2.Op != OpARMMOVWconst {
  1538  			break
  1539  		}
  1540  		c := v_2.AuxInt
  1541  		v.reset(OpARMADCshiftRA)
  1542  		v.AuxInt = c
  1543  		v.AddArg(x)
  1544  		v.AddArg(y)
  1545  		v.AddArg(flags)
  1546  		return true
  1547  	}
  1548  	return false
  1549  }
  1550  func rewriteValueARM_OpARMADCshiftRL_0(v *Value) bool {
  1551  	b := v.Block
  1552  	// match: (ADCshiftRL (MOVWconst [c]) x [d] flags)
  1553  	// result: (ADCconst [c] (SRLconst <x.Type> x [d]) flags)
  1554  	for {
  1555  		d := v.AuxInt
  1556  		flags := v.Args[2]
  1557  		v_0 := v.Args[0]
  1558  		if v_0.Op != OpARMMOVWconst {
  1559  			break
  1560  		}
  1561  		c := v_0.AuxInt
  1562  		x := v.Args[1]
  1563  		v.reset(OpARMADCconst)
  1564  		v.AuxInt = c
  1565  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  1566  		v0.AuxInt = d
  1567  		v0.AddArg(x)
  1568  		v.AddArg(v0)
  1569  		v.AddArg(flags)
  1570  		return true
  1571  	}
  1572  	// match: (ADCshiftRL x (MOVWconst [c]) [d] flags)
  1573  	// result: (ADCconst x [int64(int32(uint32(c)>>uint64(d)))] flags)
  1574  	for {
  1575  		d := v.AuxInt
  1576  		flags := v.Args[2]
  1577  		x := v.Args[0]
  1578  		v_1 := v.Args[1]
  1579  		if v_1.Op != OpARMMOVWconst {
  1580  			break
  1581  		}
  1582  		c := v_1.AuxInt
  1583  		v.reset(OpARMADCconst)
  1584  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  1585  		v.AddArg(x)
  1586  		v.AddArg(flags)
  1587  		return true
  1588  	}
  1589  	return false
  1590  }
  1591  func rewriteValueARM_OpARMADCshiftRLreg_0(v *Value) bool {
  1592  	b := v.Block
  1593  	// match: (ADCshiftRLreg (MOVWconst [c]) x y flags)
  1594  	// result: (ADCconst [c] (SRL <x.Type> x y) flags)
  1595  	for {
  1596  		flags := v.Args[3]
  1597  		v_0 := v.Args[0]
  1598  		if v_0.Op != OpARMMOVWconst {
  1599  			break
  1600  		}
  1601  		c := v_0.AuxInt
  1602  		x := v.Args[1]
  1603  		y := v.Args[2]
  1604  		v.reset(OpARMADCconst)
  1605  		v.AuxInt = c
  1606  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  1607  		v0.AddArg(x)
  1608  		v0.AddArg(y)
  1609  		v.AddArg(v0)
  1610  		v.AddArg(flags)
  1611  		return true
  1612  	}
  1613  	// match: (ADCshiftRLreg x y (MOVWconst [c]) flags)
  1614  	// result: (ADCshiftRL x y [c] flags)
  1615  	for {
  1616  		flags := v.Args[3]
  1617  		x := v.Args[0]
  1618  		y := v.Args[1]
  1619  		v_2 := v.Args[2]
  1620  		if v_2.Op != OpARMMOVWconst {
  1621  			break
  1622  		}
  1623  		c := v_2.AuxInt
  1624  		v.reset(OpARMADCshiftRL)
  1625  		v.AuxInt = c
  1626  		v.AddArg(x)
  1627  		v.AddArg(y)
  1628  		v.AddArg(flags)
  1629  		return true
  1630  	}
  1631  	return false
  1632  }
  1633  func rewriteValueARM_OpARMADD_0(v *Value) bool {
  1634  	// match: (ADD x (MOVWconst [c]))
  1635  	// result: (ADDconst [c] x)
  1636  	for {
  1637  		_ = v.Args[1]
  1638  		x := v.Args[0]
  1639  		v_1 := v.Args[1]
  1640  		if v_1.Op != OpARMMOVWconst {
  1641  			break
  1642  		}
  1643  		c := v_1.AuxInt
  1644  		v.reset(OpARMADDconst)
  1645  		v.AuxInt = c
  1646  		v.AddArg(x)
  1647  		return true
  1648  	}
  1649  	// match: (ADD (MOVWconst [c]) x)
  1650  	// result: (ADDconst [c] x)
  1651  	for {
  1652  		x := v.Args[1]
  1653  		v_0 := v.Args[0]
  1654  		if v_0.Op != OpARMMOVWconst {
  1655  			break
  1656  		}
  1657  		c := v_0.AuxInt
  1658  		v.reset(OpARMADDconst)
  1659  		v.AuxInt = c
  1660  		v.AddArg(x)
  1661  		return true
  1662  	}
  1663  	// match: (ADD x (SLLconst [c] y))
  1664  	// result: (ADDshiftLL x y [c])
  1665  	for {
  1666  		_ = v.Args[1]
  1667  		x := v.Args[0]
  1668  		v_1 := v.Args[1]
  1669  		if v_1.Op != OpARMSLLconst {
  1670  			break
  1671  		}
  1672  		c := v_1.AuxInt
  1673  		y := v_1.Args[0]
  1674  		v.reset(OpARMADDshiftLL)
  1675  		v.AuxInt = c
  1676  		v.AddArg(x)
  1677  		v.AddArg(y)
  1678  		return true
  1679  	}
  1680  	// match: (ADD (SLLconst [c] y) x)
  1681  	// result: (ADDshiftLL x y [c])
  1682  	for {
  1683  		x := v.Args[1]
  1684  		v_0 := v.Args[0]
  1685  		if v_0.Op != OpARMSLLconst {
  1686  			break
  1687  		}
  1688  		c := v_0.AuxInt
  1689  		y := v_0.Args[0]
  1690  		v.reset(OpARMADDshiftLL)
  1691  		v.AuxInt = c
  1692  		v.AddArg(x)
  1693  		v.AddArg(y)
  1694  		return true
  1695  	}
  1696  	// match: (ADD x (SRLconst [c] y))
  1697  	// result: (ADDshiftRL x y [c])
  1698  	for {
  1699  		_ = v.Args[1]
  1700  		x := v.Args[0]
  1701  		v_1 := v.Args[1]
  1702  		if v_1.Op != OpARMSRLconst {
  1703  			break
  1704  		}
  1705  		c := v_1.AuxInt
  1706  		y := v_1.Args[0]
  1707  		v.reset(OpARMADDshiftRL)
  1708  		v.AuxInt = c
  1709  		v.AddArg(x)
  1710  		v.AddArg(y)
  1711  		return true
  1712  	}
  1713  	// match: (ADD (SRLconst [c] y) x)
  1714  	// result: (ADDshiftRL x y [c])
  1715  	for {
  1716  		x := v.Args[1]
  1717  		v_0 := v.Args[0]
  1718  		if v_0.Op != OpARMSRLconst {
  1719  			break
  1720  		}
  1721  		c := v_0.AuxInt
  1722  		y := v_0.Args[0]
  1723  		v.reset(OpARMADDshiftRL)
  1724  		v.AuxInt = c
  1725  		v.AddArg(x)
  1726  		v.AddArg(y)
  1727  		return true
  1728  	}
  1729  	// match: (ADD x (SRAconst [c] y))
  1730  	// result: (ADDshiftRA x y [c])
  1731  	for {
  1732  		_ = v.Args[1]
  1733  		x := v.Args[0]
  1734  		v_1 := v.Args[1]
  1735  		if v_1.Op != OpARMSRAconst {
  1736  			break
  1737  		}
  1738  		c := v_1.AuxInt
  1739  		y := v_1.Args[0]
  1740  		v.reset(OpARMADDshiftRA)
  1741  		v.AuxInt = c
  1742  		v.AddArg(x)
  1743  		v.AddArg(y)
  1744  		return true
  1745  	}
  1746  	// match: (ADD (SRAconst [c] y) x)
  1747  	// result: (ADDshiftRA x y [c])
  1748  	for {
  1749  		x := v.Args[1]
  1750  		v_0 := v.Args[0]
  1751  		if v_0.Op != OpARMSRAconst {
  1752  			break
  1753  		}
  1754  		c := v_0.AuxInt
  1755  		y := v_0.Args[0]
  1756  		v.reset(OpARMADDshiftRA)
  1757  		v.AuxInt = c
  1758  		v.AddArg(x)
  1759  		v.AddArg(y)
  1760  		return true
  1761  	}
  1762  	// match: (ADD x (SLL y z))
  1763  	// result: (ADDshiftLLreg x y z)
  1764  	for {
  1765  		_ = v.Args[1]
  1766  		x := v.Args[0]
  1767  		v_1 := v.Args[1]
  1768  		if v_1.Op != OpARMSLL {
  1769  			break
  1770  		}
  1771  		z := v_1.Args[1]
  1772  		y := v_1.Args[0]
  1773  		v.reset(OpARMADDshiftLLreg)
  1774  		v.AddArg(x)
  1775  		v.AddArg(y)
  1776  		v.AddArg(z)
  1777  		return true
  1778  	}
  1779  	// match: (ADD (SLL y z) x)
  1780  	// result: (ADDshiftLLreg x y z)
  1781  	for {
  1782  		x := v.Args[1]
  1783  		v_0 := v.Args[0]
  1784  		if v_0.Op != OpARMSLL {
  1785  			break
  1786  		}
  1787  		z := v_0.Args[1]
  1788  		y := v_0.Args[0]
  1789  		v.reset(OpARMADDshiftLLreg)
  1790  		v.AddArg(x)
  1791  		v.AddArg(y)
  1792  		v.AddArg(z)
  1793  		return true
  1794  	}
  1795  	return false
  1796  }
  1797  func rewriteValueARM_OpARMADD_10(v *Value) bool {
  1798  	b := v.Block
  1799  	// match: (ADD x (SRL y z))
  1800  	// result: (ADDshiftRLreg x y z)
  1801  	for {
  1802  		_ = v.Args[1]
  1803  		x := v.Args[0]
  1804  		v_1 := v.Args[1]
  1805  		if v_1.Op != OpARMSRL {
  1806  			break
  1807  		}
  1808  		z := v_1.Args[1]
  1809  		y := v_1.Args[0]
  1810  		v.reset(OpARMADDshiftRLreg)
  1811  		v.AddArg(x)
  1812  		v.AddArg(y)
  1813  		v.AddArg(z)
  1814  		return true
  1815  	}
  1816  	// match: (ADD (SRL y z) x)
  1817  	// result: (ADDshiftRLreg x y z)
  1818  	for {
  1819  		x := v.Args[1]
  1820  		v_0 := v.Args[0]
  1821  		if v_0.Op != OpARMSRL {
  1822  			break
  1823  		}
  1824  		z := v_0.Args[1]
  1825  		y := v_0.Args[0]
  1826  		v.reset(OpARMADDshiftRLreg)
  1827  		v.AddArg(x)
  1828  		v.AddArg(y)
  1829  		v.AddArg(z)
  1830  		return true
  1831  	}
  1832  	// match: (ADD x (SRA y z))
  1833  	// result: (ADDshiftRAreg x y z)
  1834  	for {
  1835  		_ = v.Args[1]
  1836  		x := v.Args[0]
  1837  		v_1 := v.Args[1]
  1838  		if v_1.Op != OpARMSRA {
  1839  			break
  1840  		}
  1841  		z := v_1.Args[1]
  1842  		y := v_1.Args[0]
  1843  		v.reset(OpARMADDshiftRAreg)
  1844  		v.AddArg(x)
  1845  		v.AddArg(y)
  1846  		v.AddArg(z)
  1847  		return true
  1848  	}
  1849  	// match: (ADD (SRA y z) x)
  1850  	// result: (ADDshiftRAreg x y z)
  1851  	for {
  1852  		x := v.Args[1]
  1853  		v_0 := v.Args[0]
  1854  		if v_0.Op != OpARMSRA {
  1855  			break
  1856  		}
  1857  		z := v_0.Args[1]
  1858  		y := v_0.Args[0]
  1859  		v.reset(OpARMADDshiftRAreg)
  1860  		v.AddArg(x)
  1861  		v.AddArg(y)
  1862  		v.AddArg(z)
  1863  		return true
  1864  	}
  1865  	// match: (ADD x (RSBconst [0] y))
  1866  	// result: (SUB x y)
  1867  	for {
  1868  		_ = v.Args[1]
  1869  		x := v.Args[0]
  1870  		v_1 := v.Args[1]
  1871  		if v_1.Op != OpARMRSBconst || v_1.AuxInt != 0 {
  1872  			break
  1873  		}
  1874  		y := v_1.Args[0]
  1875  		v.reset(OpARMSUB)
  1876  		v.AddArg(x)
  1877  		v.AddArg(y)
  1878  		return true
  1879  	}
  1880  	// match: (ADD (RSBconst [0] y) x)
  1881  	// result: (SUB x y)
  1882  	for {
  1883  		x := v.Args[1]
  1884  		v_0 := v.Args[0]
  1885  		if v_0.Op != OpARMRSBconst || v_0.AuxInt != 0 {
  1886  			break
  1887  		}
  1888  		y := v_0.Args[0]
  1889  		v.reset(OpARMSUB)
  1890  		v.AddArg(x)
  1891  		v.AddArg(y)
  1892  		return true
  1893  	}
  1894  	// match: (ADD <t> (RSBconst [c] x) (RSBconst [d] y))
  1895  	// result: (RSBconst [c+d] (ADD <t> x y))
  1896  	for {
  1897  		t := v.Type
  1898  		_ = v.Args[1]
  1899  		v_0 := v.Args[0]
  1900  		if v_0.Op != OpARMRSBconst {
  1901  			break
  1902  		}
  1903  		c := v_0.AuxInt
  1904  		x := v_0.Args[0]
  1905  		v_1 := v.Args[1]
  1906  		if v_1.Op != OpARMRSBconst {
  1907  			break
  1908  		}
  1909  		d := v_1.AuxInt
  1910  		y := v_1.Args[0]
  1911  		v.reset(OpARMRSBconst)
  1912  		v.AuxInt = c + d
  1913  		v0 := b.NewValue0(v.Pos, OpARMADD, t)
  1914  		v0.AddArg(x)
  1915  		v0.AddArg(y)
  1916  		v.AddArg(v0)
  1917  		return true
  1918  	}
  1919  	// match: (ADD <t> (RSBconst [d] y) (RSBconst [c] x))
  1920  	// result: (RSBconst [c+d] (ADD <t> x y))
  1921  	for {
  1922  		t := v.Type
  1923  		_ = v.Args[1]
  1924  		v_0 := v.Args[0]
  1925  		if v_0.Op != OpARMRSBconst {
  1926  			break
  1927  		}
  1928  		d := v_0.AuxInt
  1929  		y := v_0.Args[0]
  1930  		v_1 := v.Args[1]
  1931  		if v_1.Op != OpARMRSBconst {
  1932  			break
  1933  		}
  1934  		c := v_1.AuxInt
  1935  		x := v_1.Args[0]
  1936  		v.reset(OpARMRSBconst)
  1937  		v.AuxInt = c + d
  1938  		v0 := b.NewValue0(v.Pos, OpARMADD, t)
  1939  		v0.AddArg(x)
  1940  		v0.AddArg(y)
  1941  		v.AddArg(v0)
  1942  		return true
  1943  	}
  1944  	// match: (ADD (MUL x y) a)
  1945  	// result: (MULA x y a)
  1946  	for {
  1947  		a := v.Args[1]
  1948  		v_0 := v.Args[0]
  1949  		if v_0.Op != OpARMMUL {
  1950  			break
  1951  		}
  1952  		y := v_0.Args[1]
  1953  		x := v_0.Args[0]
  1954  		v.reset(OpARMMULA)
  1955  		v.AddArg(x)
  1956  		v.AddArg(y)
  1957  		v.AddArg(a)
  1958  		return true
  1959  	}
  1960  	// match: (ADD a (MUL x y))
  1961  	// result: (MULA x y a)
  1962  	for {
  1963  		_ = v.Args[1]
  1964  		a := v.Args[0]
  1965  		v_1 := v.Args[1]
  1966  		if v_1.Op != OpARMMUL {
  1967  			break
  1968  		}
  1969  		y := v_1.Args[1]
  1970  		x := v_1.Args[0]
  1971  		v.reset(OpARMMULA)
  1972  		v.AddArg(x)
  1973  		v.AddArg(y)
  1974  		v.AddArg(a)
  1975  		return true
  1976  	}
  1977  	return false
  1978  }
  1979  func rewriteValueARM_OpARMADDD_0(v *Value) bool {
  1980  	// match: (ADDD a (MULD x y))
  1981  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  1982  	// result: (MULAD a x y)
  1983  	for {
  1984  		_ = v.Args[1]
  1985  		a := v.Args[0]
  1986  		v_1 := v.Args[1]
  1987  		if v_1.Op != OpARMMULD {
  1988  			break
  1989  		}
  1990  		y := v_1.Args[1]
  1991  		x := v_1.Args[0]
  1992  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  1993  			break
  1994  		}
  1995  		v.reset(OpARMMULAD)
  1996  		v.AddArg(a)
  1997  		v.AddArg(x)
  1998  		v.AddArg(y)
  1999  		return true
  2000  	}
  2001  	// match: (ADDD (MULD x y) a)
  2002  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2003  	// result: (MULAD a x y)
  2004  	for {
  2005  		a := v.Args[1]
  2006  		v_0 := v.Args[0]
  2007  		if v_0.Op != OpARMMULD {
  2008  			break
  2009  		}
  2010  		y := v_0.Args[1]
  2011  		x := v_0.Args[0]
  2012  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2013  			break
  2014  		}
  2015  		v.reset(OpARMMULAD)
  2016  		v.AddArg(a)
  2017  		v.AddArg(x)
  2018  		v.AddArg(y)
  2019  		return true
  2020  	}
  2021  	// match: (ADDD a (NMULD x y))
  2022  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2023  	// result: (MULSD a x y)
  2024  	for {
  2025  		_ = v.Args[1]
  2026  		a := v.Args[0]
  2027  		v_1 := v.Args[1]
  2028  		if v_1.Op != OpARMNMULD {
  2029  			break
  2030  		}
  2031  		y := v_1.Args[1]
  2032  		x := v_1.Args[0]
  2033  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2034  			break
  2035  		}
  2036  		v.reset(OpARMMULSD)
  2037  		v.AddArg(a)
  2038  		v.AddArg(x)
  2039  		v.AddArg(y)
  2040  		return true
  2041  	}
  2042  	// match: (ADDD (NMULD x y) a)
  2043  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2044  	// result: (MULSD a x y)
  2045  	for {
  2046  		a := v.Args[1]
  2047  		v_0 := v.Args[0]
  2048  		if v_0.Op != OpARMNMULD {
  2049  			break
  2050  		}
  2051  		y := v_0.Args[1]
  2052  		x := v_0.Args[0]
  2053  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2054  			break
  2055  		}
  2056  		v.reset(OpARMMULSD)
  2057  		v.AddArg(a)
  2058  		v.AddArg(x)
  2059  		v.AddArg(y)
  2060  		return true
  2061  	}
  2062  	return false
  2063  }
  2064  func rewriteValueARM_OpARMADDF_0(v *Value) bool {
  2065  	// match: (ADDF a (MULF x y))
  2066  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2067  	// result: (MULAF a x y)
  2068  	for {
  2069  		_ = v.Args[1]
  2070  		a := v.Args[0]
  2071  		v_1 := v.Args[1]
  2072  		if v_1.Op != OpARMMULF {
  2073  			break
  2074  		}
  2075  		y := v_1.Args[1]
  2076  		x := v_1.Args[0]
  2077  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2078  			break
  2079  		}
  2080  		v.reset(OpARMMULAF)
  2081  		v.AddArg(a)
  2082  		v.AddArg(x)
  2083  		v.AddArg(y)
  2084  		return true
  2085  	}
  2086  	// match: (ADDF (MULF x y) a)
  2087  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2088  	// result: (MULAF a x y)
  2089  	for {
  2090  		a := v.Args[1]
  2091  		v_0 := v.Args[0]
  2092  		if v_0.Op != OpARMMULF {
  2093  			break
  2094  		}
  2095  		y := v_0.Args[1]
  2096  		x := v_0.Args[0]
  2097  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2098  			break
  2099  		}
  2100  		v.reset(OpARMMULAF)
  2101  		v.AddArg(a)
  2102  		v.AddArg(x)
  2103  		v.AddArg(y)
  2104  		return true
  2105  	}
  2106  	// match: (ADDF a (NMULF x y))
  2107  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2108  	// result: (MULSF a x y)
  2109  	for {
  2110  		_ = v.Args[1]
  2111  		a := v.Args[0]
  2112  		v_1 := v.Args[1]
  2113  		if v_1.Op != OpARMNMULF {
  2114  			break
  2115  		}
  2116  		y := v_1.Args[1]
  2117  		x := v_1.Args[0]
  2118  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2119  			break
  2120  		}
  2121  		v.reset(OpARMMULSF)
  2122  		v.AddArg(a)
  2123  		v.AddArg(x)
  2124  		v.AddArg(y)
  2125  		return true
  2126  	}
  2127  	// match: (ADDF (NMULF x y) a)
  2128  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2129  	// result: (MULSF a x y)
  2130  	for {
  2131  		a := v.Args[1]
  2132  		v_0 := v.Args[0]
  2133  		if v_0.Op != OpARMNMULF {
  2134  			break
  2135  		}
  2136  		y := v_0.Args[1]
  2137  		x := v_0.Args[0]
  2138  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2139  			break
  2140  		}
  2141  		v.reset(OpARMMULSF)
  2142  		v.AddArg(a)
  2143  		v.AddArg(x)
  2144  		v.AddArg(y)
  2145  		return true
  2146  	}
  2147  	return false
  2148  }
  2149  func rewriteValueARM_OpARMADDS_0(v *Value) bool {
  2150  	// match: (ADDS x (MOVWconst [c]))
  2151  	// result: (ADDSconst [c] x)
  2152  	for {
  2153  		_ = v.Args[1]
  2154  		x := v.Args[0]
  2155  		v_1 := v.Args[1]
  2156  		if v_1.Op != OpARMMOVWconst {
  2157  			break
  2158  		}
  2159  		c := v_1.AuxInt
  2160  		v.reset(OpARMADDSconst)
  2161  		v.AuxInt = c
  2162  		v.AddArg(x)
  2163  		return true
  2164  	}
  2165  	// match: (ADDS (MOVWconst [c]) x)
  2166  	// result: (ADDSconst [c] x)
  2167  	for {
  2168  		x := v.Args[1]
  2169  		v_0 := v.Args[0]
  2170  		if v_0.Op != OpARMMOVWconst {
  2171  			break
  2172  		}
  2173  		c := v_0.AuxInt
  2174  		v.reset(OpARMADDSconst)
  2175  		v.AuxInt = c
  2176  		v.AddArg(x)
  2177  		return true
  2178  	}
  2179  	// match: (ADDS x (SLLconst [c] y))
  2180  	// result: (ADDSshiftLL x y [c])
  2181  	for {
  2182  		_ = v.Args[1]
  2183  		x := v.Args[0]
  2184  		v_1 := v.Args[1]
  2185  		if v_1.Op != OpARMSLLconst {
  2186  			break
  2187  		}
  2188  		c := v_1.AuxInt
  2189  		y := v_1.Args[0]
  2190  		v.reset(OpARMADDSshiftLL)
  2191  		v.AuxInt = c
  2192  		v.AddArg(x)
  2193  		v.AddArg(y)
  2194  		return true
  2195  	}
  2196  	// match: (ADDS (SLLconst [c] y) x)
  2197  	// result: (ADDSshiftLL x y [c])
  2198  	for {
  2199  		x := v.Args[1]
  2200  		v_0 := v.Args[0]
  2201  		if v_0.Op != OpARMSLLconst {
  2202  			break
  2203  		}
  2204  		c := v_0.AuxInt
  2205  		y := v_0.Args[0]
  2206  		v.reset(OpARMADDSshiftLL)
  2207  		v.AuxInt = c
  2208  		v.AddArg(x)
  2209  		v.AddArg(y)
  2210  		return true
  2211  	}
  2212  	// match: (ADDS x (SRLconst [c] y))
  2213  	// result: (ADDSshiftRL x y [c])
  2214  	for {
  2215  		_ = v.Args[1]
  2216  		x := v.Args[0]
  2217  		v_1 := v.Args[1]
  2218  		if v_1.Op != OpARMSRLconst {
  2219  			break
  2220  		}
  2221  		c := v_1.AuxInt
  2222  		y := v_1.Args[0]
  2223  		v.reset(OpARMADDSshiftRL)
  2224  		v.AuxInt = c
  2225  		v.AddArg(x)
  2226  		v.AddArg(y)
  2227  		return true
  2228  	}
  2229  	// match: (ADDS (SRLconst [c] y) x)
  2230  	// result: (ADDSshiftRL x y [c])
  2231  	for {
  2232  		x := v.Args[1]
  2233  		v_0 := v.Args[0]
  2234  		if v_0.Op != OpARMSRLconst {
  2235  			break
  2236  		}
  2237  		c := v_0.AuxInt
  2238  		y := v_0.Args[0]
  2239  		v.reset(OpARMADDSshiftRL)
  2240  		v.AuxInt = c
  2241  		v.AddArg(x)
  2242  		v.AddArg(y)
  2243  		return true
  2244  	}
  2245  	// match: (ADDS x (SRAconst [c] y))
  2246  	// result: (ADDSshiftRA x y [c])
  2247  	for {
  2248  		_ = v.Args[1]
  2249  		x := v.Args[0]
  2250  		v_1 := v.Args[1]
  2251  		if v_1.Op != OpARMSRAconst {
  2252  			break
  2253  		}
  2254  		c := v_1.AuxInt
  2255  		y := v_1.Args[0]
  2256  		v.reset(OpARMADDSshiftRA)
  2257  		v.AuxInt = c
  2258  		v.AddArg(x)
  2259  		v.AddArg(y)
  2260  		return true
  2261  	}
  2262  	// match: (ADDS (SRAconst [c] y) x)
  2263  	// result: (ADDSshiftRA x y [c])
  2264  	for {
  2265  		x := v.Args[1]
  2266  		v_0 := v.Args[0]
  2267  		if v_0.Op != OpARMSRAconst {
  2268  			break
  2269  		}
  2270  		c := v_0.AuxInt
  2271  		y := v_0.Args[0]
  2272  		v.reset(OpARMADDSshiftRA)
  2273  		v.AuxInt = c
  2274  		v.AddArg(x)
  2275  		v.AddArg(y)
  2276  		return true
  2277  	}
  2278  	// match: (ADDS x (SLL y z))
  2279  	// result: (ADDSshiftLLreg x y z)
  2280  	for {
  2281  		_ = v.Args[1]
  2282  		x := v.Args[0]
  2283  		v_1 := v.Args[1]
  2284  		if v_1.Op != OpARMSLL {
  2285  			break
  2286  		}
  2287  		z := v_1.Args[1]
  2288  		y := v_1.Args[0]
  2289  		v.reset(OpARMADDSshiftLLreg)
  2290  		v.AddArg(x)
  2291  		v.AddArg(y)
  2292  		v.AddArg(z)
  2293  		return true
  2294  	}
  2295  	// match: (ADDS (SLL y z) x)
  2296  	// result: (ADDSshiftLLreg x y z)
  2297  	for {
  2298  		x := v.Args[1]
  2299  		v_0 := v.Args[0]
  2300  		if v_0.Op != OpARMSLL {
  2301  			break
  2302  		}
  2303  		z := v_0.Args[1]
  2304  		y := v_0.Args[0]
  2305  		v.reset(OpARMADDSshiftLLreg)
  2306  		v.AddArg(x)
  2307  		v.AddArg(y)
  2308  		v.AddArg(z)
  2309  		return true
  2310  	}
  2311  	return false
  2312  }
  2313  func rewriteValueARM_OpARMADDS_10(v *Value) bool {
  2314  	// match: (ADDS x (SRL y z))
  2315  	// result: (ADDSshiftRLreg x y z)
  2316  	for {
  2317  		_ = v.Args[1]
  2318  		x := v.Args[0]
  2319  		v_1 := v.Args[1]
  2320  		if v_1.Op != OpARMSRL {
  2321  			break
  2322  		}
  2323  		z := v_1.Args[1]
  2324  		y := v_1.Args[0]
  2325  		v.reset(OpARMADDSshiftRLreg)
  2326  		v.AddArg(x)
  2327  		v.AddArg(y)
  2328  		v.AddArg(z)
  2329  		return true
  2330  	}
  2331  	// match: (ADDS (SRL y z) x)
  2332  	// result: (ADDSshiftRLreg x y z)
  2333  	for {
  2334  		x := v.Args[1]
  2335  		v_0 := v.Args[0]
  2336  		if v_0.Op != OpARMSRL {
  2337  			break
  2338  		}
  2339  		z := v_0.Args[1]
  2340  		y := v_0.Args[0]
  2341  		v.reset(OpARMADDSshiftRLreg)
  2342  		v.AddArg(x)
  2343  		v.AddArg(y)
  2344  		v.AddArg(z)
  2345  		return true
  2346  	}
  2347  	// match: (ADDS x (SRA y z))
  2348  	// result: (ADDSshiftRAreg x y z)
  2349  	for {
  2350  		_ = v.Args[1]
  2351  		x := v.Args[0]
  2352  		v_1 := v.Args[1]
  2353  		if v_1.Op != OpARMSRA {
  2354  			break
  2355  		}
  2356  		z := v_1.Args[1]
  2357  		y := v_1.Args[0]
  2358  		v.reset(OpARMADDSshiftRAreg)
  2359  		v.AddArg(x)
  2360  		v.AddArg(y)
  2361  		v.AddArg(z)
  2362  		return true
  2363  	}
  2364  	// match: (ADDS (SRA y z) x)
  2365  	// result: (ADDSshiftRAreg x y z)
  2366  	for {
  2367  		x := v.Args[1]
  2368  		v_0 := v.Args[0]
  2369  		if v_0.Op != OpARMSRA {
  2370  			break
  2371  		}
  2372  		z := v_0.Args[1]
  2373  		y := v_0.Args[0]
  2374  		v.reset(OpARMADDSshiftRAreg)
  2375  		v.AddArg(x)
  2376  		v.AddArg(y)
  2377  		v.AddArg(z)
  2378  		return true
  2379  	}
  2380  	return false
  2381  }
  2382  func rewriteValueARM_OpARMADDSshiftLL_0(v *Value) bool {
  2383  	b := v.Block
  2384  	// match: (ADDSshiftLL (MOVWconst [c]) x [d])
  2385  	// result: (ADDSconst [c] (SLLconst <x.Type> x [d]))
  2386  	for {
  2387  		d := v.AuxInt
  2388  		x := v.Args[1]
  2389  		v_0 := v.Args[0]
  2390  		if v_0.Op != OpARMMOVWconst {
  2391  			break
  2392  		}
  2393  		c := v_0.AuxInt
  2394  		v.reset(OpARMADDSconst)
  2395  		v.AuxInt = c
  2396  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  2397  		v0.AuxInt = d
  2398  		v0.AddArg(x)
  2399  		v.AddArg(v0)
  2400  		return true
  2401  	}
  2402  	// match: (ADDSshiftLL x (MOVWconst [c]) [d])
  2403  	// result: (ADDSconst x [int64(int32(uint32(c)<<uint64(d)))])
  2404  	for {
  2405  		d := v.AuxInt
  2406  		_ = v.Args[1]
  2407  		x := v.Args[0]
  2408  		v_1 := v.Args[1]
  2409  		if v_1.Op != OpARMMOVWconst {
  2410  			break
  2411  		}
  2412  		c := v_1.AuxInt
  2413  		v.reset(OpARMADDSconst)
  2414  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  2415  		v.AddArg(x)
  2416  		return true
  2417  	}
  2418  	return false
  2419  }
  2420  func rewriteValueARM_OpARMADDSshiftLLreg_0(v *Value) bool {
  2421  	b := v.Block
  2422  	// match: (ADDSshiftLLreg (MOVWconst [c]) x y)
  2423  	// result: (ADDSconst [c] (SLL <x.Type> x y))
  2424  	for {
  2425  		y := v.Args[2]
  2426  		v_0 := v.Args[0]
  2427  		if v_0.Op != OpARMMOVWconst {
  2428  			break
  2429  		}
  2430  		c := v_0.AuxInt
  2431  		x := v.Args[1]
  2432  		v.reset(OpARMADDSconst)
  2433  		v.AuxInt = c
  2434  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  2435  		v0.AddArg(x)
  2436  		v0.AddArg(y)
  2437  		v.AddArg(v0)
  2438  		return true
  2439  	}
  2440  	// match: (ADDSshiftLLreg x y (MOVWconst [c]))
  2441  	// result: (ADDSshiftLL x y [c])
  2442  	for {
  2443  		_ = v.Args[2]
  2444  		x := v.Args[0]
  2445  		y := v.Args[1]
  2446  		v_2 := v.Args[2]
  2447  		if v_2.Op != OpARMMOVWconst {
  2448  			break
  2449  		}
  2450  		c := v_2.AuxInt
  2451  		v.reset(OpARMADDSshiftLL)
  2452  		v.AuxInt = c
  2453  		v.AddArg(x)
  2454  		v.AddArg(y)
  2455  		return true
  2456  	}
  2457  	return false
  2458  }
  2459  func rewriteValueARM_OpARMADDSshiftRA_0(v *Value) bool {
  2460  	b := v.Block
  2461  	// match: (ADDSshiftRA (MOVWconst [c]) x [d])
  2462  	// result: (ADDSconst [c] (SRAconst <x.Type> x [d]))
  2463  	for {
  2464  		d := v.AuxInt
  2465  		x := v.Args[1]
  2466  		v_0 := v.Args[0]
  2467  		if v_0.Op != OpARMMOVWconst {
  2468  			break
  2469  		}
  2470  		c := v_0.AuxInt
  2471  		v.reset(OpARMADDSconst)
  2472  		v.AuxInt = c
  2473  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  2474  		v0.AuxInt = d
  2475  		v0.AddArg(x)
  2476  		v.AddArg(v0)
  2477  		return true
  2478  	}
  2479  	// match: (ADDSshiftRA x (MOVWconst [c]) [d])
  2480  	// result: (ADDSconst x [int64(int32(c)>>uint64(d))])
  2481  	for {
  2482  		d := v.AuxInt
  2483  		_ = v.Args[1]
  2484  		x := v.Args[0]
  2485  		v_1 := v.Args[1]
  2486  		if v_1.Op != OpARMMOVWconst {
  2487  			break
  2488  		}
  2489  		c := v_1.AuxInt
  2490  		v.reset(OpARMADDSconst)
  2491  		v.AuxInt = int64(int32(c) >> uint64(d))
  2492  		v.AddArg(x)
  2493  		return true
  2494  	}
  2495  	return false
  2496  }
  2497  func rewriteValueARM_OpARMADDSshiftRAreg_0(v *Value) bool {
  2498  	b := v.Block
  2499  	// match: (ADDSshiftRAreg (MOVWconst [c]) x y)
  2500  	// result: (ADDSconst [c] (SRA <x.Type> x y))
  2501  	for {
  2502  		y := v.Args[2]
  2503  		v_0 := v.Args[0]
  2504  		if v_0.Op != OpARMMOVWconst {
  2505  			break
  2506  		}
  2507  		c := v_0.AuxInt
  2508  		x := v.Args[1]
  2509  		v.reset(OpARMADDSconst)
  2510  		v.AuxInt = c
  2511  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  2512  		v0.AddArg(x)
  2513  		v0.AddArg(y)
  2514  		v.AddArg(v0)
  2515  		return true
  2516  	}
  2517  	// match: (ADDSshiftRAreg x y (MOVWconst [c]))
  2518  	// result: (ADDSshiftRA x y [c])
  2519  	for {
  2520  		_ = v.Args[2]
  2521  		x := v.Args[0]
  2522  		y := v.Args[1]
  2523  		v_2 := v.Args[2]
  2524  		if v_2.Op != OpARMMOVWconst {
  2525  			break
  2526  		}
  2527  		c := v_2.AuxInt
  2528  		v.reset(OpARMADDSshiftRA)
  2529  		v.AuxInt = c
  2530  		v.AddArg(x)
  2531  		v.AddArg(y)
  2532  		return true
  2533  	}
  2534  	return false
  2535  }
  2536  func rewriteValueARM_OpARMADDSshiftRL_0(v *Value) bool {
  2537  	b := v.Block
  2538  	// match: (ADDSshiftRL (MOVWconst [c]) x [d])
  2539  	// result: (ADDSconst [c] (SRLconst <x.Type> x [d]))
  2540  	for {
  2541  		d := v.AuxInt
  2542  		x := v.Args[1]
  2543  		v_0 := v.Args[0]
  2544  		if v_0.Op != OpARMMOVWconst {
  2545  			break
  2546  		}
  2547  		c := v_0.AuxInt
  2548  		v.reset(OpARMADDSconst)
  2549  		v.AuxInt = c
  2550  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  2551  		v0.AuxInt = d
  2552  		v0.AddArg(x)
  2553  		v.AddArg(v0)
  2554  		return true
  2555  	}
  2556  	// match: (ADDSshiftRL x (MOVWconst [c]) [d])
  2557  	// result: (ADDSconst x [int64(int32(uint32(c)>>uint64(d)))])
  2558  	for {
  2559  		d := v.AuxInt
  2560  		_ = v.Args[1]
  2561  		x := v.Args[0]
  2562  		v_1 := v.Args[1]
  2563  		if v_1.Op != OpARMMOVWconst {
  2564  			break
  2565  		}
  2566  		c := v_1.AuxInt
  2567  		v.reset(OpARMADDSconst)
  2568  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  2569  		v.AddArg(x)
  2570  		return true
  2571  	}
  2572  	return false
  2573  }
  2574  func rewriteValueARM_OpARMADDSshiftRLreg_0(v *Value) bool {
  2575  	b := v.Block
  2576  	// match: (ADDSshiftRLreg (MOVWconst [c]) x y)
  2577  	// result: (ADDSconst [c] (SRL <x.Type> x y))
  2578  	for {
  2579  		y := v.Args[2]
  2580  		v_0 := v.Args[0]
  2581  		if v_0.Op != OpARMMOVWconst {
  2582  			break
  2583  		}
  2584  		c := v_0.AuxInt
  2585  		x := v.Args[1]
  2586  		v.reset(OpARMADDSconst)
  2587  		v.AuxInt = c
  2588  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  2589  		v0.AddArg(x)
  2590  		v0.AddArg(y)
  2591  		v.AddArg(v0)
  2592  		return true
  2593  	}
  2594  	// match: (ADDSshiftRLreg x y (MOVWconst [c]))
  2595  	// result: (ADDSshiftRL x y [c])
  2596  	for {
  2597  		_ = v.Args[2]
  2598  		x := v.Args[0]
  2599  		y := v.Args[1]
  2600  		v_2 := v.Args[2]
  2601  		if v_2.Op != OpARMMOVWconst {
  2602  			break
  2603  		}
  2604  		c := v_2.AuxInt
  2605  		v.reset(OpARMADDSshiftRL)
  2606  		v.AuxInt = c
  2607  		v.AddArg(x)
  2608  		v.AddArg(y)
  2609  		return true
  2610  	}
  2611  	return false
  2612  }
  2613  func rewriteValueARM_OpARMADDconst_0(v *Value) bool {
  2614  	// match: (ADDconst [off1] (MOVWaddr [off2] {sym} ptr))
  2615  	// result: (MOVWaddr [off1+off2] {sym} ptr)
  2616  	for {
  2617  		off1 := v.AuxInt
  2618  		v_0 := v.Args[0]
  2619  		if v_0.Op != OpARMMOVWaddr {
  2620  			break
  2621  		}
  2622  		off2 := v_0.AuxInt
  2623  		sym := v_0.Aux
  2624  		ptr := v_0.Args[0]
  2625  		v.reset(OpARMMOVWaddr)
  2626  		v.AuxInt = off1 + off2
  2627  		v.Aux = sym
  2628  		v.AddArg(ptr)
  2629  		return true
  2630  	}
  2631  	// match: (ADDconst [0] x)
  2632  	// result: x
  2633  	for {
  2634  		if v.AuxInt != 0 {
  2635  			break
  2636  		}
  2637  		x := v.Args[0]
  2638  		v.reset(OpCopy)
  2639  		v.Type = x.Type
  2640  		v.AddArg(x)
  2641  		return true
  2642  	}
  2643  	// match: (ADDconst [c] x)
  2644  	// cond: !isARMImmRot(uint32(c)) && isARMImmRot(uint32(-c))
  2645  	// result: (SUBconst [int64(int32(-c))] x)
  2646  	for {
  2647  		c := v.AuxInt
  2648  		x := v.Args[0]
  2649  		if !(!isARMImmRot(uint32(c)) && isARMImmRot(uint32(-c))) {
  2650  			break
  2651  		}
  2652  		v.reset(OpARMSUBconst)
  2653  		v.AuxInt = int64(int32(-c))
  2654  		v.AddArg(x)
  2655  		return true
  2656  	}
  2657  	// match: (ADDconst [c] x)
  2658  	// cond: objabi.GOARM==7 && !isARMImmRot(uint32(c)) && uint32(c)>0xffff && uint32(-c)<=0xffff
  2659  	// result: (SUBconst [int64(int32(-c))] x)
  2660  	for {
  2661  		c := v.AuxInt
  2662  		x := v.Args[0]
  2663  		if !(objabi.GOARM == 7 && !isARMImmRot(uint32(c)) && uint32(c) > 0xffff && uint32(-c) <= 0xffff) {
  2664  			break
  2665  		}
  2666  		v.reset(OpARMSUBconst)
  2667  		v.AuxInt = int64(int32(-c))
  2668  		v.AddArg(x)
  2669  		return true
  2670  	}
  2671  	// match: (ADDconst [c] (MOVWconst [d]))
  2672  	// result: (MOVWconst [int64(int32(c+d))])
  2673  	for {
  2674  		c := v.AuxInt
  2675  		v_0 := v.Args[0]
  2676  		if v_0.Op != OpARMMOVWconst {
  2677  			break
  2678  		}
  2679  		d := v_0.AuxInt
  2680  		v.reset(OpARMMOVWconst)
  2681  		v.AuxInt = int64(int32(c + d))
  2682  		return true
  2683  	}
  2684  	// match: (ADDconst [c] (ADDconst [d] x))
  2685  	// result: (ADDconst [int64(int32(c+d))] x)
  2686  	for {
  2687  		c := v.AuxInt
  2688  		v_0 := v.Args[0]
  2689  		if v_0.Op != OpARMADDconst {
  2690  			break
  2691  		}
  2692  		d := v_0.AuxInt
  2693  		x := v_0.Args[0]
  2694  		v.reset(OpARMADDconst)
  2695  		v.AuxInt = int64(int32(c + d))
  2696  		v.AddArg(x)
  2697  		return true
  2698  	}
  2699  	// match: (ADDconst [c] (SUBconst [d] x))
  2700  	// result: (ADDconst [int64(int32(c-d))] x)
  2701  	for {
  2702  		c := v.AuxInt
  2703  		v_0 := v.Args[0]
  2704  		if v_0.Op != OpARMSUBconst {
  2705  			break
  2706  		}
  2707  		d := v_0.AuxInt
  2708  		x := v_0.Args[0]
  2709  		v.reset(OpARMADDconst)
  2710  		v.AuxInt = int64(int32(c - d))
  2711  		v.AddArg(x)
  2712  		return true
  2713  	}
  2714  	// match: (ADDconst [c] (RSBconst [d] x))
  2715  	// result: (RSBconst [int64(int32(c+d))] x)
  2716  	for {
  2717  		c := v.AuxInt
  2718  		v_0 := v.Args[0]
  2719  		if v_0.Op != OpARMRSBconst {
  2720  			break
  2721  		}
  2722  		d := v_0.AuxInt
  2723  		x := v_0.Args[0]
  2724  		v.reset(OpARMRSBconst)
  2725  		v.AuxInt = int64(int32(c + d))
  2726  		v.AddArg(x)
  2727  		return true
  2728  	}
  2729  	return false
  2730  }
  2731  func rewriteValueARM_OpARMADDshiftLL_0(v *Value) bool {
  2732  	b := v.Block
  2733  	typ := &b.Func.Config.Types
  2734  	// match: (ADDshiftLL (MOVWconst [c]) x [d])
  2735  	// result: (ADDconst [c] (SLLconst <x.Type> x [d]))
  2736  	for {
  2737  		d := v.AuxInt
  2738  		x := v.Args[1]
  2739  		v_0 := v.Args[0]
  2740  		if v_0.Op != OpARMMOVWconst {
  2741  			break
  2742  		}
  2743  		c := v_0.AuxInt
  2744  		v.reset(OpARMADDconst)
  2745  		v.AuxInt = c
  2746  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  2747  		v0.AuxInt = d
  2748  		v0.AddArg(x)
  2749  		v.AddArg(v0)
  2750  		return true
  2751  	}
  2752  	// match: (ADDshiftLL x (MOVWconst [c]) [d])
  2753  	// result: (ADDconst x [int64(int32(uint32(c)<<uint64(d)))])
  2754  	for {
  2755  		d := v.AuxInt
  2756  		_ = v.Args[1]
  2757  		x := v.Args[0]
  2758  		v_1 := v.Args[1]
  2759  		if v_1.Op != OpARMMOVWconst {
  2760  			break
  2761  		}
  2762  		c := v_1.AuxInt
  2763  		v.reset(OpARMADDconst)
  2764  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  2765  		v.AddArg(x)
  2766  		return true
  2767  	}
  2768  	// match: (ADDshiftLL [c] (SRLconst x [32-c]) x)
  2769  	// result: (SRRconst [32-c] x)
  2770  	for {
  2771  		c := v.AuxInt
  2772  		x := v.Args[1]
  2773  		v_0 := v.Args[0]
  2774  		if v_0.Op != OpARMSRLconst || v_0.AuxInt != 32-c || x != v_0.Args[0] {
  2775  			break
  2776  		}
  2777  		v.reset(OpARMSRRconst)
  2778  		v.AuxInt = 32 - c
  2779  		v.AddArg(x)
  2780  		return true
  2781  	}
  2782  	// match: (ADDshiftLL <typ.UInt16> [8] (BFXU <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
  2783  	// result: (REV16 x)
  2784  	for {
  2785  		if v.Type != typ.UInt16 || v.AuxInt != 8 {
  2786  			break
  2787  		}
  2788  		x := v.Args[1]
  2789  		v_0 := v.Args[0]
  2790  		if v_0.Op != OpARMBFXU || v_0.Type != typ.UInt16 || v_0.AuxInt != armBFAuxInt(8, 8) || x != v_0.Args[0] {
  2791  			break
  2792  		}
  2793  		v.reset(OpARMREV16)
  2794  		v.AddArg(x)
  2795  		return true
  2796  	}
  2797  	// match: (ADDshiftLL <typ.UInt16> [8] (SRLconst <typ.UInt16> [24] (SLLconst [16] x)) x)
  2798  	// cond: objabi.GOARM>=6
  2799  	// result: (REV16 x)
  2800  	for {
  2801  		if v.Type != typ.UInt16 || v.AuxInt != 8 {
  2802  			break
  2803  		}
  2804  		x := v.Args[1]
  2805  		v_0 := v.Args[0]
  2806  		if v_0.Op != OpARMSRLconst || v_0.Type != typ.UInt16 || v_0.AuxInt != 24 {
  2807  			break
  2808  		}
  2809  		v_0_0 := v_0.Args[0]
  2810  		if v_0_0.Op != OpARMSLLconst || v_0_0.AuxInt != 16 || x != v_0_0.Args[0] || !(objabi.GOARM >= 6) {
  2811  			break
  2812  		}
  2813  		v.reset(OpARMREV16)
  2814  		v.AddArg(x)
  2815  		return true
  2816  	}
  2817  	return false
  2818  }
  2819  func rewriteValueARM_OpARMADDshiftLLreg_0(v *Value) bool {
  2820  	b := v.Block
  2821  	// match: (ADDshiftLLreg (MOVWconst [c]) x y)
  2822  	// result: (ADDconst [c] (SLL <x.Type> x y))
  2823  	for {
  2824  		y := v.Args[2]
  2825  		v_0 := v.Args[0]
  2826  		if v_0.Op != OpARMMOVWconst {
  2827  			break
  2828  		}
  2829  		c := v_0.AuxInt
  2830  		x := v.Args[1]
  2831  		v.reset(OpARMADDconst)
  2832  		v.AuxInt = c
  2833  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  2834  		v0.AddArg(x)
  2835  		v0.AddArg(y)
  2836  		v.AddArg(v0)
  2837  		return true
  2838  	}
  2839  	// match: (ADDshiftLLreg x y (MOVWconst [c]))
  2840  	// result: (ADDshiftLL x y [c])
  2841  	for {
  2842  		_ = v.Args[2]
  2843  		x := v.Args[0]
  2844  		y := v.Args[1]
  2845  		v_2 := v.Args[2]
  2846  		if v_2.Op != OpARMMOVWconst {
  2847  			break
  2848  		}
  2849  		c := v_2.AuxInt
  2850  		v.reset(OpARMADDshiftLL)
  2851  		v.AuxInt = c
  2852  		v.AddArg(x)
  2853  		v.AddArg(y)
  2854  		return true
  2855  	}
  2856  	return false
  2857  }
  2858  func rewriteValueARM_OpARMADDshiftRA_0(v *Value) bool {
  2859  	b := v.Block
  2860  	// match: (ADDshiftRA (MOVWconst [c]) x [d])
  2861  	// result: (ADDconst [c] (SRAconst <x.Type> x [d]))
  2862  	for {
  2863  		d := v.AuxInt
  2864  		x := v.Args[1]
  2865  		v_0 := v.Args[0]
  2866  		if v_0.Op != OpARMMOVWconst {
  2867  			break
  2868  		}
  2869  		c := v_0.AuxInt
  2870  		v.reset(OpARMADDconst)
  2871  		v.AuxInt = c
  2872  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  2873  		v0.AuxInt = d
  2874  		v0.AddArg(x)
  2875  		v.AddArg(v0)
  2876  		return true
  2877  	}
  2878  	// match: (ADDshiftRA x (MOVWconst [c]) [d])
  2879  	// result: (ADDconst x [int64(int32(c)>>uint64(d))])
  2880  	for {
  2881  		d := v.AuxInt
  2882  		_ = v.Args[1]
  2883  		x := v.Args[0]
  2884  		v_1 := v.Args[1]
  2885  		if v_1.Op != OpARMMOVWconst {
  2886  			break
  2887  		}
  2888  		c := v_1.AuxInt
  2889  		v.reset(OpARMADDconst)
  2890  		v.AuxInt = int64(int32(c) >> uint64(d))
  2891  		v.AddArg(x)
  2892  		return true
  2893  	}
  2894  	return false
  2895  }
  2896  func rewriteValueARM_OpARMADDshiftRAreg_0(v *Value) bool {
  2897  	b := v.Block
  2898  	// match: (ADDshiftRAreg (MOVWconst [c]) x y)
  2899  	// result: (ADDconst [c] (SRA <x.Type> x y))
  2900  	for {
  2901  		y := v.Args[2]
  2902  		v_0 := v.Args[0]
  2903  		if v_0.Op != OpARMMOVWconst {
  2904  			break
  2905  		}
  2906  		c := v_0.AuxInt
  2907  		x := v.Args[1]
  2908  		v.reset(OpARMADDconst)
  2909  		v.AuxInt = c
  2910  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  2911  		v0.AddArg(x)
  2912  		v0.AddArg(y)
  2913  		v.AddArg(v0)
  2914  		return true
  2915  	}
  2916  	// match: (ADDshiftRAreg x y (MOVWconst [c]))
  2917  	// result: (ADDshiftRA x y [c])
  2918  	for {
  2919  		_ = v.Args[2]
  2920  		x := v.Args[0]
  2921  		y := v.Args[1]
  2922  		v_2 := v.Args[2]
  2923  		if v_2.Op != OpARMMOVWconst {
  2924  			break
  2925  		}
  2926  		c := v_2.AuxInt
  2927  		v.reset(OpARMADDshiftRA)
  2928  		v.AuxInt = c
  2929  		v.AddArg(x)
  2930  		v.AddArg(y)
  2931  		return true
  2932  	}
  2933  	return false
  2934  }
  2935  func rewriteValueARM_OpARMADDshiftRL_0(v *Value) bool {
  2936  	b := v.Block
  2937  	// match: (ADDshiftRL (MOVWconst [c]) x [d])
  2938  	// result: (ADDconst [c] (SRLconst <x.Type> x [d]))
  2939  	for {
  2940  		d := v.AuxInt
  2941  		x := v.Args[1]
  2942  		v_0 := v.Args[0]
  2943  		if v_0.Op != OpARMMOVWconst {
  2944  			break
  2945  		}
  2946  		c := v_0.AuxInt
  2947  		v.reset(OpARMADDconst)
  2948  		v.AuxInt = c
  2949  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  2950  		v0.AuxInt = d
  2951  		v0.AddArg(x)
  2952  		v.AddArg(v0)
  2953  		return true
  2954  	}
  2955  	// match: (ADDshiftRL x (MOVWconst [c]) [d])
  2956  	// result: (ADDconst x [int64(int32(uint32(c)>>uint64(d)))])
  2957  	for {
  2958  		d := v.AuxInt
  2959  		_ = v.Args[1]
  2960  		x := v.Args[0]
  2961  		v_1 := v.Args[1]
  2962  		if v_1.Op != OpARMMOVWconst {
  2963  			break
  2964  		}
  2965  		c := v_1.AuxInt
  2966  		v.reset(OpARMADDconst)
  2967  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  2968  		v.AddArg(x)
  2969  		return true
  2970  	}
  2971  	// match: (ADDshiftRL [c] (SLLconst x [32-c]) x)
  2972  	// result: (SRRconst [ c] x)
  2973  	for {
  2974  		c := v.AuxInt
  2975  		x := v.Args[1]
  2976  		v_0 := v.Args[0]
  2977  		if v_0.Op != OpARMSLLconst || v_0.AuxInt != 32-c || x != v_0.Args[0] {
  2978  			break
  2979  		}
  2980  		v.reset(OpARMSRRconst)
  2981  		v.AuxInt = c
  2982  		v.AddArg(x)
  2983  		return true
  2984  	}
  2985  	return false
  2986  }
  2987  func rewriteValueARM_OpARMADDshiftRLreg_0(v *Value) bool {
  2988  	b := v.Block
  2989  	// match: (ADDshiftRLreg (MOVWconst [c]) x y)
  2990  	// result: (ADDconst [c] (SRL <x.Type> x y))
  2991  	for {
  2992  		y := v.Args[2]
  2993  		v_0 := v.Args[0]
  2994  		if v_0.Op != OpARMMOVWconst {
  2995  			break
  2996  		}
  2997  		c := v_0.AuxInt
  2998  		x := v.Args[1]
  2999  		v.reset(OpARMADDconst)
  3000  		v.AuxInt = c
  3001  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  3002  		v0.AddArg(x)
  3003  		v0.AddArg(y)
  3004  		v.AddArg(v0)
  3005  		return true
  3006  	}
  3007  	// match: (ADDshiftRLreg x y (MOVWconst [c]))
  3008  	// result: (ADDshiftRL x y [c])
  3009  	for {
  3010  		_ = v.Args[2]
  3011  		x := v.Args[0]
  3012  		y := v.Args[1]
  3013  		v_2 := v.Args[2]
  3014  		if v_2.Op != OpARMMOVWconst {
  3015  			break
  3016  		}
  3017  		c := v_2.AuxInt
  3018  		v.reset(OpARMADDshiftRL)
  3019  		v.AuxInt = c
  3020  		v.AddArg(x)
  3021  		v.AddArg(y)
  3022  		return true
  3023  	}
  3024  	return false
  3025  }
  3026  func rewriteValueARM_OpARMAND_0(v *Value) bool {
  3027  	// match: (AND x (MOVWconst [c]))
  3028  	// result: (ANDconst [c] x)
  3029  	for {
  3030  		_ = v.Args[1]
  3031  		x := v.Args[0]
  3032  		v_1 := v.Args[1]
  3033  		if v_1.Op != OpARMMOVWconst {
  3034  			break
  3035  		}
  3036  		c := v_1.AuxInt
  3037  		v.reset(OpARMANDconst)
  3038  		v.AuxInt = c
  3039  		v.AddArg(x)
  3040  		return true
  3041  	}
  3042  	// match: (AND (MOVWconst [c]) x)
  3043  	// result: (ANDconst [c] x)
  3044  	for {
  3045  		x := v.Args[1]
  3046  		v_0 := v.Args[0]
  3047  		if v_0.Op != OpARMMOVWconst {
  3048  			break
  3049  		}
  3050  		c := v_0.AuxInt
  3051  		v.reset(OpARMANDconst)
  3052  		v.AuxInt = c
  3053  		v.AddArg(x)
  3054  		return true
  3055  	}
  3056  	// match: (AND x (SLLconst [c] y))
  3057  	// result: (ANDshiftLL x y [c])
  3058  	for {
  3059  		_ = v.Args[1]
  3060  		x := v.Args[0]
  3061  		v_1 := v.Args[1]
  3062  		if v_1.Op != OpARMSLLconst {
  3063  			break
  3064  		}
  3065  		c := v_1.AuxInt
  3066  		y := v_1.Args[0]
  3067  		v.reset(OpARMANDshiftLL)
  3068  		v.AuxInt = c
  3069  		v.AddArg(x)
  3070  		v.AddArg(y)
  3071  		return true
  3072  	}
  3073  	// match: (AND (SLLconst [c] y) x)
  3074  	// result: (ANDshiftLL x y [c])
  3075  	for {
  3076  		x := v.Args[1]
  3077  		v_0 := v.Args[0]
  3078  		if v_0.Op != OpARMSLLconst {
  3079  			break
  3080  		}
  3081  		c := v_0.AuxInt
  3082  		y := v_0.Args[0]
  3083  		v.reset(OpARMANDshiftLL)
  3084  		v.AuxInt = c
  3085  		v.AddArg(x)
  3086  		v.AddArg(y)
  3087  		return true
  3088  	}
  3089  	// match: (AND x (SRLconst [c] y))
  3090  	// result: (ANDshiftRL x y [c])
  3091  	for {
  3092  		_ = v.Args[1]
  3093  		x := v.Args[0]
  3094  		v_1 := v.Args[1]
  3095  		if v_1.Op != OpARMSRLconst {
  3096  			break
  3097  		}
  3098  		c := v_1.AuxInt
  3099  		y := v_1.Args[0]
  3100  		v.reset(OpARMANDshiftRL)
  3101  		v.AuxInt = c
  3102  		v.AddArg(x)
  3103  		v.AddArg(y)
  3104  		return true
  3105  	}
  3106  	// match: (AND (SRLconst [c] y) x)
  3107  	// result: (ANDshiftRL x y [c])
  3108  	for {
  3109  		x := v.Args[1]
  3110  		v_0 := v.Args[0]
  3111  		if v_0.Op != OpARMSRLconst {
  3112  			break
  3113  		}
  3114  		c := v_0.AuxInt
  3115  		y := v_0.Args[0]
  3116  		v.reset(OpARMANDshiftRL)
  3117  		v.AuxInt = c
  3118  		v.AddArg(x)
  3119  		v.AddArg(y)
  3120  		return true
  3121  	}
  3122  	// match: (AND x (SRAconst [c] y))
  3123  	// result: (ANDshiftRA x y [c])
  3124  	for {
  3125  		_ = v.Args[1]
  3126  		x := v.Args[0]
  3127  		v_1 := v.Args[1]
  3128  		if v_1.Op != OpARMSRAconst {
  3129  			break
  3130  		}
  3131  		c := v_1.AuxInt
  3132  		y := v_1.Args[0]
  3133  		v.reset(OpARMANDshiftRA)
  3134  		v.AuxInt = c
  3135  		v.AddArg(x)
  3136  		v.AddArg(y)
  3137  		return true
  3138  	}
  3139  	// match: (AND (SRAconst [c] y) x)
  3140  	// result: (ANDshiftRA x y [c])
  3141  	for {
  3142  		x := v.Args[1]
  3143  		v_0 := v.Args[0]
  3144  		if v_0.Op != OpARMSRAconst {
  3145  			break
  3146  		}
  3147  		c := v_0.AuxInt
  3148  		y := v_0.Args[0]
  3149  		v.reset(OpARMANDshiftRA)
  3150  		v.AuxInt = c
  3151  		v.AddArg(x)
  3152  		v.AddArg(y)
  3153  		return true
  3154  	}
  3155  	// match: (AND x (SLL y z))
  3156  	// result: (ANDshiftLLreg x y z)
  3157  	for {
  3158  		_ = v.Args[1]
  3159  		x := v.Args[0]
  3160  		v_1 := v.Args[1]
  3161  		if v_1.Op != OpARMSLL {
  3162  			break
  3163  		}
  3164  		z := v_1.Args[1]
  3165  		y := v_1.Args[0]
  3166  		v.reset(OpARMANDshiftLLreg)
  3167  		v.AddArg(x)
  3168  		v.AddArg(y)
  3169  		v.AddArg(z)
  3170  		return true
  3171  	}
  3172  	// match: (AND (SLL y z) x)
  3173  	// result: (ANDshiftLLreg x y z)
  3174  	for {
  3175  		x := v.Args[1]
  3176  		v_0 := v.Args[0]
  3177  		if v_0.Op != OpARMSLL {
  3178  			break
  3179  		}
  3180  		z := v_0.Args[1]
  3181  		y := v_0.Args[0]
  3182  		v.reset(OpARMANDshiftLLreg)
  3183  		v.AddArg(x)
  3184  		v.AddArg(y)
  3185  		v.AddArg(z)
  3186  		return true
  3187  	}
  3188  	return false
  3189  }
  3190  func rewriteValueARM_OpARMAND_10(v *Value) bool {
  3191  	// match: (AND x (SRL y z))
  3192  	// result: (ANDshiftRLreg x y z)
  3193  	for {
  3194  		_ = v.Args[1]
  3195  		x := v.Args[0]
  3196  		v_1 := v.Args[1]
  3197  		if v_1.Op != OpARMSRL {
  3198  			break
  3199  		}
  3200  		z := v_1.Args[1]
  3201  		y := v_1.Args[0]
  3202  		v.reset(OpARMANDshiftRLreg)
  3203  		v.AddArg(x)
  3204  		v.AddArg(y)
  3205  		v.AddArg(z)
  3206  		return true
  3207  	}
  3208  	// match: (AND (SRL y z) x)
  3209  	// result: (ANDshiftRLreg x y z)
  3210  	for {
  3211  		x := v.Args[1]
  3212  		v_0 := v.Args[0]
  3213  		if v_0.Op != OpARMSRL {
  3214  			break
  3215  		}
  3216  		z := v_0.Args[1]
  3217  		y := v_0.Args[0]
  3218  		v.reset(OpARMANDshiftRLreg)
  3219  		v.AddArg(x)
  3220  		v.AddArg(y)
  3221  		v.AddArg(z)
  3222  		return true
  3223  	}
  3224  	// match: (AND x (SRA y z))
  3225  	// result: (ANDshiftRAreg x y z)
  3226  	for {
  3227  		_ = v.Args[1]
  3228  		x := v.Args[0]
  3229  		v_1 := v.Args[1]
  3230  		if v_1.Op != OpARMSRA {
  3231  			break
  3232  		}
  3233  		z := v_1.Args[1]
  3234  		y := v_1.Args[0]
  3235  		v.reset(OpARMANDshiftRAreg)
  3236  		v.AddArg(x)
  3237  		v.AddArg(y)
  3238  		v.AddArg(z)
  3239  		return true
  3240  	}
  3241  	// match: (AND (SRA y z) x)
  3242  	// result: (ANDshiftRAreg x y z)
  3243  	for {
  3244  		x := v.Args[1]
  3245  		v_0 := v.Args[0]
  3246  		if v_0.Op != OpARMSRA {
  3247  			break
  3248  		}
  3249  		z := v_0.Args[1]
  3250  		y := v_0.Args[0]
  3251  		v.reset(OpARMANDshiftRAreg)
  3252  		v.AddArg(x)
  3253  		v.AddArg(y)
  3254  		v.AddArg(z)
  3255  		return true
  3256  	}
  3257  	// match: (AND x x)
  3258  	// result: x
  3259  	for {
  3260  		x := v.Args[1]
  3261  		if x != v.Args[0] {
  3262  			break
  3263  		}
  3264  		v.reset(OpCopy)
  3265  		v.Type = x.Type
  3266  		v.AddArg(x)
  3267  		return true
  3268  	}
  3269  	// match: (AND x (MVN y))
  3270  	// result: (BIC x y)
  3271  	for {
  3272  		_ = v.Args[1]
  3273  		x := v.Args[0]
  3274  		v_1 := v.Args[1]
  3275  		if v_1.Op != OpARMMVN {
  3276  			break
  3277  		}
  3278  		y := v_1.Args[0]
  3279  		v.reset(OpARMBIC)
  3280  		v.AddArg(x)
  3281  		v.AddArg(y)
  3282  		return true
  3283  	}
  3284  	// match: (AND (MVN y) x)
  3285  	// result: (BIC x y)
  3286  	for {
  3287  		x := v.Args[1]
  3288  		v_0 := v.Args[0]
  3289  		if v_0.Op != OpARMMVN {
  3290  			break
  3291  		}
  3292  		y := v_0.Args[0]
  3293  		v.reset(OpARMBIC)
  3294  		v.AddArg(x)
  3295  		v.AddArg(y)
  3296  		return true
  3297  	}
  3298  	// match: (AND x (MVNshiftLL y [c]))
  3299  	// result: (BICshiftLL x y [c])
  3300  	for {
  3301  		_ = v.Args[1]
  3302  		x := v.Args[0]
  3303  		v_1 := v.Args[1]
  3304  		if v_1.Op != OpARMMVNshiftLL {
  3305  			break
  3306  		}
  3307  		c := v_1.AuxInt
  3308  		y := v_1.Args[0]
  3309  		v.reset(OpARMBICshiftLL)
  3310  		v.AuxInt = c
  3311  		v.AddArg(x)
  3312  		v.AddArg(y)
  3313  		return true
  3314  	}
  3315  	// match: (AND (MVNshiftLL y [c]) x)
  3316  	// result: (BICshiftLL x y [c])
  3317  	for {
  3318  		x := v.Args[1]
  3319  		v_0 := v.Args[0]
  3320  		if v_0.Op != OpARMMVNshiftLL {
  3321  			break
  3322  		}
  3323  		c := v_0.AuxInt
  3324  		y := v_0.Args[0]
  3325  		v.reset(OpARMBICshiftLL)
  3326  		v.AuxInt = c
  3327  		v.AddArg(x)
  3328  		v.AddArg(y)
  3329  		return true
  3330  	}
  3331  	// match: (AND x (MVNshiftRL y [c]))
  3332  	// result: (BICshiftRL x y [c])
  3333  	for {
  3334  		_ = v.Args[1]
  3335  		x := v.Args[0]
  3336  		v_1 := v.Args[1]
  3337  		if v_1.Op != OpARMMVNshiftRL {
  3338  			break
  3339  		}
  3340  		c := v_1.AuxInt
  3341  		y := v_1.Args[0]
  3342  		v.reset(OpARMBICshiftRL)
  3343  		v.AuxInt = c
  3344  		v.AddArg(x)
  3345  		v.AddArg(y)
  3346  		return true
  3347  	}
  3348  	return false
  3349  }
  3350  func rewriteValueARM_OpARMAND_20(v *Value) bool {
  3351  	// match: (AND (MVNshiftRL y [c]) x)
  3352  	// result: (BICshiftRL x y [c])
  3353  	for {
  3354  		x := v.Args[1]
  3355  		v_0 := v.Args[0]
  3356  		if v_0.Op != OpARMMVNshiftRL {
  3357  			break
  3358  		}
  3359  		c := v_0.AuxInt
  3360  		y := v_0.Args[0]
  3361  		v.reset(OpARMBICshiftRL)
  3362  		v.AuxInt = c
  3363  		v.AddArg(x)
  3364  		v.AddArg(y)
  3365  		return true
  3366  	}
  3367  	// match: (AND x (MVNshiftRA y [c]))
  3368  	// result: (BICshiftRA x y [c])
  3369  	for {
  3370  		_ = v.Args[1]
  3371  		x := v.Args[0]
  3372  		v_1 := v.Args[1]
  3373  		if v_1.Op != OpARMMVNshiftRA {
  3374  			break
  3375  		}
  3376  		c := v_1.AuxInt
  3377  		y := v_1.Args[0]
  3378  		v.reset(OpARMBICshiftRA)
  3379  		v.AuxInt = c
  3380  		v.AddArg(x)
  3381  		v.AddArg(y)
  3382  		return true
  3383  	}
  3384  	// match: (AND (MVNshiftRA y [c]) x)
  3385  	// result: (BICshiftRA x y [c])
  3386  	for {
  3387  		x := v.Args[1]
  3388  		v_0 := v.Args[0]
  3389  		if v_0.Op != OpARMMVNshiftRA {
  3390  			break
  3391  		}
  3392  		c := v_0.AuxInt
  3393  		y := v_0.Args[0]
  3394  		v.reset(OpARMBICshiftRA)
  3395  		v.AuxInt = c
  3396  		v.AddArg(x)
  3397  		v.AddArg(y)
  3398  		return true
  3399  	}
  3400  	return false
  3401  }
  3402  func rewriteValueARM_OpARMANDconst_0(v *Value) bool {
  3403  	// match: (ANDconst [0] _)
  3404  	// result: (MOVWconst [0])
  3405  	for {
  3406  		if v.AuxInt != 0 {
  3407  			break
  3408  		}
  3409  		v.reset(OpARMMOVWconst)
  3410  		v.AuxInt = 0
  3411  		return true
  3412  	}
  3413  	// match: (ANDconst [c] x)
  3414  	// cond: int32(c)==-1
  3415  	// result: x
  3416  	for {
  3417  		c := v.AuxInt
  3418  		x := v.Args[0]
  3419  		if !(int32(c) == -1) {
  3420  			break
  3421  		}
  3422  		v.reset(OpCopy)
  3423  		v.Type = x.Type
  3424  		v.AddArg(x)
  3425  		return true
  3426  	}
  3427  	// match: (ANDconst [c] x)
  3428  	// cond: !isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))
  3429  	// result: (BICconst [int64(int32(^uint32(c)))] x)
  3430  	for {
  3431  		c := v.AuxInt
  3432  		x := v.Args[0]
  3433  		if !(!isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))) {
  3434  			break
  3435  		}
  3436  		v.reset(OpARMBICconst)
  3437  		v.AuxInt = int64(int32(^uint32(c)))
  3438  		v.AddArg(x)
  3439  		return true
  3440  	}
  3441  	// match: (ANDconst [c] x)
  3442  	// cond: objabi.GOARM==7 && !isARMImmRot(uint32(c)) && uint32(c)>0xffff && ^uint32(c)<=0xffff
  3443  	// result: (BICconst [int64(int32(^uint32(c)))] x)
  3444  	for {
  3445  		c := v.AuxInt
  3446  		x := v.Args[0]
  3447  		if !(objabi.GOARM == 7 && !isARMImmRot(uint32(c)) && uint32(c) > 0xffff && ^uint32(c) <= 0xffff) {
  3448  			break
  3449  		}
  3450  		v.reset(OpARMBICconst)
  3451  		v.AuxInt = int64(int32(^uint32(c)))
  3452  		v.AddArg(x)
  3453  		return true
  3454  	}
  3455  	// match: (ANDconst [c] (MOVWconst [d]))
  3456  	// result: (MOVWconst [c&d])
  3457  	for {
  3458  		c := v.AuxInt
  3459  		v_0 := v.Args[0]
  3460  		if v_0.Op != OpARMMOVWconst {
  3461  			break
  3462  		}
  3463  		d := v_0.AuxInt
  3464  		v.reset(OpARMMOVWconst)
  3465  		v.AuxInt = c & d
  3466  		return true
  3467  	}
  3468  	// match: (ANDconst [c] (ANDconst [d] x))
  3469  	// result: (ANDconst [c&d] x)
  3470  	for {
  3471  		c := v.AuxInt
  3472  		v_0 := v.Args[0]
  3473  		if v_0.Op != OpARMANDconst {
  3474  			break
  3475  		}
  3476  		d := v_0.AuxInt
  3477  		x := v_0.Args[0]
  3478  		v.reset(OpARMANDconst)
  3479  		v.AuxInt = c & d
  3480  		v.AddArg(x)
  3481  		return true
  3482  	}
  3483  	return false
  3484  }
  3485  func rewriteValueARM_OpARMANDshiftLL_0(v *Value) bool {
  3486  	b := v.Block
  3487  	// match: (ANDshiftLL (MOVWconst [c]) x [d])
  3488  	// result: (ANDconst [c] (SLLconst <x.Type> x [d]))
  3489  	for {
  3490  		d := v.AuxInt
  3491  		x := v.Args[1]
  3492  		v_0 := v.Args[0]
  3493  		if v_0.Op != OpARMMOVWconst {
  3494  			break
  3495  		}
  3496  		c := v_0.AuxInt
  3497  		v.reset(OpARMANDconst)
  3498  		v.AuxInt = c
  3499  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  3500  		v0.AuxInt = d
  3501  		v0.AddArg(x)
  3502  		v.AddArg(v0)
  3503  		return true
  3504  	}
  3505  	// match: (ANDshiftLL x (MOVWconst [c]) [d])
  3506  	// result: (ANDconst x [int64(int32(uint32(c)<<uint64(d)))])
  3507  	for {
  3508  		d := v.AuxInt
  3509  		_ = v.Args[1]
  3510  		x := v.Args[0]
  3511  		v_1 := v.Args[1]
  3512  		if v_1.Op != OpARMMOVWconst {
  3513  			break
  3514  		}
  3515  		c := v_1.AuxInt
  3516  		v.reset(OpARMANDconst)
  3517  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  3518  		v.AddArg(x)
  3519  		return true
  3520  	}
  3521  	// match: (ANDshiftLL x y:(SLLconst x [c]) [d])
  3522  	// cond: c==d
  3523  	// result: y
  3524  	for {
  3525  		d := v.AuxInt
  3526  		_ = v.Args[1]
  3527  		x := v.Args[0]
  3528  		y := v.Args[1]
  3529  		if y.Op != OpARMSLLconst {
  3530  			break
  3531  		}
  3532  		c := y.AuxInt
  3533  		if x != y.Args[0] || !(c == d) {
  3534  			break
  3535  		}
  3536  		v.reset(OpCopy)
  3537  		v.Type = y.Type
  3538  		v.AddArg(y)
  3539  		return true
  3540  	}
  3541  	return false
  3542  }
  3543  func rewriteValueARM_OpARMANDshiftLLreg_0(v *Value) bool {
  3544  	b := v.Block
  3545  	// match: (ANDshiftLLreg (MOVWconst [c]) x y)
  3546  	// result: (ANDconst [c] (SLL <x.Type> x y))
  3547  	for {
  3548  		y := v.Args[2]
  3549  		v_0 := v.Args[0]
  3550  		if v_0.Op != OpARMMOVWconst {
  3551  			break
  3552  		}
  3553  		c := v_0.AuxInt
  3554  		x := v.Args[1]
  3555  		v.reset(OpARMANDconst)
  3556  		v.AuxInt = c
  3557  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  3558  		v0.AddArg(x)
  3559  		v0.AddArg(y)
  3560  		v.AddArg(v0)
  3561  		return true
  3562  	}
  3563  	// match: (ANDshiftLLreg x y (MOVWconst [c]))
  3564  	// result: (ANDshiftLL x y [c])
  3565  	for {
  3566  		_ = v.Args[2]
  3567  		x := v.Args[0]
  3568  		y := v.Args[1]
  3569  		v_2 := v.Args[2]
  3570  		if v_2.Op != OpARMMOVWconst {
  3571  			break
  3572  		}
  3573  		c := v_2.AuxInt
  3574  		v.reset(OpARMANDshiftLL)
  3575  		v.AuxInt = c
  3576  		v.AddArg(x)
  3577  		v.AddArg(y)
  3578  		return true
  3579  	}
  3580  	return false
  3581  }
  3582  func rewriteValueARM_OpARMANDshiftRA_0(v *Value) bool {
  3583  	b := v.Block
  3584  	// match: (ANDshiftRA (MOVWconst [c]) x [d])
  3585  	// result: (ANDconst [c] (SRAconst <x.Type> x [d]))
  3586  	for {
  3587  		d := v.AuxInt
  3588  		x := v.Args[1]
  3589  		v_0 := v.Args[0]
  3590  		if v_0.Op != OpARMMOVWconst {
  3591  			break
  3592  		}
  3593  		c := v_0.AuxInt
  3594  		v.reset(OpARMANDconst)
  3595  		v.AuxInt = c
  3596  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  3597  		v0.AuxInt = d
  3598  		v0.AddArg(x)
  3599  		v.AddArg(v0)
  3600  		return true
  3601  	}
  3602  	// match: (ANDshiftRA x (MOVWconst [c]) [d])
  3603  	// result: (ANDconst x [int64(int32(c)>>uint64(d))])
  3604  	for {
  3605  		d := v.AuxInt
  3606  		_ = v.Args[1]
  3607  		x := v.Args[0]
  3608  		v_1 := v.Args[1]
  3609  		if v_1.Op != OpARMMOVWconst {
  3610  			break
  3611  		}
  3612  		c := v_1.AuxInt
  3613  		v.reset(OpARMANDconst)
  3614  		v.AuxInt = int64(int32(c) >> uint64(d))
  3615  		v.AddArg(x)
  3616  		return true
  3617  	}
  3618  	// match: (ANDshiftRA x y:(SRAconst x [c]) [d])
  3619  	// cond: c==d
  3620  	// result: y
  3621  	for {
  3622  		d := v.AuxInt
  3623  		_ = v.Args[1]
  3624  		x := v.Args[0]
  3625  		y := v.Args[1]
  3626  		if y.Op != OpARMSRAconst {
  3627  			break
  3628  		}
  3629  		c := y.AuxInt
  3630  		if x != y.Args[0] || !(c == d) {
  3631  			break
  3632  		}
  3633  		v.reset(OpCopy)
  3634  		v.Type = y.Type
  3635  		v.AddArg(y)
  3636  		return true
  3637  	}
  3638  	return false
  3639  }
  3640  func rewriteValueARM_OpARMANDshiftRAreg_0(v *Value) bool {
  3641  	b := v.Block
  3642  	// match: (ANDshiftRAreg (MOVWconst [c]) x y)
  3643  	// result: (ANDconst [c] (SRA <x.Type> x y))
  3644  	for {
  3645  		y := v.Args[2]
  3646  		v_0 := v.Args[0]
  3647  		if v_0.Op != OpARMMOVWconst {
  3648  			break
  3649  		}
  3650  		c := v_0.AuxInt
  3651  		x := v.Args[1]
  3652  		v.reset(OpARMANDconst)
  3653  		v.AuxInt = c
  3654  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  3655  		v0.AddArg(x)
  3656  		v0.AddArg(y)
  3657  		v.AddArg(v0)
  3658  		return true
  3659  	}
  3660  	// match: (ANDshiftRAreg x y (MOVWconst [c]))
  3661  	// result: (ANDshiftRA x y [c])
  3662  	for {
  3663  		_ = v.Args[2]
  3664  		x := v.Args[0]
  3665  		y := v.Args[1]
  3666  		v_2 := v.Args[2]
  3667  		if v_2.Op != OpARMMOVWconst {
  3668  			break
  3669  		}
  3670  		c := v_2.AuxInt
  3671  		v.reset(OpARMANDshiftRA)
  3672  		v.AuxInt = c
  3673  		v.AddArg(x)
  3674  		v.AddArg(y)
  3675  		return true
  3676  	}
  3677  	return false
  3678  }
  3679  func rewriteValueARM_OpARMANDshiftRL_0(v *Value) bool {
  3680  	b := v.Block
  3681  	// match: (ANDshiftRL (MOVWconst [c]) x [d])
  3682  	// result: (ANDconst [c] (SRLconst <x.Type> x [d]))
  3683  	for {
  3684  		d := v.AuxInt
  3685  		x := v.Args[1]
  3686  		v_0 := v.Args[0]
  3687  		if v_0.Op != OpARMMOVWconst {
  3688  			break
  3689  		}
  3690  		c := v_0.AuxInt
  3691  		v.reset(OpARMANDconst)
  3692  		v.AuxInt = c
  3693  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  3694  		v0.AuxInt = d
  3695  		v0.AddArg(x)
  3696  		v.AddArg(v0)
  3697  		return true
  3698  	}
  3699  	// match: (ANDshiftRL x (MOVWconst [c]) [d])
  3700  	// result: (ANDconst x [int64(int32(uint32(c)>>uint64(d)))])
  3701  	for {
  3702  		d := v.AuxInt
  3703  		_ = v.Args[1]
  3704  		x := v.Args[0]
  3705  		v_1 := v.Args[1]
  3706  		if v_1.Op != OpARMMOVWconst {
  3707  			break
  3708  		}
  3709  		c := v_1.AuxInt
  3710  		v.reset(OpARMANDconst)
  3711  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  3712  		v.AddArg(x)
  3713  		return true
  3714  	}
  3715  	// match: (ANDshiftRL x y:(SRLconst x [c]) [d])
  3716  	// cond: c==d
  3717  	// result: y
  3718  	for {
  3719  		d := v.AuxInt
  3720  		_ = v.Args[1]
  3721  		x := v.Args[0]
  3722  		y := v.Args[1]
  3723  		if y.Op != OpARMSRLconst {
  3724  			break
  3725  		}
  3726  		c := y.AuxInt
  3727  		if x != y.Args[0] || !(c == d) {
  3728  			break
  3729  		}
  3730  		v.reset(OpCopy)
  3731  		v.Type = y.Type
  3732  		v.AddArg(y)
  3733  		return true
  3734  	}
  3735  	return false
  3736  }
  3737  func rewriteValueARM_OpARMANDshiftRLreg_0(v *Value) bool {
  3738  	b := v.Block
  3739  	// match: (ANDshiftRLreg (MOVWconst [c]) x y)
  3740  	// result: (ANDconst [c] (SRL <x.Type> x y))
  3741  	for {
  3742  		y := v.Args[2]
  3743  		v_0 := v.Args[0]
  3744  		if v_0.Op != OpARMMOVWconst {
  3745  			break
  3746  		}
  3747  		c := v_0.AuxInt
  3748  		x := v.Args[1]
  3749  		v.reset(OpARMANDconst)
  3750  		v.AuxInt = c
  3751  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  3752  		v0.AddArg(x)
  3753  		v0.AddArg(y)
  3754  		v.AddArg(v0)
  3755  		return true
  3756  	}
  3757  	// match: (ANDshiftRLreg x y (MOVWconst [c]))
  3758  	// result: (ANDshiftRL x y [c])
  3759  	for {
  3760  		_ = v.Args[2]
  3761  		x := v.Args[0]
  3762  		y := v.Args[1]
  3763  		v_2 := v.Args[2]
  3764  		if v_2.Op != OpARMMOVWconst {
  3765  			break
  3766  		}
  3767  		c := v_2.AuxInt
  3768  		v.reset(OpARMANDshiftRL)
  3769  		v.AuxInt = c
  3770  		v.AddArg(x)
  3771  		v.AddArg(y)
  3772  		return true
  3773  	}
  3774  	return false
  3775  }
  3776  func rewriteValueARM_OpARMBFX_0(v *Value) bool {
  3777  	// match: (BFX [c] (MOVWconst [d]))
  3778  	// result: (MOVWconst [int64(int32(d)<<(32-uint32(c&0xff)-uint32(c>>8))>>(32-uint32(c>>8)))])
  3779  	for {
  3780  		c := v.AuxInt
  3781  		v_0 := v.Args[0]
  3782  		if v_0.Op != OpARMMOVWconst {
  3783  			break
  3784  		}
  3785  		d := v_0.AuxInt
  3786  		v.reset(OpARMMOVWconst)
  3787  		v.AuxInt = int64(int32(d) << (32 - uint32(c&0xff) - uint32(c>>8)) >> (32 - uint32(c>>8)))
  3788  		return true
  3789  	}
  3790  	return false
  3791  }
  3792  func rewriteValueARM_OpARMBFXU_0(v *Value) bool {
  3793  	// match: (BFXU [c] (MOVWconst [d]))
  3794  	// result: (MOVWconst [int64(int32(uint32(d)<<(32-uint32(c&0xff)-uint32(c>>8))>>(32-uint32(c>>8))))])
  3795  	for {
  3796  		c := v.AuxInt
  3797  		v_0 := v.Args[0]
  3798  		if v_0.Op != OpARMMOVWconst {
  3799  			break
  3800  		}
  3801  		d := v_0.AuxInt
  3802  		v.reset(OpARMMOVWconst)
  3803  		v.AuxInt = int64(int32(uint32(d) << (32 - uint32(c&0xff) - uint32(c>>8)) >> (32 - uint32(c>>8))))
  3804  		return true
  3805  	}
  3806  	return false
  3807  }
  3808  func rewriteValueARM_OpARMBIC_0(v *Value) bool {
  3809  	// match: (BIC x (MOVWconst [c]))
  3810  	// result: (BICconst [c] x)
  3811  	for {
  3812  		_ = v.Args[1]
  3813  		x := v.Args[0]
  3814  		v_1 := v.Args[1]
  3815  		if v_1.Op != OpARMMOVWconst {
  3816  			break
  3817  		}
  3818  		c := v_1.AuxInt
  3819  		v.reset(OpARMBICconst)
  3820  		v.AuxInt = c
  3821  		v.AddArg(x)
  3822  		return true
  3823  	}
  3824  	// match: (BIC x (SLLconst [c] y))
  3825  	// result: (BICshiftLL x y [c])
  3826  	for {
  3827  		_ = v.Args[1]
  3828  		x := v.Args[0]
  3829  		v_1 := v.Args[1]
  3830  		if v_1.Op != OpARMSLLconst {
  3831  			break
  3832  		}
  3833  		c := v_1.AuxInt
  3834  		y := v_1.Args[0]
  3835  		v.reset(OpARMBICshiftLL)
  3836  		v.AuxInt = c
  3837  		v.AddArg(x)
  3838  		v.AddArg(y)
  3839  		return true
  3840  	}
  3841  	// match: (BIC x (SRLconst [c] y))
  3842  	// result: (BICshiftRL x y [c])
  3843  	for {
  3844  		_ = v.Args[1]
  3845  		x := v.Args[0]
  3846  		v_1 := v.Args[1]
  3847  		if v_1.Op != OpARMSRLconst {
  3848  			break
  3849  		}
  3850  		c := v_1.AuxInt
  3851  		y := v_1.Args[0]
  3852  		v.reset(OpARMBICshiftRL)
  3853  		v.AuxInt = c
  3854  		v.AddArg(x)
  3855  		v.AddArg(y)
  3856  		return true
  3857  	}
  3858  	// match: (BIC x (SRAconst [c] y))
  3859  	// result: (BICshiftRA x y [c])
  3860  	for {
  3861  		_ = v.Args[1]
  3862  		x := v.Args[0]
  3863  		v_1 := v.Args[1]
  3864  		if v_1.Op != OpARMSRAconst {
  3865  			break
  3866  		}
  3867  		c := v_1.AuxInt
  3868  		y := v_1.Args[0]
  3869  		v.reset(OpARMBICshiftRA)
  3870  		v.AuxInt = c
  3871  		v.AddArg(x)
  3872  		v.AddArg(y)
  3873  		return true
  3874  	}
  3875  	// match: (BIC x (SLL y z))
  3876  	// result: (BICshiftLLreg x y z)
  3877  	for {
  3878  		_ = v.Args[1]
  3879  		x := v.Args[0]
  3880  		v_1 := v.Args[1]
  3881  		if v_1.Op != OpARMSLL {
  3882  			break
  3883  		}
  3884  		z := v_1.Args[1]
  3885  		y := v_1.Args[0]
  3886  		v.reset(OpARMBICshiftLLreg)
  3887  		v.AddArg(x)
  3888  		v.AddArg(y)
  3889  		v.AddArg(z)
  3890  		return true
  3891  	}
  3892  	// match: (BIC x (SRL y z))
  3893  	// result: (BICshiftRLreg x y z)
  3894  	for {
  3895  		_ = v.Args[1]
  3896  		x := v.Args[0]
  3897  		v_1 := v.Args[1]
  3898  		if v_1.Op != OpARMSRL {
  3899  			break
  3900  		}
  3901  		z := v_1.Args[1]
  3902  		y := v_1.Args[0]
  3903  		v.reset(OpARMBICshiftRLreg)
  3904  		v.AddArg(x)
  3905  		v.AddArg(y)
  3906  		v.AddArg(z)
  3907  		return true
  3908  	}
  3909  	// match: (BIC x (SRA y z))
  3910  	// result: (BICshiftRAreg x y z)
  3911  	for {
  3912  		_ = v.Args[1]
  3913  		x := v.Args[0]
  3914  		v_1 := v.Args[1]
  3915  		if v_1.Op != OpARMSRA {
  3916  			break
  3917  		}
  3918  		z := v_1.Args[1]
  3919  		y := v_1.Args[0]
  3920  		v.reset(OpARMBICshiftRAreg)
  3921  		v.AddArg(x)
  3922  		v.AddArg(y)
  3923  		v.AddArg(z)
  3924  		return true
  3925  	}
  3926  	// match: (BIC x x)
  3927  	// result: (MOVWconst [0])
  3928  	for {
  3929  		x := v.Args[1]
  3930  		if x != v.Args[0] {
  3931  			break
  3932  		}
  3933  		v.reset(OpARMMOVWconst)
  3934  		v.AuxInt = 0
  3935  		return true
  3936  	}
  3937  	return false
  3938  }
  3939  func rewriteValueARM_OpARMBICconst_0(v *Value) bool {
  3940  	// match: (BICconst [0] x)
  3941  	// result: x
  3942  	for {
  3943  		if v.AuxInt != 0 {
  3944  			break
  3945  		}
  3946  		x := v.Args[0]
  3947  		v.reset(OpCopy)
  3948  		v.Type = x.Type
  3949  		v.AddArg(x)
  3950  		return true
  3951  	}
  3952  	// match: (BICconst [c] _)
  3953  	// cond: int32(c)==-1
  3954  	// result: (MOVWconst [0])
  3955  	for {
  3956  		c := v.AuxInt
  3957  		if !(int32(c) == -1) {
  3958  			break
  3959  		}
  3960  		v.reset(OpARMMOVWconst)
  3961  		v.AuxInt = 0
  3962  		return true
  3963  	}
  3964  	// match: (BICconst [c] x)
  3965  	// cond: !isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))
  3966  	// result: (ANDconst [int64(int32(^uint32(c)))] x)
  3967  	for {
  3968  		c := v.AuxInt
  3969  		x := v.Args[0]
  3970  		if !(!isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))) {
  3971  			break
  3972  		}
  3973  		v.reset(OpARMANDconst)
  3974  		v.AuxInt = int64(int32(^uint32(c)))
  3975  		v.AddArg(x)
  3976  		return true
  3977  	}
  3978  	// match: (BICconst [c] x)
  3979  	// cond: objabi.GOARM==7 && !isARMImmRot(uint32(c)) && uint32(c)>0xffff && ^uint32(c)<=0xffff
  3980  	// result: (ANDconst [int64(int32(^uint32(c)))] x)
  3981  	for {
  3982  		c := v.AuxInt
  3983  		x := v.Args[0]
  3984  		if !(objabi.GOARM == 7 && !isARMImmRot(uint32(c)) && uint32(c) > 0xffff && ^uint32(c) <= 0xffff) {
  3985  			break
  3986  		}
  3987  		v.reset(OpARMANDconst)
  3988  		v.AuxInt = int64(int32(^uint32(c)))
  3989  		v.AddArg(x)
  3990  		return true
  3991  	}
  3992  	// match: (BICconst [c] (MOVWconst [d]))
  3993  	// result: (MOVWconst [d&^c])
  3994  	for {
  3995  		c := v.AuxInt
  3996  		v_0 := v.Args[0]
  3997  		if v_0.Op != OpARMMOVWconst {
  3998  			break
  3999  		}
  4000  		d := v_0.AuxInt
  4001  		v.reset(OpARMMOVWconst)
  4002  		v.AuxInt = d &^ c
  4003  		return true
  4004  	}
  4005  	// match: (BICconst [c] (BICconst [d] x))
  4006  	// result: (BICconst [int64(int32(c|d))] x)
  4007  	for {
  4008  		c := v.AuxInt
  4009  		v_0 := v.Args[0]
  4010  		if v_0.Op != OpARMBICconst {
  4011  			break
  4012  		}
  4013  		d := v_0.AuxInt
  4014  		x := v_0.Args[0]
  4015  		v.reset(OpARMBICconst)
  4016  		v.AuxInt = int64(int32(c | d))
  4017  		v.AddArg(x)
  4018  		return true
  4019  	}
  4020  	return false
  4021  }
  4022  func rewriteValueARM_OpARMBICshiftLL_0(v *Value) bool {
  4023  	// match: (BICshiftLL x (MOVWconst [c]) [d])
  4024  	// result: (BICconst x [int64(int32(uint32(c)<<uint64(d)))])
  4025  	for {
  4026  		d := v.AuxInt
  4027  		_ = v.Args[1]
  4028  		x := v.Args[0]
  4029  		v_1 := v.Args[1]
  4030  		if v_1.Op != OpARMMOVWconst {
  4031  			break
  4032  		}
  4033  		c := v_1.AuxInt
  4034  		v.reset(OpARMBICconst)
  4035  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  4036  		v.AddArg(x)
  4037  		return true
  4038  	}
  4039  	// match: (BICshiftLL x (SLLconst x [c]) [d])
  4040  	// cond: c==d
  4041  	// result: (MOVWconst [0])
  4042  	for {
  4043  		d := v.AuxInt
  4044  		_ = v.Args[1]
  4045  		x := v.Args[0]
  4046  		v_1 := v.Args[1]
  4047  		if v_1.Op != OpARMSLLconst {
  4048  			break
  4049  		}
  4050  		c := v_1.AuxInt
  4051  		if x != v_1.Args[0] || !(c == d) {
  4052  			break
  4053  		}
  4054  		v.reset(OpARMMOVWconst)
  4055  		v.AuxInt = 0
  4056  		return true
  4057  	}
  4058  	return false
  4059  }
  4060  func rewriteValueARM_OpARMBICshiftLLreg_0(v *Value) bool {
  4061  	// match: (BICshiftLLreg x y (MOVWconst [c]))
  4062  	// result: (BICshiftLL x y [c])
  4063  	for {
  4064  		_ = v.Args[2]
  4065  		x := v.Args[0]
  4066  		y := v.Args[1]
  4067  		v_2 := v.Args[2]
  4068  		if v_2.Op != OpARMMOVWconst {
  4069  			break
  4070  		}
  4071  		c := v_2.AuxInt
  4072  		v.reset(OpARMBICshiftLL)
  4073  		v.AuxInt = c
  4074  		v.AddArg(x)
  4075  		v.AddArg(y)
  4076  		return true
  4077  	}
  4078  	return false
  4079  }
  4080  func rewriteValueARM_OpARMBICshiftRA_0(v *Value) bool {
  4081  	// match: (BICshiftRA x (MOVWconst [c]) [d])
  4082  	// result: (BICconst x [int64(int32(c)>>uint64(d))])
  4083  	for {
  4084  		d := v.AuxInt
  4085  		_ = v.Args[1]
  4086  		x := v.Args[0]
  4087  		v_1 := v.Args[1]
  4088  		if v_1.Op != OpARMMOVWconst {
  4089  			break
  4090  		}
  4091  		c := v_1.AuxInt
  4092  		v.reset(OpARMBICconst)
  4093  		v.AuxInt = int64(int32(c) >> uint64(d))
  4094  		v.AddArg(x)
  4095  		return true
  4096  	}
  4097  	// match: (BICshiftRA x (SRAconst x [c]) [d])
  4098  	// cond: c==d
  4099  	// result: (MOVWconst [0])
  4100  	for {
  4101  		d := v.AuxInt
  4102  		_ = v.Args[1]
  4103  		x := v.Args[0]
  4104  		v_1 := v.Args[1]
  4105  		if v_1.Op != OpARMSRAconst {
  4106  			break
  4107  		}
  4108  		c := v_1.AuxInt
  4109  		if x != v_1.Args[0] || !(c == d) {
  4110  			break
  4111  		}
  4112  		v.reset(OpARMMOVWconst)
  4113  		v.AuxInt = 0
  4114  		return true
  4115  	}
  4116  	return false
  4117  }
  4118  func rewriteValueARM_OpARMBICshiftRAreg_0(v *Value) bool {
  4119  	// match: (BICshiftRAreg x y (MOVWconst [c]))
  4120  	// result: (BICshiftRA x y [c])
  4121  	for {
  4122  		_ = v.Args[2]
  4123  		x := v.Args[0]
  4124  		y := v.Args[1]
  4125  		v_2 := v.Args[2]
  4126  		if v_2.Op != OpARMMOVWconst {
  4127  			break
  4128  		}
  4129  		c := v_2.AuxInt
  4130  		v.reset(OpARMBICshiftRA)
  4131  		v.AuxInt = c
  4132  		v.AddArg(x)
  4133  		v.AddArg(y)
  4134  		return true
  4135  	}
  4136  	return false
  4137  }
  4138  func rewriteValueARM_OpARMBICshiftRL_0(v *Value) bool {
  4139  	// match: (BICshiftRL x (MOVWconst [c]) [d])
  4140  	// result: (BICconst x [int64(int32(uint32(c)>>uint64(d)))])
  4141  	for {
  4142  		d := v.AuxInt
  4143  		_ = v.Args[1]
  4144  		x := v.Args[0]
  4145  		v_1 := v.Args[1]
  4146  		if v_1.Op != OpARMMOVWconst {
  4147  			break
  4148  		}
  4149  		c := v_1.AuxInt
  4150  		v.reset(OpARMBICconst)
  4151  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  4152  		v.AddArg(x)
  4153  		return true
  4154  	}
  4155  	// match: (BICshiftRL x (SRLconst x [c]) [d])
  4156  	// cond: c==d
  4157  	// result: (MOVWconst [0])
  4158  	for {
  4159  		d := v.AuxInt
  4160  		_ = v.Args[1]
  4161  		x := v.Args[0]
  4162  		v_1 := v.Args[1]
  4163  		if v_1.Op != OpARMSRLconst {
  4164  			break
  4165  		}
  4166  		c := v_1.AuxInt
  4167  		if x != v_1.Args[0] || !(c == d) {
  4168  			break
  4169  		}
  4170  		v.reset(OpARMMOVWconst)
  4171  		v.AuxInt = 0
  4172  		return true
  4173  	}
  4174  	return false
  4175  }
  4176  func rewriteValueARM_OpARMBICshiftRLreg_0(v *Value) bool {
  4177  	// match: (BICshiftRLreg x y (MOVWconst [c]))
  4178  	// result: (BICshiftRL x y [c])
  4179  	for {
  4180  		_ = v.Args[2]
  4181  		x := v.Args[0]
  4182  		y := v.Args[1]
  4183  		v_2 := v.Args[2]
  4184  		if v_2.Op != OpARMMOVWconst {
  4185  			break
  4186  		}
  4187  		c := v_2.AuxInt
  4188  		v.reset(OpARMBICshiftRL)
  4189  		v.AuxInt = c
  4190  		v.AddArg(x)
  4191  		v.AddArg(y)
  4192  		return true
  4193  	}
  4194  	return false
  4195  }
  4196  func rewriteValueARM_OpARMCMN_0(v *Value) bool {
  4197  	// match: (CMN x (MOVWconst [c]))
  4198  	// result: (CMNconst [c] x)
  4199  	for {
  4200  		_ = v.Args[1]
  4201  		x := v.Args[0]
  4202  		v_1 := v.Args[1]
  4203  		if v_1.Op != OpARMMOVWconst {
  4204  			break
  4205  		}
  4206  		c := v_1.AuxInt
  4207  		v.reset(OpARMCMNconst)
  4208  		v.AuxInt = c
  4209  		v.AddArg(x)
  4210  		return true
  4211  	}
  4212  	// match: (CMN (MOVWconst [c]) x)
  4213  	// result: (CMNconst [c] x)
  4214  	for {
  4215  		x := v.Args[1]
  4216  		v_0 := v.Args[0]
  4217  		if v_0.Op != OpARMMOVWconst {
  4218  			break
  4219  		}
  4220  		c := v_0.AuxInt
  4221  		v.reset(OpARMCMNconst)
  4222  		v.AuxInt = c
  4223  		v.AddArg(x)
  4224  		return true
  4225  	}
  4226  	// match: (CMN x (SLLconst [c] y))
  4227  	// result: (CMNshiftLL x y [c])
  4228  	for {
  4229  		_ = v.Args[1]
  4230  		x := v.Args[0]
  4231  		v_1 := v.Args[1]
  4232  		if v_1.Op != OpARMSLLconst {
  4233  			break
  4234  		}
  4235  		c := v_1.AuxInt
  4236  		y := v_1.Args[0]
  4237  		v.reset(OpARMCMNshiftLL)
  4238  		v.AuxInt = c
  4239  		v.AddArg(x)
  4240  		v.AddArg(y)
  4241  		return true
  4242  	}
  4243  	// match: (CMN (SLLconst [c] y) x)
  4244  	// result: (CMNshiftLL x y [c])
  4245  	for {
  4246  		x := v.Args[1]
  4247  		v_0 := v.Args[0]
  4248  		if v_0.Op != OpARMSLLconst {
  4249  			break
  4250  		}
  4251  		c := v_0.AuxInt
  4252  		y := v_0.Args[0]
  4253  		v.reset(OpARMCMNshiftLL)
  4254  		v.AuxInt = c
  4255  		v.AddArg(x)
  4256  		v.AddArg(y)
  4257  		return true
  4258  	}
  4259  	// match: (CMN x (SRLconst [c] y))
  4260  	// result: (CMNshiftRL x y [c])
  4261  	for {
  4262  		_ = v.Args[1]
  4263  		x := v.Args[0]
  4264  		v_1 := v.Args[1]
  4265  		if v_1.Op != OpARMSRLconst {
  4266  			break
  4267  		}
  4268  		c := v_1.AuxInt
  4269  		y := v_1.Args[0]
  4270  		v.reset(OpARMCMNshiftRL)
  4271  		v.AuxInt = c
  4272  		v.AddArg(x)
  4273  		v.AddArg(y)
  4274  		return true
  4275  	}
  4276  	// match: (CMN (SRLconst [c] y) x)
  4277  	// result: (CMNshiftRL x y [c])
  4278  	for {
  4279  		x := v.Args[1]
  4280  		v_0 := v.Args[0]
  4281  		if v_0.Op != OpARMSRLconst {
  4282  			break
  4283  		}
  4284  		c := v_0.AuxInt
  4285  		y := v_0.Args[0]
  4286  		v.reset(OpARMCMNshiftRL)
  4287  		v.AuxInt = c
  4288  		v.AddArg(x)
  4289  		v.AddArg(y)
  4290  		return true
  4291  	}
  4292  	// match: (CMN x (SRAconst [c] y))
  4293  	// result: (CMNshiftRA x y [c])
  4294  	for {
  4295  		_ = v.Args[1]
  4296  		x := v.Args[0]
  4297  		v_1 := v.Args[1]
  4298  		if v_1.Op != OpARMSRAconst {
  4299  			break
  4300  		}
  4301  		c := v_1.AuxInt
  4302  		y := v_1.Args[0]
  4303  		v.reset(OpARMCMNshiftRA)
  4304  		v.AuxInt = c
  4305  		v.AddArg(x)
  4306  		v.AddArg(y)
  4307  		return true
  4308  	}
  4309  	// match: (CMN (SRAconst [c] y) x)
  4310  	// result: (CMNshiftRA x y [c])
  4311  	for {
  4312  		x := v.Args[1]
  4313  		v_0 := v.Args[0]
  4314  		if v_0.Op != OpARMSRAconst {
  4315  			break
  4316  		}
  4317  		c := v_0.AuxInt
  4318  		y := v_0.Args[0]
  4319  		v.reset(OpARMCMNshiftRA)
  4320  		v.AuxInt = c
  4321  		v.AddArg(x)
  4322  		v.AddArg(y)
  4323  		return true
  4324  	}
  4325  	// match: (CMN x (SLL y z))
  4326  	// result: (CMNshiftLLreg x y z)
  4327  	for {
  4328  		_ = v.Args[1]
  4329  		x := v.Args[0]
  4330  		v_1 := v.Args[1]
  4331  		if v_1.Op != OpARMSLL {
  4332  			break
  4333  		}
  4334  		z := v_1.Args[1]
  4335  		y := v_1.Args[0]
  4336  		v.reset(OpARMCMNshiftLLreg)
  4337  		v.AddArg(x)
  4338  		v.AddArg(y)
  4339  		v.AddArg(z)
  4340  		return true
  4341  	}
  4342  	// match: (CMN (SLL y z) x)
  4343  	// result: (CMNshiftLLreg x y z)
  4344  	for {
  4345  		x := v.Args[1]
  4346  		v_0 := v.Args[0]
  4347  		if v_0.Op != OpARMSLL {
  4348  			break
  4349  		}
  4350  		z := v_0.Args[1]
  4351  		y := v_0.Args[0]
  4352  		v.reset(OpARMCMNshiftLLreg)
  4353  		v.AddArg(x)
  4354  		v.AddArg(y)
  4355  		v.AddArg(z)
  4356  		return true
  4357  	}
  4358  	return false
  4359  }
  4360  func rewriteValueARM_OpARMCMN_10(v *Value) bool {
  4361  	// match: (CMN x (SRL y z))
  4362  	// result: (CMNshiftRLreg x y z)
  4363  	for {
  4364  		_ = v.Args[1]
  4365  		x := v.Args[0]
  4366  		v_1 := v.Args[1]
  4367  		if v_1.Op != OpARMSRL {
  4368  			break
  4369  		}
  4370  		z := v_1.Args[1]
  4371  		y := v_1.Args[0]
  4372  		v.reset(OpARMCMNshiftRLreg)
  4373  		v.AddArg(x)
  4374  		v.AddArg(y)
  4375  		v.AddArg(z)
  4376  		return true
  4377  	}
  4378  	// match: (CMN (SRL y z) x)
  4379  	// result: (CMNshiftRLreg x y z)
  4380  	for {
  4381  		x := v.Args[1]
  4382  		v_0 := v.Args[0]
  4383  		if v_0.Op != OpARMSRL {
  4384  			break
  4385  		}
  4386  		z := v_0.Args[1]
  4387  		y := v_0.Args[0]
  4388  		v.reset(OpARMCMNshiftRLreg)
  4389  		v.AddArg(x)
  4390  		v.AddArg(y)
  4391  		v.AddArg(z)
  4392  		return true
  4393  	}
  4394  	// match: (CMN x (SRA y z))
  4395  	// result: (CMNshiftRAreg x y z)
  4396  	for {
  4397  		_ = v.Args[1]
  4398  		x := v.Args[0]
  4399  		v_1 := v.Args[1]
  4400  		if v_1.Op != OpARMSRA {
  4401  			break
  4402  		}
  4403  		z := v_1.Args[1]
  4404  		y := v_1.Args[0]
  4405  		v.reset(OpARMCMNshiftRAreg)
  4406  		v.AddArg(x)
  4407  		v.AddArg(y)
  4408  		v.AddArg(z)
  4409  		return true
  4410  	}
  4411  	// match: (CMN (SRA y z) x)
  4412  	// result: (CMNshiftRAreg x y z)
  4413  	for {
  4414  		x := v.Args[1]
  4415  		v_0 := v.Args[0]
  4416  		if v_0.Op != OpARMSRA {
  4417  			break
  4418  		}
  4419  		z := v_0.Args[1]
  4420  		y := v_0.Args[0]
  4421  		v.reset(OpARMCMNshiftRAreg)
  4422  		v.AddArg(x)
  4423  		v.AddArg(y)
  4424  		v.AddArg(z)
  4425  		return true
  4426  	}
  4427  	// match: (CMN x (RSBconst [0] y))
  4428  	// result: (CMP x y)
  4429  	for {
  4430  		_ = v.Args[1]
  4431  		x := v.Args[0]
  4432  		v_1 := v.Args[1]
  4433  		if v_1.Op != OpARMRSBconst || v_1.AuxInt != 0 {
  4434  			break
  4435  		}
  4436  		y := v_1.Args[0]
  4437  		v.reset(OpARMCMP)
  4438  		v.AddArg(x)
  4439  		v.AddArg(y)
  4440  		return true
  4441  	}
  4442  	// match: (CMN (RSBconst [0] y) x)
  4443  	// result: (CMP x y)
  4444  	for {
  4445  		x := v.Args[1]
  4446  		v_0 := v.Args[0]
  4447  		if v_0.Op != OpARMRSBconst || v_0.AuxInt != 0 {
  4448  			break
  4449  		}
  4450  		y := v_0.Args[0]
  4451  		v.reset(OpARMCMP)
  4452  		v.AddArg(x)
  4453  		v.AddArg(y)
  4454  		return true
  4455  	}
  4456  	return false
  4457  }
  4458  func rewriteValueARM_OpARMCMNconst_0(v *Value) bool {
  4459  	// match: (CMNconst (MOVWconst [x]) [y])
  4460  	// cond: int32(x)==int32(-y)
  4461  	// result: (FlagEQ)
  4462  	for {
  4463  		y := v.AuxInt
  4464  		v_0 := v.Args[0]
  4465  		if v_0.Op != OpARMMOVWconst {
  4466  			break
  4467  		}
  4468  		x := v_0.AuxInt
  4469  		if !(int32(x) == int32(-y)) {
  4470  			break
  4471  		}
  4472  		v.reset(OpARMFlagEQ)
  4473  		return true
  4474  	}
  4475  	// match: (CMNconst (MOVWconst [x]) [y])
  4476  	// cond: int32(x)<int32(-y) && uint32(x)<uint32(-y)
  4477  	// result: (FlagLT_ULT)
  4478  	for {
  4479  		y := v.AuxInt
  4480  		v_0 := v.Args[0]
  4481  		if v_0.Op != OpARMMOVWconst {
  4482  			break
  4483  		}
  4484  		x := v_0.AuxInt
  4485  		if !(int32(x) < int32(-y) && uint32(x) < uint32(-y)) {
  4486  			break
  4487  		}
  4488  		v.reset(OpARMFlagLT_ULT)
  4489  		return true
  4490  	}
  4491  	// match: (CMNconst (MOVWconst [x]) [y])
  4492  	// cond: int32(x)<int32(-y) && uint32(x)>uint32(-y)
  4493  	// result: (FlagLT_UGT)
  4494  	for {
  4495  		y := v.AuxInt
  4496  		v_0 := v.Args[0]
  4497  		if v_0.Op != OpARMMOVWconst {
  4498  			break
  4499  		}
  4500  		x := v_0.AuxInt
  4501  		if !(int32(x) < int32(-y) && uint32(x) > uint32(-y)) {
  4502  			break
  4503  		}
  4504  		v.reset(OpARMFlagLT_UGT)
  4505  		return true
  4506  	}
  4507  	// match: (CMNconst (MOVWconst [x]) [y])
  4508  	// cond: int32(x)>int32(-y) && uint32(x)<uint32(-y)
  4509  	// result: (FlagGT_ULT)
  4510  	for {
  4511  		y := v.AuxInt
  4512  		v_0 := v.Args[0]
  4513  		if v_0.Op != OpARMMOVWconst {
  4514  			break
  4515  		}
  4516  		x := v_0.AuxInt
  4517  		if !(int32(x) > int32(-y) && uint32(x) < uint32(-y)) {
  4518  			break
  4519  		}
  4520  		v.reset(OpARMFlagGT_ULT)
  4521  		return true
  4522  	}
  4523  	// match: (CMNconst (MOVWconst [x]) [y])
  4524  	// cond: int32(x)>int32(-y) && uint32(x)>uint32(-y)
  4525  	// result: (FlagGT_UGT)
  4526  	for {
  4527  		y := v.AuxInt
  4528  		v_0 := v.Args[0]
  4529  		if v_0.Op != OpARMMOVWconst {
  4530  			break
  4531  		}
  4532  		x := v_0.AuxInt
  4533  		if !(int32(x) > int32(-y) && uint32(x) > uint32(-y)) {
  4534  			break
  4535  		}
  4536  		v.reset(OpARMFlagGT_UGT)
  4537  		return true
  4538  	}
  4539  	return false
  4540  }
  4541  func rewriteValueARM_OpARMCMNshiftLL_0(v *Value) bool {
  4542  	b := v.Block
  4543  	// match: (CMNshiftLL (MOVWconst [c]) x [d])
  4544  	// result: (CMNconst [c] (SLLconst <x.Type> x [d]))
  4545  	for {
  4546  		d := v.AuxInt
  4547  		x := v.Args[1]
  4548  		v_0 := v.Args[0]
  4549  		if v_0.Op != OpARMMOVWconst {
  4550  			break
  4551  		}
  4552  		c := v_0.AuxInt
  4553  		v.reset(OpARMCMNconst)
  4554  		v.AuxInt = c
  4555  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  4556  		v0.AuxInt = d
  4557  		v0.AddArg(x)
  4558  		v.AddArg(v0)
  4559  		return true
  4560  	}
  4561  	// match: (CMNshiftLL x (MOVWconst [c]) [d])
  4562  	// result: (CMNconst x [int64(int32(uint32(c)<<uint64(d)))])
  4563  	for {
  4564  		d := v.AuxInt
  4565  		_ = v.Args[1]
  4566  		x := v.Args[0]
  4567  		v_1 := v.Args[1]
  4568  		if v_1.Op != OpARMMOVWconst {
  4569  			break
  4570  		}
  4571  		c := v_1.AuxInt
  4572  		v.reset(OpARMCMNconst)
  4573  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  4574  		v.AddArg(x)
  4575  		return true
  4576  	}
  4577  	return false
  4578  }
  4579  func rewriteValueARM_OpARMCMNshiftLLreg_0(v *Value) bool {
  4580  	b := v.Block
  4581  	// match: (CMNshiftLLreg (MOVWconst [c]) x y)
  4582  	// result: (CMNconst [c] (SLL <x.Type> x y))
  4583  	for {
  4584  		y := v.Args[2]
  4585  		v_0 := v.Args[0]
  4586  		if v_0.Op != OpARMMOVWconst {
  4587  			break
  4588  		}
  4589  		c := v_0.AuxInt
  4590  		x := v.Args[1]
  4591  		v.reset(OpARMCMNconst)
  4592  		v.AuxInt = c
  4593  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  4594  		v0.AddArg(x)
  4595  		v0.AddArg(y)
  4596  		v.AddArg(v0)
  4597  		return true
  4598  	}
  4599  	// match: (CMNshiftLLreg x y (MOVWconst [c]))
  4600  	// result: (CMNshiftLL x y [c])
  4601  	for {
  4602  		_ = v.Args[2]
  4603  		x := v.Args[0]
  4604  		y := v.Args[1]
  4605  		v_2 := v.Args[2]
  4606  		if v_2.Op != OpARMMOVWconst {
  4607  			break
  4608  		}
  4609  		c := v_2.AuxInt
  4610  		v.reset(OpARMCMNshiftLL)
  4611  		v.AuxInt = c
  4612  		v.AddArg(x)
  4613  		v.AddArg(y)
  4614  		return true
  4615  	}
  4616  	return false
  4617  }
  4618  func rewriteValueARM_OpARMCMNshiftRA_0(v *Value) bool {
  4619  	b := v.Block
  4620  	// match: (CMNshiftRA (MOVWconst [c]) x [d])
  4621  	// result: (CMNconst [c] (SRAconst <x.Type> x [d]))
  4622  	for {
  4623  		d := v.AuxInt
  4624  		x := v.Args[1]
  4625  		v_0 := v.Args[0]
  4626  		if v_0.Op != OpARMMOVWconst {
  4627  			break
  4628  		}
  4629  		c := v_0.AuxInt
  4630  		v.reset(OpARMCMNconst)
  4631  		v.AuxInt = c
  4632  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  4633  		v0.AuxInt = d
  4634  		v0.AddArg(x)
  4635  		v.AddArg(v0)
  4636  		return true
  4637  	}
  4638  	// match: (CMNshiftRA x (MOVWconst [c]) [d])
  4639  	// result: (CMNconst x [int64(int32(c)>>uint64(d))])
  4640  	for {
  4641  		d := v.AuxInt
  4642  		_ = v.Args[1]
  4643  		x := v.Args[0]
  4644  		v_1 := v.Args[1]
  4645  		if v_1.Op != OpARMMOVWconst {
  4646  			break
  4647  		}
  4648  		c := v_1.AuxInt
  4649  		v.reset(OpARMCMNconst)
  4650  		v.AuxInt = int64(int32(c) >> uint64(d))
  4651  		v.AddArg(x)
  4652  		return true
  4653  	}
  4654  	return false
  4655  }
  4656  func rewriteValueARM_OpARMCMNshiftRAreg_0(v *Value) bool {
  4657  	b := v.Block
  4658  	// match: (CMNshiftRAreg (MOVWconst [c]) x y)
  4659  	// result: (CMNconst [c] (SRA <x.Type> x y))
  4660  	for {
  4661  		y := v.Args[2]
  4662  		v_0 := v.Args[0]
  4663  		if v_0.Op != OpARMMOVWconst {
  4664  			break
  4665  		}
  4666  		c := v_0.AuxInt
  4667  		x := v.Args[1]
  4668  		v.reset(OpARMCMNconst)
  4669  		v.AuxInt = c
  4670  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  4671  		v0.AddArg(x)
  4672  		v0.AddArg(y)
  4673  		v.AddArg(v0)
  4674  		return true
  4675  	}
  4676  	// match: (CMNshiftRAreg x y (MOVWconst [c]))
  4677  	// result: (CMNshiftRA x y [c])
  4678  	for {
  4679  		_ = v.Args[2]
  4680  		x := v.Args[0]
  4681  		y := v.Args[1]
  4682  		v_2 := v.Args[2]
  4683  		if v_2.Op != OpARMMOVWconst {
  4684  			break
  4685  		}
  4686  		c := v_2.AuxInt
  4687  		v.reset(OpARMCMNshiftRA)
  4688  		v.AuxInt = c
  4689  		v.AddArg(x)
  4690  		v.AddArg(y)
  4691  		return true
  4692  	}
  4693  	return false
  4694  }
  4695  func rewriteValueARM_OpARMCMNshiftRL_0(v *Value) bool {
  4696  	b := v.Block
  4697  	// match: (CMNshiftRL (MOVWconst [c]) x [d])
  4698  	// result: (CMNconst [c] (SRLconst <x.Type> x [d]))
  4699  	for {
  4700  		d := v.AuxInt
  4701  		x := v.Args[1]
  4702  		v_0 := v.Args[0]
  4703  		if v_0.Op != OpARMMOVWconst {
  4704  			break
  4705  		}
  4706  		c := v_0.AuxInt
  4707  		v.reset(OpARMCMNconst)
  4708  		v.AuxInt = c
  4709  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  4710  		v0.AuxInt = d
  4711  		v0.AddArg(x)
  4712  		v.AddArg(v0)
  4713  		return true
  4714  	}
  4715  	// match: (CMNshiftRL x (MOVWconst [c]) [d])
  4716  	// result: (CMNconst x [int64(int32(uint32(c)>>uint64(d)))])
  4717  	for {
  4718  		d := v.AuxInt
  4719  		_ = v.Args[1]
  4720  		x := v.Args[0]
  4721  		v_1 := v.Args[1]
  4722  		if v_1.Op != OpARMMOVWconst {
  4723  			break
  4724  		}
  4725  		c := v_1.AuxInt
  4726  		v.reset(OpARMCMNconst)
  4727  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  4728  		v.AddArg(x)
  4729  		return true
  4730  	}
  4731  	return false
  4732  }
  4733  func rewriteValueARM_OpARMCMNshiftRLreg_0(v *Value) bool {
  4734  	b := v.Block
  4735  	// match: (CMNshiftRLreg (MOVWconst [c]) x y)
  4736  	// result: (CMNconst [c] (SRL <x.Type> x y))
  4737  	for {
  4738  		y := v.Args[2]
  4739  		v_0 := v.Args[0]
  4740  		if v_0.Op != OpARMMOVWconst {
  4741  			break
  4742  		}
  4743  		c := v_0.AuxInt
  4744  		x := v.Args[1]
  4745  		v.reset(OpARMCMNconst)
  4746  		v.AuxInt = c
  4747  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  4748  		v0.AddArg(x)
  4749  		v0.AddArg(y)
  4750  		v.AddArg(v0)
  4751  		return true
  4752  	}
  4753  	// match: (CMNshiftRLreg x y (MOVWconst [c]))
  4754  	// result: (CMNshiftRL x y [c])
  4755  	for {
  4756  		_ = v.Args[2]
  4757  		x := v.Args[0]
  4758  		y := v.Args[1]
  4759  		v_2 := v.Args[2]
  4760  		if v_2.Op != OpARMMOVWconst {
  4761  			break
  4762  		}
  4763  		c := v_2.AuxInt
  4764  		v.reset(OpARMCMNshiftRL)
  4765  		v.AuxInt = c
  4766  		v.AddArg(x)
  4767  		v.AddArg(y)
  4768  		return true
  4769  	}
  4770  	return false
  4771  }
  4772  func rewriteValueARM_OpARMCMOVWHSconst_0(v *Value) bool {
  4773  	// match: (CMOVWHSconst _ (FlagEQ) [c])
  4774  	// result: (MOVWconst [c])
  4775  	for {
  4776  		c := v.AuxInt
  4777  		_ = v.Args[1]
  4778  		v_1 := v.Args[1]
  4779  		if v_1.Op != OpARMFlagEQ {
  4780  			break
  4781  		}
  4782  		v.reset(OpARMMOVWconst)
  4783  		v.AuxInt = c
  4784  		return true
  4785  	}
  4786  	// match: (CMOVWHSconst x (FlagLT_ULT))
  4787  	// result: x
  4788  	for {
  4789  		_ = v.Args[1]
  4790  		x := v.Args[0]
  4791  		v_1 := v.Args[1]
  4792  		if v_1.Op != OpARMFlagLT_ULT {
  4793  			break
  4794  		}
  4795  		v.reset(OpCopy)
  4796  		v.Type = x.Type
  4797  		v.AddArg(x)
  4798  		return true
  4799  	}
  4800  	// match: (CMOVWHSconst _ (FlagLT_UGT) [c])
  4801  	// result: (MOVWconst [c])
  4802  	for {
  4803  		c := v.AuxInt
  4804  		_ = v.Args[1]
  4805  		v_1 := v.Args[1]
  4806  		if v_1.Op != OpARMFlagLT_UGT {
  4807  			break
  4808  		}
  4809  		v.reset(OpARMMOVWconst)
  4810  		v.AuxInt = c
  4811  		return true
  4812  	}
  4813  	// match: (CMOVWHSconst x (FlagGT_ULT))
  4814  	// result: x
  4815  	for {
  4816  		_ = v.Args[1]
  4817  		x := v.Args[0]
  4818  		v_1 := v.Args[1]
  4819  		if v_1.Op != OpARMFlagGT_ULT {
  4820  			break
  4821  		}
  4822  		v.reset(OpCopy)
  4823  		v.Type = x.Type
  4824  		v.AddArg(x)
  4825  		return true
  4826  	}
  4827  	// match: (CMOVWHSconst _ (FlagGT_UGT) [c])
  4828  	// result: (MOVWconst [c])
  4829  	for {
  4830  		c := v.AuxInt
  4831  		_ = v.Args[1]
  4832  		v_1 := v.Args[1]
  4833  		if v_1.Op != OpARMFlagGT_UGT {
  4834  			break
  4835  		}
  4836  		v.reset(OpARMMOVWconst)
  4837  		v.AuxInt = c
  4838  		return true
  4839  	}
  4840  	// match: (CMOVWHSconst x (InvertFlags flags) [c])
  4841  	// result: (CMOVWLSconst x flags [c])
  4842  	for {
  4843  		c := v.AuxInt
  4844  		_ = v.Args[1]
  4845  		x := v.Args[0]
  4846  		v_1 := v.Args[1]
  4847  		if v_1.Op != OpARMInvertFlags {
  4848  			break
  4849  		}
  4850  		flags := v_1.Args[0]
  4851  		v.reset(OpARMCMOVWLSconst)
  4852  		v.AuxInt = c
  4853  		v.AddArg(x)
  4854  		v.AddArg(flags)
  4855  		return true
  4856  	}
  4857  	return false
  4858  }
  4859  func rewriteValueARM_OpARMCMOVWLSconst_0(v *Value) bool {
  4860  	// match: (CMOVWLSconst _ (FlagEQ) [c])
  4861  	// result: (MOVWconst [c])
  4862  	for {
  4863  		c := v.AuxInt
  4864  		_ = v.Args[1]
  4865  		v_1 := v.Args[1]
  4866  		if v_1.Op != OpARMFlagEQ {
  4867  			break
  4868  		}
  4869  		v.reset(OpARMMOVWconst)
  4870  		v.AuxInt = c
  4871  		return true
  4872  	}
  4873  	// match: (CMOVWLSconst _ (FlagLT_ULT) [c])
  4874  	// result: (MOVWconst [c])
  4875  	for {
  4876  		c := v.AuxInt
  4877  		_ = v.Args[1]
  4878  		v_1 := v.Args[1]
  4879  		if v_1.Op != OpARMFlagLT_ULT {
  4880  			break
  4881  		}
  4882  		v.reset(OpARMMOVWconst)
  4883  		v.AuxInt = c
  4884  		return true
  4885  	}
  4886  	// match: (CMOVWLSconst x (FlagLT_UGT))
  4887  	// result: x
  4888  	for {
  4889  		_ = v.Args[1]
  4890  		x := v.Args[0]
  4891  		v_1 := v.Args[1]
  4892  		if v_1.Op != OpARMFlagLT_UGT {
  4893  			break
  4894  		}
  4895  		v.reset(OpCopy)
  4896  		v.Type = x.Type
  4897  		v.AddArg(x)
  4898  		return true
  4899  	}
  4900  	// match: (CMOVWLSconst _ (FlagGT_ULT) [c])
  4901  	// result: (MOVWconst [c])
  4902  	for {
  4903  		c := v.AuxInt
  4904  		_ = v.Args[1]
  4905  		v_1 := v.Args[1]
  4906  		if v_1.Op != OpARMFlagGT_ULT {
  4907  			break
  4908  		}
  4909  		v.reset(OpARMMOVWconst)
  4910  		v.AuxInt = c
  4911  		return true
  4912  	}
  4913  	// match: (CMOVWLSconst x (FlagGT_UGT))
  4914  	// result: x
  4915  	for {
  4916  		_ = v.Args[1]
  4917  		x := v.Args[0]
  4918  		v_1 := v.Args[1]
  4919  		if v_1.Op != OpARMFlagGT_UGT {
  4920  			break
  4921  		}
  4922  		v.reset(OpCopy)
  4923  		v.Type = x.Type
  4924  		v.AddArg(x)
  4925  		return true
  4926  	}
  4927  	// match: (CMOVWLSconst x (InvertFlags flags) [c])
  4928  	// result: (CMOVWHSconst x flags [c])
  4929  	for {
  4930  		c := v.AuxInt
  4931  		_ = v.Args[1]
  4932  		x := v.Args[0]
  4933  		v_1 := v.Args[1]
  4934  		if v_1.Op != OpARMInvertFlags {
  4935  			break
  4936  		}
  4937  		flags := v_1.Args[0]
  4938  		v.reset(OpARMCMOVWHSconst)
  4939  		v.AuxInt = c
  4940  		v.AddArg(x)
  4941  		v.AddArg(flags)
  4942  		return true
  4943  	}
  4944  	return false
  4945  }
  4946  func rewriteValueARM_OpARMCMP_0(v *Value) bool {
  4947  	b := v.Block
  4948  	// match: (CMP x (MOVWconst [c]))
  4949  	// result: (CMPconst [c] x)
  4950  	for {
  4951  		_ = v.Args[1]
  4952  		x := v.Args[0]
  4953  		v_1 := v.Args[1]
  4954  		if v_1.Op != OpARMMOVWconst {
  4955  			break
  4956  		}
  4957  		c := v_1.AuxInt
  4958  		v.reset(OpARMCMPconst)
  4959  		v.AuxInt = c
  4960  		v.AddArg(x)
  4961  		return true
  4962  	}
  4963  	// match: (CMP (MOVWconst [c]) x)
  4964  	// result: (InvertFlags (CMPconst [c] x))
  4965  	for {
  4966  		x := v.Args[1]
  4967  		v_0 := v.Args[0]
  4968  		if v_0.Op != OpARMMOVWconst {
  4969  			break
  4970  		}
  4971  		c := v_0.AuxInt
  4972  		v.reset(OpARMInvertFlags)
  4973  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  4974  		v0.AuxInt = c
  4975  		v0.AddArg(x)
  4976  		v.AddArg(v0)
  4977  		return true
  4978  	}
  4979  	// match: (CMP x (SLLconst [c] y))
  4980  	// result: (CMPshiftLL x y [c])
  4981  	for {
  4982  		_ = v.Args[1]
  4983  		x := v.Args[0]
  4984  		v_1 := v.Args[1]
  4985  		if v_1.Op != OpARMSLLconst {
  4986  			break
  4987  		}
  4988  		c := v_1.AuxInt
  4989  		y := v_1.Args[0]
  4990  		v.reset(OpARMCMPshiftLL)
  4991  		v.AuxInt = c
  4992  		v.AddArg(x)
  4993  		v.AddArg(y)
  4994  		return true
  4995  	}
  4996  	// match: (CMP (SLLconst [c] y) x)
  4997  	// result: (InvertFlags (CMPshiftLL x y [c]))
  4998  	for {
  4999  		x := v.Args[1]
  5000  		v_0 := v.Args[0]
  5001  		if v_0.Op != OpARMSLLconst {
  5002  			break
  5003  		}
  5004  		c := v_0.AuxInt
  5005  		y := v_0.Args[0]
  5006  		v.reset(OpARMInvertFlags)
  5007  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftLL, types.TypeFlags)
  5008  		v0.AuxInt = c
  5009  		v0.AddArg(x)
  5010  		v0.AddArg(y)
  5011  		v.AddArg(v0)
  5012  		return true
  5013  	}
  5014  	// match: (CMP x (SRLconst [c] y))
  5015  	// result: (CMPshiftRL x y [c])
  5016  	for {
  5017  		_ = v.Args[1]
  5018  		x := v.Args[0]
  5019  		v_1 := v.Args[1]
  5020  		if v_1.Op != OpARMSRLconst {
  5021  			break
  5022  		}
  5023  		c := v_1.AuxInt
  5024  		y := v_1.Args[0]
  5025  		v.reset(OpARMCMPshiftRL)
  5026  		v.AuxInt = c
  5027  		v.AddArg(x)
  5028  		v.AddArg(y)
  5029  		return true
  5030  	}
  5031  	// match: (CMP (SRLconst [c] y) x)
  5032  	// result: (InvertFlags (CMPshiftRL x y [c]))
  5033  	for {
  5034  		x := v.Args[1]
  5035  		v_0 := v.Args[0]
  5036  		if v_0.Op != OpARMSRLconst {
  5037  			break
  5038  		}
  5039  		c := v_0.AuxInt
  5040  		y := v_0.Args[0]
  5041  		v.reset(OpARMInvertFlags)
  5042  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRL, types.TypeFlags)
  5043  		v0.AuxInt = c
  5044  		v0.AddArg(x)
  5045  		v0.AddArg(y)
  5046  		v.AddArg(v0)
  5047  		return true
  5048  	}
  5049  	// match: (CMP x (SRAconst [c] y))
  5050  	// result: (CMPshiftRA x y [c])
  5051  	for {
  5052  		_ = v.Args[1]
  5053  		x := v.Args[0]
  5054  		v_1 := v.Args[1]
  5055  		if v_1.Op != OpARMSRAconst {
  5056  			break
  5057  		}
  5058  		c := v_1.AuxInt
  5059  		y := v_1.Args[0]
  5060  		v.reset(OpARMCMPshiftRA)
  5061  		v.AuxInt = c
  5062  		v.AddArg(x)
  5063  		v.AddArg(y)
  5064  		return true
  5065  	}
  5066  	// match: (CMP (SRAconst [c] y) x)
  5067  	// result: (InvertFlags (CMPshiftRA x y [c]))
  5068  	for {
  5069  		x := v.Args[1]
  5070  		v_0 := v.Args[0]
  5071  		if v_0.Op != OpARMSRAconst {
  5072  			break
  5073  		}
  5074  		c := v_0.AuxInt
  5075  		y := v_0.Args[0]
  5076  		v.reset(OpARMInvertFlags)
  5077  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRA, types.TypeFlags)
  5078  		v0.AuxInt = c
  5079  		v0.AddArg(x)
  5080  		v0.AddArg(y)
  5081  		v.AddArg(v0)
  5082  		return true
  5083  	}
  5084  	// match: (CMP x (SLL y z))
  5085  	// result: (CMPshiftLLreg x y z)
  5086  	for {
  5087  		_ = v.Args[1]
  5088  		x := v.Args[0]
  5089  		v_1 := v.Args[1]
  5090  		if v_1.Op != OpARMSLL {
  5091  			break
  5092  		}
  5093  		z := v_1.Args[1]
  5094  		y := v_1.Args[0]
  5095  		v.reset(OpARMCMPshiftLLreg)
  5096  		v.AddArg(x)
  5097  		v.AddArg(y)
  5098  		v.AddArg(z)
  5099  		return true
  5100  	}
  5101  	// match: (CMP (SLL y z) x)
  5102  	// result: (InvertFlags (CMPshiftLLreg x y z))
  5103  	for {
  5104  		x := v.Args[1]
  5105  		v_0 := v.Args[0]
  5106  		if v_0.Op != OpARMSLL {
  5107  			break
  5108  		}
  5109  		z := v_0.Args[1]
  5110  		y := v_0.Args[0]
  5111  		v.reset(OpARMInvertFlags)
  5112  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftLLreg, types.TypeFlags)
  5113  		v0.AddArg(x)
  5114  		v0.AddArg(y)
  5115  		v0.AddArg(z)
  5116  		v.AddArg(v0)
  5117  		return true
  5118  	}
  5119  	return false
  5120  }
  5121  func rewriteValueARM_OpARMCMP_10(v *Value) bool {
  5122  	b := v.Block
  5123  	// match: (CMP x (SRL y z))
  5124  	// result: (CMPshiftRLreg x y z)
  5125  	for {
  5126  		_ = v.Args[1]
  5127  		x := v.Args[0]
  5128  		v_1 := v.Args[1]
  5129  		if v_1.Op != OpARMSRL {
  5130  			break
  5131  		}
  5132  		z := v_1.Args[1]
  5133  		y := v_1.Args[0]
  5134  		v.reset(OpARMCMPshiftRLreg)
  5135  		v.AddArg(x)
  5136  		v.AddArg(y)
  5137  		v.AddArg(z)
  5138  		return true
  5139  	}
  5140  	// match: (CMP (SRL y z) x)
  5141  	// result: (InvertFlags (CMPshiftRLreg x y z))
  5142  	for {
  5143  		x := v.Args[1]
  5144  		v_0 := v.Args[0]
  5145  		if v_0.Op != OpARMSRL {
  5146  			break
  5147  		}
  5148  		z := v_0.Args[1]
  5149  		y := v_0.Args[0]
  5150  		v.reset(OpARMInvertFlags)
  5151  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRLreg, types.TypeFlags)
  5152  		v0.AddArg(x)
  5153  		v0.AddArg(y)
  5154  		v0.AddArg(z)
  5155  		v.AddArg(v0)
  5156  		return true
  5157  	}
  5158  	// match: (CMP x (SRA y z))
  5159  	// result: (CMPshiftRAreg x y z)
  5160  	for {
  5161  		_ = v.Args[1]
  5162  		x := v.Args[0]
  5163  		v_1 := v.Args[1]
  5164  		if v_1.Op != OpARMSRA {
  5165  			break
  5166  		}
  5167  		z := v_1.Args[1]
  5168  		y := v_1.Args[0]
  5169  		v.reset(OpARMCMPshiftRAreg)
  5170  		v.AddArg(x)
  5171  		v.AddArg(y)
  5172  		v.AddArg(z)
  5173  		return true
  5174  	}
  5175  	// match: (CMP (SRA y z) x)
  5176  	// result: (InvertFlags (CMPshiftRAreg x y z))
  5177  	for {
  5178  		x := v.Args[1]
  5179  		v_0 := v.Args[0]
  5180  		if v_0.Op != OpARMSRA {
  5181  			break
  5182  		}
  5183  		z := v_0.Args[1]
  5184  		y := v_0.Args[0]
  5185  		v.reset(OpARMInvertFlags)
  5186  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRAreg, types.TypeFlags)
  5187  		v0.AddArg(x)
  5188  		v0.AddArg(y)
  5189  		v0.AddArg(z)
  5190  		v.AddArg(v0)
  5191  		return true
  5192  	}
  5193  	// match: (CMP x (RSBconst [0] y))
  5194  	// result: (CMN x y)
  5195  	for {
  5196  		_ = v.Args[1]
  5197  		x := v.Args[0]
  5198  		v_1 := v.Args[1]
  5199  		if v_1.Op != OpARMRSBconst || v_1.AuxInt != 0 {
  5200  			break
  5201  		}
  5202  		y := v_1.Args[0]
  5203  		v.reset(OpARMCMN)
  5204  		v.AddArg(x)
  5205  		v.AddArg(y)
  5206  		return true
  5207  	}
  5208  	return false
  5209  }
  5210  func rewriteValueARM_OpARMCMPD_0(v *Value) bool {
  5211  	// match: (CMPD x (MOVDconst [0]))
  5212  	// result: (CMPD0 x)
  5213  	for {
  5214  		_ = v.Args[1]
  5215  		x := v.Args[0]
  5216  		v_1 := v.Args[1]
  5217  		if v_1.Op != OpARMMOVDconst || v_1.AuxInt != 0 {
  5218  			break
  5219  		}
  5220  		v.reset(OpARMCMPD0)
  5221  		v.AddArg(x)
  5222  		return true
  5223  	}
  5224  	return false
  5225  }
  5226  func rewriteValueARM_OpARMCMPF_0(v *Value) bool {
  5227  	// match: (CMPF x (MOVFconst [0]))
  5228  	// result: (CMPF0 x)
  5229  	for {
  5230  		_ = v.Args[1]
  5231  		x := v.Args[0]
  5232  		v_1 := v.Args[1]
  5233  		if v_1.Op != OpARMMOVFconst || v_1.AuxInt != 0 {
  5234  			break
  5235  		}
  5236  		v.reset(OpARMCMPF0)
  5237  		v.AddArg(x)
  5238  		return true
  5239  	}
  5240  	return false
  5241  }
  5242  func rewriteValueARM_OpARMCMPconst_0(v *Value) bool {
  5243  	// match: (CMPconst (MOVWconst [x]) [y])
  5244  	// cond: int32(x)==int32(y)
  5245  	// result: (FlagEQ)
  5246  	for {
  5247  		y := v.AuxInt
  5248  		v_0 := v.Args[0]
  5249  		if v_0.Op != OpARMMOVWconst {
  5250  			break
  5251  		}
  5252  		x := v_0.AuxInt
  5253  		if !(int32(x) == int32(y)) {
  5254  			break
  5255  		}
  5256  		v.reset(OpARMFlagEQ)
  5257  		return true
  5258  	}
  5259  	// match: (CMPconst (MOVWconst [x]) [y])
  5260  	// cond: int32(x)<int32(y) && uint32(x)<uint32(y)
  5261  	// result: (FlagLT_ULT)
  5262  	for {
  5263  		y := v.AuxInt
  5264  		v_0 := v.Args[0]
  5265  		if v_0.Op != OpARMMOVWconst {
  5266  			break
  5267  		}
  5268  		x := v_0.AuxInt
  5269  		if !(int32(x) < int32(y) && uint32(x) < uint32(y)) {
  5270  			break
  5271  		}
  5272  		v.reset(OpARMFlagLT_ULT)
  5273  		return true
  5274  	}
  5275  	// match: (CMPconst (MOVWconst [x]) [y])
  5276  	// cond: int32(x)<int32(y) && uint32(x)>uint32(y)
  5277  	// result: (FlagLT_UGT)
  5278  	for {
  5279  		y := v.AuxInt
  5280  		v_0 := v.Args[0]
  5281  		if v_0.Op != OpARMMOVWconst {
  5282  			break
  5283  		}
  5284  		x := v_0.AuxInt
  5285  		if !(int32(x) < int32(y) && uint32(x) > uint32(y)) {
  5286  			break
  5287  		}
  5288  		v.reset(OpARMFlagLT_UGT)
  5289  		return true
  5290  	}
  5291  	// match: (CMPconst (MOVWconst [x]) [y])
  5292  	// cond: int32(x)>int32(y) && uint32(x)<uint32(y)
  5293  	// result: (FlagGT_ULT)
  5294  	for {
  5295  		y := v.AuxInt
  5296  		v_0 := v.Args[0]
  5297  		if v_0.Op != OpARMMOVWconst {
  5298  			break
  5299  		}
  5300  		x := v_0.AuxInt
  5301  		if !(int32(x) > int32(y) && uint32(x) < uint32(y)) {
  5302  			break
  5303  		}
  5304  		v.reset(OpARMFlagGT_ULT)
  5305  		return true
  5306  	}
  5307  	// match: (CMPconst (MOVWconst [x]) [y])
  5308  	// cond: int32(x)>int32(y) && uint32(x)>uint32(y)
  5309  	// result: (FlagGT_UGT)
  5310  	for {
  5311  		y := v.AuxInt
  5312  		v_0 := v.Args[0]
  5313  		if v_0.Op != OpARMMOVWconst {
  5314  			break
  5315  		}
  5316  		x := v_0.AuxInt
  5317  		if !(int32(x) > int32(y) && uint32(x) > uint32(y)) {
  5318  			break
  5319  		}
  5320  		v.reset(OpARMFlagGT_UGT)
  5321  		return true
  5322  	}
  5323  	// match: (CMPconst (MOVBUreg _) [c])
  5324  	// cond: 0xff < c
  5325  	// result: (FlagLT_ULT)
  5326  	for {
  5327  		c := v.AuxInt
  5328  		v_0 := v.Args[0]
  5329  		if v_0.Op != OpARMMOVBUreg || !(0xff < c) {
  5330  			break
  5331  		}
  5332  		v.reset(OpARMFlagLT_ULT)
  5333  		return true
  5334  	}
  5335  	// match: (CMPconst (MOVHUreg _) [c])
  5336  	// cond: 0xffff < c
  5337  	// result: (FlagLT_ULT)
  5338  	for {
  5339  		c := v.AuxInt
  5340  		v_0 := v.Args[0]
  5341  		if v_0.Op != OpARMMOVHUreg || !(0xffff < c) {
  5342  			break
  5343  		}
  5344  		v.reset(OpARMFlagLT_ULT)
  5345  		return true
  5346  	}
  5347  	// match: (CMPconst (ANDconst _ [m]) [n])
  5348  	// cond: 0 <= int32(m) && int32(m) < int32(n)
  5349  	// result: (FlagLT_ULT)
  5350  	for {
  5351  		n := v.AuxInt
  5352  		v_0 := v.Args[0]
  5353  		if v_0.Op != OpARMANDconst {
  5354  			break
  5355  		}
  5356  		m := v_0.AuxInt
  5357  		if !(0 <= int32(m) && int32(m) < int32(n)) {
  5358  			break
  5359  		}
  5360  		v.reset(OpARMFlagLT_ULT)
  5361  		return true
  5362  	}
  5363  	// match: (CMPconst (SRLconst _ [c]) [n])
  5364  	// cond: 0 <= n && 0 < c && c <= 32 && (1<<uint32(32-c)) <= uint32(n)
  5365  	// result: (FlagLT_ULT)
  5366  	for {
  5367  		n := v.AuxInt
  5368  		v_0 := v.Args[0]
  5369  		if v_0.Op != OpARMSRLconst {
  5370  			break
  5371  		}
  5372  		c := v_0.AuxInt
  5373  		if !(0 <= n && 0 < c && c <= 32 && (1<<uint32(32-c)) <= uint32(n)) {
  5374  			break
  5375  		}
  5376  		v.reset(OpARMFlagLT_ULT)
  5377  		return true
  5378  	}
  5379  	return false
  5380  }
  5381  func rewriteValueARM_OpARMCMPshiftLL_0(v *Value) bool {
  5382  	b := v.Block
  5383  	// match: (CMPshiftLL (MOVWconst [c]) x [d])
  5384  	// result: (InvertFlags (CMPconst [c] (SLLconst <x.Type> x [d])))
  5385  	for {
  5386  		d := v.AuxInt
  5387  		x := v.Args[1]
  5388  		v_0 := v.Args[0]
  5389  		if v_0.Op != OpARMMOVWconst {
  5390  			break
  5391  		}
  5392  		c := v_0.AuxInt
  5393  		v.reset(OpARMInvertFlags)
  5394  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  5395  		v0.AuxInt = c
  5396  		v1 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  5397  		v1.AuxInt = d
  5398  		v1.AddArg(x)
  5399  		v0.AddArg(v1)
  5400  		v.AddArg(v0)
  5401  		return true
  5402  	}
  5403  	// match: (CMPshiftLL x (MOVWconst [c]) [d])
  5404  	// result: (CMPconst x [int64(int32(uint32(c)<<uint64(d)))])
  5405  	for {
  5406  		d := v.AuxInt
  5407  		_ = v.Args[1]
  5408  		x := v.Args[0]
  5409  		v_1 := v.Args[1]
  5410  		if v_1.Op != OpARMMOVWconst {
  5411  			break
  5412  		}
  5413  		c := v_1.AuxInt
  5414  		v.reset(OpARMCMPconst)
  5415  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  5416  		v.AddArg(x)
  5417  		return true
  5418  	}
  5419  	return false
  5420  }
  5421  func rewriteValueARM_OpARMCMPshiftLLreg_0(v *Value) bool {
  5422  	b := v.Block
  5423  	// match: (CMPshiftLLreg (MOVWconst [c]) x y)
  5424  	// result: (InvertFlags (CMPconst [c] (SLL <x.Type> x y)))
  5425  	for {
  5426  		y := v.Args[2]
  5427  		v_0 := v.Args[0]
  5428  		if v_0.Op != OpARMMOVWconst {
  5429  			break
  5430  		}
  5431  		c := v_0.AuxInt
  5432  		x := v.Args[1]
  5433  		v.reset(OpARMInvertFlags)
  5434  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  5435  		v0.AuxInt = c
  5436  		v1 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  5437  		v1.AddArg(x)
  5438  		v1.AddArg(y)
  5439  		v0.AddArg(v1)
  5440  		v.AddArg(v0)
  5441  		return true
  5442  	}
  5443  	// match: (CMPshiftLLreg x y (MOVWconst [c]))
  5444  	// result: (CMPshiftLL x y [c])
  5445  	for {
  5446  		_ = v.Args[2]
  5447  		x := v.Args[0]
  5448  		y := v.Args[1]
  5449  		v_2 := v.Args[2]
  5450  		if v_2.Op != OpARMMOVWconst {
  5451  			break
  5452  		}
  5453  		c := v_2.AuxInt
  5454  		v.reset(OpARMCMPshiftLL)
  5455  		v.AuxInt = c
  5456  		v.AddArg(x)
  5457  		v.AddArg(y)
  5458  		return true
  5459  	}
  5460  	return false
  5461  }
  5462  func rewriteValueARM_OpARMCMPshiftRA_0(v *Value) bool {
  5463  	b := v.Block
  5464  	// match: (CMPshiftRA (MOVWconst [c]) x [d])
  5465  	// result: (InvertFlags (CMPconst [c] (SRAconst <x.Type> x [d])))
  5466  	for {
  5467  		d := v.AuxInt
  5468  		x := v.Args[1]
  5469  		v_0 := v.Args[0]
  5470  		if v_0.Op != OpARMMOVWconst {
  5471  			break
  5472  		}
  5473  		c := v_0.AuxInt
  5474  		v.reset(OpARMInvertFlags)
  5475  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  5476  		v0.AuxInt = c
  5477  		v1 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  5478  		v1.AuxInt = d
  5479  		v1.AddArg(x)
  5480  		v0.AddArg(v1)
  5481  		v.AddArg(v0)
  5482  		return true
  5483  	}
  5484  	// match: (CMPshiftRA x (MOVWconst [c]) [d])
  5485  	// result: (CMPconst x [int64(int32(c)>>uint64(d))])
  5486  	for {
  5487  		d := v.AuxInt
  5488  		_ = v.Args[1]
  5489  		x := v.Args[0]
  5490  		v_1 := v.Args[1]
  5491  		if v_1.Op != OpARMMOVWconst {
  5492  			break
  5493  		}
  5494  		c := v_1.AuxInt
  5495  		v.reset(OpARMCMPconst)
  5496  		v.AuxInt = int64(int32(c) >> uint64(d))
  5497  		v.AddArg(x)
  5498  		return true
  5499  	}
  5500  	return false
  5501  }
  5502  func rewriteValueARM_OpARMCMPshiftRAreg_0(v *Value) bool {
  5503  	b := v.Block
  5504  	// match: (CMPshiftRAreg (MOVWconst [c]) x y)
  5505  	// result: (InvertFlags (CMPconst [c] (SRA <x.Type> x y)))
  5506  	for {
  5507  		y := v.Args[2]
  5508  		v_0 := v.Args[0]
  5509  		if v_0.Op != OpARMMOVWconst {
  5510  			break
  5511  		}
  5512  		c := v_0.AuxInt
  5513  		x := v.Args[1]
  5514  		v.reset(OpARMInvertFlags)
  5515  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  5516  		v0.AuxInt = c
  5517  		v1 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  5518  		v1.AddArg(x)
  5519  		v1.AddArg(y)
  5520  		v0.AddArg(v1)
  5521  		v.AddArg(v0)
  5522  		return true
  5523  	}
  5524  	// match: (CMPshiftRAreg x y (MOVWconst [c]))
  5525  	// result: (CMPshiftRA x y [c])
  5526  	for {
  5527  		_ = v.Args[2]
  5528  		x := v.Args[0]
  5529  		y := v.Args[1]
  5530  		v_2 := v.Args[2]
  5531  		if v_2.Op != OpARMMOVWconst {
  5532  			break
  5533  		}
  5534  		c := v_2.AuxInt
  5535  		v.reset(OpARMCMPshiftRA)
  5536  		v.AuxInt = c
  5537  		v.AddArg(x)
  5538  		v.AddArg(y)
  5539  		return true
  5540  	}
  5541  	return false
  5542  }
  5543  func rewriteValueARM_OpARMCMPshiftRL_0(v *Value) bool {
  5544  	b := v.Block
  5545  	// match: (CMPshiftRL (MOVWconst [c]) x [d])
  5546  	// result: (InvertFlags (CMPconst [c] (SRLconst <x.Type> x [d])))
  5547  	for {
  5548  		d := v.AuxInt
  5549  		x := v.Args[1]
  5550  		v_0 := v.Args[0]
  5551  		if v_0.Op != OpARMMOVWconst {
  5552  			break
  5553  		}
  5554  		c := v_0.AuxInt
  5555  		v.reset(OpARMInvertFlags)
  5556  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  5557  		v0.AuxInt = c
  5558  		v1 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  5559  		v1.AuxInt = d
  5560  		v1.AddArg(x)
  5561  		v0.AddArg(v1)
  5562  		v.AddArg(v0)
  5563  		return true
  5564  	}
  5565  	// match: (CMPshiftRL x (MOVWconst [c]) [d])
  5566  	// result: (CMPconst x [int64(int32(uint32(c)>>uint64(d)))])
  5567  	for {
  5568  		d := v.AuxInt
  5569  		_ = v.Args[1]
  5570  		x := v.Args[0]
  5571  		v_1 := v.Args[1]
  5572  		if v_1.Op != OpARMMOVWconst {
  5573  			break
  5574  		}
  5575  		c := v_1.AuxInt
  5576  		v.reset(OpARMCMPconst)
  5577  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  5578  		v.AddArg(x)
  5579  		return true
  5580  	}
  5581  	return false
  5582  }
  5583  func rewriteValueARM_OpARMCMPshiftRLreg_0(v *Value) bool {
  5584  	b := v.Block
  5585  	// match: (CMPshiftRLreg (MOVWconst [c]) x y)
  5586  	// result: (InvertFlags (CMPconst [c] (SRL <x.Type> x y)))
  5587  	for {
  5588  		y := v.Args[2]
  5589  		v_0 := v.Args[0]
  5590  		if v_0.Op != OpARMMOVWconst {
  5591  			break
  5592  		}
  5593  		c := v_0.AuxInt
  5594  		x := v.Args[1]
  5595  		v.reset(OpARMInvertFlags)
  5596  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  5597  		v0.AuxInt = c
  5598  		v1 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  5599  		v1.AddArg(x)
  5600  		v1.AddArg(y)
  5601  		v0.AddArg(v1)
  5602  		v.AddArg(v0)
  5603  		return true
  5604  	}
  5605  	// match: (CMPshiftRLreg x y (MOVWconst [c]))
  5606  	// result: (CMPshiftRL x y [c])
  5607  	for {
  5608  		_ = v.Args[2]
  5609  		x := v.Args[0]
  5610  		y := v.Args[1]
  5611  		v_2 := v.Args[2]
  5612  		if v_2.Op != OpARMMOVWconst {
  5613  			break
  5614  		}
  5615  		c := v_2.AuxInt
  5616  		v.reset(OpARMCMPshiftRL)
  5617  		v.AuxInt = c
  5618  		v.AddArg(x)
  5619  		v.AddArg(y)
  5620  		return true
  5621  	}
  5622  	return false
  5623  }
  5624  func rewriteValueARM_OpARMEqual_0(v *Value) bool {
  5625  	// match: (Equal (FlagEQ))
  5626  	// result: (MOVWconst [1])
  5627  	for {
  5628  		v_0 := v.Args[0]
  5629  		if v_0.Op != OpARMFlagEQ {
  5630  			break
  5631  		}
  5632  		v.reset(OpARMMOVWconst)
  5633  		v.AuxInt = 1
  5634  		return true
  5635  	}
  5636  	// match: (Equal (FlagLT_ULT))
  5637  	// result: (MOVWconst [0])
  5638  	for {
  5639  		v_0 := v.Args[0]
  5640  		if v_0.Op != OpARMFlagLT_ULT {
  5641  			break
  5642  		}
  5643  		v.reset(OpARMMOVWconst)
  5644  		v.AuxInt = 0
  5645  		return true
  5646  	}
  5647  	// match: (Equal (FlagLT_UGT))
  5648  	// result: (MOVWconst [0])
  5649  	for {
  5650  		v_0 := v.Args[0]
  5651  		if v_0.Op != OpARMFlagLT_UGT {
  5652  			break
  5653  		}
  5654  		v.reset(OpARMMOVWconst)
  5655  		v.AuxInt = 0
  5656  		return true
  5657  	}
  5658  	// match: (Equal (FlagGT_ULT))
  5659  	// result: (MOVWconst [0])
  5660  	for {
  5661  		v_0 := v.Args[0]
  5662  		if v_0.Op != OpARMFlagGT_ULT {
  5663  			break
  5664  		}
  5665  		v.reset(OpARMMOVWconst)
  5666  		v.AuxInt = 0
  5667  		return true
  5668  	}
  5669  	// match: (Equal (FlagGT_UGT))
  5670  	// result: (MOVWconst [0])
  5671  	for {
  5672  		v_0 := v.Args[0]
  5673  		if v_0.Op != OpARMFlagGT_UGT {
  5674  			break
  5675  		}
  5676  		v.reset(OpARMMOVWconst)
  5677  		v.AuxInt = 0
  5678  		return true
  5679  	}
  5680  	// match: (Equal (InvertFlags x))
  5681  	// result: (Equal x)
  5682  	for {
  5683  		v_0 := v.Args[0]
  5684  		if v_0.Op != OpARMInvertFlags {
  5685  			break
  5686  		}
  5687  		x := v_0.Args[0]
  5688  		v.reset(OpARMEqual)
  5689  		v.AddArg(x)
  5690  		return true
  5691  	}
  5692  	return false
  5693  }
  5694  func rewriteValueARM_OpARMGreaterEqual_0(v *Value) bool {
  5695  	// match: (GreaterEqual (FlagEQ))
  5696  	// result: (MOVWconst [1])
  5697  	for {
  5698  		v_0 := v.Args[0]
  5699  		if v_0.Op != OpARMFlagEQ {
  5700  			break
  5701  		}
  5702  		v.reset(OpARMMOVWconst)
  5703  		v.AuxInt = 1
  5704  		return true
  5705  	}
  5706  	// match: (GreaterEqual (FlagLT_ULT))
  5707  	// result: (MOVWconst [0])
  5708  	for {
  5709  		v_0 := v.Args[0]
  5710  		if v_0.Op != OpARMFlagLT_ULT {
  5711  			break
  5712  		}
  5713  		v.reset(OpARMMOVWconst)
  5714  		v.AuxInt = 0
  5715  		return true
  5716  	}
  5717  	// match: (GreaterEqual (FlagLT_UGT))
  5718  	// result: (MOVWconst [0])
  5719  	for {
  5720  		v_0 := v.Args[0]
  5721  		if v_0.Op != OpARMFlagLT_UGT {
  5722  			break
  5723  		}
  5724  		v.reset(OpARMMOVWconst)
  5725  		v.AuxInt = 0
  5726  		return true
  5727  	}
  5728  	// match: (GreaterEqual (FlagGT_ULT))
  5729  	// result: (MOVWconst [1])
  5730  	for {
  5731  		v_0 := v.Args[0]
  5732  		if v_0.Op != OpARMFlagGT_ULT {
  5733  			break
  5734  		}
  5735  		v.reset(OpARMMOVWconst)
  5736  		v.AuxInt = 1
  5737  		return true
  5738  	}
  5739  	// match: (GreaterEqual (FlagGT_UGT))
  5740  	// result: (MOVWconst [1])
  5741  	for {
  5742  		v_0 := v.Args[0]
  5743  		if v_0.Op != OpARMFlagGT_UGT {
  5744  			break
  5745  		}
  5746  		v.reset(OpARMMOVWconst)
  5747  		v.AuxInt = 1
  5748  		return true
  5749  	}
  5750  	// match: (GreaterEqual (InvertFlags x))
  5751  	// result: (LessEqual x)
  5752  	for {
  5753  		v_0 := v.Args[0]
  5754  		if v_0.Op != OpARMInvertFlags {
  5755  			break
  5756  		}
  5757  		x := v_0.Args[0]
  5758  		v.reset(OpARMLessEqual)
  5759  		v.AddArg(x)
  5760  		return true
  5761  	}
  5762  	return false
  5763  }
  5764  func rewriteValueARM_OpARMGreaterEqualU_0(v *Value) bool {
  5765  	// match: (GreaterEqualU (FlagEQ))
  5766  	// result: (MOVWconst [1])
  5767  	for {
  5768  		v_0 := v.Args[0]
  5769  		if v_0.Op != OpARMFlagEQ {
  5770  			break
  5771  		}
  5772  		v.reset(OpARMMOVWconst)
  5773  		v.AuxInt = 1
  5774  		return true
  5775  	}
  5776  	// match: (GreaterEqualU (FlagLT_ULT))
  5777  	// result: (MOVWconst [0])
  5778  	for {
  5779  		v_0 := v.Args[0]
  5780  		if v_0.Op != OpARMFlagLT_ULT {
  5781  			break
  5782  		}
  5783  		v.reset(OpARMMOVWconst)
  5784  		v.AuxInt = 0
  5785  		return true
  5786  	}
  5787  	// match: (GreaterEqualU (FlagLT_UGT))
  5788  	// result: (MOVWconst [1])
  5789  	for {
  5790  		v_0 := v.Args[0]
  5791  		if v_0.Op != OpARMFlagLT_UGT {
  5792  			break
  5793  		}
  5794  		v.reset(OpARMMOVWconst)
  5795  		v.AuxInt = 1
  5796  		return true
  5797  	}
  5798  	// match: (GreaterEqualU (FlagGT_ULT))
  5799  	// result: (MOVWconst [0])
  5800  	for {
  5801  		v_0 := v.Args[0]
  5802  		if v_0.Op != OpARMFlagGT_ULT {
  5803  			break
  5804  		}
  5805  		v.reset(OpARMMOVWconst)
  5806  		v.AuxInt = 0
  5807  		return true
  5808  	}
  5809  	// match: (GreaterEqualU (FlagGT_UGT))
  5810  	// result: (MOVWconst [1])
  5811  	for {
  5812  		v_0 := v.Args[0]
  5813  		if v_0.Op != OpARMFlagGT_UGT {
  5814  			break
  5815  		}
  5816  		v.reset(OpARMMOVWconst)
  5817  		v.AuxInt = 1
  5818  		return true
  5819  	}
  5820  	// match: (GreaterEqualU (InvertFlags x))
  5821  	// result: (LessEqualU x)
  5822  	for {
  5823  		v_0 := v.Args[0]
  5824  		if v_0.Op != OpARMInvertFlags {
  5825  			break
  5826  		}
  5827  		x := v_0.Args[0]
  5828  		v.reset(OpARMLessEqualU)
  5829  		v.AddArg(x)
  5830  		return true
  5831  	}
  5832  	return false
  5833  }
  5834  func rewriteValueARM_OpARMGreaterThan_0(v *Value) bool {
  5835  	// match: (GreaterThan (FlagEQ))
  5836  	// result: (MOVWconst [0])
  5837  	for {
  5838  		v_0 := v.Args[0]
  5839  		if v_0.Op != OpARMFlagEQ {
  5840  			break
  5841  		}
  5842  		v.reset(OpARMMOVWconst)
  5843  		v.AuxInt = 0
  5844  		return true
  5845  	}
  5846  	// match: (GreaterThan (FlagLT_ULT))
  5847  	// result: (MOVWconst [0])
  5848  	for {
  5849  		v_0 := v.Args[0]
  5850  		if v_0.Op != OpARMFlagLT_ULT {
  5851  			break
  5852  		}
  5853  		v.reset(OpARMMOVWconst)
  5854  		v.AuxInt = 0
  5855  		return true
  5856  	}
  5857  	// match: (GreaterThan (FlagLT_UGT))
  5858  	// result: (MOVWconst [0])
  5859  	for {
  5860  		v_0 := v.Args[0]
  5861  		if v_0.Op != OpARMFlagLT_UGT {
  5862  			break
  5863  		}
  5864  		v.reset(OpARMMOVWconst)
  5865  		v.AuxInt = 0
  5866  		return true
  5867  	}
  5868  	// match: (GreaterThan (FlagGT_ULT))
  5869  	// result: (MOVWconst [1])
  5870  	for {
  5871  		v_0 := v.Args[0]
  5872  		if v_0.Op != OpARMFlagGT_ULT {
  5873  			break
  5874  		}
  5875  		v.reset(OpARMMOVWconst)
  5876  		v.AuxInt = 1
  5877  		return true
  5878  	}
  5879  	// match: (GreaterThan (FlagGT_UGT))
  5880  	// result: (MOVWconst [1])
  5881  	for {
  5882  		v_0 := v.Args[0]
  5883  		if v_0.Op != OpARMFlagGT_UGT {
  5884  			break
  5885  		}
  5886  		v.reset(OpARMMOVWconst)
  5887  		v.AuxInt = 1
  5888  		return true
  5889  	}
  5890  	// match: (GreaterThan (InvertFlags x))
  5891  	// result: (LessThan x)
  5892  	for {
  5893  		v_0 := v.Args[0]
  5894  		if v_0.Op != OpARMInvertFlags {
  5895  			break
  5896  		}
  5897  		x := v_0.Args[0]
  5898  		v.reset(OpARMLessThan)
  5899  		v.AddArg(x)
  5900  		return true
  5901  	}
  5902  	return false
  5903  }
  5904  func rewriteValueARM_OpARMGreaterThanU_0(v *Value) bool {
  5905  	// match: (GreaterThanU (FlagEQ))
  5906  	// result: (MOVWconst [0])
  5907  	for {
  5908  		v_0 := v.Args[0]
  5909  		if v_0.Op != OpARMFlagEQ {
  5910  			break
  5911  		}
  5912  		v.reset(OpARMMOVWconst)
  5913  		v.AuxInt = 0
  5914  		return true
  5915  	}
  5916  	// match: (GreaterThanU (FlagLT_ULT))
  5917  	// result: (MOVWconst [0])
  5918  	for {
  5919  		v_0 := v.Args[0]
  5920  		if v_0.Op != OpARMFlagLT_ULT {
  5921  			break
  5922  		}
  5923  		v.reset(OpARMMOVWconst)
  5924  		v.AuxInt = 0
  5925  		return true
  5926  	}
  5927  	// match: (GreaterThanU (FlagLT_UGT))
  5928  	// result: (MOVWconst [1])
  5929  	for {
  5930  		v_0 := v.Args[0]
  5931  		if v_0.Op != OpARMFlagLT_UGT {
  5932  			break
  5933  		}
  5934  		v.reset(OpARMMOVWconst)
  5935  		v.AuxInt = 1
  5936  		return true
  5937  	}
  5938  	// match: (GreaterThanU (FlagGT_ULT))
  5939  	// result: (MOVWconst [0])
  5940  	for {
  5941  		v_0 := v.Args[0]
  5942  		if v_0.Op != OpARMFlagGT_ULT {
  5943  			break
  5944  		}
  5945  		v.reset(OpARMMOVWconst)
  5946  		v.AuxInt = 0
  5947  		return true
  5948  	}
  5949  	// match: (GreaterThanU (FlagGT_UGT))
  5950  	// result: (MOVWconst [1])
  5951  	for {
  5952  		v_0 := v.Args[0]
  5953  		if v_0.Op != OpARMFlagGT_UGT {
  5954  			break
  5955  		}
  5956  		v.reset(OpARMMOVWconst)
  5957  		v.AuxInt = 1
  5958  		return true
  5959  	}
  5960  	// match: (GreaterThanU (InvertFlags x))
  5961  	// result: (LessThanU x)
  5962  	for {
  5963  		v_0 := v.Args[0]
  5964  		if v_0.Op != OpARMInvertFlags {
  5965  			break
  5966  		}
  5967  		x := v_0.Args[0]
  5968  		v.reset(OpARMLessThanU)
  5969  		v.AddArg(x)
  5970  		return true
  5971  	}
  5972  	return false
  5973  }
  5974  func rewriteValueARM_OpARMLessEqual_0(v *Value) bool {
  5975  	// match: (LessEqual (FlagEQ))
  5976  	// result: (MOVWconst [1])
  5977  	for {
  5978  		v_0 := v.Args[0]
  5979  		if v_0.Op != OpARMFlagEQ {
  5980  			break
  5981  		}
  5982  		v.reset(OpARMMOVWconst)
  5983  		v.AuxInt = 1
  5984  		return true
  5985  	}
  5986  	// match: (LessEqual (FlagLT_ULT))
  5987  	// result: (MOVWconst [1])
  5988  	for {
  5989  		v_0 := v.Args[0]
  5990  		if v_0.Op != OpARMFlagLT_ULT {
  5991  			break
  5992  		}
  5993  		v.reset(OpARMMOVWconst)
  5994  		v.AuxInt = 1
  5995  		return true
  5996  	}
  5997  	// match: (LessEqual (FlagLT_UGT))
  5998  	// result: (MOVWconst [1])
  5999  	for {
  6000  		v_0 := v.Args[0]
  6001  		if v_0.Op != OpARMFlagLT_UGT {
  6002  			break
  6003  		}
  6004  		v.reset(OpARMMOVWconst)
  6005  		v.AuxInt = 1
  6006  		return true
  6007  	}
  6008  	// match: (LessEqual (FlagGT_ULT))
  6009  	// result: (MOVWconst [0])
  6010  	for {
  6011  		v_0 := v.Args[0]
  6012  		if v_0.Op != OpARMFlagGT_ULT {
  6013  			break
  6014  		}
  6015  		v.reset(OpARMMOVWconst)
  6016  		v.AuxInt = 0
  6017  		return true
  6018  	}
  6019  	// match: (LessEqual (FlagGT_UGT))
  6020  	// result: (MOVWconst [0])
  6021  	for {
  6022  		v_0 := v.Args[0]
  6023  		if v_0.Op != OpARMFlagGT_UGT {
  6024  			break
  6025  		}
  6026  		v.reset(OpARMMOVWconst)
  6027  		v.AuxInt = 0
  6028  		return true
  6029  	}
  6030  	// match: (LessEqual (InvertFlags x))
  6031  	// result: (GreaterEqual x)
  6032  	for {
  6033  		v_0 := v.Args[0]
  6034  		if v_0.Op != OpARMInvertFlags {
  6035  			break
  6036  		}
  6037  		x := v_0.Args[0]
  6038  		v.reset(OpARMGreaterEqual)
  6039  		v.AddArg(x)
  6040  		return true
  6041  	}
  6042  	return false
  6043  }
  6044  func rewriteValueARM_OpARMLessEqualU_0(v *Value) bool {
  6045  	// match: (LessEqualU (FlagEQ))
  6046  	// result: (MOVWconst [1])
  6047  	for {
  6048  		v_0 := v.Args[0]
  6049  		if v_0.Op != OpARMFlagEQ {
  6050  			break
  6051  		}
  6052  		v.reset(OpARMMOVWconst)
  6053  		v.AuxInt = 1
  6054  		return true
  6055  	}
  6056  	// match: (LessEqualU (FlagLT_ULT))
  6057  	// result: (MOVWconst [1])
  6058  	for {
  6059  		v_0 := v.Args[0]
  6060  		if v_0.Op != OpARMFlagLT_ULT {
  6061  			break
  6062  		}
  6063  		v.reset(OpARMMOVWconst)
  6064  		v.AuxInt = 1
  6065  		return true
  6066  	}
  6067  	// match: (LessEqualU (FlagLT_UGT))
  6068  	// result: (MOVWconst [0])
  6069  	for {
  6070  		v_0 := v.Args[0]
  6071  		if v_0.Op != OpARMFlagLT_UGT {
  6072  			break
  6073  		}
  6074  		v.reset(OpARMMOVWconst)
  6075  		v.AuxInt = 0
  6076  		return true
  6077  	}
  6078  	// match: (LessEqualU (FlagGT_ULT))
  6079  	// result: (MOVWconst [1])
  6080  	for {
  6081  		v_0 := v.Args[0]
  6082  		if v_0.Op != OpARMFlagGT_ULT {
  6083  			break
  6084  		}
  6085  		v.reset(OpARMMOVWconst)
  6086  		v.AuxInt = 1
  6087  		return true
  6088  	}
  6089  	// match: (LessEqualU (FlagGT_UGT))
  6090  	// result: (MOVWconst [0])
  6091  	for {
  6092  		v_0 := v.Args[0]
  6093  		if v_0.Op != OpARMFlagGT_UGT {
  6094  			break
  6095  		}
  6096  		v.reset(OpARMMOVWconst)
  6097  		v.AuxInt = 0
  6098  		return true
  6099  	}
  6100  	// match: (LessEqualU (InvertFlags x))
  6101  	// result: (GreaterEqualU x)
  6102  	for {
  6103  		v_0 := v.Args[0]
  6104  		if v_0.Op != OpARMInvertFlags {
  6105  			break
  6106  		}
  6107  		x := v_0.Args[0]
  6108  		v.reset(OpARMGreaterEqualU)
  6109  		v.AddArg(x)
  6110  		return true
  6111  	}
  6112  	return false
  6113  }
  6114  func rewriteValueARM_OpARMLessThan_0(v *Value) bool {
  6115  	// match: (LessThan (FlagEQ))
  6116  	// result: (MOVWconst [0])
  6117  	for {
  6118  		v_0 := v.Args[0]
  6119  		if v_0.Op != OpARMFlagEQ {
  6120  			break
  6121  		}
  6122  		v.reset(OpARMMOVWconst)
  6123  		v.AuxInt = 0
  6124  		return true
  6125  	}
  6126  	// match: (LessThan (FlagLT_ULT))
  6127  	// result: (MOVWconst [1])
  6128  	for {
  6129  		v_0 := v.Args[0]
  6130  		if v_0.Op != OpARMFlagLT_ULT {
  6131  			break
  6132  		}
  6133  		v.reset(OpARMMOVWconst)
  6134  		v.AuxInt = 1
  6135  		return true
  6136  	}
  6137  	// match: (LessThan (FlagLT_UGT))
  6138  	// result: (MOVWconst [1])
  6139  	for {
  6140  		v_0 := v.Args[0]
  6141  		if v_0.Op != OpARMFlagLT_UGT {
  6142  			break
  6143  		}
  6144  		v.reset(OpARMMOVWconst)
  6145  		v.AuxInt = 1
  6146  		return true
  6147  	}
  6148  	// match: (LessThan (FlagGT_ULT))
  6149  	// result: (MOVWconst [0])
  6150  	for {
  6151  		v_0 := v.Args[0]
  6152  		if v_0.Op != OpARMFlagGT_ULT {
  6153  			break
  6154  		}
  6155  		v.reset(OpARMMOVWconst)
  6156  		v.AuxInt = 0
  6157  		return true
  6158  	}
  6159  	// match: (LessThan (FlagGT_UGT))
  6160  	// result: (MOVWconst [0])
  6161  	for {
  6162  		v_0 := v.Args[0]
  6163  		if v_0.Op != OpARMFlagGT_UGT {
  6164  			break
  6165  		}
  6166  		v.reset(OpARMMOVWconst)
  6167  		v.AuxInt = 0
  6168  		return true
  6169  	}
  6170  	// match: (LessThan (InvertFlags x))
  6171  	// result: (GreaterThan x)
  6172  	for {
  6173  		v_0 := v.Args[0]
  6174  		if v_0.Op != OpARMInvertFlags {
  6175  			break
  6176  		}
  6177  		x := v_0.Args[0]
  6178  		v.reset(OpARMGreaterThan)
  6179  		v.AddArg(x)
  6180  		return true
  6181  	}
  6182  	return false
  6183  }
  6184  func rewriteValueARM_OpARMLessThanU_0(v *Value) bool {
  6185  	// match: (LessThanU (FlagEQ))
  6186  	// result: (MOVWconst [0])
  6187  	for {
  6188  		v_0 := v.Args[0]
  6189  		if v_0.Op != OpARMFlagEQ {
  6190  			break
  6191  		}
  6192  		v.reset(OpARMMOVWconst)
  6193  		v.AuxInt = 0
  6194  		return true
  6195  	}
  6196  	// match: (LessThanU (FlagLT_ULT))
  6197  	// result: (MOVWconst [1])
  6198  	for {
  6199  		v_0 := v.Args[0]
  6200  		if v_0.Op != OpARMFlagLT_ULT {
  6201  			break
  6202  		}
  6203  		v.reset(OpARMMOVWconst)
  6204  		v.AuxInt = 1
  6205  		return true
  6206  	}
  6207  	// match: (LessThanU (FlagLT_UGT))
  6208  	// result: (MOVWconst [0])
  6209  	for {
  6210  		v_0 := v.Args[0]
  6211  		if v_0.Op != OpARMFlagLT_UGT {
  6212  			break
  6213  		}
  6214  		v.reset(OpARMMOVWconst)
  6215  		v.AuxInt = 0
  6216  		return true
  6217  	}
  6218  	// match: (LessThanU (FlagGT_ULT))
  6219  	// result: (MOVWconst [1])
  6220  	for {
  6221  		v_0 := v.Args[0]
  6222  		if v_0.Op != OpARMFlagGT_ULT {
  6223  			break
  6224  		}
  6225  		v.reset(OpARMMOVWconst)
  6226  		v.AuxInt = 1
  6227  		return true
  6228  	}
  6229  	// match: (LessThanU (FlagGT_UGT))
  6230  	// result: (MOVWconst [0])
  6231  	for {
  6232  		v_0 := v.Args[0]
  6233  		if v_0.Op != OpARMFlagGT_UGT {
  6234  			break
  6235  		}
  6236  		v.reset(OpARMMOVWconst)
  6237  		v.AuxInt = 0
  6238  		return true
  6239  	}
  6240  	// match: (LessThanU (InvertFlags x))
  6241  	// result: (GreaterThanU x)
  6242  	for {
  6243  		v_0 := v.Args[0]
  6244  		if v_0.Op != OpARMInvertFlags {
  6245  			break
  6246  		}
  6247  		x := v_0.Args[0]
  6248  		v.reset(OpARMGreaterThanU)
  6249  		v.AddArg(x)
  6250  		return true
  6251  	}
  6252  	return false
  6253  }
  6254  func rewriteValueARM_OpARMMOVBUload_0(v *Value) bool {
  6255  	// match: (MOVBUload [off1] {sym} (ADDconst [off2] ptr) mem)
  6256  	// result: (MOVBUload [off1+off2] {sym} ptr mem)
  6257  	for {
  6258  		off1 := v.AuxInt
  6259  		sym := v.Aux
  6260  		mem := v.Args[1]
  6261  		v_0 := v.Args[0]
  6262  		if v_0.Op != OpARMADDconst {
  6263  			break
  6264  		}
  6265  		off2 := v_0.AuxInt
  6266  		ptr := v_0.Args[0]
  6267  		v.reset(OpARMMOVBUload)
  6268  		v.AuxInt = off1 + off2
  6269  		v.Aux = sym
  6270  		v.AddArg(ptr)
  6271  		v.AddArg(mem)
  6272  		return true
  6273  	}
  6274  	// match: (MOVBUload [off1] {sym} (SUBconst [off2] ptr) mem)
  6275  	// result: (MOVBUload [off1-off2] {sym} ptr mem)
  6276  	for {
  6277  		off1 := v.AuxInt
  6278  		sym := v.Aux
  6279  		mem := v.Args[1]
  6280  		v_0 := v.Args[0]
  6281  		if v_0.Op != OpARMSUBconst {
  6282  			break
  6283  		}
  6284  		off2 := v_0.AuxInt
  6285  		ptr := v_0.Args[0]
  6286  		v.reset(OpARMMOVBUload)
  6287  		v.AuxInt = off1 - off2
  6288  		v.Aux = sym
  6289  		v.AddArg(ptr)
  6290  		v.AddArg(mem)
  6291  		return true
  6292  	}
  6293  	// match: (MOVBUload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  6294  	// cond: canMergeSym(sym1,sym2)
  6295  	// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6296  	for {
  6297  		off1 := v.AuxInt
  6298  		sym1 := v.Aux
  6299  		mem := v.Args[1]
  6300  		v_0 := v.Args[0]
  6301  		if v_0.Op != OpARMMOVWaddr {
  6302  			break
  6303  		}
  6304  		off2 := v_0.AuxInt
  6305  		sym2 := v_0.Aux
  6306  		ptr := v_0.Args[0]
  6307  		if !(canMergeSym(sym1, sym2)) {
  6308  			break
  6309  		}
  6310  		v.reset(OpARMMOVBUload)
  6311  		v.AuxInt = off1 + off2
  6312  		v.Aux = mergeSym(sym1, sym2)
  6313  		v.AddArg(ptr)
  6314  		v.AddArg(mem)
  6315  		return true
  6316  	}
  6317  	// match: (MOVBUload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  6318  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  6319  	// result: (MOVBUreg x)
  6320  	for {
  6321  		off := v.AuxInt
  6322  		sym := v.Aux
  6323  		_ = v.Args[1]
  6324  		ptr := v.Args[0]
  6325  		v_1 := v.Args[1]
  6326  		if v_1.Op != OpARMMOVBstore {
  6327  			break
  6328  		}
  6329  		off2 := v_1.AuxInt
  6330  		sym2 := v_1.Aux
  6331  		_ = v_1.Args[2]
  6332  		ptr2 := v_1.Args[0]
  6333  		x := v_1.Args[1]
  6334  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  6335  			break
  6336  		}
  6337  		v.reset(OpARMMOVBUreg)
  6338  		v.AddArg(x)
  6339  		return true
  6340  	}
  6341  	// match: (MOVBUload [0] {sym} (ADD ptr idx) mem)
  6342  	// cond: sym == nil
  6343  	// result: (MOVBUloadidx ptr idx mem)
  6344  	for {
  6345  		if v.AuxInt != 0 {
  6346  			break
  6347  		}
  6348  		sym := v.Aux
  6349  		mem := v.Args[1]
  6350  		v_0 := v.Args[0]
  6351  		if v_0.Op != OpARMADD {
  6352  			break
  6353  		}
  6354  		idx := v_0.Args[1]
  6355  		ptr := v_0.Args[0]
  6356  		if !(sym == nil) {
  6357  			break
  6358  		}
  6359  		v.reset(OpARMMOVBUloadidx)
  6360  		v.AddArg(ptr)
  6361  		v.AddArg(idx)
  6362  		v.AddArg(mem)
  6363  		return true
  6364  	}
  6365  	// match: (MOVBUload [off] {sym} (SB) _)
  6366  	// cond: symIsRO(sym)
  6367  	// result: (MOVWconst [int64(read8(sym, off))])
  6368  	for {
  6369  		off := v.AuxInt
  6370  		sym := v.Aux
  6371  		_ = v.Args[1]
  6372  		v_0 := v.Args[0]
  6373  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  6374  			break
  6375  		}
  6376  		v.reset(OpARMMOVWconst)
  6377  		v.AuxInt = int64(read8(sym, off))
  6378  		return true
  6379  	}
  6380  	return false
  6381  }
  6382  func rewriteValueARM_OpARMMOVBUloadidx_0(v *Value) bool {
  6383  	// match: (MOVBUloadidx ptr idx (MOVBstoreidx ptr2 idx x _))
  6384  	// cond: isSamePtr(ptr, ptr2)
  6385  	// result: (MOVBUreg x)
  6386  	for {
  6387  		_ = v.Args[2]
  6388  		ptr := v.Args[0]
  6389  		idx := v.Args[1]
  6390  		v_2 := v.Args[2]
  6391  		if v_2.Op != OpARMMOVBstoreidx {
  6392  			break
  6393  		}
  6394  		_ = v_2.Args[3]
  6395  		ptr2 := v_2.Args[0]
  6396  		if idx != v_2.Args[1] {
  6397  			break
  6398  		}
  6399  		x := v_2.Args[2]
  6400  		if !(isSamePtr(ptr, ptr2)) {
  6401  			break
  6402  		}
  6403  		v.reset(OpARMMOVBUreg)
  6404  		v.AddArg(x)
  6405  		return true
  6406  	}
  6407  	// match: (MOVBUloadidx ptr (MOVWconst [c]) mem)
  6408  	// result: (MOVBUload [c] ptr mem)
  6409  	for {
  6410  		mem := v.Args[2]
  6411  		ptr := v.Args[0]
  6412  		v_1 := v.Args[1]
  6413  		if v_1.Op != OpARMMOVWconst {
  6414  			break
  6415  		}
  6416  		c := v_1.AuxInt
  6417  		v.reset(OpARMMOVBUload)
  6418  		v.AuxInt = c
  6419  		v.AddArg(ptr)
  6420  		v.AddArg(mem)
  6421  		return true
  6422  	}
  6423  	// match: (MOVBUloadidx (MOVWconst [c]) ptr mem)
  6424  	// result: (MOVBUload [c] ptr mem)
  6425  	for {
  6426  		mem := v.Args[2]
  6427  		v_0 := v.Args[0]
  6428  		if v_0.Op != OpARMMOVWconst {
  6429  			break
  6430  		}
  6431  		c := v_0.AuxInt
  6432  		ptr := v.Args[1]
  6433  		v.reset(OpARMMOVBUload)
  6434  		v.AuxInt = c
  6435  		v.AddArg(ptr)
  6436  		v.AddArg(mem)
  6437  		return true
  6438  	}
  6439  	return false
  6440  }
  6441  func rewriteValueARM_OpARMMOVBUreg_0(v *Value) bool {
  6442  	// match: (MOVBUreg x:(MOVBUload _ _))
  6443  	// result: (MOVWreg x)
  6444  	for {
  6445  		x := v.Args[0]
  6446  		if x.Op != OpARMMOVBUload {
  6447  			break
  6448  		}
  6449  		_ = x.Args[1]
  6450  		v.reset(OpARMMOVWreg)
  6451  		v.AddArg(x)
  6452  		return true
  6453  	}
  6454  	// match: (MOVBUreg (ANDconst [c] x))
  6455  	// result: (ANDconst [c&0xff] x)
  6456  	for {
  6457  		v_0 := v.Args[0]
  6458  		if v_0.Op != OpARMANDconst {
  6459  			break
  6460  		}
  6461  		c := v_0.AuxInt
  6462  		x := v_0.Args[0]
  6463  		v.reset(OpARMANDconst)
  6464  		v.AuxInt = c & 0xff
  6465  		v.AddArg(x)
  6466  		return true
  6467  	}
  6468  	// match: (MOVBUreg x:(MOVBUreg _))
  6469  	// result: (MOVWreg x)
  6470  	for {
  6471  		x := v.Args[0]
  6472  		if x.Op != OpARMMOVBUreg {
  6473  			break
  6474  		}
  6475  		v.reset(OpARMMOVWreg)
  6476  		v.AddArg(x)
  6477  		return true
  6478  	}
  6479  	// match: (MOVBUreg (MOVWconst [c]))
  6480  	// result: (MOVWconst [int64(uint8(c))])
  6481  	for {
  6482  		v_0 := v.Args[0]
  6483  		if v_0.Op != OpARMMOVWconst {
  6484  			break
  6485  		}
  6486  		c := v_0.AuxInt
  6487  		v.reset(OpARMMOVWconst)
  6488  		v.AuxInt = int64(uint8(c))
  6489  		return true
  6490  	}
  6491  	return false
  6492  }
  6493  func rewriteValueARM_OpARMMOVBload_0(v *Value) bool {
  6494  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  6495  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  6496  	for {
  6497  		off1 := v.AuxInt
  6498  		sym := v.Aux
  6499  		mem := v.Args[1]
  6500  		v_0 := v.Args[0]
  6501  		if v_0.Op != OpARMADDconst {
  6502  			break
  6503  		}
  6504  		off2 := v_0.AuxInt
  6505  		ptr := v_0.Args[0]
  6506  		v.reset(OpARMMOVBload)
  6507  		v.AuxInt = off1 + off2
  6508  		v.Aux = sym
  6509  		v.AddArg(ptr)
  6510  		v.AddArg(mem)
  6511  		return true
  6512  	}
  6513  	// match: (MOVBload [off1] {sym} (SUBconst [off2] ptr) mem)
  6514  	// result: (MOVBload [off1-off2] {sym} ptr mem)
  6515  	for {
  6516  		off1 := v.AuxInt
  6517  		sym := v.Aux
  6518  		mem := v.Args[1]
  6519  		v_0 := v.Args[0]
  6520  		if v_0.Op != OpARMSUBconst {
  6521  			break
  6522  		}
  6523  		off2 := v_0.AuxInt
  6524  		ptr := v_0.Args[0]
  6525  		v.reset(OpARMMOVBload)
  6526  		v.AuxInt = off1 - off2
  6527  		v.Aux = sym
  6528  		v.AddArg(ptr)
  6529  		v.AddArg(mem)
  6530  		return true
  6531  	}
  6532  	// match: (MOVBload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  6533  	// cond: canMergeSym(sym1,sym2)
  6534  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6535  	for {
  6536  		off1 := v.AuxInt
  6537  		sym1 := v.Aux
  6538  		mem := v.Args[1]
  6539  		v_0 := v.Args[0]
  6540  		if v_0.Op != OpARMMOVWaddr {
  6541  			break
  6542  		}
  6543  		off2 := v_0.AuxInt
  6544  		sym2 := v_0.Aux
  6545  		ptr := v_0.Args[0]
  6546  		if !(canMergeSym(sym1, sym2)) {
  6547  			break
  6548  		}
  6549  		v.reset(OpARMMOVBload)
  6550  		v.AuxInt = off1 + off2
  6551  		v.Aux = mergeSym(sym1, sym2)
  6552  		v.AddArg(ptr)
  6553  		v.AddArg(mem)
  6554  		return true
  6555  	}
  6556  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  6557  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  6558  	// result: (MOVBreg x)
  6559  	for {
  6560  		off := v.AuxInt
  6561  		sym := v.Aux
  6562  		_ = v.Args[1]
  6563  		ptr := v.Args[0]
  6564  		v_1 := v.Args[1]
  6565  		if v_1.Op != OpARMMOVBstore {
  6566  			break
  6567  		}
  6568  		off2 := v_1.AuxInt
  6569  		sym2 := v_1.Aux
  6570  		_ = v_1.Args[2]
  6571  		ptr2 := v_1.Args[0]
  6572  		x := v_1.Args[1]
  6573  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  6574  			break
  6575  		}
  6576  		v.reset(OpARMMOVBreg)
  6577  		v.AddArg(x)
  6578  		return true
  6579  	}
  6580  	// match: (MOVBload [0] {sym} (ADD ptr idx) mem)
  6581  	// cond: sym == nil
  6582  	// result: (MOVBloadidx ptr idx mem)
  6583  	for {
  6584  		if v.AuxInt != 0 {
  6585  			break
  6586  		}
  6587  		sym := v.Aux
  6588  		mem := v.Args[1]
  6589  		v_0 := v.Args[0]
  6590  		if v_0.Op != OpARMADD {
  6591  			break
  6592  		}
  6593  		idx := v_0.Args[1]
  6594  		ptr := v_0.Args[0]
  6595  		if !(sym == nil) {
  6596  			break
  6597  		}
  6598  		v.reset(OpARMMOVBloadidx)
  6599  		v.AddArg(ptr)
  6600  		v.AddArg(idx)
  6601  		v.AddArg(mem)
  6602  		return true
  6603  	}
  6604  	return false
  6605  }
  6606  func rewriteValueARM_OpARMMOVBloadidx_0(v *Value) bool {
  6607  	// match: (MOVBloadidx ptr idx (MOVBstoreidx ptr2 idx x _))
  6608  	// cond: isSamePtr(ptr, ptr2)
  6609  	// result: (MOVBreg x)
  6610  	for {
  6611  		_ = v.Args[2]
  6612  		ptr := v.Args[0]
  6613  		idx := v.Args[1]
  6614  		v_2 := v.Args[2]
  6615  		if v_2.Op != OpARMMOVBstoreidx {
  6616  			break
  6617  		}
  6618  		_ = v_2.Args[3]
  6619  		ptr2 := v_2.Args[0]
  6620  		if idx != v_2.Args[1] {
  6621  			break
  6622  		}
  6623  		x := v_2.Args[2]
  6624  		if !(isSamePtr(ptr, ptr2)) {
  6625  			break
  6626  		}
  6627  		v.reset(OpARMMOVBreg)
  6628  		v.AddArg(x)
  6629  		return true
  6630  	}
  6631  	// match: (MOVBloadidx ptr (MOVWconst [c]) mem)
  6632  	// result: (MOVBload [c] ptr mem)
  6633  	for {
  6634  		mem := v.Args[2]
  6635  		ptr := v.Args[0]
  6636  		v_1 := v.Args[1]
  6637  		if v_1.Op != OpARMMOVWconst {
  6638  			break
  6639  		}
  6640  		c := v_1.AuxInt
  6641  		v.reset(OpARMMOVBload)
  6642  		v.AuxInt = c
  6643  		v.AddArg(ptr)
  6644  		v.AddArg(mem)
  6645  		return true
  6646  	}
  6647  	// match: (MOVBloadidx (MOVWconst [c]) ptr mem)
  6648  	// result: (MOVBload [c] ptr mem)
  6649  	for {
  6650  		mem := v.Args[2]
  6651  		v_0 := v.Args[0]
  6652  		if v_0.Op != OpARMMOVWconst {
  6653  			break
  6654  		}
  6655  		c := v_0.AuxInt
  6656  		ptr := v.Args[1]
  6657  		v.reset(OpARMMOVBload)
  6658  		v.AuxInt = c
  6659  		v.AddArg(ptr)
  6660  		v.AddArg(mem)
  6661  		return true
  6662  	}
  6663  	return false
  6664  }
  6665  func rewriteValueARM_OpARMMOVBreg_0(v *Value) bool {
  6666  	// match: (MOVBreg x:(MOVBload _ _))
  6667  	// result: (MOVWreg x)
  6668  	for {
  6669  		x := v.Args[0]
  6670  		if x.Op != OpARMMOVBload {
  6671  			break
  6672  		}
  6673  		_ = x.Args[1]
  6674  		v.reset(OpARMMOVWreg)
  6675  		v.AddArg(x)
  6676  		return true
  6677  	}
  6678  	// match: (MOVBreg (ANDconst [c] x))
  6679  	// cond: c & 0x80 == 0
  6680  	// result: (ANDconst [c&0x7f] x)
  6681  	for {
  6682  		v_0 := v.Args[0]
  6683  		if v_0.Op != OpARMANDconst {
  6684  			break
  6685  		}
  6686  		c := v_0.AuxInt
  6687  		x := v_0.Args[0]
  6688  		if !(c&0x80 == 0) {
  6689  			break
  6690  		}
  6691  		v.reset(OpARMANDconst)
  6692  		v.AuxInt = c & 0x7f
  6693  		v.AddArg(x)
  6694  		return true
  6695  	}
  6696  	// match: (MOVBreg x:(MOVBreg _))
  6697  	// result: (MOVWreg x)
  6698  	for {
  6699  		x := v.Args[0]
  6700  		if x.Op != OpARMMOVBreg {
  6701  			break
  6702  		}
  6703  		v.reset(OpARMMOVWreg)
  6704  		v.AddArg(x)
  6705  		return true
  6706  	}
  6707  	// match: (MOVBreg (MOVWconst [c]))
  6708  	// result: (MOVWconst [int64(int8(c))])
  6709  	for {
  6710  		v_0 := v.Args[0]
  6711  		if v_0.Op != OpARMMOVWconst {
  6712  			break
  6713  		}
  6714  		c := v_0.AuxInt
  6715  		v.reset(OpARMMOVWconst)
  6716  		v.AuxInt = int64(int8(c))
  6717  		return true
  6718  	}
  6719  	return false
  6720  }
  6721  func rewriteValueARM_OpARMMOVBstore_0(v *Value) bool {
  6722  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6723  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  6724  	for {
  6725  		off1 := v.AuxInt
  6726  		sym := v.Aux
  6727  		mem := v.Args[2]
  6728  		v_0 := v.Args[0]
  6729  		if v_0.Op != OpARMADDconst {
  6730  			break
  6731  		}
  6732  		off2 := v_0.AuxInt
  6733  		ptr := v_0.Args[0]
  6734  		val := v.Args[1]
  6735  		v.reset(OpARMMOVBstore)
  6736  		v.AuxInt = off1 + off2
  6737  		v.Aux = sym
  6738  		v.AddArg(ptr)
  6739  		v.AddArg(val)
  6740  		v.AddArg(mem)
  6741  		return true
  6742  	}
  6743  	// match: (MOVBstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  6744  	// result: (MOVBstore [off1-off2] {sym} ptr val mem)
  6745  	for {
  6746  		off1 := v.AuxInt
  6747  		sym := v.Aux
  6748  		mem := v.Args[2]
  6749  		v_0 := v.Args[0]
  6750  		if v_0.Op != OpARMSUBconst {
  6751  			break
  6752  		}
  6753  		off2 := v_0.AuxInt
  6754  		ptr := v_0.Args[0]
  6755  		val := v.Args[1]
  6756  		v.reset(OpARMMOVBstore)
  6757  		v.AuxInt = off1 - off2
  6758  		v.Aux = sym
  6759  		v.AddArg(ptr)
  6760  		v.AddArg(val)
  6761  		v.AddArg(mem)
  6762  		return true
  6763  	}
  6764  	// match: (MOVBstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  6765  	// cond: canMergeSym(sym1,sym2)
  6766  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  6767  	for {
  6768  		off1 := v.AuxInt
  6769  		sym1 := v.Aux
  6770  		mem := v.Args[2]
  6771  		v_0 := v.Args[0]
  6772  		if v_0.Op != OpARMMOVWaddr {
  6773  			break
  6774  		}
  6775  		off2 := v_0.AuxInt
  6776  		sym2 := v_0.Aux
  6777  		ptr := v_0.Args[0]
  6778  		val := v.Args[1]
  6779  		if !(canMergeSym(sym1, sym2)) {
  6780  			break
  6781  		}
  6782  		v.reset(OpARMMOVBstore)
  6783  		v.AuxInt = off1 + off2
  6784  		v.Aux = mergeSym(sym1, sym2)
  6785  		v.AddArg(ptr)
  6786  		v.AddArg(val)
  6787  		v.AddArg(mem)
  6788  		return true
  6789  	}
  6790  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  6791  	// result: (MOVBstore [off] {sym} ptr x mem)
  6792  	for {
  6793  		off := v.AuxInt
  6794  		sym := v.Aux
  6795  		mem := v.Args[2]
  6796  		ptr := v.Args[0]
  6797  		v_1 := v.Args[1]
  6798  		if v_1.Op != OpARMMOVBreg {
  6799  			break
  6800  		}
  6801  		x := v_1.Args[0]
  6802  		v.reset(OpARMMOVBstore)
  6803  		v.AuxInt = off
  6804  		v.Aux = sym
  6805  		v.AddArg(ptr)
  6806  		v.AddArg(x)
  6807  		v.AddArg(mem)
  6808  		return true
  6809  	}
  6810  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  6811  	// result: (MOVBstore [off] {sym} ptr x mem)
  6812  	for {
  6813  		off := v.AuxInt
  6814  		sym := v.Aux
  6815  		mem := v.Args[2]
  6816  		ptr := v.Args[0]
  6817  		v_1 := v.Args[1]
  6818  		if v_1.Op != OpARMMOVBUreg {
  6819  			break
  6820  		}
  6821  		x := v_1.Args[0]
  6822  		v.reset(OpARMMOVBstore)
  6823  		v.AuxInt = off
  6824  		v.Aux = sym
  6825  		v.AddArg(ptr)
  6826  		v.AddArg(x)
  6827  		v.AddArg(mem)
  6828  		return true
  6829  	}
  6830  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  6831  	// result: (MOVBstore [off] {sym} ptr x mem)
  6832  	for {
  6833  		off := v.AuxInt
  6834  		sym := v.Aux
  6835  		mem := v.Args[2]
  6836  		ptr := v.Args[0]
  6837  		v_1 := v.Args[1]
  6838  		if v_1.Op != OpARMMOVHreg {
  6839  			break
  6840  		}
  6841  		x := v_1.Args[0]
  6842  		v.reset(OpARMMOVBstore)
  6843  		v.AuxInt = off
  6844  		v.Aux = sym
  6845  		v.AddArg(ptr)
  6846  		v.AddArg(x)
  6847  		v.AddArg(mem)
  6848  		return true
  6849  	}
  6850  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  6851  	// result: (MOVBstore [off] {sym} ptr x mem)
  6852  	for {
  6853  		off := v.AuxInt
  6854  		sym := v.Aux
  6855  		mem := v.Args[2]
  6856  		ptr := v.Args[0]
  6857  		v_1 := v.Args[1]
  6858  		if v_1.Op != OpARMMOVHUreg {
  6859  			break
  6860  		}
  6861  		x := v_1.Args[0]
  6862  		v.reset(OpARMMOVBstore)
  6863  		v.AuxInt = off
  6864  		v.Aux = sym
  6865  		v.AddArg(ptr)
  6866  		v.AddArg(x)
  6867  		v.AddArg(mem)
  6868  		return true
  6869  	}
  6870  	// match: (MOVBstore [0] {sym} (ADD ptr idx) val mem)
  6871  	// cond: sym == nil
  6872  	// result: (MOVBstoreidx ptr idx val mem)
  6873  	for {
  6874  		if v.AuxInt != 0 {
  6875  			break
  6876  		}
  6877  		sym := v.Aux
  6878  		mem := v.Args[2]
  6879  		v_0 := v.Args[0]
  6880  		if v_0.Op != OpARMADD {
  6881  			break
  6882  		}
  6883  		idx := v_0.Args[1]
  6884  		ptr := v_0.Args[0]
  6885  		val := v.Args[1]
  6886  		if !(sym == nil) {
  6887  			break
  6888  		}
  6889  		v.reset(OpARMMOVBstoreidx)
  6890  		v.AddArg(ptr)
  6891  		v.AddArg(idx)
  6892  		v.AddArg(val)
  6893  		v.AddArg(mem)
  6894  		return true
  6895  	}
  6896  	return false
  6897  }
  6898  func rewriteValueARM_OpARMMOVBstoreidx_0(v *Value) bool {
  6899  	// match: (MOVBstoreidx ptr (MOVWconst [c]) val mem)
  6900  	// result: (MOVBstore [c] ptr val mem)
  6901  	for {
  6902  		mem := v.Args[3]
  6903  		ptr := v.Args[0]
  6904  		v_1 := v.Args[1]
  6905  		if v_1.Op != OpARMMOVWconst {
  6906  			break
  6907  		}
  6908  		c := v_1.AuxInt
  6909  		val := v.Args[2]
  6910  		v.reset(OpARMMOVBstore)
  6911  		v.AuxInt = c
  6912  		v.AddArg(ptr)
  6913  		v.AddArg(val)
  6914  		v.AddArg(mem)
  6915  		return true
  6916  	}
  6917  	// match: (MOVBstoreidx (MOVWconst [c]) ptr val mem)
  6918  	// result: (MOVBstore [c] ptr val mem)
  6919  	for {
  6920  		mem := v.Args[3]
  6921  		v_0 := v.Args[0]
  6922  		if v_0.Op != OpARMMOVWconst {
  6923  			break
  6924  		}
  6925  		c := v_0.AuxInt
  6926  		ptr := v.Args[1]
  6927  		val := v.Args[2]
  6928  		v.reset(OpARMMOVBstore)
  6929  		v.AuxInt = c
  6930  		v.AddArg(ptr)
  6931  		v.AddArg(val)
  6932  		v.AddArg(mem)
  6933  		return true
  6934  	}
  6935  	return false
  6936  }
  6937  func rewriteValueARM_OpARMMOVDload_0(v *Value) bool {
  6938  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  6939  	// result: (MOVDload [off1+off2] {sym} ptr mem)
  6940  	for {
  6941  		off1 := v.AuxInt
  6942  		sym := v.Aux
  6943  		mem := v.Args[1]
  6944  		v_0 := v.Args[0]
  6945  		if v_0.Op != OpARMADDconst {
  6946  			break
  6947  		}
  6948  		off2 := v_0.AuxInt
  6949  		ptr := v_0.Args[0]
  6950  		v.reset(OpARMMOVDload)
  6951  		v.AuxInt = off1 + off2
  6952  		v.Aux = sym
  6953  		v.AddArg(ptr)
  6954  		v.AddArg(mem)
  6955  		return true
  6956  	}
  6957  	// match: (MOVDload [off1] {sym} (SUBconst [off2] ptr) mem)
  6958  	// result: (MOVDload [off1-off2] {sym} ptr mem)
  6959  	for {
  6960  		off1 := v.AuxInt
  6961  		sym := v.Aux
  6962  		mem := v.Args[1]
  6963  		v_0 := v.Args[0]
  6964  		if v_0.Op != OpARMSUBconst {
  6965  			break
  6966  		}
  6967  		off2 := v_0.AuxInt
  6968  		ptr := v_0.Args[0]
  6969  		v.reset(OpARMMOVDload)
  6970  		v.AuxInt = off1 - off2
  6971  		v.Aux = sym
  6972  		v.AddArg(ptr)
  6973  		v.AddArg(mem)
  6974  		return true
  6975  	}
  6976  	// match: (MOVDload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  6977  	// cond: canMergeSym(sym1,sym2)
  6978  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6979  	for {
  6980  		off1 := v.AuxInt
  6981  		sym1 := v.Aux
  6982  		mem := v.Args[1]
  6983  		v_0 := v.Args[0]
  6984  		if v_0.Op != OpARMMOVWaddr {
  6985  			break
  6986  		}
  6987  		off2 := v_0.AuxInt
  6988  		sym2 := v_0.Aux
  6989  		ptr := v_0.Args[0]
  6990  		if !(canMergeSym(sym1, sym2)) {
  6991  			break
  6992  		}
  6993  		v.reset(OpARMMOVDload)
  6994  		v.AuxInt = off1 + off2
  6995  		v.Aux = mergeSym(sym1, sym2)
  6996  		v.AddArg(ptr)
  6997  		v.AddArg(mem)
  6998  		return true
  6999  	}
  7000  	// match: (MOVDload [off] {sym} ptr (MOVDstore [off2] {sym2} ptr2 x _))
  7001  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  7002  	// result: x
  7003  	for {
  7004  		off := v.AuxInt
  7005  		sym := v.Aux
  7006  		_ = v.Args[1]
  7007  		ptr := v.Args[0]
  7008  		v_1 := v.Args[1]
  7009  		if v_1.Op != OpARMMOVDstore {
  7010  			break
  7011  		}
  7012  		off2 := v_1.AuxInt
  7013  		sym2 := v_1.Aux
  7014  		_ = v_1.Args[2]
  7015  		ptr2 := v_1.Args[0]
  7016  		x := v_1.Args[1]
  7017  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  7018  			break
  7019  		}
  7020  		v.reset(OpCopy)
  7021  		v.Type = x.Type
  7022  		v.AddArg(x)
  7023  		return true
  7024  	}
  7025  	return false
  7026  }
  7027  func rewriteValueARM_OpARMMOVDstore_0(v *Value) bool {
  7028  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7029  	// result: (MOVDstore [off1+off2] {sym} ptr val mem)
  7030  	for {
  7031  		off1 := v.AuxInt
  7032  		sym := v.Aux
  7033  		mem := v.Args[2]
  7034  		v_0 := v.Args[0]
  7035  		if v_0.Op != OpARMADDconst {
  7036  			break
  7037  		}
  7038  		off2 := v_0.AuxInt
  7039  		ptr := v_0.Args[0]
  7040  		val := v.Args[1]
  7041  		v.reset(OpARMMOVDstore)
  7042  		v.AuxInt = off1 + off2
  7043  		v.Aux = sym
  7044  		v.AddArg(ptr)
  7045  		v.AddArg(val)
  7046  		v.AddArg(mem)
  7047  		return true
  7048  	}
  7049  	// match: (MOVDstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  7050  	// result: (MOVDstore [off1-off2] {sym} ptr val mem)
  7051  	for {
  7052  		off1 := v.AuxInt
  7053  		sym := v.Aux
  7054  		mem := v.Args[2]
  7055  		v_0 := v.Args[0]
  7056  		if v_0.Op != OpARMSUBconst {
  7057  			break
  7058  		}
  7059  		off2 := v_0.AuxInt
  7060  		ptr := v_0.Args[0]
  7061  		val := v.Args[1]
  7062  		v.reset(OpARMMOVDstore)
  7063  		v.AuxInt = off1 - off2
  7064  		v.Aux = sym
  7065  		v.AddArg(ptr)
  7066  		v.AddArg(val)
  7067  		v.AddArg(mem)
  7068  		return true
  7069  	}
  7070  	// match: (MOVDstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  7071  	// cond: canMergeSym(sym1,sym2)
  7072  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7073  	for {
  7074  		off1 := v.AuxInt
  7075  		sym1 := v.Aux
  7076  		mem := v.Args[2]
  7077  		v_0 := v.Args[0]
  7078  		if v_0.Op != OpARMMOVWaddr {
  7079  			break
  7080  		}
  7081  		off2 := v_0.AuxInt
  7082  		sym2 := v_0.Aux
  7083  		ptr := v_0.Args[0]
  7084  		val := v.Args[1]
  7085  		if !(canMergeSym(sym1, sym2)) {
  7086  			break
  7087  		}
  7088  		v.reset(OpARMMOVDstore)
  7089  		v.AuxInt = off1 + off2
  7090  		v.Aux = mergeSym(sym1, sym2)
  7091  		v.AddArg(ptr)
  7092  		v.AddArg(val)
  7093  		v.AddArg(mem)
  7094  		return true
  7095  	}
  7096  	return false
  7097  }
  7098  func rewriteValueARM_OpARMMOVFload_0(v *Value) bool {
  7099  	// match: (MOVFload [off1] {sym} (ADDconst [off2] ptr) mem)
  7100  	// result: (MOVFload [off1+off2] {sym} ptr mem)
  7101  	for {
  7102  		off1 := v.AuxInt
  7103  		sym := v.Aux
  7104  		mem := v.Args[1]
  7105  		v_0 := v.Args[0]
  7106  		if v_0.Op != OpARMADDconst {
  7107  			break
  7108  		}
  7109  		off2 := v_0.AuxInt
  7110  		ptr := v_0.Args[0]
  7111  		v.reset(OpARMMOVFload)
  7112  		v.AuxInt = off1 + off2
  7113  		v.Aux = sym
  7114  		v.AddArg(ptr)
  7115  		v.AddArg(mem)
  7116  		return true
  7117  	}
  7118  	// match: (MOVFload [off1] {sym} (SUBconst [off2] ptr) mem)
  7119  	// result: (MOVFload [off1-off2] {sym} ptr mem)
  7120  	for {
  7121  		off1 := v.AuxInt
  7122  		sym := v.Aux
  7123  		mem := v.Args[1]
  7124  		v_0 := v.Args[0]
  7125  		if v_0.Op != OpARMSUBconst {
  7126  			break
  7127  		}
  7128  		off2 := v_0.AuxInt
  7129  		ptr := v_0.Args[0]
  7130  		v.reset(OpARMMOVFload)
  7131  		v.AuxInt = off1 - off2
  7132  		v.Aux = sym
  7133  		v.AddArg(ptr)
  7134  		v.AddArg(mem)
  7135  		return true
  7136  	}
  7137  	// match: (MOVFload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  7138  	// cond: canMergeSym(sym1,sym2)
  7139  	// result: (MOVFload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  7140  	for {
  7141  		off1 := v.AuxInt
  7142  		sym1 := v.Aux
  7143  		mem := v.Args[1]
  7144  		v_0 := v.Args[0]
  7145  		if v_0.Op != OpARMMOVWaddr {
  7146  			break
  7147  		}
  7148  		off2 := v_0.AuxInt
  7149  		sym2 := v_0.Aux
  7150  		ptr := v_0.Args[0]
  7151  		if !(canMergeSym(sym1, sym2)) {
  7152  			break
  7153  		}
  7154  		v.reset(OpARMMOVFload)
  7155  		v.AuxInt = off1 + off2
  7156  		v.Aux = mergeSym(sym1, sym2)
  7157  		v.AddArg(ptr)
  7158  		v.AddArg(mem)
  7159  		return true
  7160  	}
  7161  	// match: (MOVFload [off] {sym} ptr (MOVFstore [off2] {sym2} ptr2 x _))
  7162  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  7163  	// result: x
  7164  	for {
  7165  		off := v.AuxInt
  7166  		sym := v.Aux
  7167  		_ = v.Args[1]
  7168  		ptr := v.Args[0]
  7169  		v_1 := v.Args[1]
  7170  		if v_1.Op != OpARMMOVFstore {
  7171  			break
  7172  		}
  7173  		off2 := v_1.AuxInt
  7174  		sym2 := v_1.Aux
  7175  		_ = v_1.Args[2]
  7176  		ptr2 := v_1.Args[0]
  7177  		x := v_1.Args[1]
  7178  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  7179  			break
  7180  		}
  7181  		v.reset(OpCopy)
  7182  		v.Type = x.Type
  7183  		v.AddArg(x)
  7184  		return true
  7185  	}
  7186  	return false
  7187  }
  7188  func rewriteValueARM_OpARMMOVFstore_0(v *Value) bool {
  7189  	// match: (MOVFstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7190  	// result: (MOVFstore [off1+off2] {sym} ptr val mem)
  7191  	for {
  7192  		off1 := v.AuxInt
  7193  		sym := v.Aux
  7194  		mem := v.Args[2]
  7195  		v_0 := v.Args[0]
  7196  		if v_0.Op != OpARMADDconst {
  7197  			break
  7198  		}
  7199  		off2 := v_0.AuxInt
  7200  		ptr := v_0.Args[0]
  7201  		val := v.Args[1]
  7202  		v.reset(OpARMMOVFstore)
  7203  		v.AuxInt = off1 + off2
  7204  		v.Aux = sym
  7205  		v.AddArg(ptr)
  7206  		v.AddArg(val)
  7207  		v.AddArg(mem)
  7208  		return true
  7209  	}
  7210  	// match: (MOVFstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  7211  	// result: (MOVFstore [off1-off2] {sym} ptr val mem)
  7212  	for {
  7213  		off1 := v.AuxInt
  7214  		sym := v.Aux
  7215  		mem := v.Args[2]
  7216  		v_0 := v.Args[0]
  7217  		if v_0.Op != OpARMSUBconst {
  7218  			break
  7219  		}
  7220  		off2 := v_0.AuxInt
  7221  		ptr := v_0.Args[0]
  7222  		val := v.Args[1]
  7223  		v.reset(OpARMMOVFstore)
  7224  		v.AuxInt = off1 - off2
  7225  		v.Aux = sym
  7226  		v.AddArg(ptr)
  7227  		v.AddArg(val)
  7228  		v.AddArg(mem)
  7229  		return true
  7230  	}
  7231  	// match: (MOVFstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  7232  	// cond: canMergeSym(sym1,sym2)
  7233  	// result: (MOVFstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7234  	for {
  7235  		off1 := v.AuxInt
  7236  		sym1 := v.Aux
  7237  		mem := v.Args[2]
  7238  		v_0 := v.Args[0]
  7239  		if v_0.Op != OpARMMOVWaddr {
  7240  			break
  7241  		}
  7242  		off2 := v_0.AuxInt
  7243  		sym2 := v_0.Aux
  7244  		ptr := v_0.Args[0]
  7245  		val := v.Args[1]
  7246  		if !(canMergeSym(sym1, sym2)) {
  7247  			break
  7248  		}
  7249  		v.reset(OpARMMOVFstore)
  7250  		v.AuxInt = off1 + off2
  7251  		v.Aux = mergeSym(sym1, sym2)
  7252  		v.AddArg(ptr)
  7253  		v.AddArg(val)
  7254  		v.AddArg(mem)
  7255  		return true
  7256  	}
  7257  	return false
  7258  }
  7259  func rewriteValueARM_OpARMMOVHUload_0(v *Value) bool {
  7260  	b := v.Block
  7261  	config := b.Func.Config
  7262  	// match: (MOVHUload [off1] {sym} (ADDconst [off2] ptr) mem)
  7263  	// result: (MOVHUload [off1+off2] {sym} ptr mem)
  7264  	for {
  7265  		off1 := v.AuxInt
  7266  		sym := v.Aux
  7267  		mem := v.Args[1]
  7268  		v_0 := v.Args[0]
  7269  		if v_0.Op != OpARMADDconst {
  7270  			break
  7271  		}
  7272  		off2 := v_0.AuxInt
  7273  		ptr := v_0.Args[0]
  7274  		v.reset(OpARMMOVHUload)
  7275  		v.AuxInt = off1 + off2
  7276  		v.Aux = sym
  7277  		v.AddArg(ptr)
  7278  		v.AddArg(mem)
  7279  		return true
  7280  	}
  7281  	// match: (MOVHUload [off1] {sym} (SUBconst [off2] ptr) mem)
  7282  	// result: (MOVHUload [off1-off2] {sym} ptr mem)
  7283  	for {
  7284  		off1 := v.AuxInt
  7285  		sym := v.Aux
  7286  		mem := v.Args[1]
  7287  		v_0 := v.Args[0]
  7288  		if v_0.Op != OpARMSUBconst {
  7289  			break
  7290  		}
  7291  		off2 := v_0.AuxInt
  7292  		ptr := v_0.Args[0]
  7293  		v.reset(OpARMMOVHUload)
  7294  		v.AuxInt = off1 - off2
  7295  		v.Aux = sym
  7296  		v.AddArg(ptr)
  7297  		v.AddArg(mem)
  7298  		return true
  7299  	}
  7300  	// match: (MOVHUload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  7301  	// cond: canMergeSym(sym1,sym2)
  7302  	// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  7303  	for {
  7304  		off1 := v.AuxInt
  7305  		sym1 := v.Aux
  7306  		mem := v.Args[1]
  7307  		v_0 := v.Args[0]
  7308  		if v_0.Op != OpARMMOVWaddr {
  7309  			break
  7310  		}
  7311  		off2 := v_0.AuxInt
  7312  		sym2 := v_0.Aux
  7313  		ptr := v_0.Args[0]
  7314  		if !(canMergeSym(sym1, sym2)) {
  7315  			break
  7316  		}
  7317  		v.reset(OpARMMOVHUload)
  7318  		v.AuxInt = off1 + off2
  7319  		v.Aux = mergeSym(sym1, sym2)
  7320  		v.AddArg(ptr)
  7321  		v.AddArg(mem)
  7322  		return true
  7323  	}
  7324  	// match: (MOVHUload [off] {sym} ptr (MOVHstore [off2] {sym2} ptr2 x _))
  7325  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  7326  	// result: (MOVHUreg x)
  7327  	for {
  7328  		off := v.AuxInt
  7329  		sym := v.Aux
  7330  		_ = v.Args[1]
  7331  		ptr := v.Args[0]
  7332  		v_1 := v.Args[1]
  7333  		if v_1.Op != OpARMMOVHstore {
  7334  			break
  7335  		}
  7336  		off2 := v_1.AuxInt
  7337  		sym2 := v_1.Aux
  7338  		_ = v_1.Args[2]
  7339  		ptr2 := v_1.Args[0]
  7340  		x := v_1.Args[1]
  7341  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  7342  			break
  7343  		}
  7344  		v.reset(OpARMMOVHUreg)
  7345  		v.AddArg(x)
  7346  		return true
  7347  	}
  7348  	// match: (MOVHUload [0] {sym} (ADD ptr idx) mem)
  7349  	// cond: sym == nil
  7350  	// result: (MOVHUloadidx ptr idx mem)
  7351  	for {
  7352  		if v.AuxInt != 0 {
  7353  			break
  7354  		}
  7355  		sym := v.Aux
  7356  		mem := v.Args[1]
  7357  		v_0 := v.Args[0]
  7358  		if v_0.Op != OpARMADD {
  7359  			break
  7360  		}
  7361  		idx := v_0.Args[1]
  7362  		ptr := v_0.Args[0]
  7363  		if !(sym == nil) {
  7364  			break
  7365  		}
  7366  		v.reset(OpARMMOVHUloadidx)
  7367  		v.AddArg(ptr)
  7368  		v.AddArg(idx)
  7369  		v.AddArg(mem)
  7370  		return true
  7371  	}
  7372  	// match: (MOVHUload [off] {sym} (SB) _)
  7373  	// cond: symIsRO(sym)
  7374  	// result: (MOVWconst [int64(read16(sym, off, config.BigEndian))])
  7375  	for {
  7376  		off := v.AuxInt
  7377  		sym := v.Aux
  7378  		_ = v.Args[1]
  7379  		v_0 := v.Args[0]
  7380  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  7381  			break
  7382  		}
  7383  		v.reset(OpARMMOVWconst)
  7384  		v.AuxInt = int64(read16(sym, off, config.BigEndian))
  7385  		return true
  7386  	}
  7387  	return false
  7388  }
  7389  func rewriteValueARM_OpARMMOVHUloadidx_0(v *Value) bool {
  7390  	// match: (MOVHUloadidx ptr idx (MOVHstoreidx ptr2 idx x _))
  7391  	// cond: isSamePtr(ptr, ptr2)
  7392  	// result: (MOVHUreg x)
  7393  	for {
  7394  		_ = v.Args[2]
  7395  		ptr := v.Args[0]
  7396  		idx := v.Args[1]
  7397  		v_2 := v.Args[2]
  7398  		if v_2.Op != OpARMMOVHstoreidx {
  7399  			break
  7400  		}
  7401  		_ = v_2.Args[3]
  7402  		ptr2 := v_2.Args[0]
  7403  		if idx != v_2.Args[1] {
  7404  			break
  7405  		}
  7406  		x := v_2.Args[2]
  7407  		if !(isSamePtr(ptr, ptr2)) {
  7408  			break
  7409  		}
  7410  		v.reset(OpARMMOVHUreg)
  7411  		v.AddArg(x)
  7412  		return true
  7413  	}
  7414  	// match: (MOVHUloadidx ptr (MOVWconst [c]) mem)
  7415  	// result: (MOVHUload [c] ptr mem)
  7416  	for {
  7417  		mem := v.Args[2]
  7418  		ptr := v.Args[0]
  7419  		v_1 := v.Args[1]
  7420  		if v_1.Op != OpARMMOVWconst {
  7421  			break
  7422  		}
  7423  		c := v_1.AuxInt
  7424  		v.reset(OpARMMOVHUload)
  7425  		v.AuxInt = c
  7426  		v.AddArg(ptr)
  7427  		v.AddArg(mem)
  7428  		return true
  7429  	}
  7430  	// match: (MOVHUloadidx (MOVWconst [c]) ptr mem)
  7431  	// result: (MOVHUload [c] ptr mem)
  7432  	for {
  7433  		mem := v.Args[2]
  7434  		v_0 := v.Args[0]
  7435  		if v_0.Op != OpARMMOVWconst {
  7436  			break
  7437  		}
  7438  		c := v_0.AuxInt
  7439  		ptr := v.Args[1]
  7440  		v.reset(OpARMMOVHUload)
  7441  		v.AuxInt = c
  7442  		v.AddArg(ptr)
  7443  		v.AddArg(mem)
  7444  		return true
  7445  	}
  7446  	return false
  7447  }
  7448  func rewriteValueARM_OpARMMOVHUreg_0(v *Value) bool {
  7449  	// match: (MOVHUreg x:(MOVBUload _ _))
  7450  	// result: (MOVWreg x)
  7451  	for {
  7452  		x := v.Args[0]
  7453  		if x.Op != OpARMMOVBUload {
  7454  			break
  7455  		}
  7456  		_ = x.Args[1]
  7457  		v.reset(OpARMMOVWreg)
  7458  		v.AddArg(x)
  7459  		return true
  7460  	}
  7461  	// match: (MOVHUreg x:(MOVHUload _ _))
  7462  	// result: (MOVWreg x)
  7463  	for {
  7464  		x := v.Args[0]
  7465  		if x.Op != OpARMMOVHUload {
  7466  			break
  7467  		}
  7468  		_ = x.Args[1]
  7469  		v.reset(OpARMMOVWreg)
  7470  		v.AddArg(x)
  7471  		return true
  7472  	}
  7473  	// match: (MOVHUreg (ANDconst [c] x))
  7474  	// result: (ANDconst [c&0xffff] x)
  7475  	for {
  7476  		v_0 := v.Args[0]
  7477  		if v_0.Op != OpARMANDconst {
  7478  			break
  7479  		}
  7480  		c := v_0.AuxInt
  7481  		x := v_0.Args[0]
  7482  		v.reset(OpARMANDconst)
  7483  		v.AuxInt = c & 0xffff
  7484  		v.AddArg(x)
  7485  		return true
  7486  	}
  7487  	// match: (MOVHUreg x:(MOVBUreg _))
  7488  	// result: (MOVWreg x)
  7489  	for {
  7490  		x := v.Args[0]
  7491  		if x.Op != OpARMMOVBUreg {
  7492  			break
  7493  		}
  7494  		v.reset(OpARMMOVWreg)
  7495  		v.AddArg(x)
  7496  		return true
  7497  	}
  7498  	// match: (MOVHUreg x:(MOVHUreg _))
  7499  	// result: (MOVWreg x)
  7500  	for {
  7501  		x := v.Args[0]
  7502  		if x.Op != OpARMMOVHUreg {
  7503  			break
  7504  		}
  7505  		v.reset(OpARMMOVWreg)
  7506  		v.AddArg(x)
  7507  		return true
  7508  	}
  7509  	// match: (MOVHUreg (MOVWconst [c]))
  7510  	// result: (MOVWconst [int64(uint16(c))])
  7511  	for {
  7512  		v_0 := v.Args[0]
  7513  		if v_0.Op != OpARMMOVWconst {
  7514  			break
  7515  		}
  7516  		c := v_0.AuxInt
  7517  		v.reset(OpARMMOVWconst)
  7518  		v.AuxInt = int64(uint16(c))
  7519  		return true
  7520  	}
  7521  	return false
  7522  }
  7523  func rewriteValueARM_OpARMMOVHload_0(v *Value) bool {
  7524  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
  7525  	// result: (MOVHload [off1+off2] {sym} ptr mem)
  7526  	for {
  7527  		off1 := v.AuxInt
  7528  		sym := v.Aux
  7529  		mem := v.Args[1]
  7530  		v_0 := v.Args[0]
  7531  		if v_0.Op != OpARMADDconst {
  7532  			break
  7533  		}
  7534  		off2 := v_0.AuxInt
  7535  		ptr := v_0.Args[0]
  7536  		v.reset(OpARMMOVHload)
  7537  		v.AuxInt = off1 + off2
  7538  		v.Aux = sym
  7539  		v.AddArg(ptr)
  7540  		v.AddArg(mem)
  7541  		return true
  7542  	}
  7543  	// match: (MOVHload [off1] {sym} (SUBconst [off2] ptr) mem)
  7544  	// result: (MOVHload [off1-off2] {sym} ptr mem)
  7545  	for {
  7546  		off1 := v.AuxInt
  7547  		sym := v.Aux
  7548  		mem := v.Args[1]
  7549  		v_0 := v.Args[0]
  7550  		if v_0.Op != OpARMSUBconst {
  7551  			break
  7552  		}
  7553  		off2 := v_0.AuxInt
  7554  		ptr := v_0.Args[0]
  7555  		v.reset(OpARMMOVHload)
  7556  		v.AuxInt = off1 - off2
  7557  		v.Aux = sym
  7558  		v.AddArg(ptr)
  7559  		v.AddArg(mem)
  7560  		return true
  7561  	}
  7562  	// match: (MOVHload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  7563  	// cond: canMergeSym(sym1,sym2)
  7564  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  7565  	for {
  7566  		off1 := v.AuxInt
  7567  		sym1 := v.Aux
  7568  		mem := v.Args[1]
  7569  		v_0 := v.Args[0]
  7570  		if v_0.Op != OpARMMOVWaddr {
  7571  			break
  7572  		}
  7573  		off2 := v_0.AuxInt
  7574  		sym2 := v_0.Aux
  7575  		ptr := v_0.Args[0]
  7576  		if !(canMergeSym(sym1, sym2)) {
  7577  			break
  7578  		}
  7579  		v.reset(OpARMMOVHload)
  7580  		v.AuxInt = off1 + off2
  7581  		v.Aux = mergeSym(sym1, sym2)
  7582  		v.AddArg(ptr)
  7583  		v.AddArg(mem)
  7584  		return true
  7585  	}
  7586  	// match: (MOVHload [off] {sym} ptr (MOVHstore [off2] {sym2} ptr2 x _))
  7587  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  7588  	// result: (MOVHreg x)
  7589  	for {
  7590  		off := v.AuxInt
  7591  		sym := v.Aux
  7592  		_ = v.Args[1]
  7593  		ptr := v.Args[0]
  7594  		v_1 := v.Args[1]
  7595  		if v_1.Op != OpARMMOVHstore {
  7596  			break
  7597  		}
  7598  		off2 := v_1.AuxInt
  7599  		sym2 := v_1.Aux
  7600  		_ = v_1.Args[2]
  7601  		ptr2 := v_1.Args[0]
  7602  		x := v_1.Args[1]
  7603  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  7604  			break
  7605  		}
  7606  		v.reset(OpARMMOVHreg)
  7607  		v.AddArg(x)
  7608  		return true
  7609  	}
  7610  	// match: (MOVHload [0] {sym} (ADD ptr idx) mem)
  7611  	// cond: sym == nil
  7612  	// result: (MOVHloadidx ptr idx mem)
  7613  	for {
  7614  		if v.AuxInt != 0 {
  7615  			break
  7616  		}
  7617  		sym := v.Aux
  7618  		mem := v.Args[1]
  7619  		v_0 := v.Args[0]
  7620  		if v_0.Op != OpARMADD {
  7621  			break
  7622  		}
  7623  		idx := v_0.Args[1]
  7624  		ptr := v_0.Args[0]
  7625  		if !(sym == nil) {
  7626  			break
  7627  		}
  7628  		v.reset(OpARMMOVHloadidx)
  7629  		v.AddArg(ptr)
  7630  		v.AddArg(idx)
  7631  		v.AddArg(mem)
  7632  		return true
  7633  	}
  7634  	return false
  7635  }
  7636  func rewriteValueARM_OpARMMOVHloadidx_0(v *Value) bool {
  7637  	// match: (MOVHloadidx ptr idx (MOVHstoreidx ptr2 idx x _))
  7638  	// cond: isSamePtr(ptr, ptr2)
  7639  	// result: (MOVHreg x)
  7640  	for {
  7641  		_ = v.Args[2]
  7642  		ptr := v.Args[0]
  7643  		idx := v.Args[1]
  7644  		v_2 := v.Args[2]
  7645  		if v_2.Op != OpARMMOVHstoreidx {
  7646  			break
  7647  		}
  7648  		_ = v_2.Args[3]
  7649  		ptr2 := v_2.Args[0]
  7650  		if idx != v_2.Args[1] {
  7651  			break
  7652  		}
  7653  		x := v_2.Args[2]
  7654  		if !(isSamePtr(ptr, ptr2)) {
  7655  			break
  7656  		}
  7657  		v.reset(OpARMMOVHreg)
  7658  		v.AddArg(x)
  7659  		return true
  7660  	}
  7661  	// match: (MOVHloadidx ptr (MOVWconst [c]) mem)
  7662  	// result: (MOVHload [c] ptr mem)
  7663  	for {
  7664  		mem := v.Args[2]
  7665  		ptr := v.Args[0]
  7666  		v_1 := v.Args[1]
  7667  		if v_1.Op != OpARMMOVWconst {
  7668  			break
  7669  		}
  7670  		c := v_1.AuxInt
  7671  		v.reset(OpARMMOVHload)
  7672  		v.AuxInt = c
  7673  		v.AddArg(ptr)
  7674  		v.AddArg(mem)
  7675  		return true
  7676  	}
  7677  	// match: (MOVHloadidx (MOVWconst [c]) ptr mem)
  7678  	// result: (MOVHload [c] ptr mem)
  7679  	for {
  7680  		mem := v.Args[2]
  7681  		v_0 := v.Args[0]
  7682  		if v_0.Op != OpARMMOVWconst {
  7683  			break
  7684  		}
  7685  		c := v_0.AuxInt
  7686  		ptr := v.Args[1]
  7687  		v.reset(OpARMMOVHload)
  7688  		v.AuxInt = c
  7689  		v.AddArg(ptr)
  7690  		v.AddArg(mem)
  7691  		return true
  7692  	}
  7693  	return false
  7694  }
  7695  func rewriteValueARM_OpARMMOVHreg_0(v *Value) bool {
  7696  	// match: (MOVHreg x:(MOVBload _ _))
  7697  	// result: (MOVWreg x)
  7698  	for {
  7699  		x := v.Args[0]
  7700  		if x.Op != OpARMMOVBload {
  7701  			break
  7702  		}
  7703  		_ = x.Args[1]
  7704  		v.reset(OpARMMOVWreg)
  7705  		v.AddArg(x)
  7706  		return true
  7707  	}
  7708  	// match: (MOVHreg x:(MOVBUload _ _))
  7709  	// result: (MOVWreg x)
  7710  	for {
  7711  		x := v.Args[0]
  7712  		if x.Op != OpARMMOVBUload {
  7713  			break
  7714  		}
  7715  		_ = x.Args[1]
  7716  		v.reset(OpARMMOVWreg)
  7717  		v.AddArg(x)
  7718  		return true
  7719  	}
  7720  	// match: (MOVHreg x:(MOVHload _ _))
  7721  	// result: (MOVWreg x)
  7722  	for {
  7723  		x := v.Args[0]
  7724  		if x.Op != OpARMMOVHload {
  7725  			break
  7726  		}
  7727  		_ = x.Args[1]
  7728  		v.reset(OpARMMOVWreg)
  7729  		v.AddArg(x)
  7730  		return true
  7731  	}
  7732  	// match: (MOVHreg (ANDconst [c] x))
  7733  	// cond: c & 0x8000 == 0
  7734  	// result: (ANDconst [c&0x7fff] x)
  7735  	for {
  7736  		v_0 := v.Args[0]
  7737  		if v_0.Op != OpARMANDconst {
  7738  			break
  7739  		}
  7740  		c := v_0.AuxInt
  7741  		x := v_0.Args[0]
  7742  		if !(c&0x8000 == 0) {
  7743  			break
  7744  		}
  7745  		v.reset(OpARMANDconst)
  7746  		v.AuxInt = c & 0x7fff
  7747  		v.AddArg(x)
  7748  		return true
  7749  	}
  7750  	// match: (MOVHreg x:(MOVBreg _))
  7751  	// result: (MOVWreg x)
  7752  	for {
  7753  		x := v.Args[0]
  7754  		if x.Op != OpARMMOVBreg {
  7755  			break
  7756  		}
  7757  		v.reset(OpARMMOVWreg)
  7758  		v.AddArg(x)
  7759  		return true
  7760  	}
  7761  	// match: (MOVHreg x:(MOVBUreg _))
  7762  	// result: (MOVWreg x)
  7763  	for {
  7764  		x := v.Args[0]
  7765  		if x.Op != OpARMMOVBUreg {
  7766  			break
  7767  		}
  7768  		v.reset(OpARMMOVWreg)
  7769  		v.AddArg(x)
  7770  		return true
  7771  	}
  7772  	// match: (MOVHreg x:(MOVHreg _))
  7773  	// result: (MOVWreg x)
  7774  	for {
  7775  		x := v.Args[0]
  7776  		if x.Op != OpARMMOVHreg {
  7777  			break
  7778  		}
  7779  		v.reset(OpARMMOVWreg)
  7780  		v.AddArg(x)
  7781  		return true
  7782  	}
  7783  	// match: (MOVHreg (MOVWconst [c]))
  7784  	// result: (MOVWconst [int64(int16(c))])
  7785  	for {
  7786  		v_0 := v.Args[0]
  7787  		if v_0.Op != OpARMMOVWconst {
  7788  			break
  7789  		}
  7790  		c := v_0.AuxInt
  7791  		v.reset(OpARMMOVWconst)
  7792  		v.AuxInt = int64(int16(c))
  7793  		return true
  7794  	}
  7795  	return false
  7796  }
  7797  func rewriteValueARM_OpARMMOVHstore_0(v *Value) bool {
  7798  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7799  	// result: (MOVHstore [off1+off2] {sym} ptr val mem)
  7800  	for {
  7801  		off1 := v.AuxInt
  7802  		sym := v.Aux
  7803  		mem := v.Args[2]
  7804  		v_0 := v.Args[0]
  7805  		if v_0.Op != OpARMADDconst {
  7806  			break
  7807  		}
  7808  		off2 := v_0.AuxInt
  7809  		ptr := v_0.Args[0]
  7810  		val := v.Args[1]
  7811  		v.reset(OpARMMOVHstore)
  7812  		v.AuxInt = off1 + off2
  7813  		v.Aux = sym
  7814  		v.AddArg(ptr)
  7815  		v.AddArg(val)
  7816  		v.AddArg(mem)
  7817  		return true
  7818  	}
  7819  	// match: (MOVHstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  7820  	// result: (MOVHstore [off1-off2] {sym} ptr val mem)
  7821  	for {
  7822  		off1 := v.AuxInt
  7823  		sym := v.Aux
  7824  		mem := v.Args[2]
  7825  		v_0 := v.Args[0]
  7826  		if v_0.Op != OpARMSUBconst {
  7827  			break
  7828  		}
  7829  		off2 := v_0.AuxInt
  7830  		ptr := v_0.Args[0]
  7831  		val := v.Args[1]
  7832  		v.reset(OpARMMOVHstore)
  7833  		v.AuxInt = off1 - off2
  7834  		v.Aux = sym
  7835  		v.AddArg(ptr)
  7836  		v.AddArg(val)
  7837  		v.AddArg(mem)
  7838  		return true
  7839  	}
  7840  	// match: (MOVHstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  7841  	// cond: canMergeSym(sym1,sym2)
  7842  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7843  	for {
  7844  		off1 := v.AuxInt
  7845  		sym1 := v.Aux
  7846  		mem := v.Args[2]
  7847  		v_0 := v.Args[0]
  7848  		if v_0.Op != OpARMMOVWaddr {
  7849  			break
  7850  		}
  7851  		off2 := v_0.AuxInt
  7852  		sym2 := v_0.Aux
  7853  		ptr := v_0.Args[0]
  7854  		val := v.Args[1]
  7855  		if !(canMergeSym(sym1, sym2)) {
  7856  			break
  7857  		}
  7858  		v.reset(OpARMMOVHstore)
  7859  		v.AuxInt = off1 + off2
  7860  		v.Aux = mergeSym(sym1, sym2)
  7861  		v.AddArg(ptr)
  7862  		v.AddArg(val)
  7863  		v.AddArg(mem)
  7864  		return true
  7865  	}
  7866  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  7867  	// result: (MOVHstore [off] {sym} ptr x mem)
  7868  	for {
  7869  		off := v.AuxInt
  7870  		sym := v.Aux
  7871  		mem := v.Args[2]
  7872  		ptr := v.Args[0]
  7873  		v_1 := v.Args[1]
  7874  		if v_1.Op != OpARMMOVHreg {
  7875  			break
  7876  		}
  7877  		x := v_1.Args[0]
  7878  		v.reset(OpARMMOVHstore)
  7879  		v.AuxInt = off
  7880  		v.Aux = sym
  7881  		v.AddArg(ptr)
  7882  		v.AddArg(x)
  7883  		v.AddArg(mem)
  7884  		return true
  7885  	}
  7886  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
  7887  	// result: (MOVHstore [off] {sym} ptr x mem)
  7888  	for {
  7889  		off := v.AuxInt
  7890  		sym := v.Aux
  7891  		mem := v.Args[2]
  7892  		ptr := v.Args[0]
  7893  		v_1 := v.Args[1]
  7894  		if v_1.Op != OpARMMOVHUreg {
  7895  			break
  7896  		}
  7897  		x := v_1.Args[0]
  7898  		v.reset(OpARMMOVHstore)
  7899  		v.AuxInt = off
  7900  		v.Aux = sym
  7901  		v.AddArg(ptr)
  7902  		v.AddArg(x)
  7903  		v.AddArg(mem)
  7904  		return true
  7905  	}
  7906  	// match: (MOVHstore [0] {sym} (ADD ptr idx) val mem)
  7907  	// cond: sym == nil
  7908  	// result: (MOVHstoreidx ptr idx val mem)
  7909  	for {
  7910  		if v.AuxInt != 0 {
  7911  			break
  7912  		}
  7913  		sym := v.Aux
  7914  		mem := v.Args[2]
  7915  		v_0 := v.Args[0]
  7916  		if v_0.Op != OpARMADD {
  7917  			break
  7918  		}
  7919  		idx := v_0.Args[1]
  7920  		ptr := v_0.Args[0]
  7921  		val := v.Args[1]
  7922  		if !(sym == nil) {
  7923  			break
  7924  		}
  7925  		v.reset(OpARMMOVHstoreidx)
  7926  		v.AddArg(ptr)
  7927  		v.AddArg(idx)
  7928  		v.AddArg(val)
  7929  		v.AddArg(mem)
  7930  		return true
  7931  	}
  7932  	return false
  7933  }
  7934  func rewriteValueARM_OpARMMOVHstoreidx_0(v *Value) bool {
  7935  	// match: (MOVHstoreidx ptr (MOVWconst [c]) val mem)
  7936  	// result: (MOVHstore [c] ptr val mem)
  7937  	for {
  7938  		mem := v.Args[3]
  7939  		ptr := v.Args[0]
  7940  		v_1 := v.Args[1]
  7941  		if v_1.Op != OpARMMOVWconst {
  7942  			break
  7943  		}
  7944  		c := v_1.AuxInt
  7945  		val := v.Args[2]
  7946  		v.reset(OpARMMOVHstore)
  7947  		v.AuxInt = c
  7948  		v.AddArg(ptr)
  7949  		v.AddArg(val)
  7950  		v.AddArg(mem)
  7951  		return true
  7952  	}
  7953  	// match: (MOVHstoreidx (MOVWconst [c]) ptr val mem)
  7954  	// result: (MOVHstore [c] ptr val mem)
  7955  	for {
  7956  		mem := v.Args[3]
  7957  		v_0 := v.Args[0]
  7958  		if v_0.Op != OpARMMOVWconst {
  7959  			break
  7960  		}
  7961  		c := v_0.AuxInt
  7962  		ptr := v.Args[1]
  7963  		val := v.Args[2]
  7964  		v.reset(OpARMMOVHstore)
  7965  		v.AuxInt = c
  7966  		v.AddArg(ptr)
  7967  		v.AddArg(val)
  7968  		v.AddArg(mem)
  7969  		return true
  7970  	}
  7971  	return false
  7972  }
  7973  func rewriteValueARM_OpARMMOVWload_0(v *Value) bool {
  7974  	b := v.Block
  7975  	config := b.Func.Config
  7976  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
  7977  	// result: (MOVWload [off1+off2] {sym} ptr mem)
  7978  	for {
  7979  		off1 := v.AuxInt
  7980  		sym := v.Aux
  7981  		mem := v.Args[1]
  7982  		v_0 := v.Args[0]
  7983  		if v_0.Op != OpARMADDconst {
  7984  			break
  7985  		}
  7986  		off2 := v_0.AuxInt
  7987  		ptr := v_0.Args[0]
  7988  		v.reset(OpARMMOVWload)
  7989  		v.AuxInt = off1 + off2
  7990  		v.Aux = sym
  7991  		v.AddArg(ptr)
  7992  		v.AddArg(mem)
  7993  		return true
  7994  	}
  7995  	// match: (MOVWload [off1] {sym} (SUBconst [off2] ptr) mem)
  7996  	// result: (MOVWload [off1-off2] {sym} ptr mem)
  7997  	for {
  7998  		off1 := v.AuxInt
  7999  		sym := v.Aux
  8000  		mem := v.Args[1]
  8001  		v_0 := v.Args[0]
  8002  		if v_0.Op != OpARMSUBconst {
  8003  			break
  8004  		}
  8005  		off2 := v_0.AuxInt
  8006  		ptr := v_0.Args[0]
  8007  		v.reset(OpARMMOVWload)
  8008  		v.AuxInt = off1 - off2
  8009  		v.Aux = sym
  8010  		v.AddArg(ptr)
  8011  		v.AddArg(mem)
  8012  		return true
  8013  	}
  8014  	// match: (MOVWload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  8015  	// cond: canMergeSym(sym1,sym2)
  8016  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8017  	for {
  8018  		off1 := v.AuxInt
  8019  		sym1 := v.Aux
  8020  		mem := v.Args[1]
  8021  		v_0 := v.Args[0]
  8022  		if v_0.Op != OpARMMOVWaddr {
  8023  			break
  8024  		}
  8025  		off2 := v_0.AuxInt
  8026  		sym2 := v_0.Aux
  8027  		ptr := v_0.Args[0]
  8028  		if !(canMergeSym(sym1, sym2)) {
  8029  			break
  8030  		}
  8031  		v.reset(OpARMMOVWload)
  8032  		v.AuxInt = off1 + off2
  8033  		v.Aux = mergeSym(sym1, sym2)
  8034  		v.AddArg(ptr)
  8035  		v.AddArg(mem)
  8036  		return true
  8037  	}
  8038  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  8039  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  8040  	// result: x
  8041  	for {
  8042  		off := v.AuxInt
  8043  		sym := v.Aux
  8044  		_ = v.Args[1]
  8045  		ptr := v.Args[0]
  8046  		v_1 := v.Args[1]
  8047  		if v_1.Op != OpARMMOVWstore {
  8048  			break
  8049  		}
  8050  		off2 := v_1.AuxInt
  8051  		sym2 := v_1.Aux
  8052  		_ = v_1.Args[2]
  8053  		ptr2 := v_1.Args[0]
  8054  		x := v_1.Args[1]
  8055  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  8056  			break
  8057  		}
  8058  		v.reset(OpCopy)
  8059  		v.Type = x.Type
  8060  		v.AddArg(x)
  8061  		return true
  8062  	}
  8063  	// match: (MOVWload [0] {sym} (ADD ptr idx) mem)
  8064  	// cond: sym == nil
  8065  	// result: (MOVWloadidx ptr idx mem)
  8066  	for {
  8067  		if v.AuxInt != 0 {
  8068  			break
  8069  		}
  8070  		sym := v.Aux
  8071  		mem := v.Args[1]
  8072  		v_0 := v.Args[0]
  8073  		if v_0.Op != OpARMADD {
  8074  			break
  8075  		}
  8076  		idx := v_0.Args[1]
  8077  		ptr := v_0.Args[0]
  8078  		if !(sym == nil) {
  8079  			break
  8080  		}
  8081  		v.reset(OpARMMOVWloadidx)
  8082  		v.AddArg(ptr)
  8083  		v.AddArg(idx)
  8084  		v.AddArg(mem)
  8085  		return true
  8086  	}
  8087  	// match: (MOVWload [0] {sym} (ADDshiftLL ptr idx [c]) mem)
  8088  	// cond: sym == nil
  8089  	// result: (MOVWloadshiftLL ptr idx [c] mem)
  8090  	for {
  8091  		if v.AuxInt != 0 {
  8092  			break
  8093  		}
  8094  		sym := v.Aux
  8095  		mem := v.Args[1]
  8096  		v_0 := v.Args[0]
  8097  		if v_0.Op != OpARMADDshiftLL {
  8098  			break
  8099  		}
  8100  		c := v_0.AuxInt
  8101  		idx := v_0.Args[1]
  8102  		ptr := v_0.Args[0]
  8103  		if !(sym == nil) {
  8104  			break
  8105  		}
  8106  		v.reset(OpARMMOVWloadshiftLL)
  8107  		v.AuxInt = c
  8108  		v.AddArg(ptr)
  8109  		v.AddArg(idx)
  8110  		v.AddArg(mem)
  8111  		return true
  8112  	}
  8113  	// match: (MOVWload [0] {sym} (ADDshiftRL ptr idx [c]) mem)
  8114  	// cond: sym == nil
  8115  	// result: (MOVWloadshiftRL ptr idx [c] mem)
  8116  	for {
  8117  		if v.AuxInt != 0 {
  8118  			break
  8119  		}
  8120  		sym := v.Aux
  8121  		mem := v.Args[1]
  8122  		v_0 := v.Args[0]
  8123  		if v_0.Op != OpARMADDshiftRL {
  8124  			break
  8125  		}
  8126  		c := v_0.AuxInt
  8127  		idx := v_0.Args[1]
  8128  		ptr := v_0.Args[0]
  8129  		if !(sym == nil) {
  8130  			break
  8131  		}
  8132  		v.reset(OpARMMOVWloadshiftRL)
  8133  		v.AuxInt = c
  8134  		v.AddArg(ptr)
  8135  		v.AddArg(idx)
  8136  		v.AddArg(mem)
  8137  		return true
  8138  	}
  8139  	// match: (MOVWload [0] {sym} (ADDshiftRA ptr idx [c]) mem)
  8140  	// cond: sym == nil
  8141  	// result: (MOVWloadshiftRA ptr idx [c] mem)
  8142  	for {
  8143  		if v.AuxInt != 0 {
  8144  			break
  8145  		}
  8146  		sym := v.Aux
  8147  		mem := v.Args[1]
  8148  		v_0 := v.Args[0]
  8149  		if v_0.Op != OpARMADDshiftRA {
  8150  			break
  8151  		}
  8152  		c := v_0.AuxInt
  8153  		idx := v_0.Args[1]
  8154  		ptr := v_0.Args[0]
  8155  		if !(sym == nil) {
  8156  			break
  8157  		}
  8158  		v.reset(OpARMMOVWloadshiftRA)
  8159  		v.AuxInt = c
  8160  		v.AddArg(ptr)
  8161  		v.AddArg(idx)
  8162  		v.AddArg(mem)
  8163  		return true
  8164  	}
  8165  	// match: (MOVWload [off] {sym} (SB) _)
  8166  	// cond: symIsRO(sym)
  8167  	// result: (MOVWconst [int64(int32(read32(sym, off, config.BigEndian)))])
  8168  	for {
  8169  		off := v.AuxInt
  8170  		sym := v.Aux
  8171  		_ = v.Args[1]
  8172  		v_0 := v.Args[0]
  8173  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  8174  			break
  8175  		}
  8176  		v.reset(OpARMMOVWconst)
  8177  		v.AuxInt = int64(int32(read32(sym, off, config.BigEndian)))
  8178  		return true
  8179  	}
  8180  	return false
  8181  }
  8182  func rewriteValueARM_OpARMMOVWloadidx_0(v *Value) bool {
  8183  	// match: (MOVWloadidx ptr idx (MOVWstoreidx ptr2 idx x _))
  8184  	// cond: isSamePtr(ptr, ptr2)
  8185  	// result: x
  8186  	for {
  8187  		_ = v.Args[2]
  8188  		ptr := v.Args[0]
  8189  		idx := v.Args[1]
  8190  		v_2 := v.Args[2]
  8191  		if v_2.Op != OpARMMOVWstoreidx {
  8192  			break
  8193  		}
  8194  		_ = v_2.Args[3]
  8195  		ptr2 := v_2.Args[0]
  8196  		if idx != v_2.Args[1] {
  8197  			break
  8198  		}
  8199  		x := v_2.Args[2]
  8200  		if !(isSamePtr(ptr, ptr2)) {
  8201  			break
  8202  		}
  8203  		v.reset(OpCopy)
  8204  		v.Type = x.Type
  8205  		v.AddArg(x)
  8206  		return true
  8207  	}
  8208  	// match: (MOVWloadidx ptr (MOVWconst [c]) mem)
  8209  	// result: (MOVWload [c] ptr mem)
  8210  	for {
  8211  		mem := v.Args[2]
  8212  		ptr := v.Args[0]
  8213  		v_1 := v.Args[1]
  8214  		if v_1.Op != OpARMMOVWconst {
  8215  			break
  8216  		}
  8217  		c := v_1.AuxInt
  8218  		v.reset(OpARMMOVWload)
  8219  		v.AuxInt = c
  8220  		v.AddArg(ptr)
  8221  		v.AddArg(mem)
  8222  		return true
  8223  	}
  8224  	// match: (MOVWloadidx (MOVWconst [c]) ptr mem)
  8225  	// result: (MOVWload [c] ptr mem)
  8226  	for {
  8227  		mem := v.Args[2]
  8228  		v_0 := v.Args[0]
  8229  		if v_0.Op != OpARMMOVWconst {
  8230  			break
  8231  		}
  8232  		c := v_0.AuxInt
  8233  		ptr := v.Args[1]
  8234  		v.reset(OpARMMOVWload)
  8235  		v.AuxInt = c
  8236  		v.AddArg(ptr)
  8237  		v.AddArg(mem)
  8238  		return true
  8239  	}
  8240  	// match: (MOVWloadidx ptr (SLLconst idx [c]) mem)
  8241  	// result: (MOVWloadshiftLL ptr idx [c] mem)
  8242  	for {
  8243  		mem := v.Args[2]
  8244  		ptr := v.Args[0]
  8245  		v_1 := v.Args[1]
  8246  		if v_1.Op != OpARMSLLconst {
  8247  			break
  8248  		}
  8249  		c := v_1.AuxInt
  8250  		idx := v_1.Args[0]
  8251  		v.reset(OpARMMOVWloadshiftLL)
  8252  		v.AuxInt = c
  8253  		v.AddArg(ptr)
  8254  		v.AddArg(idx)
  8255  		v.AddArg(mem)
  8256  		return true
  8257  	}
  8258  	// match: (MOVWloadidx (SLLconst idx [c]) ptr mem)
  8259  	// result: (MOVWloadshiftLL ptr idx [c] mem)
  8260  	for {
  8261  		mem := v.Args[2]
  8262  		v_0 := v.Args[0]
  8263  		if v_0.Op != OpARMSLLconst {
  8264  			break
  8265  		}
  8266  		c := v_0.AuxInt
  8267  		idx := v_0.Args[0]
  8268  		ptr := v.Args[1]
  8269  		v.reset(OpARMMOVWloadshiftLL)
  8270  		v.AuxInt = c
  8271  		v.AddArg(ptr)
  8272  		v.AddArg(idx)
  8273  		v.AddArg(mem)
  8274  		return true
  8275  	}
  8276  	// match: (MOVWloadidx ptr (SRLconst idx [c]) mem)
  8277  	// result: (MOVWloadshiftRL ptr idx [c] mem)
  8278  	for {
  8279  		mem := v.Args[2]
  8280  		ptr := v.Args[0]
  8281  		v_1 := v.Args[1]
  8282  		if v_1.Op != OpARMSRLconst {
  8283  			break
  8284  		}
  8285  		c := v_1.AuxInt
  8286  		idx := v_1.Args[0]
  8287  		v.reset(OpARMMOVWloadshiftRL)
  8288  		v.AuxInt = c
  8289  		v.AddArg(ptr)
  8290  		v.AddArg(idx)
  8291  		v.AddArg(mem)
  8292  		return true
  8293  	}
  8294  	// match: (MOVWloadidx (SRLconst idx [c]) ptr mem)
  8295  	// result: (MOVWloadshiftRL ptr idx [c] mem)
  8296  	for {
  8297  		mem := v.Args[2]
  8298  		v_0 := v.Args[0]
  8299  		if v_0.Op != OpARMSRLconst {
  8300  			break
  8301  		}
  8302  		c := v_0.AuxInt
  8303  		idx := v_0.Args[0]
  8304  		ptr := v.Args[1]
  8305  		v.reset(OpARMMOVWloadshiftRL)
  8306  		v.AuxInt = c
  8307  		v.AddArg(ptr)
  8308  		v.AddArg(idx)
  8309  		v.AddArg(mem)
  8310  		return true
  8311  	}
  8312  	// match: (MOVWloadidx ptr (SRAconst idx [c]) mem)
  8313  	// result: (MOVWloadshiftRA ptr idx [c] mem)
  8314  	for {
  8315  		mem := v.Args[2]
  8316  		ptr := v.Args[0]
  8317  		v_1 := v.Args[1]
  8318  		if v_1.Op != OpARMSRAconst {
  8319  			break
  8320  		}
  8321  		c := v_1.AuxInt
  8322  		idx := v_1.Args[0]
  8323  		v.reset(OpARMMOVWloadshiftRA)
  8324  		v.AuxInt = c
  8325  		v.AddArg(ptr)
  8326  		v.AddArg(idx)
  8327  		v.AddArg(mem)
  8328  		return true
  8329  	}
  8330  	// match: (MOVWloadidx (SRAconst idx [c]) ptr mem)
  8331  	// result: (MOVWloadshiftRA ptr idx [c] mem)
  8332  	for {
  8333  		mem := v.Args[2]
  8334  		v_0 := v.Args[0]
  8335  		if v_0.Op != OpARMSRAconst {
  8336  			break
  8337  		}
  8338  		c := v_0.AuxInt
  8339  		idx := v_0.Args[0]
  8340  		ptr := v.Args[1]
  8341  		v.reset(OpARMMOVWloadshiftRA)
  8342  		v.AuxInt = c
  8343  		v.AddArg(ptr)
  8344  		v.AddArg(idx)
  8345  		v.AddArg(mem)
  8346  		return true
  8347  	}
  8348  	return false
  8349  }
  8350  func rewriteValueARM_OpARMMOVWloadshiftLL_0(v *Value) bool {
  8351  	// match: (MOVWloadshiftLL ptr idx [c] (MOVWstoreshiftLL ptr2 idx [d] x _))
  8352  	// cond: c==d && isSamePtr(ptr, ptr2)
  8353  	// result: x
  8354  	for {
  8355  		c := v.AuxInt
  8356  		_ = v.Args[2]
  8357  		ptr := v.Args[0]
  8358  		idx := v.Args[1]
  8359  		v_2 := v.Args[2]
  8360  		if v_2.Op != OpARMMOVWstoreshiftLL {
  8361  			break
  8362  		}
  8363  		d := v_2.AuxInt
  8364  		_ = v_2.Args[3]
  8365  		ptr2 := v_2.Args[0]
  8366  		if idx != v_2.Args[1] {
  8367  			break
  8368  		}
  8369  		x := v_2.Args[2]
  8370  		if !(c == d && isSamePtr(ptr, ptr2)) {
  8371  			break
  8372  		}
  8373  		v.reset(OpCopy)
  8374  		v.Type = x.Type
  8375  		v.AddArg(x)
  8376  		return true
  8377  	}
  8378  	// match: (MOVWloadshiftLL ptr (MOVWconst [c]) [d] mem)
  8379  	// result: (MOVWload [int64(uint32(c)<<uint64(d))] ptr mem)
  8380  	for {
  8381  		d := v.AuxInt
  8382  		mem := v.Args[2]
  8383  		ptr := v.Args[0]
  8384  		v_1 := v.Args[1]
  8385  		if v_1.Op != OpARMMOVWconst {
  8386  			break
  8387  		}
  8388  		c := v_1.AuxInt
  8389  		v.reset(OpARMMOVWload)
  8390  		v.AuxInt = int64(uint32(c) << uint64(d))
  8391  		v.AddArg(ptr)
  8392  		v.AddArg(mem)
  8393  		return true
  8394  	}
  8395  	return false
  8396  }
  8397  func rewriteValueARM_OpARMMOVWloadshiftRA_0(v *Value) bool {
  8398  	// match: (MOVWloadshiftRA ptr idx [c] (MOVWstoreshiftRA ptr2 idx [d] x _))
  8399  	// cond: c==d && isSamePtr(ptr, ptr2)
  8400  	// result: x
  8401  	for {
  8402  		c := v.AuxInt
  8403  		_ = v.Args[2]
  8404  		ptr := v.Args[0]
  8405  		idx := v.Args[1]
  8406  		v_2 := v.Args[2]
  8407  		if v_2.Op != OpARMMOVWstoreshiftRA {
  8408  			break
  8409  		}
  8410  		d := v_2.AuxInt
  8411  		_ = v_2.Args[3]
  8412  		ptr2 := v_2.Args[0]
  8413  		if idx != v_2.Args[1] {
  8414  			break
  8415  		}
  8416  		x := v_2.Args[2]
  8417  		if !(c == d && isSamePtr(ptr, ptr2)) {
  8418  			break
  8419  		}
  8420  		v.reset(OpCopy)
  8421  		v.Type = x.Type
  8422  		v.AddArg(x)
  8423  		return true
  8424  	}
  8425  	// match: (MOVWloadshiftRA ptr (MOVWconst [c]) [d] mem)
  8426  	// result: (MOVWload [int64(int32(c)>>uint64(d))] ptr mem)
  8427  	for {
  8428  		d := v.AuxInt
  8429  		mem := v.Args[2]
  8430  		ptr := v.Args[0]
  8431  		v_1 := v.Args[1]
  8432  		if v_1.Op != OpARMMOVWconst {
  8433  			break
  8434  		}
  8435  		c := v_1.AuxInt
  8436  		v.reset(OpARMMOVWload)
  8437  		v.AuxInt = int64(int32(c) >> uint64(d))
  8438  		v.AddArg(ptr)
  8439  		v.AddArg(mem)
  8440  		return true
  8441  	}
  8442  	return false
  8443  }
  8444  func rewriteValueARM_OpARMMOVWloadshiftRL_0(v *Value) bool {
  8445  	// match: (MOVWloadshiftRL ptr idx [c] (MOVWstoreshiftRL ptr2 idx [d] x _))
  8446  	// cond: c==d && isSamePtr(ptr, ptr2)
  8447  	// result: x
  8448  	for {
  8449  		c := v.AuxInt
  8450  		_ = v.Args[2]
  8451  		ptr := v.Args[0]
  8452  		idx := v.Args[1]
  8453  		v_2 := v.Args[2]
  8454  		if v_2.Op != OpARMMOVWstoreshiftRL {
  8455  			break
  8456  		}
  8457  		d := v_2.AuxInt
  8458  		_ = v_2.Args[3]
  8459  		ptr2 := v_2.Args[0]
  8460  		if idx != v_2.Args[1] {
  8461  			break
  8462  		}
  8463  		x := v_2.Args[2]
  8464  		if !(c == d && isSamePtr(ptr, ptr2)) {
  8465  			break
  8466  		}
  8467  		v.reset(OpCopy)
  8468  		v.Type = x.Type
  8469  		v.AddArg(x)
  8470  		return true
  8471  	}
  8472  	// match: (MOVWloadshiftRL ptr (MOVWconst [c]) [d] mem)
  8473  	// result: (MOVWload [int64(uint32(c)>>uint64(d))] ptr mem)
  8474  	for {
  8475  		d := v.AuxInt
  8476  		mem := v.Args[2]
  8477  		ptr := v.Args[0]
  8478  		v_1 := v.Args[1]
  8479  		if v_1.Op != OpARMMOVWconst {
  8480  			break
  8481  		}
  8482  		c := v_1.AuxInt
  8483  		v.reset(OpARMMOVWload)
  8484  		v.AuxInt = int64(uint32(c) >> uint64(d))
  8485  		v.AddArg(ptr)
  8486  		v.AddArg(mem)
  8487  		return true
  8488  	}
  8489  	return false
  8490  }
  8491  func rewriteValueARM_OpARMMOVWreg_0(v *Value) bool {
  8492  	// match: (MOVWreg x)
  8493  	// cond: x.Uses == 1
  8494  	// result: (MOVWnop x)
  8495  	for {
  8496  		x := v.Args[0]
  8497  		if !(x.Uses == 1) {
  8498  			break
  8499  		}
  8500  		v.reset(OpARMMOVWnop)
  8501  		v.AddArg(x)
  8502  		return true
  8503  	}
  8504  	// match: (MOVWreg (MOVWconst [c]))
  8505  	// result: (MOVWconst [c])
  8506  	for {
  8507  		v_0 := v.Args[0]
  8508  		if v_0.Op != OpARMMOVWconst {
  8509  			break
  8510  		}
  8511  		c := v_0.AuxInt
  8512  		v.reset(OpARMMOVWconst)
  8513  		v.AuxInt = c
  8514  		return true
  8515  	}
  8516  	return false
  8517  }
  8518  func rewriteValueARM_OpARMMOVWstore_0(v *Value) bool {
  8519  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  8520  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
  8521  	for {
  8522  		off1 := v.AuxInt
  8523  		sym := v.Aux
  8524  		mem := v.Args[2]
  8525  		v_0 := v.Args[0]
  8526  		if v_0.Op != OpARMADDconst {
  8527  			break
  8528  		}
  8529  		off2 := v_0.AuxInt
  8530  		ptr := v_0.Args[0]
  8531  		val := v.Args[1]
  8532  		v.reset(OpARMMOVWstore)
  8533  		v.AuxInt = off1 + off2
  8534  		v.Aux = sym
  8535  		v.AddArg(ptr)
  8536  		v.AddArg(val)
  8537  		v.AddArg(mem)
  8538  		return true
  8539  	}
  8540  	// match: (MOVWstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  8541  	// result: (MOVWstore [off1-off2] {sym} ptr val mem)
  8542  	for {
  8543  		off1 := v.AuxInt
  8544  		sym := v.Aux
  8545  		mem := v.Args[2]
  8546  		v_0 := v.Args[0]
  8547  		if v_0.Op != OpARMSUBconst {
  8548  			break
  8549  		}
  8550  		off2 := v_0.AuxInt
  8551  		ptr := v_0.Args[0]
  8552  		val := v.Args[1]
  8553  		v.reset(OpARMMOVWstore)
  8554  		v.AuxInt = off1 - off2
  8555  		v.Aux = sym
  8556  		v.AddArg(ptr)
  8557  		v.AddArg(val)
  8558  		v.AddArg(mem)
  8559  		return true
  8560  	}
  8561  	// match: (MOVWstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  8562  	// cond: canMergeSym(sym1,sym2)
  8563  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  8564  	for {
  8565  		off1 := v.AuxInt
  8566  		sym1 := v.Aux
  8567  		mem := v.Args[2]
  8568  		v_0 := v.Args[0]
  8569  		if v_0.Op != OpARMMOVWaddr {
  8570  			break
  8571  		}
  8572  		off2 := v_0.AuxInt
  8573  		sym2 := v_0.Aux
  8574  		ptr := v_0.Args[0]
  8575  		val := v.Args[1]
  8576  		if !(canMergeSym(sym1, sym2)) {
  8577  			break
  8578  		}
  8579  		v.reset(OpARMMOVWstore)
  8580  		v.AuxInt = off1 + off2
  8581  		v.Aux = mergeSym(sym1, sym2)
  8582  		v.AddArg(ptr)
  8583  		v.AddArg(val)
  8584  		v.AddArg(mem)
  8585  		return true
  8586  	}
  8587  	// match: (MOVWstore [0] {sym} (ADD ptr idx) val mem)
  8588  	// cond: sym == nil
  8589  	// result: (MOVWstoreidx ptr idx val mem)
  8590  	for {
  8591  		if v.AuxInt != 0 {
  8592  			break
  8593  		}
  8594  		sym := v.Aux
  8595  		mem := v.Args[2]
  8596  		v_0 := v.Args[0]
  8597  		if v_0.Op != OpARMADD {
  8598  			break
  8599  		}
  8600  		idx := v_0.Args[1]
  8601  		ptr := v_0.Args[0]
  8602  		val := v.Args[1]
  8603  		if !(sym == nil) {
  8604  			break
  8605  		}
  8606  		v.reset(OpARMMOVWstoreidx)
  8607  		v.AddArg(ptr)
  8608  		v.AddArg(idx)
  8609  		v.AddArg(val)
  8610  		v.AddArg(mem)
  8611  		return true
  8612  	}
  8613  	// match: (MOVWstore [0] {sym} (ADDshiftLL ptr idx [c]) val mem)
  8614  	// cond: sym == nil
  8615  	// result: (MOVWstoreshiftLL ptr idx [c] val mem)
  8616  	for {
  8617  		if v.AuxInt != 0 {
  8618  			break
  8619  		}
  8620  		sym := v.Aux
  8621  		mem := v.Args[2]
  8622  		v_0 := v.Args[0]
  8623  		if v_0.Op != OpARMADDshiftLL {
  8624  			break
  8625  		}
  8626  		c := v_0.AuxInt
  8627  		idx := v_0.Args[1]
  8628  		ptr := v_0.Args[0]
  8629  		val := v.Args[1]
  8630  		if !(sym == nil) {
  8631  			break
  8632  		}
  8633  		v.reset(OpARMMOVWstoreshiftLL)
  8634  		v.AuxInt = c
  8635  		v.AddArg(ptr)
  8636  		v.AddArg(idx)
  8637  		v.AddArg(val)
  8638  		v.AddArg(mem)
  8639  		return true
  8640  	}
  8641  	// match: (MOVWstore [0] {sym} (ADDshiftRL ptr idx [c]) val mem)
  8642  	// cond: sym == nil
  8643  	// result: (MOVWstoreshiftRL ptr idx [c] val mem)
  8644  	for {
  8645  		if v.AuxInt != 0 {
  8646  			break
  8647  		}
  8648  		sym := v.Aux
  8649  		mem := v.Args[2]
  8650  		v_0 := v.Args[0]
  8651  		if v_0.Op != OpARMADDshiftRL {
  8652  			break
  8653  		}
  8654  		c := v_0.AuxInt
  8655  		idx := v_0.Args[1]
  8656  		ptr := v_0.Args[0]
  8657  		val := v.Args[1]
  8658  		if !(sym == nil) {
  8659  			break
  8660  		}
  8661  		v.reset(OpARMMOVWstoreshiftRL)
  8662  		v.AuxInt = c
  8663  		v.AddArg(ptr)
  8664  		v.AddArg(idx)
  8665  		v.AddArg(val)
  8666  		v.AddArg(mem)
  8667  		return true
  8668  	}
  8669  	// match: (MOVWstore [0] {sym} (ADDshiftRA ptr idx [c]) val mem)
  8670  	// cond: sym == nil
  8671  	// result: (MOVWstoreshiftRA ptr idx [c] val mem)
  8672  	for {
  8673  		if v.AuxInt != 0 {
  8674  			break
  8675  		}
  8676  		sym := v.Aux
  8677  		mem := v.Args[2]
  8678  		v_0 := v.Args[0]
  8679  		if v_0.Op != OpARMADDshiftRA {
  8680  			break
  8681  		}
  8682  		c := v_0.AuxInt
  8683  		idx := v_0.Args[1]
  8684  		ptr := v_0.Args[0]
  8685  		val := v.Args[1]
  8686  		if !(sym == nil) {
  8687  			break
  8688  		}
  8689  		v.reset(OpARMMOVWstoreshiftRA)
  8690  		v.AuxInt = c
  8691  		v.AddArg(ptr)
  8692  		v.AddArg(idx)
  8693  		v.AddArg(val)
  8694  		v.AddArg(mem)
  8695  		return true
  8696  	}
  8697  	return false
  8698  }
  8699  func rewriteValueARM_OpARMMOVWstoreidx_0(v *Value) bool {
  8700  	// match: (MOVWstoreidx ptr (MOVWconst [c]) val mem)
  8701  	// result: (MOVWstore [c] ptr val mem)
  8702  	for {
  8703  		mem := v.Args[3]
  8704  		ptr := v.Args[0]
  8705  		v_1 := v.Args[1]
  8706  		if v_1.Op != OpARMMOVWconst {
  8707  			break
  8708  		}
  8709  		c := v_1.AuxInt
  8710  		val := v.Args[2]
  8711  		v.reset(OpARMMOVWstore)
  8712  		v.AuxInt = c
  8713  		v.AddArg(ptr)
  8714  		v.AddArg(val)
  8715  		v.AddArg(mem)
  8716  		return true
  8717  	}
  8718  	// match: (MOVWstoreidx (MOVWconst [c]) ptr val mem)
  8719  	// result: (MOVWstore [c] ptr val mem)
  8720  	for {
  8721  		mem := v.Args[3]
  8722  		v_0 := v.Args[0]
  8723  		if v_0.Op != OpARMMOVWconst {
  8724  			break
  8725  		}
  8726  		c := v_0.AuxInt
  8727  		ptr := v.Args[1]
  8728  		val := v.Args[2]
  8729  		v.reset(OpARMMOVWstore)
  8730  		v.AuxInt = c
  8731  		v.AddArg(ptr)
  8732  		v.AddArg(val)
  8733  		v.AddArg(mem)
  8734  		return true
  8735  	}
  8736  	// match: (MOVWstoreidx ptr (SLLconst idx [c]) val mem)
  8737  	// result: (MOVWstoreshiftLL ptr idx [c] val mem)
  8738  	for {
  8739  		mem := v.Args[3]
  8740  		ptr := v.Args[0]
  8741  		v_1 := v.Args[1]
  8742  		if v_1.Op != OpARMSLLconst {
  8743  			break
  8744  		}
  8745  		c := v_1.AuxInt
  8746  		idx := v_1.Args[0]
  8747  		val := v.Args[2]
  8748  		v.reset(OpARMMOVWstoreshiftLL)
  8749  		v.AuxInt = c
  8750  		v.AddArg(ptr)
  8751  		v.AddArg(idx)
  8752  		v.AddArg(val)
  8753  		v.AddArg(mem)
  8754  		return true
  8755  	}
  8756  	// match: (MOVWstoreidx (SLLconst idx [c]) ptr val mem)
  8757  	// result: (MOVWstoreshiftLL ptr idx [c] val mem)
  8758  	for {
  8759  		mem := v.Args[3]
  8760  		v_0 := v.Args[0]
  8761  		if v_0.Op != OpARMSLLconst {
  8762  			break
  8763  		}
  8764  		c := v_0.AuxInt
  8765  		idx := v_0.Args[0]
  8766  		ptr := v.Args[1]
  8767  		val := v.Args[2]
  8768  		v.reset(OpARMMOVWstoreshiftLL)
  8769  		v.AuxInt = c
  8770  		v.AddArg(ptr)
  8771  		v.AddArg(idx)
  8772  		v.AddArg(val)
  8773  		v.AddArg(mem)
  8774  		return true
  8775  	}
  8776  	// match: (MOVWstoreidx ptr (SRLconst idx [c]) val mem)
  8777  	// result: (MOVWstoreshiftRL ptr idx [c] val mem)
  8778  	for {
  8779  		mem := v.Args[3]
  8780  		ptr := v.Args[0]
  8781  		v_1 := v.Args[1]
  8782  		if v_1.Op != OpARMSRLconst {
  8783  			break
  8784  		}
  8785  		c := v_1.AuxInt
  8786  		idx := v_1.Args[0]
  8787  		val := v.Args[2]
  8788  		v.reset(OpARMMOVWstoreshiftRL)
  8789  		v.AuxInt = c
  8790  		v.AddArg(ptr)
  8791  		v.AddArg(idx)
  8792  		v.AddArg(val)
  8793  		v.AddArg(mem)
  8794  		return true
  8795  	}
  8796  	// match: (MOVWstoreidx (SRLconst idx [c]) ptr val mem)
  8797  	// result: (MOVWstoreshiftRL ptr idx [c] val mem)
  8798  	for {
  8799  		mem := v.Args[3]
  8800  		v_0 := v.Args[0]
  8801  		if v_0.Op != OpARMSRLconst {
  8802  			break
  8803  		}
  8804  		c := v_0.AuxInt
  8805  		idx := v_0.Args[0]
  8806  		ptr := v.Args[1]
  8807  		val := v.Args[2]
  8808  		v.reset(OpARMMOVWstoreshiftRL)
  8809  		v.AuxInt = c
  8810  		v.AddArg(ptr)
  8811  		v.AddArg(idx)
  8812  		v.AddArg(val)
  8813  		v.AddArg(mem)
  8814  		return true
  8815  	}
  8816  	// match: (MOVWstoreidx ptr (SRAconst idx [c]) val mem)
  8817  	// result: (MOVWstoreshiftRA ptr idx [c] val mem)
  8818  	for {
  8819  		mem := v.Args[3]
  8820  		ptr := v.Args[0]
  8821  		v_1 := v.Args[1]
  8822  		if v_1.Op != OpARMSRAconst {
  8823  			break
  8824  		}
  8825  		c := v_1.AuxInt
  8826  		idx := v_1.Args[0]
  8827  		val := v.Args[2]
  8828  		v.reset(OpARMMOVWstoreshiftRA)
  8829  		v.AuxInt = c
  8830  		v.AddArg(ptr)
  8831  		v.AddArg(idx)
  8832  		v.AddArg(val)
  8833  		v.AddArg(mem)
  8834  		return true
  8835  	}
  8836  	// match: (MOVWstoreidx (SRAconst idx [c]) ptr val mem)
  8837  	// result: (MOVWstoreshiftRA ptr idx [c] val mem)
  8838  	for {
  8839  		mem := v.Args[3]
  8840  		v_0 := v.Args[0]
  8841  		if v_0.Op != OpARMSRAconst {
  8842  			break
  8843  		}
  8844  		c := v_0.AuxInt
  8845  		idx := v_0.Args[0]
  8846  		ptr := v.Args[1]
  8847  		val := v.Args[2]
  8848  		v.reset(OpARMMOVWstoreshiftRA)
  8849  		v.AuxInt = c
  8850  		v.AddArg(ptr)
  8851  		v.AddArg(idx)
  8852  		v.AddArg(val)
  8853  		v.AddArg(mem)
  8854  		return true
  8855  	}
  8856  	return false
  8857  }
  8858  func rewriteValueARM_OpARMMOVWstoreshiftLL_0(v *Value) bool {
  8859  	// match: (MOVWstoreshiftLL ptr (MOVWconst [c]) [d] val mem)
  8860  	// result: (MOVWstore [int64(uint32(c)<<uint64(d))] ptr val mem)
  8861  	for {
  8862  		d := v.AuxInt
  8863  		mem := v.Args[3]
  8864  		ptr := v.Args[0]
  8865  		v_1 := v.Args[1]
  8866  		if v_1.Op != OpARMMOVWconst {
  8867  			break
  8868  		}
  8869  		c := v_1.AuxInt
  8870  		val := v.Args[2]
  8871  		v.reset(OpARMMOVWstore)
  8872  		v.AuxInt = int64(uint32(c) << uint64(d))
  8873  		v.AddArg(ptr)
  8874  		v.AddArg(val)
  8875  		v.AddArg(mem)
  8876  		return true
  8877  	}
  8878  	return false
  8879  }
  8880  func rewriteValueARM_OpARMMOVWstoreshiftRA_0(v *Value) bool {
  8881  	// match: (MOVWstoreshiftRA ptr (MOVWconst [c]) [d] val mem)
  8882  	// result: (MOVWstore [int64(int32(c)>>uint64(d))] ptr val mem)
  8883  	for {
  8884  		d := v.AuxInt
  8885  		mem := v.Args[3]
  8886  		ptr := v.Args[0]
  8887  		v_1 := v.Args[1]
  8888  		if v_1.Op != OpARMMOVWconst {
  8889  			break
  8890  		}
  8891  		c := v_1.AuxInt
  8892  		val := v.Args[2]
  8893  		v.reset(OpARMMOVWstore)
  8894  		v.AuxInt = int64(int32(c) >> uint64(d))
  8895  		v.AddArg(ptr)
  8896  		v.AddArg(val)
  8897  		v.AddArg(mem)
  8898  		return true
  8899  	}
  8900  	return false
  8901  }
  8902  func rewriteValueARM_OpARMMOVWstoreshiftRL_0(v *Value) bool {
  8903  	// match: (MOVWstoreshiftRL ptr (MOVWconst [c]) [d] val mem)
  8904  	// result: (MOVWstore [int64(uint32(c)>>uint64(d))] ptr val mem)
  8905  	for {
  8906  		d := v.AuxInt
  8907  		mem := v.Args[3]
  8908  		ptr := v.Args[0]
  8909  		v_1 := v.Args[1]
  8910  		if v_1.Op != OpARMMOVWconst {
  8911  			break
  8912  		}
  8913  		c := v_1.AuxInt
  8914  		val := v.Args[2]
  8915  		v.reset(OpARMMOVWstore)
  8916  		v.AuxInt = int64(uint32(c) >> uint64(d))
  8917  		v.AddArg(ptr)
  8918  		v.AddArg(val)
  8919  		v.AddArg(mem)
  8920  		return true
  8921  	}
  8922  	return false
  8923  }
  8924  func rewriteValueARM_OpARMMUL_0(v *Value) bool {
  8925  	// match: (MUL x (MOVWconst [c]))
  8926  	// cond: int32(c) == -1
  8927  	// result: (RSBconst [0] x)
  8928  	for {
  8929  		_ = v.Args[1]
  8930  		x := v.Args[0]
  8931  		v_1 := v.Args[1]
  8932  		if v_1.Op != OpARMMOVWconst {
  8933  			break
  8934  		}
  8935  		c := v_1.AuxInt
  8936  		if !(int32(c) == -1) {
  8937  			break
  8938  		}
  8939  		v.reset(OpARMRSBconst)
  8940  		v.AuxInt = 0
  8941  		v.AddArg(x)
  8942  		return true
  8943  	}
  8944  	// match: (MUL (MOVWconst [c]) x)
  8945  	// cond: int32(c) == -1
  8946  	// result: (RSBconst [0] x)
  8947  	for {
  8948  		x := v.Args[1]
  8949  		v_0 := v.Args[0]
  8950  		if v_0.Op != OpARMMOVWconst {
  8951  			break
  8952  		}
  8953  		c := v_0.AuxInt
  8954  		if !(int32(c) == -1) {
  8955  			break
  8956  		}
  8957  		v.reset(OpARMRSBconst)
  8958  		v.AuxInt = 0
  8959  		v.AddArg(x)
  8960  		return true
  8961  	}
  8962  	// match: (MUL _ (MOVWconst [0]))
  8963  	// result: (MOVWconst [0])
  8964  	for {
  8965  		_ = v.Args[1]
  8966  		v_1 := v.Args[1]
  8967  		if v_1.Op != OpARMMOVWconst || v_1.AuxInt != 0 {
  8968  			break
  8969  		}
  8970  		v.reset(OpARMMOVWconst)
  8971  		v.AuxInt = 0
  8972  		return true
  8973  	}
  8974  	// match: (MUL (MOVWconst [0]) _)
  8975  	// result: (MOVWconst [0])
  8976  	for {
  8977  		_ = v.Args[1]
  8978  		v_0 := v.Args[0]
  8979  		if v_0.Op != OpARMMOVWconst || v_0.AuxInt != 0 {
  8980  			break
  8981  		}
  8982  		v.reset(OpARMMOVWconst)
  8983  		v.AuxInt = 0
  8984  		return true
  8985  	}
  8986  	// match: (MUL x (MOVWconst [1]))
  8987  	// result: x
  8988  	for {
  8989  		_ = v.Args[1]
  8990  		x := v.Args[0]
  8991  		v_1 := v.Args[1]
  8992  		if v_1.Op != OpARMMOVWconst || v_1.AuxInt != 1 {
  8993  			break
  8994  		}
  8995  		v.reset(OpCopy)
  8996  		v.Type = x.Type
  8997  		v.AddArg(x)
  8998  		return true
  8999  	}
  9000  	// match: (MUL (MOVWconst [1]) x)
  9001  	// result: x
  9002  	for {
  9003  		x := v.Args[1]
  9004  		v_0 := v.Args[0]
  9005  		if v_0.Op != OpARMMOVWconst || v_0.AuxInt != 1 {
  9006  			break
  9007  		}
  9008  		v.reset(OpCopy)
  9009  		v.Type = x.Type
  9010  		v.AddArg(x)
  9011  		return true
  9012  	}
  9013  	// match: (MUL x (MOVWconst [c]))
  9014  	// cond: isPowerOfTwo(c)
  9015  	// result: (SLLconst [log2(c)] x)
  9016  	for {
  9017  		_ = v.Args[1]
  9018  		x := v.Args[0]
  9019  		v_1 := v.Args[1]
  9020  		if v_1.Op != OpARMMOVWconst {
  9021  			break
  9022  		}
  9023  		c := v_1.AuxInt
  9024  		if !(isPowerOfTwo(c)) {
  9025  			break
  9026  		}
  9027  		v.reset(OpARMSLLconst)
  9028  		v.AuxInt = log2(c)
  9029  		v.AddArg(x)
  9030  		return true
  9031  	}
  9032  	// match: (MUL (MOVWconst [c]) x)
  9033  	// cond: isPowerOfTwo(c)
  9034  	// result: (SLLconst [log2(c)] x)
  9035  	for {
  9036  		x := v.Args[1]
  9037  		v_0 := v.Args[0]
  9038  		if v_0.Op != OpARMMOVWconst {
  9039  			break
  9040  		}
  9041  		c := v_0.AuxInt
  9042  		if !(isPowerOfTwo(c)) {
  9043  			break
  9044  		}
  9045  		v.reset(OpARMSLLconst)
  9046  		v.AuxInt = log2(c)
  9047  		v.AddArg(x)
  9048  		return true
  9049  	}
  9050  	// match: (MUL x (MOVWconst [c]))
  9051  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  9052  	// result: (ADDshiftLL x x [log2(c-1)])
  9053  	for {
  9054  		_ = v.Args[1]
  9055  		x := v.Args[0]
  9056  		v_1 := v.Args[1]
  9057  		if v_1.Op != OpARMMOVWconst {
  9058  			break
  9059  		}
  9060  		c := v_1.AuxInt
  9061  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9062  			break
  9063  		}
  9064  		v.reset(OpARMADDshiftLL)
  9065  		v.AuxInt = log2(c - 1)
  9066  		v.AddArg(x)
  9067  		v.AddArg(x)
  9068  		return true
  9069  	}
  9070  	// match: (MUL (MOVWconst [c]) x)
  9071  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  9072  	// result: (ADDshiftLL x x [log2(c-1)])
  9073  	for {
  9074  		x := v.Args[1]
  9075  		v_0 := v.Args[0]
  9076  		if v_0.Op != OpARMMOVWconst {
  9077  			break
  9078  		}
  9079  		c := v_0.AuxInt
  9080  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9081  			break
  9082  		}
  9083  		v.reset(OpARMADDshiftLL)
  9084  		v.AuxInt = log2(c - 1)
  9085  		v.AddArg(x)
  9086  		v.AddArg(x)
  9087  		return true
  9088  	}
  9089  	return false
  9090  }
  9091  func rewriteValueARM_OpARMMUL_10(v *Value) bool {
  9092  	b := v.Block
  9093  	// match: (MUL x (MOVWconst [c]))
  9094  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  9095  	// result: (RSBshiftLL x x [log2(c+1)])
  9096  	for {
  9097  		_ = v.Args[1]
  9098  		x := v.Args[0]
  9099  		v_1 := v.Args[1]
  9100  		if v_1.Op != OpARMMOVWconst {
  9101  			break
  9102  		}
  9103  		c := v_1.AuxInt
  9104  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9105  			break
  9106  		}
  9107  		v.reset(OpARMRSBshiftLL)
  9108  		v.AuxInt = log2(c + 1)
  9109  		v.AddArg(x)
  9110  		v.AddArg(x)
  9111  		return true
  9112  	}
  9113  	// match: (MUL (MOVWconst [c]) x)
  9114  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  9115  	// result: (RSBshiftLL x x [log2(c+1)])
  9116  	for {
  9117  		x := v.Args[1]
  9118  		v_0 := v.Args[0]
  9119  		if v_0.Op != OpARMMOVWconst {
  9120  			break
  9121  		}
  9122  		c := v_0.AuxInt
  9123  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9124  			break
  9125  		}
  9126  		v.reset(OpARMRSBshiftLL)
  9127  		v.AuxInt = log2(c + 1)
  9128  		v.AddArg(x)
  9129  		v.AddArg(x)
  9130  		return true
  9131  	}
  9132  	// match: (MUL x (MOVWconst [c]))
  9133  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9134  	// result: (SLLconst [log2(c/3)] (ADDshiftLL <x.Type> x x [1]))
  9135  	for {
  9136  		_ = v.Args[1]
  9137  		x := v.Args[0]
  9138  		v_1 := v.Args[1]
  9139  		if v_1.Op != OpARMMOVWconst {
  9140  			break
  9141  		}
  9142  		c := v_1.AuxInt
  9143  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9144  			break
  9145  		}
  9146  		v.reset(OpARMSLLconst)
  9147  		v.AuxInt = log2(c / 3)
  9148  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9149  		v0.AuxInt = 1
  9150  		v0.AddArg(x)
  9151  		v0.AddArg(x)
  9152  		v.AddArg(v0)
  9153  		return true
  9154  	}
  9155  	// match: (MUL (MOVWconst [c]) x)
  9156  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9157  	// result: (SLLconst [log2(c/3)] (ADDshiftLL <x.Type> x x [1]))
  9158  	for {
  9159  		x := v.Args[1]
  9160  		v_0 := v.Args[0]
  9161  		if v_0.Op != OpARMMOVWconst {
  9162  			break
  9163  		}
  9164  		c := v_0.AuxInt
  9165  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9166  			break
  9167  		}
  9168  		v.reset(OpARMSLLconst)
  9169  		v.AuxInt = log2(c / 3)
  9170  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9171  		v0.AuxInt = 1
  9172  		v0.AddArg(x)
  9173  		v0.AddArg(x)
  9174  		v.AddArg(v0)
  9175  		return true
  9176  	}
  9177  	// match: (MUL x (MOVWconst [c]))
  9178  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9179  	// result: (SLLconst [log2(c/5)] (ADDshiftLL <x.Type> x x [2]))
  9180  	for {
  9181  		_ = v.Args[1]
  9182  		x := v.Args[0]
  9183  		v_1 := v.Args[1]
  9184  		if v_1.Op != OpARMMOVWconst {
  9185  			break
  9186  		}
  9187  		c := v_1.AuxInt
  9188  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9189  			break
  9190  		}
  9191  		v.reset(OpARMSLLconst)
  9192  		v.AuxInt = log2(c / 5)
  9193  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9194  		v0.AuxInt = 2
  9195  		v0.AddArg(x)
  9196  		v0.AddArg(x)
  9197  		v.AddArg(v0)
  9198  		return true
  9199  	}
  9200  	// match: (MUL (MOVWconst [c]) x)
  9201  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9202  	// result: (SLLconst [log2(c/5)] (ADDshiftLL <x.Type> x x [2]))
  9203  	for {
  9204  		x := v.Args[1]
  9205  		v_0 := v.Args[0]
  9206  		if v_0.Op != OpARMMOVWconst {
  9207  			break
  9208  		}
  9209  		c := v_0.AuxInt
  9210  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9211  			break
  9212  		}
  9213  		v.reset(OpARMSLLconst)
  9214  		v.AuxInt = log2(c / 5)
  9215  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9216  		v0.AuxInt = 2
  9217  		v0.AddArg(x)
  9218  		v0.AddArg(x)
  9219  		v.AddArg(v0)
  9220  		return true
  9221  	}
  9222  	// match: (MUL x (MOVWconst [c]))
  9223  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9224  	// result: (SLLconst [log2(c/7)] (RSBshiftLL <x.Type> x x [3]))
  9225  	for {
  9226  		_ = v.Args[1]
  9227  		x := v.Args[0]
  9228  		v_1 := v.Args[1]
  9229  		if v_1.Op != OpARMMOVWconst {
  9230  			break
  9231  		}
  9232  		c := v_1.AuxInt
  9233  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9234  			break
  9235  		}
  9236  		v.reset(OpARMSLLconst)
  9237  		v.AuxInt = log2(c / 7)
  9238  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  9239  		v0.AuxInt = 3
  9240  		v0.AddArg(x)
  9241  		v0.AddArg(x)
  9242  		v.AddArg(v0)
  9243  		return true
  9244  	}
  9245  	// match: (MUL (MOVWconst [c]) x)
  9246  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9247  	// result: (SLLconst [log2(c/7)] (RSBshiftLL <x.Type> x x [3]))
  9248  	for {
  9249  		x := v.Args[1]
  9250  		v_0 := v.Args[0]
  9251  		if v_0.Op != OpARMMOVWconst {
  9252  			break
  9253  		}
  9254  		c := v_0.AuxInt
  9255  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9256  			break
  9257  		}
  9258  		v.reset(OpARMSLLconst)
  9259  		v.AuxInt = log2(c / 7)
  9260  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  9261  		v0.AuxInt = 3
  9262  		v0.AddArg(x)
  9263  		v0.AddArg(x)
  9264  		v.AddArg(v0)
  9265  		return true
  9266  	}
  9267  	// match: (MUL x (MOVWconst [c]))
  9268  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9269  	// result: (SLLconst [log2(c/9)] (ADDshiftLL <x.Type> x x [3]))
  9270  	for {
  9271  		_ = v.Args[1]
  9272  		x := v.Args[0]
  9273  		v_1 := v.Args[1]
  9274  		if v_1.Op != OpARMMOVWconst {
  9275  			break
  9276  		}
  9277  		c := v_1.AuxInt
  9278  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9279  			break
  9280  		}
  9281  		v.reset(OpARMSLLconst)
  9282  		v.AuxInt = log2(c / 9)
  9283  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9284  		v0.AuxInt = 3
  9285  		v0.AddArg(x)
  9286  		v0.AddArg(x)
  9287  		v.AddArg(v0)
  9288  		return true
  9289  	}
  9290  	// match: (MUL (MOVWconst [c]) x)
  9291  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9292  	// result: (SLLconst [log2(c/9)] (ADDshiftLL <x.Type> x x [3]))
  9293  	for {
  9294  		x := v.Args[1]
  9295  		v_0 := v.Args[0]
  9296  		if v_0.Op != OpARMMOVWconst {
  9297  			break
  9298  		}
  9299  		c := v_0.AuxInt
  9300  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9301  			break
  9302  		}
  9303  		v.reset(OpARMSLLconst)
  9304  		v.AuxInt = log2(c / 9)
  9305  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9306  		v0.AuxInt = 3
  9307  		v0.AddArg(x)
  9308  		v0.AddArg(x)
  9309  		v.AddArg(v0)
  9310  		return true
  9311  	}
  9312  	return false
  9313  }
  9314  func rewriteValueARM_OpARMMUL_20(v *Value) bool {
  9315  	// match: (MUL (MOVWconst [c]) (MOVWconst [d]))
  9316  	// result: (MOVWconst [int64(int32(c*d))])
  9317  	for {
  9318  		_ = v.Args[1]
  9319  		v_0 := v.Args[0]
  9320  		if v_0.Op != OpARMMOVWconst {
  9321  			break
  9322  		}
  9323  		c := v_0.AuxInt
  9324  		v_1 := v.Args[1]
  9325  		if v_1.Op != OpARMMOVWconst {
  9326  			break
  9327  		}
  9328  		d := v_1.AuxInt
  9329  		v.reset(OpARMMOVWconst)
  9330  		v.AuxInt = int64(int32(c * d))
  9331  		return true
  9332  	}
  9333  	// match: (MUL (MOVWconst [d]) (MOVWconst [c]))
  9334  	// result: (MOVWconst [int64(int32(c*d))])
  9335  	for {
  9336  		_ = v.Args[1]
  9337  		v_0 := v.Args[0]
  9338  		if v_0.Op != OpARMMOVWconst {
  9339  			break
  9340  		}
  9341  		d := v_0.AuxInt
  9342  		v_1 := v.Args[1]
  9343  		if v_1.Op != OpARMMOVWconst {
  9344  			break
  9345  		}
  9346  		c := v_1.AuxInt
  9347  		v.reset(OpARMMOVWconst)
  9348  		v.AuxInt = int64(int32(c * d))
  9349  		return true
  9350  	}
  9351  	return false
  9352  }
  9353  func rewriteValueARM_OpARMMULA_0(v *Value) bool {
  9354  	b := v.Block
  9355  	// match: (MULA x (MOVWconst [c]) a)
  9356  	// cond: int32(c) == -1
  9357  	// result: (SUB a x)
  9358  	for {
  9359  		a := v.Args[2]
  9360  		x := v.Args[0]
  9361  		v_1 := v.Args[1]
  9362  		if v_1.Op != OpARMMOVWconst {
  9363  			break
  9364  		}
  9365  		c := v_1.AuxInt
  9366  		if !(int32(c) == -1) {
  9367  			break
  9368  		}
  9369  		v.reset(OpARMSUB)
  9370  		v.AddArg(a)
  9371  		v.AddArg(x)
  9372  		return true
  9373  	}
  9374  	// match: (MULA _ (MOVWconst [0]) a)
  9375  	// result: a
  9376  	for {
  9377  		a := v.Args[2]
  9378  		v_1 := v.Args[1]
  9379  		if v_1.Op != OpARMMOVWconst || v_1.AuxInt != 0 {
  9380  			break
  9381  		}
  9382  		v.reset(OpCopy)
  9383  		v.Type = a.Type
  9384  		v.AddArg(a)
  9385  		return true
  9386  	}
  9387  	// match: (MULA x (MOVWconst [1]) a)
  9388  	// result: (ADD x a)
  9389  	for {
  9390  		a := v.Args[2]
  9391  		x := v.Args[0]
  9392  		v_1 := v.Args[1]
  9393  		if v_1.Op != OpARMMOVWconst || v_1.AuxInt != 1 {
  9394  			break
  9395  		}
  9396  		v.reset(OpARMADD)
  9397  		v.AddArg(x)
  9398  		v.AddArg(a)
  9399  		return true
  9400  	}
  9401  	// match: (MULA x (MOVWconst [c]) a)
  9402  	// cond: isPowerOfTwo(c)
  9403  	// result: (ADD (SLLconst <x.Type> [log2(c)] x) a)
  9404  	for {
  9405  		a := v.Args[2]
  9406  		x := v.Args[0]
  9407  		v_1 := v.Args[1]
  9408  		if v_1.Op != OpARMMOVWconst {
  9409  			break
  9410  		}
  9411  		c := v_1.AuxInt
  9412  		if !(isPowerOfTwo(c)) {
  9413  			break
  9414  		}
  9415  		v.reset(OpARMADD)
  9416  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9417  		v0.AuxInt = log2(c)
  9418  		v0.AddArg(x)
  9419  		v.AddArg(v0)
  9420  		v.AddArg(a)
  9421  		return true
  9422  	}
  9423  	// match: (MULA x (MOVWconst [c]) a)
  9424  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  9425  	// result: (ADD (ADDshiftLL <x.Type> x x [log2(c-1)]) a)
  9426  	for {
  9427  		a := v.Args[2]
  9428  		x := v.Args[0]
  9429  		v_1 := v.Args[1]
  9430  		if v_1.Op != OpARMMOVWconst {
  9431  			break
  9432  		}
  9433  		c := v_1.AuxInt
  9434  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9435  			break
  9436  		}
  9437  		v.reset(OpARMADD)
  9438  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9439  		v0.AuxInt = log2(c - 1)
  9440  		v0.AddArg(x)
  9441  		v0.AddArg(x)
  9442  		v.AddArg(v0)
  9443  		v.AddArg(a)
  9444  		return true
  9445  	}
  9446  	// match: (MULA x (MOVWconst [c]) a)
  9447  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  9448  	// result: (ADD (RSBshiftLL <x.Type> x x [log2(c+1)]) a)
  9449  	for {
  9450  		a := v.Args[2]
  9451  		x := v.Args[0]
  9452  		v_1 := v.Args[1]
  9453  		if v_1.Op != OpARMMOVWconst {
  9454  			break
  9455  		}
  9456  		c := v_1.AuxInt
  9457  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9458  			break
  9459  		}
  9460  		v.reset(OpARMADD)
  9461  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  9462  		v0.AuxInt = log2(c + 1)
  9463  		v0.AddArg(x)
  9464  		v0.AddArg(x)
  9465  		v.AddArg(v0)
  9466  		v.AddArg(a)
  9467  		return true
  9468  	}
  9469  	// match: (MULA x (MOVWconst [c]) a)
  9470  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9471  	// result: (ADD (SLLconst <x.Type> [log2(c/3)] (ADDshiftLL <x.Type> x x [1])) a)
  9472  	for {
  9473  		a := v.Args[2]
  9474  		x := v.Args[0]
  9475  		v_1 := v.Args[1]
  9476  		if v_1.Op != OpARMMOVWconst {
  9477  			break
  9478  		}
  9479  		c := v_1.AuxInt
  9480  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9481  			break
  9482  		}
  9483  		v.reset(OpARMADD)
  9484  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9485  		v0.AuxInt = log2(c / 3)
  9486  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9487  		v1.AuxInt = 1
  9488  		v1.AddArg(x)
  9489  		v1.AddArg(x)
  9490  		v0.AddArg(v1)
  9491  		v.AddArg(v0)
  9492  		v.AddArg(a)
  9493  		return true
  9494  	}
  9495  	// match: (MULA x (MOVWconst [c]) a)
  9496  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9497  	// result: (ADD (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])) a)
  9498  	for {
  9499  		a := v.Args[2]
  9500  		x := v.Args[0]
  9501  		v_1 := v.Args[1]
  9502  		if v_1.Op != OpARMMOVWconst {
  9503  			break
  9504  		}
  9505  		c := v_1.AuxInt
  9506  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9507  			break
  9508  		}
  9509  		v.reset(OpARMADD)
  9510  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9511  		v0.AuxInt = log2(c / 5)
  9512  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9513  		v1.AuxInt = 2
  9514  		v1.AddArg(x)
  9515  		v1.AddArg(x)
  9516  		v0.AddArg(v1)
  9517  		v.AddArg(v0)
  9518  		v.AddArg(a)
  9519  		return true
  9520  	}
  9521  	// match: (MULA x (MOVWconst [c]) a)
  9522  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9523  	// result: (ADD (SLLconst <x.Type> [log2(c/7)] (RSBshiftLL <x.Type> x x [3])) a)
  9524  	for {
  9525  		a := v.Args[2]
  9526  		x := v.Args[0]
  9527  		v_1 := v.Args[1]
  9528  		if v_1.Op != OpARMMOVWconst {
  9529  			break
  9530  		}
  9531  		c := v_1.AuxInt
  9532  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9533  			break
  9534  		}
  9535  		v.reset(OpARMADD)
  9536  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9537  		v0.AuxInt = log2(c / 7)
  9538  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  9539  		v1.AuxInt = 3
  9540  		v1.AddArg(x)
  9541  		v1.AddArg(x)
  9542  		v0.AddArg(v1)
  9543  		v.AddArg(v0)
  9544  		v.AddArg(a)
  9545  		return true
  9546  	}
  9547  	// match: (MULA x (MOVWconst [c]) a)
  9548  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9549  	// result: (ADD (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])) a)
  9550  	for {
  9551  		a := v.Args[2]
  9552  		x := v.Args[0]
  9553  		v_1 := v.Args[1]
  9554  		if v_1.Op != OpARMMOVWconst {
  9555  			break
  9556  		}
  9557  		c := v_1.AuxInt
  9558  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9559  			break
  9560  		}
  9561  		v.reset(OpARMADD)
  9562  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9563  		v0.AuxInt = log2(c / 9)
  9564  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9565  		v1.AuxInt = 3
  9566  		v1.AddArg(x)
  9567  		v1.AddArg(x)
  9568  		v0.AddArg(v1)
  9569  		v.AddArg(v0)
  9570  		v.AddArg(a)
  9571  		return true
  9572  	}
  9573  	return false
  9574  }
  9575  func rewriteValueARM_OpARMMULA_10(v *Value) bool {
  9576  	b := v.Block
  9577  	// match: (MULA (MOVWconst [c]) x a)
  9578  	// cond: int32(c) == -1
  9579  	// result: (SUB a x)
  9580  	for {
  9581  		a := v.Args[2]
  9582  		v_0 := v.Args[0]
  9583  		if v_0.Op != OpARMMOVWconst {
  9584  			break
  9585  		}
  9586  		c := v_0.AuxInt
  9587  		x := v.Args[1]
  9588  		if !(int32(c) == -1) {
  9589  			break
  9590  		}
  9591  		v.reset(OpARMSUB)
  9592  		v.AddArg(a)
  9593  		v.AddArg(x)
  9594  		return true
  9595  	}
  9596  	// match: (MULA (MOVWconst [0]) _ a)
  9597  	// result: a
  9598  	for {
  9599  		a := v.Args[2]
  9600  		v_0 := v.Args[0]
  9601  		if v_0.Op != OpARMMOVWconst || v_0.AuxInt != 0 {
  9602  			break
  9603  		}
  9604  		v.reset(OpCopy)
  9605  		v.Type = a.Type
  9606  		v.AddArg(a)
  9607  		return true
  9608  	}
  9609  	// match: (MULA (MOVWconst [1]) x a)
  9610  	// result: (ADD x a)
  9611  	for {
  9612  		a := v.Args[2]
  9613  		v_0 := v.Args[0]
  9614  		if v_0.Op != OpARMMOVWconst || v_0.AuxInt != 1 {
  9615  			break
  9616  		}
  9617  		x := v.Args[1]
  9618  		v.reset(OpARMADD)
  9619  		v.AddArg(x)
  9620  		v.AddArg(a)
  9621  		return true
  9622  	}
  9623  	// match: (MULA (MOVWconst [c]) x a)
  9624  	// cond: isPowerOfTwo(c)
  9625  	// result: (ADD (SLLconst <x.Type> [log2(c)] x) a)
  9626  	for {
  9627  		a := v.Args[2]
  9628  		v_0 := v.Args[0]
  9629  		if v_0.Op != OpARMMOVWconst {
  9630  			break
  9631  		}
  9632  		c := v_0.AuxInt
  9633  		x := v.Args[1]
  9634  		if !(isPowerOfTwo(c)) {
  9635  			break
  9636  		}
  9637  		v.reset(OpARMADD)
  9638  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9639  		v0.AuxInt = log2(c)
  9640  		v0.AddArg(x)
  9641  		v.AddArg(v0)
  9642  		v.AddArg(a)
  9643  		return true
  9644  	}
  9645  	// match: (MULA (MOVWconst [c]) x a)
  9646  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  9647  	// result: (ADD (ADDshiftLL <x.Type> x x [log2(c-1)]) a)
  9648  	for {
  9649  		a := v.Args[2]
  9650  		v_0 := v.Args[0]
  9651  		if v_0.Op != OpARMMOVWconst {
  9652  			break
  9653  		}
  9654  		c := v_0.AuxInt
  9655  		x := v.Args[1]
  9656  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9657  			break
  9658  		}
  9659  		v.reset(OpARMADD)
  9660  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9661  		v0.AuxInt = log2(c - 1)
  9662  		v0.AddArg(x)
  9663  		v0.AddArg(x)
  9664  		v.AddArg(v0)
  9665  		v.AddArg(a)
  9666  		return true
  9667  	}
  9668  	// match: (MULA (MOVWconst [c]) x a)
  9669  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  9670  	// result: (ADD (RSBshiftLL <x.Type> x x [log2(c+1)]) a)
  9671  	for {
  9672  		a := v.Args[2]
  9673  		v_0 := v.Args[0]
  9674  		if v_0.Op != OpARMMOVWconst {
  9675  			break
  9676  		}
  9677  		c := v_0.AuxInt
  9678  		x := v.Args[1]
  9679  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9680  			break
  9681  		}
  9682  		v.reset(OpARMADD)
  9683  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  9684  		v0.AuxInt = log2(c + 1)
  9685  		v0.AddArg(x)
  9686  		v0.AddArg(x)
  9687  		v.AddArg(v0)
  9688  		v.AddArg(a)
  9689  		return true
  9690  	}
  9691  	// match: (MULA (MOVWconst [c]) x a)
  9692  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9693  	// result: (ADD (SLLconst <x.Type> [log2(c/3)] (ADDshiftLL <x.Type> x x [1])) a)
  9694  	for {
  9695  		a := v.Args[2]
  9696  		v_0 := v.Args[0]
  9697  		if v_0.Op != OpARMMOVWconst {
  9698  			break
  9699  		}
  9700  		c := v_0.AuxInt
  9701  		x := v.Args[1]
  9702  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9703  			break
  9704  		}
  9705  		v.reset(OpARMADD)
  9706  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9707  		v0.AuxInt = log2(c / 3)
  9708  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9709  		v1.AuxInt = 1
  9710  		v1.AddArg(x)
  9711  		v1.AddArg(x)
  9712  		v0.AddArg(v1)
  9713  		v.AddArg(v0)
  9714  		v.AddArg(a)
  9715  		return true
  9716  	}
  9717  	// match: (MULA (MOVWconst [c]) x a)
  9718  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9719  	// result: (ADD (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])) a)
  9720  	for {
  9721  		a := v.Args[2]
  9722  		v_0 := v.Args[0]
  9723  		if v_0.Op != OpARMMOVWconst {
  9724  			break
  9725  		}
  9726  		c := v_0.AuxInt
  9727  		x := v.Args[1]
  9728  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9729  			break
  9730  		}
  9731  		v.reset(OpARMADD)
  9732  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9733  		v0.AuxInt = log2(c / 5)
  9734  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9735  		v1.AuxInt = 2
  9736  		v1.AddArg(x)
  9737  		v1.AddArg(x)
  9738  		v0.AddArg(v1)
  9739  		v.AddArg(v0)
  9740  		v.AddArg(a)
  9741  		return true
  9742  	}
  9743  	// match: (MULA (MOVWconst [c]) x a)
  9744  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9745  	// result: (ADD (SLLconst <x.Type> [log2(c/7)] (RSBshiftLL <x.Type> x x [3])) a)
  9746  	for {
  9747  		a := v.Args[2]
  9748  		v_0 := v.Args[0]
  9749  		if v_0.Op != OpARMMOVWconst {
  9750  			break
  9751  		}
  9752  		c := v_0.AuxInt
  9753  		x := v.Args[1]
  9754  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9755  			break
  9756  		}
  9757  		v.reset(OpARMADD)
  9758  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9759  		v0.AuxInt = log2(c / 7)
  9760  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  9761  		v1.AuxInt = 3
  9762  		v1.AddArg(x)
  9763  		v1.AddArg(x)
  9764  		v0.AddArg(v1)
  9765  		v.AddArg(v0)
  9766  		v.AddArg(a)
  9767  		return true
  9768  	}
  9769  	// match: (MULA (MOVWconst [c]) x a)
  9770  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9771  	// result: (ADD (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])) a)
  9772  	for {
  9773  		a := v.Args[2]
  9774  		v_0 := v.Args[0]
  9775  		if v_0.Op != OpARMMOVWconst {
  9776  			break
  9777  		}
  9778  		c := v_0.AuxInt
  9779  		x := v.Args[1]
  9780  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9781  			break
  9782  		}
  9783  		v.reset(OpARMADD)
  9784  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9785  		v0.AuxInt = log2(c / 9)
  9786  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9787  		v1.AuxInt = 3
  9788  		v1.AddArg(x)
  9789  		v1.AddArg(x)
  9790  		v0.AddArg(v1)
  9791  		v.AddArg(v0)
  9792  		v.AddArg(a)
  9793  		return true
  9794  	}
  9795  	return false
  9796  }
  9797  func rewriteValueARM_OpARMMULA_20(v *Value) bool {
  9798  	// match: (MULA (MOVWconst [c]) (MOVWconst [d]) a)
  9799  	// result: (ADDconst [int64(int32(c*d))] a)
  9800  	for {
  9801  		a := v.Args[2]
  9802  		v_0 := v.Args[0]
  9803  		if v_0.Op != OpARMMOVWconst {
  9804  			break
  9805  		}
  9806  		c := v_0.AuxInt
  9807  		v_1 := v.Args[1]
  9808  		if v_1.Op != OpARMMOVWconst {
  9809  			break
  9810  		}
  9811  		d := v_1.AuxInt
  9812  		v.reset(OpARMADDconst)
  9813  		v.AuxInt = int64(int32(c * d))
  9814  		v.AddArg(a)
  9815  		return true
  9816  	}
  9817  	return false
  9818  }
  9819  func rewriteValueARM_OpARMMULD_0(v *Value) bool {
  9820  	// match: (MULD (NEGD x) y)
  9821  	// cond: objabi.GOARM >= 6
  9822  	// result: (NMULD x y)
  9823  	for {
  9824  		y := v.Args[1]
  9825  		v_0 := v.Args[0]
  9826  		if v_0.Op != OpARMNEGD {
  9827  			break
  9828  		}
  9829  		x := v_0.Args[0]
  9830  		if !(objabi.GOARM >= 6) {
  9831  			break
  9832  		}
  9833  		v.reset(OpARMNMULD)
  9834  		v.AddArg(x)
  9835  		v.AddArg(y)
  9836  		return true
  9837  	}
  9838  	// match: (MULD y (NEGD x))
  9839  	// cond: objabi.GOARM >= 6
  9840  	// result: (NMULD x y)
  9841  	for {
  9842  		_ = v.Args[1]
  9843  		y := v.Args[0]
  9844  		v_1 := v.Args[1]
  9845  		if v_1.Op != OpARMNEGD {
  9846  			break
  9847  		}
  9848  		x := v_1.Args[0]
  9849  		if !(objabi.GOARM >= 6) {
  9850  			break
  9851  		}
  9852  		v.reset(OpARMNMULD)
  9853  		v.AddArg(x)
  9854  		v.AddArg(y)
  9855  		return true
  9856  	}
  9857  	return false
  9858  }
  9859  func rewriteValueARM_OpARMMULF_0(v *Value) bool {
  9860  	// match: (MULF (NEGF x) y)
  9861  	// cond: objabi.GOARM >= 6
  9862  	// result: (NMULF x y)
  9863  	for {
  9864  		y := v.Args[1]
  9865  		v_0 := v.Args[0]
  9866  		if v_0.Op != OpARMNEGF {
  9867  			break
  9868  		}
  9869  		x := v_0.Args[0]
  9870  		if !(objabi.GOARM >= 6) {
  9871  			break
  9872  		}
  9873  		v.reset(OpARMNMULF)
  9874  		v.AddArg(x)
  9875  		v.AddArg(y)
  9876  		return true
  9877  	}
  9878  	// match: (MULF y (NEGF x))
  9879  	// cond: objabi.GOARM >= 6
  9880  	// result: (NMULF x y)
  9881  	for {
  9882  		_ = v.Args[1]
  9883  		y := v.Args[0]
  9884  		v_1 := v.Args[1]
  9885  		if v_1.Op != OpARMNEGF {
  9886  			break
  9887  		}
  9888  		x := v_1.Args[0]
  9889  		if !(objabi.GOARM >= 6) {
  9890  			break
  9891  		}
  9892  		v.reset(OpARMNMULF)
  9893  		v.AddArg(x)
  9894  		v.AddArg(y)
  9895  		return true
  9896  	}
  9897  	return false
  9898  }
  9899  func rewriteValueARM_OpARMMULS_0(v *Value) bool {
  9900  	b := v.Block
  9901  	// match: (MULS x (MOVWconst [c]) a)
  9902  	// cond: int32(c) == -1
  9903  	// result: (ADD a x)
  9904  	for {
  9905  		a := v.Args[2]
  9906  		x := v.Args[0]
  9907  		v_1 := v.Args[1]
  9908  		if v_1.Op != OpARMMOVWconst {
  9909  			break
  9910  		}
  9911  		c := v_1.AuxInt
  9912  		if !(int32(c) == -1) {
  9913  			break
  9914  		}
  9915  		v.reset(OpARMADD)
  9916  		v.AddArg(a)
  9917  		v.AddArg(x)
  9918  		return true
  9919  	}
  9920  	// match: (MULS _ (MOVWconst [0]) a)
  9921  	// result: a
  9922  	for {
  9923  		a := v.Args[2]
  9924  		v_1 := v.Args[1]
  9925  		if v_1.Op != OpARMMOVWconst || v_1.AuxInt != 0 {
  9926  			break
  9927  		}
  9928  		v.reset(OpCopy)
  9929  		v.Type = a.Type
  9930  		v.AddArg(a)
  9931  		return true
  9932  	}
  9933  	// match: (MULS x (MOVWconst [1]) a)
  9934  	// result: (RSB x a)
  9935  	for {
  9936  		a := v.Args[2]
  9937  		x := v.Args[0]
  9938  		v_1 := v.Args[1]
  9939  		if v_1.Op != OpARMMOVWconst || v_1.AuxInt != 1 {
  9940  			break
  9941  		}
  9942  		v.reset(OpARMRSB)
  9943  		v.AddArg(x)
  9944  		v.AddArg(a)
  9945  		return true
  9946  	}
  9947  	// match: (MULS x (MOVWconst [c]) a)
  9948  	// cond: isPowerOfTwo(c)
  9949  	// result: (RSB (SLLconst <x.Type> [log2(c)] x) a)
  9950  	for {
  9951  		a := v.Args[2]
  9952  		x := v.Args[0]
  9953  		v_1 := v.Args[1]
  9954  		if v_1.Op != OpARMMOVWconst {
  9955  			break
  9956  		}
  9957  		c := v_1.AuxInt
  9958  		if !(isPowerOfTwo(c)) {
  9959  			break
  9960  		}
  9961  		v.reset(OpARMRSB)
  9962  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9963  		v0.AuxInt = log2(c)
  9964  		v0.AddArg(x)
  9965  		v.AddArg(v0)
  9966  		v.AddArg(a)
  9967  		return true
  9968  	}
  9969  	// match: (MULS x (MOVWconst [c]) a)
  9970  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  9971  	// result: (RSB (ADDshiftLL <x.Type> x x [log2(c-1)]) a)
  9972  	for {
  9973  		a := v.Args[2]
  9974  		x := v.Args[0]
  9975  		v_1 := v.Args[1]
  9976  		if v_1.Op != OpARMMOVWconst {
  9977  			break
  9978  		}
  9979  		c := v_1.AuxInt
  9980  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9981  			break
  9982  		}
  9983  		v.reset(OpARMRSB)
  9984  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9985  		v0.AuxInt = log2(c - 1)
  9986  		v0.AddArg(x)
  9987  		v0.AddArg(x)
  9988  		v.AddArg(v0)
  9989  		v.AddArg(a)
  9990  		return true
  9991  	}
  9992  	// match: (MULS x (MOVWconst [c]) a)
  9993  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  9994  	// result: (RSB (RSBshiftLL <x.Type> x x [log2(c+1)]) a)
  9995  	for {
  9996  		a := v.Args[2]
  9997  		x := v.Args[0]
  9998  		v_1 := v.Args[1]
  9999  		if v_1.Op != OpARMMOVWconst {
 10000  			break
 10001  		}
 10002  		c := v_1.AuxInt
 10003  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 10004  			break
 10005  		}
 10006  		v.reset(OpARMRSB)
 10007  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10008  		v0.AuxInt = log2(c + 1)
 10009  		v0.AddArg(x)
 10010  		v0.AddArg(x)
 10011  		v.AddArg(v0)
 10012  		v.AddArg(a)
 10013  		return true
 10014  	}
 10015  	// match: (MULS x (MOVWconst [c]) a)
 10016  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 10017  	// result: (RSB (SLLconst <x.Type> [log2(c/3)] (ADDshiftLL <x.Type> x x [1])) a)
 10018  	for {
 10019  		a := v.Args[2]
 10020  		x := v.Args[0]
 10021  		v_1 := v.Args[1]
 10022  		if v_1.Op != OpARMMOVWconst {
 10023  			break
 10024  		}
 10025  		c := v_1.AuxInt
 10026  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 10027  			break
 10028  		}
 10029  		v.reset(OpARMRSB)
 10030  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10031  		v0.AuxInt = log2(c / 3)
 10032  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10033  		v1.AuxInt = 1
 10034  		v1.AddArg(x)
 10035  		v1.AddArg(x)
 10036  		v0.AddArg(v1)
 10037  		v.AddArg(v0)
 10038  		v.AddArg(a)
 10039  		return true
 10040  	}
 10041  	// match: (MULS x (MOVWconst [c]) a)
 10042  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 10043  	// result: (RSB (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])) a)
 10044  	for {
 10045  		a := v.Args[2]
 10046  		x := v.Args[0]
 10047  		v_1 := v.Args[1]
 10048  		if v_1.Op != OpARMMOVWconst {
 10049  			break
 10050  		}
 10051  		c := v_1.AuxInt
 10052  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 10053  			break
 10054  		}
 10055  		v.reset(OpARMRSB)
 10056  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10057  		v0.AuxInt = log2(c / 5)
 10058  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10059  		v1.AuxInt = 2
 10060  		v1.AddArg(x)
 10061  		v1.AddArg(x)
 10062  		v0.AddArg(v1)
 10063  		v.AddArg(v0)
 10064  		v.AddArg(a)
 10065  		return true
 10066  	}
 10067  	// match: (MULS x (MOVWconst [c]) a)
 10068  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 10069  	// result: (RSB (SLLconst <x.Type> [log2(c/7)] (RSBshiftLL <x.Type> x x [3])) a)
 10070  	for {
 10071  		a := v.Args[2]
 10072  		x := v.Args[0]
 10073  		v_1 := v.Args[1]
 10074  		if v_1.Op != OpARMMOVWconst {
 10075  			break
 10076  		}
 10077  		c := v_1.AuxInt
 10078  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 10079  			break
 10080  		}
 10081  		v.reset(OpARMRSB)
 10082  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10083  		v0.AuxInt = log2(c / 7)
 10084  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10085  		v1.AuxInt = 3
 10086  		v1.AddArg(x)
 10087  		v1.AddArg(x)
 10088  		v0.AddArg(v1)
 10089  		v.AddArg(v0)
 10090  		v.AddArg(a)
 10091  		return true
 10092  	}
 10093  	// match: (MULS x (MOVWconst [c]) a)
 10094  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 10095  	// result: (RSB (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])) a)
 10096  	for {
 10097  		a := v.Args[2]
 10098  		x := v.Args[0]
 10099  		v_1 := v.Args[1]
 10100  		if v_1.Op != OpARMMOVWconst {
 10101  			break
 10102  		}
 10103  		c := v_1.AuxInt
 10104  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 10105  			break
 10106  		}
 10107  		v.reset(OpARMRSB)
 10108  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10109  		v0.AuxInt = log2(c / 9)
 10110  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10111  		v1.AuxInt = 3
 10112  		v1.AddArg(x)
 10113  		v1.AddArg(x)
 10114  		v0.AddArg(v1)
 10115  		v.AddArg(v0)
 10116  		v.AddArg(a)
 10117  		return true
 10118  	}
 10119  	return false
 10120  }
 10121  func rewriteValueARM_OpARMMULS_10(v *Value) bool {
 10122  	b := v.Block
 10123  	// match: (MULS (MOVWconst [c]) x a)
 10124  	// cond: int32(c) == -1
 10125  	// result: (ADD a x)
 10126  	for {
 10127  		a := v.Args[2]
 10128  		v_0 := v.Args[0]
 10129  		if v_0.Op != OpARMMOVWconst {
 10130  			break
 10131  		}
 10132  		c := v_0.AuxInt
 10133  		x := v.Args[1]
 10134  		if !(int32(c) == -1) {
 10135  			break
 10136  		}
 10137  		v.reset(OpARMADD)
 10138  		v.AddArg(a)
 10139  		v.AddArg(x)
 10140  		return true
 10141  	}
 10142  	// match: (MULS (MOVWconst [0]) _ a)
 10143  	// result: a
 10144  	for {
 10145  		a := v.Args[2]
 10146  		v_0 := v.Args[0]
 10147  		if v_0.Op != OpARMMOVWconst || v_0.AuxInt != 0 {
 10148  			break
 10149  		}
 10150  		v.reset(OpCopy)
 10151  		v.Type = a.Type
 10152  		v.AddArg(a)
 10153  		return true
 10154  	}
 10155  	// match: (MULS (MOVWconst [1]) x a)
 10156  	// result: (RSB x a)
 10157  	for {
 10158  		a := v.Args[2]
 10159  		v_0 := v.Args[0]
 10160  		if v_0.Op != OpARMMOVWconst || v_0.AuxInt != 1 {
 10161  			break
 10162  		}
 10163  		x := v.Args[1]
 10164  		v.reset(OpARMRSB)
 10165  		v.AddArg(x)
 10166  		v.AddArg(a)
 10167  		return true
 10168  	}
 10169  	// match: (MULS (MOVWconst [c]) x a)
 10170  	// cond: isPowerOfTwo(c)
 10171  	// result: (RSB (SLLconst <x.Type> [log2(c)] x) a)
 10172  	for {
 10173  		a := v.Args[2]
 10174  		v_0 := v.Args[0]
 10175  		if v_0.Op != OpARMMOVWconst {
 10176  			break
 10177  		}
 10178  		c := v_0.AuxInt
 10179  		x := v.Args[1]
 10180  		if !(isPowerOfTwo(c)) {
 10181  			break
 10182  		}
 10183  		v.reset(OpARMRSB)
 10184  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10185  		v0.AuxInt = log2(c)
 10186  		v0.AddArg(x)
 10187  		v.AddArg(v0)
 10188  		v.AddArg(a)
 10189  		return true
 10190  	}
 10191  	// match: (MULS (MOVWconst [c]) x a)
 10192  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
 10193  	// result: (RSB (ADDshiftLL <x.Type> x x [log2(c-1)]) a)
 10194  	for {
 10195  		a := v.Args[2]
 10196  		v_0 := v.Args[0]
 10197  		if v_0.Op != OpARMMOVWconst {
 10198  			break
 10199  		}
 10200  		c := v_0.AuxInt
 10201  		x := v.Args[1]
 10202  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 10203  			break
 10204  		}
 10205  		v.reset(OpARMRSB)
 10206  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10207  		v0.AuxInt = log2(c - 1)
 10208  		v0.AddArg(x)
 10209  		v0.AddArg(x)
 10210  		v.AddArg(v0)
 10211  		v.AddArg(a)
 10212  		return true
 10213  	}
 10214  	// match: (MULS (MOVWconst [c]) x a)
 10215  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
 10216  	// result: (RSB (RSBshiftLL <x.Type> x x [log2(c+1)]) a)
 10217  	for {
 10218  		a := v.Args[2]
 10219  		v_0 := v.Args[0]
 10220  		if v_0.Op != OpARMMOVWconst {
 10221  			break
 10222  		}
 10223  		c := v_0.AuxInt
 10224  		x := v.Args[1]
 10225  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 10226  			break
 10227  		}
 10228  		v.reset(OpARMRSB)
 10229  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10230  		v0.AuxInt = log2(c + 1)
 10231  		v0.AddArg(x)
 10232  		v0.AddArg(x)
 10233  		v.AddArg(v0)
 10234  		v.AddArg(a)
 10235  		return true
 10236  	}
 10237  	// match: (MULS (MOVWconst [c]) x a)
 10238  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 10239  	// result: (RSB (SLLconst <x.Type> [log2(c/3)] (ADDshiftLL <x.Type> x x [1])) a)
 10240  	for {
 10241  		a := v.Args[2]
 10242  		v_0 := v.Args[0]
 10243  		if v_0.Op != OpARMMOVWconst {
 10244  			break
 10245  		}
 10246  		c := v_0.AuxInt
 10247  		x := v.Args[1]
 10248  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 10249  			break
 10250  		}
 10251  		v.reset(OpARMRSB)
 10252  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10253  		v0.AuxInt = log2(c / 3)
 10254  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10255  		v1.AuxInt = 1
 10256  		v1.AddArg(x)
 10257  		v1.AddArg(x)
 10258  		v0.AddArg(v1)
 10259  		v.AddArg(v0)
 10260  		v.AddArg(a)
 10261  		return true
 10262  	}
 10263  	// match: (MULS (MOVWconst [c]) x a)
 10264  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 10265  	// result: (RSB (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])) a)
 10266  	for {
 10267  		a := v.Args[2]
 10268  		v_0 := v.Args[0]
 10269  		if v_0.Op != OpARMMOVWconst {
 10270  			break
 10271  		}
 10272  		c := v_0.AuxInt
 10273  		x := v.Args[1]
 10274  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 10275  			break
 10276  		}
 10277  		v.reset(OpARMRSB)
 10278  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10279  		v0.AuxInt = log2(c / 5)
 10280  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10281  		v1.AuxInt = 2
 10282  		v1.AddArg(x)
 10283  		v1.AddArg(x)
 10284  		v0.AddArg(v1)
 10285  		v.AddArg(v0)
 10286  		v.AddArg(a)
 10287  		return true
 10288  	}
 10289  	// match: (MULS (MOVWconst [c]) x a)
 10290  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 10291  	// result: (RSB (SLLconst <x.Type> [log2(c/7)] (RSBshiftLL <x.Type> x x [3])) a)
 10292  	for {
 10293  		a := v.Args[2]
 10294  		v_0 := v.Args[0]
 10295  		if v_0.Op != OpARMMOVWconst {
 10296  			break
 10297  		}
 10298  		c := v_0.AuxInt
 10299  		x := v.Args[1]
 10300  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 10301  			break
 10302  		}
 10303  		v.reset(OpARMRSB)
 10304  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10305  		v0.AuxInt = log2(c / 7)
 10306  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10307  		v1.AuxInt = 3
 10308  		v1.AddArg(x)
 10309  		v1.AddArg(x)
 10310  		v0.AddArg(v1)
 10311  		v.AddArg(v0)
 10312  		v.AddArg(a)
 10313  		return true
 10314  	}
 10315  	// match: (MULS (MOVWconst [c]) x a)
 10316  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 10317  	// result: (RSB (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])) a)
 10318  	for {
 10319  		a := v.Args[2]
 10320  		v_0 := v.Args[0]
 10321  		if v_0.Op != OpARMMOVWconst {
 10322  			break
 10323  		}
 10324  		c := v_0.AuxInt
 10325  		x := v.Args[1]
 10326  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 10327  			break
 10328  		}
 10329  		v.reset(OpARMRSB)
 10330  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10331  		v0.AuxInt = log2(c / 9)
 10332  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10333  		v1.AuxInt = 3
 10334  		v1.AddArg(x)
 10335  		v1.AddArg(x)
 10336  		v0.AddArg(v1)
 10337  		v.AddArg(v0)
 10338  		v.AddArg(a)
 10339  		return true
 10340  	}
 10341  	return false
 10342  }
 10343  func rewriteValueARM_OpARMMULS_20(v *Value) bool {
 10344  	// match: (MULS (MOVWconst [c]) (MOVWconst [d]) a)
 10345  	// result: (SUBconst [int64(int32(c*d))] a)
 10346  	for {
 10347  		a := v.Args[2]
 10348  		v_0 := v.Args[0]
 10349  		if v_0.Op != OpARMMOVWconst {
 10350  			break
 10351  		}
 10352  		c := v_0.AuxInt
 10353  		v_1 := v.Args[1]
 10354  		if v_1.Op != OpARMMOVWconst {
 10355  			break
 10356  		}
 10357  		d := v_1.AuxInt
 10358  		v.reset(OpARMSUBconst)
 10359  		v.AuxInt = int64(int32(c * d))
 10360  		v.AddArg(a)
 10361  		return true
 10362  	}
 10363  	return false
 10364  }
 10365  func rewriteValueARM_OpARMMVN_0(v *Value) bool {
 10366  	// match: (MVN (MOVWconst [c]))
 10367  	// result: (MOVWconst [^c])
 10368  	for {
 10369  		v_0 := v.Args[0]
 10370  		if v_0.Op != OpARMMOVWconst {
 10371  			break
 10372  		}
 10373  		c := v_0.AuxInt
 10374  		v.reset(OpARMMOVWconst)
 10375  		v.AuxInt = ^c
 10376  		return true
 10377  	}
 10378  	// match: (MVN (SLLconst [c] x))
 10379  	// result: (MVNshiftLL x [c])
 10380  	for {
 10381  		v_0 := v.Args[0]
 10382  		if v_0.Op != OpARMSLLconst {
 10383  			break
 10384  		}
 10385  		c := v_0.AuxInt
 10386  		x := v_0.Args[0]
 10387  		v.reset(OpARMMVNshiftLL)
 10388  		v.AuxInt = c
 10389  		v.AddArg(x)
 10390  		return true
 10391  	}
 10392  	// match: (MVN (SRLconst [c] x))
 10393  	// result: (MVNshiftRL x [c])
 10394  	for {
 10395  		v_0 := v.Args[0]
 10396  		if v_0.Op != OpARMSRLconst {
 10397  			break
 10398  		}
 10399  		c := v_0.AuxInt
 10400  		x := v_0.Args[0]
 10401  		v.reset(OpARMMVNshiftRL)
 10402  		v.AuxInt = c
 10403  		v.AddArg(x)
 10404  		return true
 10405  	}
 10406  	// match: (MVN (SRAconst [c] x))
 10407  	// result: (MVNshiftRA x [c])
 10408  	for {
 10409  		v_0 := v.Args[0]
 10410  		if v_0.Op != OpARMSRAconst {
 10411  			break
 10412  		}
 10413  		c := v_0.AuxInt
 10414  		x := v_0.Args[0]
 10415  		v.reset(OpARMMVNshiftRA)
 10416  		v.AuxInt = c
 10417  		v.AddArg(x)
 10418  		return true
 10419  	}
 10420  	// match: (MVN (SLL x y))
 10421  	// result: (MVNshiftLLreg x y)
 10422  	for {
 10423  		v_0 := v.Args[0]
 10424  		if v_0.Op != OpARMSLL {
 10425  			break
 10426  		}
 10427  		y := v_0.Args[1]
 10428  		x := v_0.Args[0]
 10429  		v.reset(OpARMMVNshiftLLreg)
 10430  		v.AddArg(x)
 10431  		v.AddArg(y)
 10432  		return true
 10433  	}
 10434  	// match: (MVN (SRL x y))
 10435  	// result: (MVNshiftRLreg x y)
 10436  	for {
 10437  		v_0 := v.Args[0]
 10438  		if v_0.Op != OpARMSRL {
 10439  			break
 10440  		}
 10441  		y := v_0.Args[1]
 10442  		x := v_0.Args[0]
 10443  		v.reset(OpARMMVNshiftRLreg)
 10444  		v.AddArg(x)
 10445  		v.AddArg(y)
 10446  		return true
 10447  	}
 10448  	// match: (MVN (SRA x y))
 10449  	// result: (MVNshiftRAreg x y)
 10450  	for {
 10451  		v_0 := v.Args[0]
 10452  		if v_0.Op != OpARMSRA {
 10453  			break
 10454  		}
 10455  		y := v_0.Args[1]
 10456  		x := v_0.Args[0]
 10457  		v.reset(OpARMMVNshiftRAreg)
 10458  		v.AddArg(x)
 10459  		v.AddArg(y)
 10460  		return true
 10461  	}
 10462  	return false
 10463  }
 10464  func rewriteValueARM_OpARMMVNshiftLL_0(v *Value) bool {
 10465  	// match: (MVNshiftLL (MOVWconst [c]) [d])
 10466  	// result: (MOVWconst [^int64(uint32(c)<<uint64(d))])
 10467  	for {
 10468  		d := v.AuxInt
 10469  		v_0 := v.Args[0]
 10470  		if v_0.Op != OpARMMOVWconst {
 10471  			break
 10472  		}
 10473  		c := v_0.AuxInt
 10474  		v.reset(OpARMMOVWconst)
 10475  		v.AuxInt = ^int64(uint32(c) << uint64(d))
 10476  		return true
 10477  	}
 10478  	return false
 10479  }
 10480  func rewriteValueARM_OpARMMVNshiftLLreg_0(v *Value) bool {
 10481  	// match: (MVNshiftLLreg x (MOVWconst [c]))
 10482  	// result: (MVNshiftLL x [c])
 10483  	for {
 10484  		_ = v.Args[1]
 10485  		x := v.Args[0]
 10486  		v_1 := v.Args[1]
 10487  		if v_1.Op != OpARMMOVWconst {
 10488  			break
 10489  		}
 10490  		c := v_1.AuxInt
 10491  		v.reset(OpARMMVNshiftLL)
 10492  		v.AuxInt = c
 10493  		v.AddArg(x)
 10494  		return true
 10495  	}
 10496  	return false
 10497  }
 10498  func rewriteValueARM_OpARMMVNshiftRA_0(v *Value) bool {
 10499  	// match: (MVNshiftRA (MOVWconst [c]) [d])
 10500  	// result: (MOVWconst [^int64(int32(c)>>uint64(d))])
 10501  	for {
 10502  		d := v.AuxInt
 10503  		v_0 := v.Args[0]
 10504  		if v_0.Op != OpARMMOVWconst {
 10505  			break
 10506  		}
 10507  		c := v_0.AuxInt
 10508  		v.reset(OpARMMOVWconst)
 10509  		v.AuxInt = ^int64(int32(c) >> uint64(d))
 10510  		return true
 10511  	}
 10512  	return false
 10513  }
 10514  func rewriteValueARM_OpARMMVNshiftRAreg_0(v *Value) bool {
 10515  	// match: (MVNshiftRAreg x (MOVWconst [c]))
 10516  	// result: (MVNshiftRA x [c])
 10517  	for {
 10518  		_ = v.Args[1]
 10519  		x := v.Args[0]
 10520  		v_1 := v.Args[1]
 10521  		if v_1.Op != OpARMMOVWconst {
 10522  			break
 10523  		}
 10524  		c := v_1.AuxInt
 10525  		v.reset(OpARMMVNshiftRA)
 10526  		v.AuxInt = c
 10527  		v.AddArg(x)
 10528  		return true
 10529  	}
 10530  	return false
 10531  }
 10532  func rewriteValueARM_OpARMMVNshiftRL_0(v *Value) bool {
 10533  	// match: (MVNshiftRL (MOVWconst [c]) [d])
 10534  	// result: (MOVWconst [^int64(uint32(c)>>uint64(d))])
 10535  	for {
 10536  		d := v.AuxInt
 10537  		v_0 := v.Args[0]
 10538  		if v_0.Op != OpARMMOVWconst {
 10539  			break
 10540  		}
 10541  		c := v_0.AuxInt
 10542  		v.reset(OpARMMOVWconst)
 10543  		v.AuxInt = ^int64(uint32(c) >> uint64(d))
 10544  		return true
 10545  	}
 10546  	return false
 10547  }
 10548  func rewriteValueARM_OpARMMVNshiftRLreg_0(v *Value) bool {
 10549  	// match: (MVNshiftRLreg x (MOVWconst [c]))
 10550  	// result: (MVNshiftRL x [c])
 10551  	for {
 10552  		_ = v.Args[1]
 10553  		x := v.Args[0]
 10554  		v_1 := v.Args[1]
 10555  		if v_1.Op != OpARMMOVWconst {
 10556  			break
 10557  		}
 10558  		c := v_1.AuxInt
 10559  		v.reset(OpARMMVNshiftRL)
 10560  		v.AuxInt = c
 10561  		v.AddArg(x)
 10562  		return true
 10563  	}
 10564  	return false
 10565  }
 10566  func rewriteValueARM_OpARMNEGD_0(v *Value) bool {
 10567  	// match: (NEGD (MULD x y))
 10568  	// cond: objabi.GOARM >= 6
 10569  	// result: (NMULD x y)
 10570  	for {
 10571  		v_0 := v.Args[0]
 10572  		if v_0.Op != OpARMMULD {
 10573  			break
 10574  		}
 10575  		y := v_0.Args[1]
 10576  		x := v_0.Args[0]
 10577  		if !(objabi.GOARM >= 6) {
 10578  			break
 10579  		}
 10580  		v.reset(OpARMNMULD)
 10581  		v.AddArg(x)
 10582  		v.AddArg(y)
 10583  		return true
 10584  	}
 10585  	return false
 10586  }
 10587  func rewriteValueARM_OpARMNEGF_0(v *Value) bool {
 10588  	// match: (NEGF (MULF x y))
 10589  	// cond: objabi.GOARM >= 6
 10590  	// result: (NMULF x y)
 10591  	for {
 10592  		v_0 := v.Args[0]
 10593  		if v_0.Op != OpARMMULF {
 10594  			break
 10595  		}
 10596  		y := v_0.Args[1]
 10597  		x := v_0.Args[0]
 10598  		if !(objabi.GOARM >= 6) {
 10599  			break
 10600  		}
 10601  		v.reset(OpARMNMULF)
 10602  		v.AddArg(x)
 10603  		v.AddArg(y)
 10604  		return true
 10605  	}
 10606  	return false
 10607  }
 10608  func rewriteValueARM_OpARMNMULD_0(v *Value) bool {
 10609  	// match: (NMULD (NEGD x) y)
 10610  	// result: (MULD x y)
 10611  	for {
 10612  		y := v.Args[1]
 10613  		v_0 := v.Args[0]
 10614  		if v_0.Op != OpARMNEGD {
 10615  			break
 10616  		}
 10617  		x := v_0.Args[0]
 10618  		v.reset(OpARMMULD)
 10619  		v.AddArg(x)
 10620  		v.AddArg(y)
 10621  		return true
 10622  	}
 10623  	// match: (NMULD y (NEGD x))
 10624  	// result: (MULD x y)
 10625  	for {
 10626  		_ = v.Args[1]
 10627  		y := v.Args[0]
 10628  		v_1 := v.Args[1]
 10629  		if v_1.Op != OpARMNEGD {
 10630  			break
 10631  		}
 10632  		x := v_1.Args[0]
 10633  		v.reset(OpARMMULD)
 10634  		v.AddArg(x)
 10635  		v.AddArg(y)
 10636  		return true
 10637  	}
 10638  	return false
 10639  }
 10640  func rewriteValueARM_OpARMNMULF_0(v *Value) bool {
 10641  	// match: (NMULF (NEGF x) y)
 10642  	// result: (MULF x y)
 10643  	for {
 10644  		y := v.Args[1]
 10645  		v_0 := v.Args[0]
 10646  		if v_0.Op != OpARMNEGF {
 10647  			break
 10648  		}
 10649  		x := v_0.Args[0]
 10650  		v.reset(OpARMMULF)
 10651  		v.AddArg(x)
 10652  		v.AddArg(y)
 10653  		return true
 10654  	}
 10655  	// match: (NMULF y (NEGF x))
 10656  	// result: (MULF x y)
 10657  	for {
 10658  		_ = v.Args[1]
 10659  		y := v.Args[0]
 10660  		v_1 := v.Args[1]
 10661  		if v_1.Op != OpARMNEGF {
 10662  			break
 10663  		}
 10664  		x := v_1.Args[0]
 10665  		v.reset(OpARMMULF)
 10666  		v.AddArg(x)
 10667  		v.AddArg(y)
 10668  		return true
 10669  	}
 10670  	return false
 10671  }
 10672  func rewriteValueARM_OpARMNotEqual_0(v *Value) bool {
 10673  	// match: (NotEqual (FlagEQ))
 10674  	// result: (MOVWconst [0])
 10675  	for {
 10676  		v_0 := v.Args[0]
 10677  		if v_0.Op != OpARMFlagEQ {
 10678  			break
 10679  		}
 10680  		v.reset(OpARMMOVWconst)
 10681  		v.AuxInt = 0
 10682  		return true
 10683  	}
 10684  	// match: (NotEqual (FlagLT_ULT))
 10685  	// result: (MOVWconst [1])
 10686  	for {
 10687  		v_0 := v.Args[0]
 10688  		if v_0.Op != OpARMFlagLT_ULT {
 10689  			break
 10690  		}
 10691  		v.reset(OpARMMOVWconst)
 10692  		v.AuxInt = 1
 10693  		return true
 10694  	}
 10695  	// match: (NotEqual (FlagLT_UGT))
 10696  	// result: (MOVWconst [1])
 10697  	for {
 10698  		v_0 := v.Args[0]
 10699  		if v_0.Op != OpARMFlagLT_UGT {
 10700  			break
 10701  		}
 10702  		v.reset(OpARMMOVWconst)
 10703  		v.AuxInt = 1
 10704  		return true
 10705  	}
 10706  	// match: (NotEqual (FlagGT_ULT))
 10707  	// result: (MOVWconst [1])
 10708  	for {
 10709  		v_0 := v.Args[0]
 10710  		if v_0.Op != OpARMFlagGT_ULT {
 10711  			break
 10712  		}
 10713  		v.reset(OpARMMOVWconst)
 10714  		v.AuxInt = 1
 10715  		return true
 10716  	}
 10717  	// match: (NotEqual (FlagGT_UGT))
 10718  	// result: (MOVWconst [1])
 10719  	for {
 10720  		v_0 := v.Args[0]
 10721  		if v_0.Op != OpARMFlagGT_UGT {
 10722  			break
 10723  		}
 10724  		v.reset(OpARMMOVWconst)
 10725  		v.AuxInt = 1
 10726  		return true
 10727  	}
 10728  	// match: (NotEqual (InvertFlags x))
 10729  	// result: (NotEqual x)
 10730  	for {
 10731  		v_0 := v.Args[0]
 10732  		if v_0.Op != OpARMInvertFlags {
 10733  			break
 10734  		}
 10735  		x := v_0.Args[0]
 10736  		v.reset(OpARMNotEqual)
 10737  		v.AddArg(x)
 10738  		return true
 10739  	}
 10740  	return false
 10741  }
 10742  func rewriteValueARM_OpARMOR_0(v *Value) bool {
 10743  	// match: (OR x (MOVWconst [c]))
 10744  	// result: (ORconst [c] x)
 10745  	for {
 10746  		_ = v.Args[1]
 10747  		x := v.Args[0]
 10748  		v_1 := v.Args[1]
 10749  		if v_1.Op != OpARMMOVWconst {
 10750  			break
 10751  		}
 10752  		c := v_1.AuxInt
 10753  		v.reset(OpARMORconst)
 10754  		v.AuxInt = c
 10755  		v.AddArg(x)
 10756  		return true
 10757  	}
 10758  	// match: (OR (MOVWconst [c]) x)
 10759  	// result: (ORconst [c] x)
 10760  	for {
 10761  		x := v.Args[1]
 10762  		v_0 := v.Args[0]
 10763  		if v_0.Op != OpARMMOVWconst {
 10764  			break
 10765  		}
 10766  		c := v_0.AuxInt
 10767  		v.reset(OpARMORconst)
 10768  		v.AuxInt = c
 10769  		v.AddArg(x)
 10770  		return true
 10771  	}
 10772  	// match: (OR x (SLLconst [c] y))
 10773  	// result: (ORshiftLL x y [c])
 10774  	for {
 10775  		_ = v.Args[1]
 10776  		x := v.Args[0]
 10777  		v_1 := v.Args[1]
 10778  		if v_1.Op != OpARMSLLconst {
 10779  			break
 10780  		}
 10781  		c := v_1.AuxInt
 10782  		y := v_1.Args[0]
 10783  		v.reset(OpARMORshiftLL)
 10784  		v.AuxInt = c
 10785  		v.AddArg(x)
 10786  		v.AddArg(y)
 10787  		return true
 10788  	}
 10789  	// match: (OR (SLLconst [c] y) x)
 10790  	// result: (ORshiftLL x y [c])
 10791  	for {
 10792  		x := v.Args[1]
 10793  		v_0 := v.Args[0]
 10794  		if v_0.Op != OpARMSLLconst {
 10795  			break
 10796  		}
 10797  		c := v_0.AuxInt
 10798  		y := v_0.Args[0]
 10799  		v.reset(OpARMORshiftLL)
 10800  		v.AuxInt = c
 10801  		v.AddArg(x)
 10802  		v.AddArg(y)
 10803  		return true
 10804  	}
 10805  	// match: (OR x (SRLconst [c] y))
 10806  	// result: (ORshiftRL x y [c])
 10807  	for {
 10808  		_ = v.Args[1]
 10809  		x := v.Args[0]
 10810  		v_1 := v.Args[1]
 10811  		if v_1.Op != OpARMSRLconst {
 10812  			break
 10813  		}
 10814  		c := v_1.AuxInt
 10815  		y := v_1.Args[0]
 10816  		v.reset(OpARMORshiftRL)
 10817  		v.AuxInt = c
 10818  		v.AddArg(x)
 10819  		v.AddArg(y)
 10820  		return true
 10821  	}
 10822  	// match: (OR (SRLconst [c] y) x)
 10823  	// result: (ORshiftRL x y [c])
 10824  	for {
 10825  		x := v.Args[1]
 10826  		v_0 := v.Args[0]
 10827  		if v_0.Op != OpARMSRLconst {
 10828  			break
 10829  		}
 10830  		c := v_0.AuxInt
 10831  		y := v_0.Args[0]
 10832  		v.reset(OpARMORshiftRL)
 10833  		v.AuxInt = c
 10834  		v.AddArg(x)
 10835  		v.AddArg(y)
 10836  		return true
 10837  	}
 10838  	// match: (OR x (SRAconst [c] y))
 10839  	// result: (ORshiftRA x y [c])
 10840  	for {
 10841  		_ = v.Args[1]
 10842  		x := v.Args[0]
 10843  		v_1 := v.Args[1]
 10844  		if v_1.Op != OpARMSRAconst {
 10845  			break
 10846  		}
 10847  		c := v_1.AuxInt
 10848  		y := v_1.Args[0]
 10849  		v.reset(OpARMORshiftRA)
 10850  		v.AuxInt = c
 10851  		v.AddArg(x)
 10852  		v.AddArg(y)
 10853  		return true
 10854  	}
 10855  	// match: (OR (SRAconst [c] y) x)
 10856  	// result: (ORshiftRA x y [c])
 10857  	for {
 10858  		x := v.Args[1]
 10859  		v_0 := v.Args[0]
 10860  		if v_0.Op != OpARMSRAconst {
 10861  			break
 10862  		}
 10863  		c := v_0.AuxInt
 10864  		y := v_0.Args[0]
 10865  		v.reset(OpARMORshiftRA)
 10866  		v.AuxInt = c
 10867  		v.AddArg(x)
 10868  		v.AddArg(y)
 10869  		return true
 10870  	}
 10871  	// match: (OR x (SLL y z))
 10872  	// result: (ORshiftLLreg x y z)
 10873  	for {
 10874  		_ = v.Args[1]
 10875  		x := v.Args[0]
 10876  		v_1 := v.Args[1]
 10877  		if v_1.Op != OpARMSLL {
 10878  			break
 10879  		}
 10880  		z := v_1.Args[1]
 10881  		y := v_1.Args[0]
 10882  		v.reset(OpARMORshiftLLreg)
 10883  		v.AddArg(x)
 10884  		v.AddArg(y)
 10885  		v.AddArg(z)
 10886  		return true
 10887  	}
 10888  	// match: (OR (SLL y z) x)
 10889  	// result: (ORshiftLLreg x y z)
 10890  	for {
 10891  		x := v.Args[1]
 10892  		v_0 := v.Args[0]
 10893  		if v_0.Op != OpARMSLL {
 10894  			break
 10895  		}
 10896  		z := v_0.Args[1]
 10897  		y := v_0.Args[0]
 10898  		v.reset(OpARMORshiftLLreg)
 10899  		v.AddArg(x)
 10900  		v.AddArg(y)
 10901  		v.AddArg(z)
 10902  		return true
 10903  	}
 10904  	return false
 10905  }
 10906  func rewriteValueARM_OpARMOR_10(v *Value) bool {
 10907  	// match: (OR x (SRL y z))
 10908  	// result: (ORshiftRLreg x y z)
 10909  	for {
 10910  		_ = v.Args[1]
 10911  		x := v.Args[0]
 10912  		v_1 := v.Args[1]
 10913  		if v_1.Op != OpARMSRL {
 10914  			break
 10915  		}
 10916  		z := v_1.Args[1]
 10917  		y := v_1.Args[0]
 10918  		v.reset(OpARMORshiftRLreg)
 10919  		v.AddArg(x)
 10920  		v.AddArg(y)
 10921  		v.AddArg(z)
 10922  		return true
 10923  	}
 10924  	// match: (OR (SRL y z) x)
 10925  	// result: (ORshiftRLreg x y z)
 10926  	for {
 10927  		x := v.Args[1]
 10928  		v_0 := v.Args[0]
 10929  		if v_0.Op != OpARMSRL {
 10930  			break
 10931  		}
 10932  		z := v_0.Args[1]
 10933  		y := v_0.Args[0]
 10934  		v.reset(OpARMORshiftRLreg)
 10935  		v.AddArg(x)
 10936  		v.AddArg(y)
 10937  		v.AddArg(z)
 10938  		return true
 10939  	}
 10940  	// match: (OR x (SRA y z))
 10941  	// result: (ORshiftRAreg x y z)
 10942  	for {
 10943  		_ = v.Args[1]
 10944  		x := v.Args[0]
 10945  		v_1 := v.Args[1]
 10946  		if v_1.Op != OpARMSRA {
 10947  			break
 10948  		}
 10949  		z := v_1.Args[1]
 10950  		y := v_1.Args[0]
 10951  		v.reset(OpARMORshiftRAreg)
 10952  		v.AddArg(x)
 10953  		v.AddArg(y)
 10954  		v.AddArg(z)
 10955  		return true
 10956  	}
 10957  	// match: (OR (SRA y z) x)
 10958  	// result: (ORshiftRAreg x y z)
 10959  	for {
 10960  		x := v.Args[1]
 10961  		v_0 := v.Args[0]
 10962  		if v_0.Op != OpARMSRA {
 10963  			break
 10964  		}
 10965  		z := v_0.Args[1]
 10966  		y := v_0.Args[0]
 10967  		v.reset(OpARMORshiftRAreg)
 10968  		v.AddArg(x)
 10969  		v.AddArg(y)
 10970  		v.AddArg(z)
 10971  		return true
 10972  	}
 10973  	// match: (OR x x)
 10974  	// result: x
 10975  	for {
 10976  		x := v.Args[1]
 10977  		if x != v.Args[0] {
 10978  			break
 10979  		}
 10980  		v.reset(OpCopy)
 10981  		v.Type = x.Type
 10982  		v.AddArg(x)
 10983  		return true
 10984  	}
 10985  	return false
 10986  }
 10987  func rewriteValueARM_OpARMORconst_0(v *Value) bool {
 10988  	// match: (ORconst [0] x)
 10989  	// result: x
 10990  	for {
 10991  		if v.AuxInt != 0 {
 10992  			break
 10993  		}
 10994  		x := v.Args[0]
 10995  		v.reset(OpCopy)
 10996  		v.Type = x.Type
 10997  		v.AddArg(x)
 10998  		return true
 10999  	}
 11000  	// match: (ORconst [c] _)
 11001  	// cond: int32(c)==-1
 11002  	// result: (MOVWconst [-1])
 11003  	for {
 11004  		c := v.AuxInt
 11005  		if !(int32(c) == -1) {
 11006  			break
 11007  		}
 11008  		v.reset(OpARMMOVWconst)
 11009  		v.AuxInt = -1
 11010  		return true
 11011  	}
 11012  	// match: (ORconst [c] (MOVWconst [d]))
 11013  	// result: (MOVWconst [c|d])
 11014  	for {
 11015  		c := v.AuxInt
 11016  		v_0 := v.Args[0]
 11017  		if v_0.Op != OpARMMOVWconst {
 11018  			break
 11019  		}
 11020  		d := v_0.AuxInt
 11021  		v.reset(OpARMMOVWconst)
 11022  		v.AuxInt = c | d
 11023  		return true
 11024  	}
 11025  	// match: (ORconst [c] (ORconst [d] x))
 11026  	// result: (ORconst [c|d] x)
 11027  	for {
 11028  		c := v.AuxInt
 11029  		v_0 := v.Args[0]
 11030  		if v_0.Op != OpARMORconst {
 11031  			break
 11032  		}
 11033  		d := v_0.AuxInt
 11034  		x := v_0.Args[0]
 11035  		v.reset(OpARMORconst)
 11036  		v.AuxInt = c | d
 11037  		v.AddArg(x)
 11038  		return true
 11039  	}
 11040  	return false
 11041  }
 11042  func rewriteValueARM_OpARMORshiftLL_0(v *Value) bool {
 11043  	b := v.Block
 11044  	typ := &b.Func.Config.Types
 11045  	// match: (ORshiftLL (MOVWconst [c]) x [d])
 11046  	// result: (ORconst [c] (SLLconst <x.Type> x [d]))
 11047  	for {
 11048  		d := v.AuxInt
 11049  		x := v.Args[1]
 11050  		v_0 := v.Args[0]
 11051  		if v_0.Op != OpARMMOVWconst {
 11052  			break
 11053  		}
 11054  		c := v_0.AuxInt
 11055  		v.reset(OpARMORconst)
 11056  		v.AuxInt = c
 11057  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 11058  		v0.AuxInt = d
 11059  		v0.AddArg(x)
 11060  		v.AddArg(v0)
 11061  		return true
 11062  	}
 11063  	// match: (ORshiftLL x (MOVWconst [c]) [d])
 11064  	// result: (ORconst x [int64(int32(uint32(c)<<uint64(d)))])
 11065  	for {
 11066  		d := v.AuxInt
 11067  		_ = v.Args[1]
 11068  		x := v.Args[0]
 11069  		v_1 := v.Args[1]
 11070  		if v_1.Op != OpARMMOVWconst {
 11071  			break
 11072  		}
 11073  		c := v_1.AuxInt
 11074  		v.reset(OpARMORconst)
 11075  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
 11076  		v.AddArg(x)
 11077  		return true
 11078  	}
 11079  	// match: (ORshiftLL [c] (SRLconst x [32-c]) x)
 11080  	// result: (SRRconst [32-c] x)
 11081  	for {
 11082  		c := v.AuxInt
 11083  		x := v.Args[1]
 11084  		v_0 := v.Args[0]
 11085  		if v_0.Op != OpARMSRLconst || v_0.AuxInt != 32-c || x != v_0.Args[0] {
 11086  			break
 11087  		}
 11088  		v.reset(OpARMSRRconst)
 11089  		v.AuxInt = 32 - c
 11090  		v.AddArg(x)
 11091  		return true
 11092  	}
 11093  	// match: (ORshiftLL <typ.UInt16> [8] (BFXU <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 11094  	// result: (REV16 x)
 11095  	for {
 11096  		if v.Type != typ.UInt16 || v.AuxInt != 8 {
 11097  			break
 11098  		}
 11099  		x := v.Args[1]
 11100  		v_0 := v.Args[0]
 11101  		if v_0.Op != OpARMBFXU || v_0.Type != typ.UInt16 || v_0.AuxInt != armBFAuxInt(8, 8) || x != v_0.Args[0] {
 11102  			break
 11103  		}
 11104  		v.reset(OpARMREV16)
 11105  		v.AddArg(x)
 11106  		return true
 11107  	}
 11108  	// match: (ORshiftLL <typ.UInt16> [8] (SRLconst <typ.UInt16> [24] (SLLconst [16] x)) x)
 11109  	// cond: objabi.GOARM>=6
 11110  	// result: (REV16 x)
 11111  	for {
 11112  		if v.Type != typ.UInt16 || v.AuxInt != 8 {
 11113  			break
 11114  		}
 11115  		x := v.Args[1]
 11116  		v_0 := v.Args[0]
 11117  		if v_0.Op != OpARMSRLconst || v_0.Type != typ.UInt16 || v_0.AuxInt != 24 {
 11118  			break
 11119  		}
 11120  		v_0_0 := v_0.Args[0]
 11121  		if v_0_0.Op != OpARMSLLconst || v_0_0.AuxInt != 16 || x != v_0_0.Args[0] || !(objabi.GOARM >= 6) {
 11122  			break
 11123  		}
 11124  		v.reset(OpARMREV16)
 11125  		v.AddArg(x)
 11126  		return true
 11127  	}
 11128  	// match: (ORshiftLL x y:(SLLconst x [c]) [d])
 11129  	// cond: c==d
 11130  	// result: y
 11131  	for {
 11132  		d := v.AuxInt
 11133  		_ = v.Args[1]
 11134  		x := v.Args[0]
 11135  		y := v.Args[1]
 11136  		if y.Op != OpARMSLLconst {
 11137  			break
 11138  		}
 11139  		c := y.AuxInt
 11140  		if x != y.Args[0] || !(c == d) {
 11141  			break
 11142  		}
 11143  		v.reset(OpCopy)
 11144  		v.Type = y.Type
 11145  		v.AddArg(y)
 11146  		return true
 11147  	}
 11148  	return false
 11149  }
 11150  func rewriteValueARM_OpARMORshiftLLreg_0(v *Value) bool {
 11151  	b := v.Block
 11152  	// match: (ORshiftLLreg (MOVWconst [c]) x y)
 11153  	// result: (ORconst [c] (SLL <x.Type> x y))
 11154  	for {
 11155  		y := v.Args[2]
 11156  		v_0 := v.Args[0]
 11157  		if v_0.Op != OpARMMOVWconst {
 11158  			break
 11159  		}
 11160  		c := v_0.AuxInt
 11161  		x := v.Args[1]
 11162  		v.reset(OpARMORconst)
 11163  		v.AuxInt = c
 11164  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 11165  		v0.AddArg(x)
 11166  		v0.AddArg(y)
 11167  		v.AddArg(v0)
 11168  		return true
 11169  	}
 11170  	// match: (ORshiftLLreg x y (MOVWconst [c]))
 11171  	// result: (ORshiftLL x y [c])
 11172  	for {
 11173  		_ = v.Args[2]
 11174  		x := v.Args[0]
 11175  		y := v.Args[1]
 11176  		v_2 := v.Args[2]
 11177  		if v_2.Op != OpARMMOVWconst {
 11178  			break
 11179  		}
 11180  		c := v_2.AuxInt
 11181  		v.reset(OpARMORshiftLL)
 11182  		v.AuxInt = c
 11183  		v.AddArg(x)
 11184  		v.AddArg(y)
 11185  		return true
 11186  	}
 11187  	return false
 11188  }
 11189  func rewriteValueARM_OpARMORshiftRA_0(v *Value) bool {
 11190  	b := v.Block
 11191  	// match: (ORshiftRA (MOVWconst [c]) x [d])
 11192  	// result: (ORconst [c] (SRAconst <x.Type> x [d]))
 11193  	for {
 11194  		d := v.AuxInt
 11195  		x := v.Args[1]
 11196  		v_0 := v.Args[0]
 11197  		if v_0.Op != OpARMMOVWconst {
 11198  			break
 11199  		}
 11200  		c := v_0.AuxInt
 11201  		v.reset(OpARMORconst)
 11202  		v.AuxInt = c
 11203  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 11204  		v0.AuxInt = d
 11205  		v0.AddArg(x)
 11206  		v.AddArg(v0)
 11207  		return true
 11208  	}
 11209  	// match: (ORshiftRA x (MOVWconst [c]) [d])
 11210  	// result: (ORconst x [int64(int32(c)>>uint64(d))])
 11211  	for {
 11212  		d := v.AuxInt
 11213  		_ = v.Args[1]
 11214  		x := v.Args[0]
 11215  		v_1 := v.Args[1]
 11216  		if v_1.Op != OpARMMOVWconst {
 11217  			break
 11218  		}
 11219  		c := v_1.AuxInt
 11220  		v.reset(OpARMORconst)
 11221  		v.AuxInt = int64(int32(c) >> uint64(d))
 11222  		v.AddArg(x)
 11223  		return true
 11224  	}
 11225  	// match: (ORshiftRA x y:(SRAconst x [c]) [d])
 11226  	// cond: c==d
 11227  	// result: y
 11228  	for {
 11229  		d := v.AuxInt
 11230  		_ = v.Args[1]
 11231  		x := v.Args[0]
 11232  		y := v.Args[1]
 11233  		if y.Op != OpARMSRAconst {
 11234  			break
 11235  		}
 11236  		c := y.AuxInt
 11237  		if x != y.Args[0] || !(c == d) {
 11238  			break
 11239  		}
 11240  		v.reset(OpCopy)
 11241  		v.Type = y.Type
 11242  		v.AddArg(y)
 11243  		return true
 11244  	}
 11245  	return false
 11246  }
 11247  func rewriteValueARM_OpARMORshiftRAreg_0(v *Value) bool {
 11248  	b := v.Block
 11249  	// match: (ORshiftRAreg (MOVWconst [c]) x y)
 11250  	// result: (ORconst [c] (SRA <x.Type> x y))
 11251  	for {
 11252  		y := v.Args[2]
 11253  		v_0 := v.Args[0]
 11254  		if v_0.Op != OpARMMOVWconst {
 11255  			break
 11256  		}
 11257  		c := v_0.AuxInt
 11258  		x := v.Args[1]
 11259  		v.reset(OpARMORconst)
 11260  		v.AuxInt = c
 11261  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 11262  		v0.AddArg(x)
 11263  		v0.AddArg(y)
 11264  		v.AddArg(v0)
 11265  		return true
 11266  	}
 11267  	// match: (ORshiftRAreg x y (MOVWconst [c]))
 11268  	// result: (ORshiftRA x y [c])
 11269  	for {
 11270  		_ = v.Args[2]
 11271  		x := v.Args[0]
 11272  		y := v.Args[1]
 11273  		v_2 := v.Args[2]
 11274  		if v_2.Op != OpARMMOVWconst {
 11275  			break
 11276  		}
 11277  		c := v_2.AuxInt
 11278  		v.reset(OpARMORshiftRA)
 11279  		v.AuxInt = c
 11280  		v.AddArg(x)
 11281  		v.AddArg(y)
 11282  		return true
 11283  	}
 11284  	return false
 11285  }
 11286  func rewriteValueARM_OpARMORshiftRL_0(v *Value) bool {
 11287  	b := v.Block
 11288  	// match: (ORshiftRL (MOVWconst [c]) x [d])
 11289  	// result: (ORconst [c] (SRLconst <x.Type> x [d]))
 11290  	for {
 11291  		d := v.AuxInt
 11292  		x := v.Args[1]
 11293  		v_0 := v.Args[0]
 11294  		if v_0.Op != OpARMMOVWconst {
 11295  			break
 11296  		}
 11297  		c := v_0.AuxInt
 11298  		v.reset(OpARMORconst)
 11299  		v.AuxInt = c
 11300  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 11301  		v0.AuxInt = d
 11302  		v0.AddArg(x)
 11303  		v.AddArg(v0)
 11304  		return true
 11305  	}
 11306  	// match: (ORshiftRL x (MOVWconst [c]) [d])
 11307  	// result: (ORconst x [int64(int32(uint32(c)>>uint64(d)))])
 11308  	for {
 11309  		d := v.AuxInt
 11310  		_ = v.Args[1]
 11311  		x := v.Args[0]
 11312  		v_1 := v.Args[1]
 11313  		if v_1.Op != OpARMMOVWconst {
 11314  			break
 11315  		}
 11316  		c := v_1.AuxInt
 11317  		v.reset(OpARMORconst)
 11318  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
 11319  		v.AddArg(x)
 11320  		return true
 11321  	}
 11322  	// match: (ORshiftRL [c] (SLLconst x [32-c]) x)
 11323  	// result: (SRRconst [ c] x)
 11324  	for {
 11325  		c := v.AuxInt
 11326  		x := v.Args[1]
 11327  		v_0 := v.Args[0]
 11328  		if v_0.Op != OpARMSLLconst || v_0.AuxInt != 32-c || x != v_0.Args[0] {
 11329  			break
 11330  		}
 11331  		v.reset(OpARMSRRconst)
 11332  		v.AuxInt = c
 11333  		v.AddArg(x)
 11334  		return true
 11335  	}
 11336  	// match: (ORshiftRL x y:(SRLconst x [c]) [d])
 11337  	// cond: c==d
 11338  	// result: y
 11339  	for {
 11340  		d := v.AuxInt
 11341  		_ = v.Args[1]
 11342  		x := v.Args[0]
 11343  		y := v.Args[1]
 11344  		if y.Op != OpARMSRLconst {
 11345  			break
 11346  		}
 11347  		c := y.AuxInt
 11348  		if x != y.Args[0] || !(c == d) {
 11349  			break
 11350  		}
 11351  		v.reset(OpCopy)
 11352  		v.Type = y.Type
 11353  		v.AddArg(y)
 11354  		return true
 11355  	}
 11356  	return false
 11357  }
 11358  func rewriteValueARM_OpARMORshiftRLreg_0(v *Value) bool {
 11359  	b := v.Block
 11360  	// match: (ORshiftRLreg (MOVWconst [c]) x y)
 11361  	// result: (ORconst [c] (SRL <x.Type> x y))
 11362  	for {
 11363  		y := v.Args[2]
 11364  		v_0 := v.Args[0]
 11365  		if v_0.Op != OpARMMOVWconst {
 11366  			break
 11367  		}
 11368  		c := v_0.AuxInt
 11369  		x := v.Args[1]
 11370  		v.reset(OpARMORconst)
 11371  		v.AuxInt = c
 11372  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 11373  		v0.AddArg(x)
 11374  		v0.AddArg(y)
 11375  		v.AddArg(v0)
 11376  		return true
 11377  	}
 11378  	// match: (ORshiftRLreg x y (MOVWconst [c]))
 11379  	// result: (ORshiftRL x y [c])
 11380  	for {
 11381  		_ = v.Args[2]
 11382  		x := v.Args[0]
 11383  		y := v.Args[1]
 11384  		v_2 := v.Args[2]
 11385  		if v_2.Op != OpARMMOVWconst {
 11386  			break
 11387  		}
 11388  		c := v_2.AuxInt
 11389  		v.reset(OpARMORshiftRL)
 11390  		v.AuxInt = c
 11391  		v.AddArg(x)
 11392  		v.AddArg(y)
 11393  		return true
 11394  	}
 11395  	return false
 11396  }
 11397  func rewriteValueARM_OpARMRSB_0(v *Value) bool {
 11398  	// match: (RSB (MOVWconst [c]) x)
 11399  	// result: (SUBconst [c] x)
 11400  	for {
 11401  		x := v.Args[1]
 11402  		v_0 := v.Args[0]
 11403  		if v_0.Op != OpARMMOVWconst {
 11404  			break
 11405  		}
 11406  		c := v_0.AuxInt
 11407  		v.reset(OpARMSUBconst)
 11408  		v.AuxInt = c
 11409  		v.AddArg(x)
 11410  		return true
 11411  	}
 11412  	// match: (RSB x (MOVWconst [c]))
 11413  	// result: (RSBconst [c] x)
 11414  	for {
 11415  		_ = v.Args[1]
 11416  		x := v.Args[0]
 11417  		v_1 := v.Args[1]
 11418  		if v_1.Op != OpARMMOVWconst {
 11419  			break
 11420  		}
 11421  		c := v_1.AuxInt
 11422  		v.reset(OpARMRSBconst)
 11423  		v.AuxInt = c
 11424  		v.AddArg(x)
 11425  		return true
 11426  	}
 11427  	// match: (RSB x (SLLconst [c] y))
 11428  	// result: (RSBshiftLL x y [c])
 11429  	for {
 11430  		_ = v.Args[1]
 11431  		x := v.Args[0]
 11432  		v_1 := v.Args[1]
 11433  		if v_1.Op != OpARMSLLconst {
 11434  			break
 11435  		}
 11436  		c := v_1.AuxInt
 11437  		y := v_1.Args[0]
 11438  		v.reset(OpARMRSBshiftLL)
 11439  		v.AuxInt = c
 11440  		v.AddArg(x)
 11441  		v.AddArg(y)
 11442  		return true
 11443  	}
 11444  	// match: (RSB (SLLconst [c] y) x)
 11445  	// result: (SUBshiftLL x y [c])
 11446  	for {
 11447  		x := v.Args[1]
 11448  		v_0 := v.Args[0]
 11449  		if v_0.Op != OpARMSLLconst {
 11450  			break
 11451  		}
 11452  		c := v_0.AuxInt
 11453  		y := v_0.Args[0]
 11454  		v.reset(OpARMSUBshiftLL)
 11455  		v.AuxInt = c
 11456  		v.AddArg(x)
 11457  		v.AddArg(y)
 11458  		return true
 11459  	}
 11460  	// match: (RSB x (SRLconst [c] y))
 11461  	// result: (RSBshiftRL x y [c])
 11462  	for {
 11463  		_ = v.Args[1]
 11464  		x := v.Args[0]
 11465  		v_1 := v.Args[1]
 11466  		if v_1.Op != OpARMSRLconst {
 11467  			break
 11468  		}
 11469  		c := v_1.AuxInt
 11470  		y := v_1.Args[0]
 11471  		v.reset(OpARMRSBshiftRL)
 11472  		v.AuxInt = c
 11473  		v.AddArg(x)
 11474  		v.AddArg(y)
 11475  		return true
 11476  	}
 11477  	// match: (RSB (SRLconst [c] y) x)
 11478  	// result: (SUBshiftRL x y [c])
 11479  	for {
 11480  		x := v.Args[1]
 11481  		v_0 := v.Args[0]
 11482  		if v_0.Op != OpARMSRLconst {
 11483  			break
 11484  		}
 11485  		c := v_0.AuxInt
 11486  		y := v_0.Args[0]
 11487  		v.reset(OpARMSUBshiftRL)
 11488  		v.AuxInt = c
 11489  		v.AddArg(x)
 11490  		v.AddArg(y)
 11491  		return true
 11492  	}
 11493  	// match: (RSB x (SRAconst [c] y))
 11494  	// result: (RSBshiftRA x y [c])
 11495  	for {
 11496  		_ = v.Args[1]
 11497  		x := v.Args[0]
 11498  		v_1 := v.Args[1]
 11499  		if v_1.Op != OpARMSRAconst {
 11500  			break
 11501  		}
 11502  		c := v_1.AuxInt
 11503  		y := v_1.Args[0]
 11504  		v.reset(OpARMRSBshiftRA)
 11505  		v.AuxInt = c
 11506  		v.AddArg(x)
 11507  		v.AddArg(y)
 11508  		return true
 11509  	}
 11510  	// match: (RSB (SRAconst [c] y) x)
 11511  	// result: (SUBshiftRA x y [c])
 11512  	for {
 11513  		x := v.Args[1]
 11514  		v_0 := v.Args[0]
 11515  		if v_0.Op != OpARMSRAconst {
 11516  			break
 11517  		}
 11518  		c := v_0.AuxInt
 11519  		y := v_0.Args[0]
 11520  		v.reset(OpARMSUBshiftRA)
 11521  		v.AuxInt = c
 11522  		v.AddArg(x)
 11523  		v.AddArg(y)
 11524  		return true
 11525  	}
 11526  	// match: (RSB x (SLL y z))
 11527  	// result: (RSBshiftLLreg x y z)
 11528  	for {
 11529  		_ = v.Args[1]
 11530  		x := v.Args[0]
 11531  		v_1 := v.Args[1]
 11532  		if v_1.Op != OpARMSLL {
 11533  			break
 11534  		}
 11535  		z := v_1.Args[1]
 11536  		y := v_1.Args[0]
 11537  		v.reset(OpARMRSBshiftLLreg)
 11538  		v.AddArg(x)
 11539  		v.AddArg(y)
 11540  		v.AddArg(z)
 11541  		return true
 11542  	}
 11543  	// match: (RSB (SLL y z) x)
 11544  	// result: (SUBshiftLLreg x y z)
 11545  	for {
 11546  		x := v.Args[1]
 11547  		v_0 := v.Args[0]
 11548  		if v_0.Op != OpARMSLL {
 11549  			break
 11550  		}
 11551  		z := v_0.Args[1]
 11552  		y := v_0.Args[0]
 11553  		v.reset(OpARMSUBshiftLLreg)
 11554  		v.AddArg(x)
 11555  		v.AddArg(y)
 11556  		v.AddArg(z)
 11557  		return true
 11558  	}
 11559  	return false
 11560  }
 11561  func rewriteValueARM_OpARMRSB_10(v *Value) bool {
 11562  	// match: (RSB x (SRL y z))
 11563  	// result: (RSBshiftRLreg x y z)
 11564  	for {
 11565  		_ = v.Args[1]
 11566  		x := v.Args[0]
 11567  		v_1 := v.Args[1]
 11568  		if v_1.Op != OpARMSRL {
 11569  			break
 11570  		}
 11571  		z := v_1.Args[1]
 11572  		y := v_1.Args[0]
 11573  		v.reset(OpARMRSBshiftRLreg)
 11574  		v.AddArg(x)
 11575  		v.AddArg(y)
 11576  		v.AddArg(z)
 11577  		return true
 11578  	}
 11579  	// match: (RSB (SRL y z) x)
 11580  	// result: (SUBshiftRLreg x y z)
 11581  	for {
 11582  		x := v.Args[1]
 11583  		v_0 := v.Args[0]
 11584  		if v_0.Op != OpARMSRL {
 11585  			break
 11586  		}
 11587  		z := v_0.Args[1]
 11588  		y := v_0.Args[0]
 11589  		v.reset(OpARMSUBshiftRLreg)
 11590  		v.AddArg(x)
 11591  		v.AddArg(y)
 11592  		v.AddArg(z)
 11593  		return true
 11594  	}
 11595  	// match: (RSB x (SRA y z))
 11596  	// result: (RSBshiftRAreg x y z)
 11597  	for {
 11598  		_ = v.Args[1]
 11599  		x := v.Args[0]
 11600  		v_1 := v.Args[1]
 11601  		if v_1.Op != OpARMSRA {
 11602  			break
 11603  		}
 11604  		z := v_1.Args[1]
 11605  		y := v_1.Args[0]
 11606  		v.reset(OpARMRSBshiftRAreg)
 11607  		v.AddArg(x)
 11608  		v.AddArg(y)
 11609  		v.AddArg(z)
 11610  		return true
 11611  	}
 11612  	// match: (RSB (SRA y z) x)
 11613  	// result: (SUBshiftRAreg x y z)
 11614  	for {
 11615  		x := v.Args[1]
 11616  		v_0 := v.Args[0]
 11617  		if v_0.Op != OpARMSRA {
 11618  			break
 11619  		}
 11620  		z := v_0.Args[1]
 11621  		y := v_0.Args[0]
 11622  		v.reset(OpARMSUBshiftRAreg)
 11623  		v.AddArg(x)
 11624  		v.AddArg(y)
 11625  		v.AddArg(z)
 11626  		return true
 11627  	}
 11628  	// match: (RSB x x)
 11629  	// result: (MOVWconst [0])
 11630  	for {
 11631  		x := v.Args[1]
 11632  		if x != v.Args[0] {
 11633  			break
 11634  		}
 11635  		v.reset(OpARMMOVWconst)
 11636  		v.AuxInt = 0
 11637  		return true
 11638  	}
 11639  	// match: (RSB (MUL x y) a)
 11640  	// cond: objabi.GOARM == 7
 11641  	// result: (MULS x y a)
 11642  	for {
 11643  		a := v.Args[1]
 11644  		v_0 := v.Args[0]
 11645  		if v_0.Op != OpARMMUL {
 11646  			break
 11647  		}
 11648  		y := v_0.Args[1]
 11649  		x := v_0.Args[0]
 11650  		if !(objabi.GOARM == 7) {
 11651  			break
 11652  		}
 11653  		v.reset(OpARMMULS)
 11654  		v.AddArg(x)
 11655  		v.AddArg(y)
 11656  		v.AddArg(a)
 11657  		return true
 11658  	}
 11659  	return false
 11660  }
 11661  func rewriteValueARM_OpARMRSBSshiftLL_0(v *Value) bool {
 11662  	b := v.Block
 11663  	// match: (RSBSshiftLL (MOVWconst [c]) x [d])
 11664  	// result: (SUBSconst [c] (SLLconst <x.Type> x [d]))
 11665  	for {
 11666  		d := v.AuxInt
 11667  		x := v.Args[1]
 11668  		v_0 := v.Args[0]
 11669  		if v_0.Op != OpARMMOVWconst {
 11670  			break
 11671  		}
 11672  		c := v_0.AuxInt
 11673  		v.reset(OpARMSUBSconst)
 11674  		v.AuxInt = c
 11675  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 11676  		v0.AuxInt = d
 11677  		v0.AddArg(x)
 11678  		v.AddArg(v0)
 11679  		return true
 11680  	}
 11681  	// match: (RSBSshiftLL x (MOVWconst [c]) [d])
 11682  	// result: (RSBSconst x [int64(int32(uint32(c)<<uint64(d)))])
 11683  	for {
 11684  		d := v.AuxInt
 11685  		_ = v.Args[1]
 11686  		x := v.Args[0]
 11687  		v_1 := v.Args[1]
 11688  		if v_1.Op != OpARMMOVWconst {
 11689  			break
 11690  		}
 11691  		c := v_1.AuxInt
 11692  		v.reset(OpARMRSBSconst)
 11693  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
 11694  		v.AddArg(x)
 11695  		return true
 11696  	}
 11697  	return false
 11698  }
 11699  func rewriteValueARM_OpARMRSBSshiftLLreg_0(v *Value) bool {
 11700  	b := v.Block
 11701  	// match: (RSBSshiftLLreg (MOVWconst [c]) x y)
 11702  	// result: (SUBSconst [c] (SLL <x.Type> x y))
 11703  	for {
 11704  		y := v.Args[2]
 11705  		v_0 := v.Args[0]
 11706  		if v_0.Op != OpARMMOVWconst {
 11707  			break
 11708  		}
 11709  		c := v_0.AuxInt
 11710  		x := v.Args[1]
 11711  		v.reset(OpARMSUBSconst)
 11712  		v.AuxInt = c
 11713  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 11714  		v0.AddArg(x)
 11715  		v0.AddArg(y)
 11716  		v.AddArg(v0)
 11717  		return true
 11718  	}
 11719  	// match: (RSBSshiftLLreg x y (MOVWconst [c]))
 11720  	// result: (RSBSshiftLL x y [c])
 11721  	for {
 11722  		_ = v.Args[2]
 11723  		x := v.Args[0]
 11724  		y := v.Args[1]
 11725  		v_2 := v.Args[2]
 11726  		if v_2.Op != OpARMMOVWconst {
 11727  			break
 11728  		}
 11729  		c := v_2.AuxInt
 11730  		v.reset(OpARMRSBSshiftLL)
 11731  		v.AuxInt = c
 11732  		v.AddArg(x)
 11733  		v.AddArg(y)
 11734  		return true
 11735  	}
 11736  	return false
 11737  }
 11738  func rewriteValueARM_OpARMRSBSshiftRA_0(v *Value) bool {
 11739  	b := v.Block
 11740  	// match: (RSBSshiftRA (MOVWconst [c]) x [d])
 11741  	// result: (SUBSconst [c] (SRAconst <x.Type> x [d]))
 11742  	for {
 11743  		d := v.AuxInt
 11744  		x := v.Args[1]
 11745  		v_0 := v.Args[0]
 11746  		if v_0.Op != OpARMMOVWconst {
 11747  			break
 11748  		}
 11749  		c := v_0.AuxInt
 11750  		v.reset(OpARMSUBSconst)
 11751  		v.AuxInt = c
 11752  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 11753  		v0.AuxInt = d
 11754  		v0.AddArg(x)
 11755  		v.AddArg(v0)
 11756  		return true
 11757  	}
 11758  	// match: (RSBSshiftRA x (MOVWconst [c]) [d])
 11759  	// result: (RSBSconst x [int64(int32(c)>>uint64(d))])
 11760  	for {
 11761  		d := v.AuxInt
 11762  		_ = v.Args[1]
 11763  		x := v.Args[0]
 11764  		v_1 := v.Args[1]
 11765  		if v_1.Op != OpARMMOVWconst {
 11766  			break
 11767  		}
 11768  		c := v_1.AuxInt
 11769  		v.reset(OpARMRSBSconst)
 11770  		v.AuxInt = int64(int32(c) >> uint64(d))
 11771  		v.AddArg(x)
 11772  		return true
 11773  	}
 11774  	return false
 11775  }
 11776  func rewriteValueARM_OpARMRSBSshiftRAreg_0(v *Value) bool {
 11777  	b := v.Block
 11778  	// match: (RSBSshiftRAreg (MOVWconst [c]) x y)
 11779  	// result: (SUBSconst [c] (SRA <x.Type> x y))
 11780  	for {
 11781  		y := v.Args[2]
 11782  		v_0 := v.Args[0]
 11783  		if v_0.Op != OpARMMOVWconst {
 11784  			break
 11785  		}
 11786  		c := v_0.AuxInt
 11787  		x := v.Args[1]
 11788  		v.reset(OpARMSUBSconst)
 11789  		v.AuxInt = c
 11790  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 11791  		v0.AddArg(x)
 11792  		v0.AddArg(y)
 11793  		v.AddArg(v0)
 11794  		return true
 11795  	}
 11796  	// match: (RSBSshiftRAreg x y (MOVWconst [c]))
 11797  	// result: (RSBSshiftRA x y [c])
 11798  	for {
 11799  		_ = v.Args[2]
 11800  		x := v.Args[0]
 11801  		y := v.Args[1]
 11802  		v_2 := v.Args[2]
 11803  		if v_2.Op != OpARMMOVWconst {
 11804  			break
 11805  		}
 11806  		c := v_2.AuxInt
 11807  		v.reset(OpARMRSBSshiftRA)
 11808  		v.AuxInt = c
 11809  		v.AddArg(x)
 11810  		v.AddArg(y)
 11811  		return true
 11812  	}
 11813  	return false
 11814  }
 11815  func rewriteValueARM_OpARMRSBSshiftRL_0(v *Value) bool {
 11816  	b := v.Block
 11817  	// match: (RSBSshiftRL (MOVWconst [c]) x [d])
 11818  	// result: (SUBSconst [c] (SRLconst <x.Type> x [d]))
 11819  	for {
 11820  		d := v.AuxInt
 11821  		x := v.Args[1]
 11822  		v_0 := v.Args[0]
 11823  		if v_0.Op != OpARMMOVWconst {
 11824  			break
 11825  		}
 11826  		c := v_0.AuxInt
 11827  		v.reset(OpARMSUBSconst)
 11828  		v.AuxInt = c
 11829  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 11830  		v0.AuxInt = d
 11831  		v0.AddArg(x)
 11832  		v.AddArg(v0)
 11833  		return true
 11834  	}
 11835  	// match: (RSBSshiftRL x (MOVWconst [c]) [d])
 11836  	// result: (RSBSconst x [int64(int32(uint32(c)>>uint64(d)))])
 11837  	for {
 11838  		d := v.AuxInt
 11839  		_ = v.Args[1]
 11840  		x := v.Args[0]
 11841  		v_1 := v.Args[1]
 11842  		if v_1.Op != OpARMMOVWconst {
 11843  			break
 11844  		}
 11845  		c := v_1.AuxInt
 11846  		v.reset(OpARMRSBSconst)
 11847  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
 11848  		v.AddArg(x)
 11849  		return true
 11850  	}
 11851  	return false
 11852  }
 11853  func rewriteValueARM_OpARMRSBSshiftRLreg_0(v *Value) bool {
 11854  	b := v.Block
 11855  	// match: (RSBSshiftRLreg (MOVWconst [c]) x y)
 11856  	// result: (SUBSconst [c] (SRL <x.Type> x y))
 11857  	for {
 11858  		y := v.Args[2]
 11859  		v_0 := v.Args[0]
 11860  		if v_0.Op != OpARMMOVWconst {
 11861  			break
 11862  		}
 11863  		c := v_0.AuxInt
 11864  		x := v.Args[1]
 11865  		v.reset(OpARMSUBSconst)
 11866  		v.AuxInt = c
 11867  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 11868  		v0.AddArg(x)
 11869  		v0.AddArg(y)
 11870  		v.AddArg(v0)
 11871  		return true
 11872  	}
 11873  	// match: (RSBSshiftRLreg x y (MOVWconst [c]))
 11874  	// result: (RSBSshiftRL x y [c])
 11875  	for {
 11876  		_ = v.Args[2]
 11877  		x := v.Args[0]
 11878  		y := v.Args[1]
 11879  		v_2 := v.Args[2]
 11880  		if v_2.Op != OpARMMOVWconst {
 11881  			break
 11882  		}
 11883  		c := v_2.AuxInt
 11884  		v.reset(OpARMRSBSshiftRL)
 11885  		v.AuxInt = c
 11886  		v.AddArg(x)
 11887  		v.AddArg(y)
 11888  		return true
 11889  	}
 11890  	return false
 11891  }
 11892  func rewriteValueARM_OpARMRSBconst_0(v *Value) bool {
 11893  	// match: (RSBconst [c] (MOVWconst [d]))
 11894  	// result: (MOVWconst [int64(int32(c-d))])
 11895  	for {
 11896  		c := v.AuxInt
 11897  		v_0 := v.Args[0]
 11898  		if v_0.Op != OpARMMOVWconst {
 11899  			break
 11900  		}
 11901  		d := v_0.AuxInt
 11902  		v.reset(OpARMMOVWconst)
 11903  		v.AuxInt = int64(int32(c - d))
 11904  		return true
 11905  	}
 11906  	// match: (RSBconst [c] (RSBconst [d] x))
 11907  	// result: (ADDconst [int64(int32(c-d))] x)
 11908  	for {
 11909  		c := v.AuxInt
 11910  		v_0 := v.Args[0]
 11911  		if v_0.Op != OpARMRSBconst {
 11912  			break
 11913  		}
 11914  		d := v_0.AuxInt
 11915  		x := v_0.Args[0]
 11916  		v.reset(OpARMADDconst)
 11917  		v.AuxInt = int64(int32(c - d))
 11918  		v.AddArg(x)
 11919  		return true
 11920  	}
 11921  	// match: (RSBconst [c] (ADDconst [d] x))
 11922  	// result: (RSBconst [int64(int32(c-d))] x)
 11923  	for {
 11924  		c := v.AuxInt
 11925  		v_0 := v.Args[0]
 11926  		if v_0.Op != OpARMADDconst {
 11927  			break
 11928  		}
 11929  		d := v_0.AuxInt
 11930  		x := v_0.Args[0]
 11931  		v.reset(OpARMRSBconst)
 11932  		v.AuxInt = int64(int32(c - d))
 11933  		v.AddArg(x)
 11934  		return true
 11935  	}
 11936  	// match: (RSBconst [c] (SUBconst [d] x))
 11937  	// result: (RSBconst [int64(int32(c+d))] x)
 11938  	for {
 11939  		c := v.AuxInt
 11940  		v_0 := v.Args[0]
 11941  		if v_0.Op != OpARMSUBconst {
 11942  			break
 11943  		}
 11944  		d := v_0.AuxInt
 11945  		x := v_0.Args[0]
 11946  		v.reset(OpARMRSBconst)
 11947  		v.AuxInt = int64(int32(c + d))
 11948  		v.AddArg(x)
 11949  		return true
 11950  	}
 11951  	return false
 11952  }
 11953  func rewriteValueARM_OpARMRSBshiftLL_0(v *Value) bool {
 11954  	b := v.Block
 11955  	// match: (RSBshiftLL (MOVWconst [c]) x [d])
 11956  	// result: (SUBconst [c] (SLLconst <x.Type> x [d]))
 11957  	for {
 11958  		d := v.AuxInt
 11959  		x := v.Args[1]
 11960  		v_0 := v.Args[0]
 11961  		if v_0.Op != OpARMMOVWconst {
 11962  			break
 11963  		}
 11964  		c := v_0.AuxInt
 11965  		v.reset(OpARMSUBconst)
 11966  		v.AuxInt = c
 11967  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 11968  		v0.AuxInt = d
 11969  		v0.AddArg(x)
 11970  		v.AddArg(v0)
 11971  		return true
 11972  	}
 11973  	// match: (RSBshiftLL x (MOVWconst [c]) [d])
 11974  	// result: (RSBconst x [int64(int32(uint32(c)<<uint64(d)))])
 11975  	for {
 11976  		d := v.AuxInt
 11977  		_ = v.Args[1]
 11978  		x := v.Args[0]
 11979  		v_1 := v.Args[1]
 11980  		if v_1.Op != OpARMMOVWconst {
 11981  			break
 11982  		}
 11983  		c := v_1.AuxInt
 11984  		v.reset(OpARMRSBconst)
 11985  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
 11986  		v.AddArg(x)
 11987  		return true
 11988  	}
 11989  	// match: (RSBshiftLL x (SLLconst x [c]) [d])
 11990  	// cond: c==d
 11991  	// result: (MOVWconst [0])
 11992  	for {
 11993  		d := v.AuxInt
 11994  		_ = v.Args[1]
 11995  		x := v.Args[0]
 11996  		v_1 := v.Args[1]
 11997  		if v_1.Op != OpARMSLLconst {
 11998  			break
 11999  		}
 12000  		c := v_1.AuxInt
 12001  		if x != v_1.Args[0] || !(c == d) {
 12002  			break
 12003  		}
 12004  		v.reset(OpARMMOVWconst)
 12005  		v.AuxInt = 0
 12006  		return true
 12007  	}
 12008  	return false
 12009  }
 12010  func rewriteValueARM_OpARMRSBshiftLLreg_0(v *Value) bool {
 12011  	b := v.Block
 12012  	// match: (RSBshiftLLreg (MOVWconst [c]) x y)
 12013  	// result: (SUBconst [c] (SLL <x.Type> x y))
 12014  	for {
 12015  		y := v.Args[2]
 12016  		v_0 := v.Args[0]
 12017  		if v_0.Op != OpARMMOVWconst {
 12018  			break
 12019  		}
 12020  		c := v_0.AuxInt
 12021  		x := v.Args[1]
 12022  		v.reset(OpARMSUBconst)
 12023  		v.AuxInt = c
 12024  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 12025  		v0.AddArg(x)
 12026  		v0.AddArg(y)
 12027  		v.AddArg(v0)
 12028  		return true
 12029  	}
 12030  	// match: (RSBshiftLLreg x y (MOVWconst [c]))
 12031  	// result: (RSBshiftLL x y [c])
 12032  	for {
 12033  		_ = v.Args[2]
 12034  		x := v.Args[0]
 12035  		y := v.Args[1]
 12036  		v_2 := v.Args[2]
 12037  		if v_2.Op != OpARMMOVWconst {
 12038  			break
 12039  		}
 12040  		c := v_2.AuxInt
 12041  		v.reset(OpARMRSBshiftLL)
 12042  		v.AuxInt = c
 12043  		v.AddArg(x)
 12044  		v.AddArg(y)
 12045  		return true
 12046  	}
 12047  	return false
 12048  }
 12049  func rewriteValueARM_OpARMRSBshiftRA_0(v *Value) bool {
 12050  	b := v.Block
 12051  	// match: (RSBshiftRA (MOVWconst [c]) x [d])
 12052  	// result: (SUBconst [c] (SRAconst <x.Type> x [d]))
 12053  	for {
 12054  		d := v.AuxInt
 12055  		x := v.Args[1]
 12056  		v_0 := v.Args[0]
 12057  		if v_0.Op != OpARMMOVWconst {
 12058  			break
 12059  		}
 12060  		c := v_0.AuxInt
 12061  		v.reset(OpARMSUBconst)
 12062  		v.AuxInt = c
 12063  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 12064  		v0.AuxInt = d
 12065  		v0.AddArg(x)
 12066  		v.AddArg(v0)
 12067  		return true
 12068  	}
 12069  	// match: (RSBshiftRA x (MOVWconst [c]) [d])
 12070  	// result: (RSBconst x [int64(int32(c)>>uint64(d))])
 12071  	for {
 12072  		d := v.AuxInt
 12073  		_ = v.Args[1]
 12074  		x := v.Args[0]
 12075  		v_1 := v.Args[1]
 12076  		if v_1.Op != OpARMMOVWconst {
 12077  			break
 12078  		}
 12079  		c := v_1.AuxInt
 12080  		v.reset(OpARMRSBconst)
 12081  		v.AuxInt = int64(int32(c) >> uint64(d))
 12082  		v.AddArg(x)
 12083  		return true
 12084  	}
 12085  	// match: (RSBshiftRA x (SRAconst x [c]) [d])
 12086  	// cond: c==d
 12087  	// result: (MOVWconst [0])
 12088  	for {
 12089  		d := v.AuxInt
 12090  		_ = v.Args[1]
 12091  		x := v.Args[0]
 12092  		v_1 := v.Args[1]
 12093  		if v_1.Op != OpARMSRAconst {
 12094  			break
 12095  		}
 12096  		c := v_1.AuxInt
 12097  		if x != v_1.Args[0] || !(c == d) {
 12098  			break
 12099  		}
 12100  		v.reset(OpARMMOVWconst)
 12101  		v.AuxInt = 0
 12102  		return true
 12103  	}
 12104  	return false
 12105  }
 12106  func rewriteValueARM_OpARMRSBshiftRAreg_0(v *Value) bool {
 12107  	b := v.Block
 12108  	// match: (RSBshiftRAreg (MOVWconst [c]) x y)
 12109  	// result: (SUBconst [c] (SRA <x.Type> x y))
 12110  	for {
 12111  		y := v.Args[2]
 12112  		v_0 := v.Args[0]
 12113  		if v_0.Op != OpARMMOVWconst {
 12114  			break
 12115  		}
 12116  		c := v_0.AuxInt
 12117  		x := v.Args[1]
 12118  		v.reset(OpARMSUBconst)
 12119  		v.AuxInt = c
 12120  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 12121  		v0.AddArg(x)
 12122  		v0.AddArg(y)
 12123  		v.AddArg(v0)
 12124  		return true
 12125  	}
 12126  	// match: (RSBshiftRAreg x y (MOVWconst [c]))
 12127  	// result: (RSBshiftRA x y [c])
 12128  	for {
 12129  		_ = v.Args[2]
 12130  		x := v.Args[0]
 12131  		y := v.Args[1]
 12132  		v_2 := v.Args[2]
 12133  		if v_2.Op != OpARMMOVWconst {
 12134  			break
 12135  		}
 12136  		c := v_2.AuxInt
 12137  		v.reset(OpARMRSBshiftRA)
 12138  		v.AuxInt = c
 12139  		v.AddArg(x)
 12140  		v.AddArg(y)
 12141  		return true
 12142  	}
 12143  	return false
 12144  }
 12145  func rewriteValueARM_OpARMRSBshiftRL_0(v *Value) bool {
 12146  	b := v.Block
 12147  	// match: (RSBshiftRL (MOVWconst [c]) x [d])
 12148  	// result: (SUBconst [c] (SRLconst <x.Type> x [d]))
 12149  	for {
 12150  		d := v.AuxInt
 12151  		x := v.Args[1]
 12152  		v_0 := v.Args[0]
 12153  		if v_0.Op != OpARMMOVWconst {
 12154  			break
 12155  		}
 12156  		c := v_0.AuxInt
 12157  		v.reset(OpARMSUBconst)
 12158  		v.AuxInt = c
 12159  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 12160  		v0.AuxInt = d
 12161  		v0.AddArg(x)
 12162  		v.AddArg(v0)
 12163  		return true
 12164  	}
 12165  	// match: (RSBshiftRL x (MOVWconst [c]) [d])
 12166  	// result: (RSBconst x [int64(int32(uint32(c)>>uint64(d)))])
 12167  	for {
 12168  		d := v.AuxInt
 12169  		_ = v.Args[1]
 12170  		x := v.Args[0]
 12171  		v_1 := v.Args[1]
 12172  		if v_1.Op != OpARMMOVWconst {
 12173  			break
 12174  		}
 12175  		c := v_1.AuxInt
 12176  		v.reset(OpARMRSBconst)
 12177  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
 12178  		v.AddArg(x)
 12179  		return true
 12180  	}
 12181  	// match: (RSBshiftRL x (SRLconst x [c]) [d])
 12182  	// cond: c==d
 12183  	// result: (MOVWconst [0])
 12184  	for {
 12185  		d := v.AuxInt
 12186  		_ = v.Args[1]
 12187  		x := v.Args[0]
 12188  		v_1 := v.Args[1]
 12189  		if v_1.Op != OpARMSRLconst {
 12190  			break
 12191  		}
 12192  		c := v_1.AuxInt
 12193  		if x != v_1.Args[0] || !(c == d) {
 12194  			break
 12195  		}
 12196  		v.reset(OpARMMOVWconst)
 12197  		v.AuxInt = 0
 12198  		return true
 12199  	}
 12200  	return false
 12201  }
 12202  func rewriteValueARM_OpARMRSBshiftRLreg_0(v *Value) bool {
 12203  	b := v.Block
 12204  	// match: (RSBshiftRLreg (MOVWconst [c]) x y)
 12205  	// result: (SUBconst [c] (SRL <x.Type> x y))
 12206  	for {
 12207  		y := v.Args[2]
 12208  		v_0 := v.Args[0]
 12209  		if v_0.Op != OpARMMOVWconst {
 12210  			break
 12211  		}
 12212  		c := v_0.AuxInt
 12213  		x := v.Args[1]
 12214  		v.reset(OpARMSUBconst)
 12215  		v.AuxInt = c
 12216  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 12217  		v0.AddArg(x)
 12218  		v0.AddArg(y)
 12219  		v.AddArg(v0)
 12220  		return true
 12221  	}
 12222  	// match: (RSBshiftRLreg x y (MOVWconst [c]))
 12223  	// result: (RSBshiftRL x y [c])
 12224  	for {
 12225  		_ = v.Args[2]
 12226  		x := v.Args[0]
 12227  		y := v.Args[1]
 12228  		v_2 := v.Args[2]
 12229  		if v_2.Op != OpARMMOVWconst {
 12230  			break
 12231  		}
 12232  		c := v_2.AuxInt
 12233  		v.reset(OpARMRSBshiftRL)
 12234  		v.AuxInt = c
 12235  		v.AddArg(x)
 12236  		v.AddArg(y)
 12237  		return true
 12238  	}
 12239  	return false
 12240  }
 12241  func rewriteValueARM_OpARMRSCconst_0(v *Value) bool {
 12242  	// match: (RSCconst [c] (ADDconst [d] x) flags)
 12243  	// result: (RSCconst [int64(int32(c-d))] x flags)
 12244  	for {
 12245  		c := v.AuxInt
 12246  		flags := v.Args[1]
 12247  		v_0 := v.Args[0]
 12248  		if v_0.Op != OpARMADDconst {
 12249  			break
 12250  		}
 12251  		d := v_0.AuxInt
 12252  		x := v_0.Args[0]
 12253  		v.reset(OpARMRSCconst)
 12254  		v.AuxInt = int64(int32(c - d))
 12255  		v.AddArg(x)
 12256  		v.AddArg(flags)
 12257  		return true
 12258  	}
 12259  	// match: (RSCconst [c] (SUBconst [d] x) flags)
 12260  	// result: (RSCconst [int64(int32(c+d))] x flags)
 12261  	for {
 12262  		c := v.AuxInt
 12263  		flags := v.Args[1]
 12264  		v_0 := v.Args[0]
 12265  		if v_0.Op != OpARMSUBconst {
 12266  			break
 12267  		}
 12268  		d := v_0.AuxInt
 12269  		x := v_0.Args[0]
 12270  		v.reset(OpARMRSCconst)
 12271  		v.AuxInt = int64(int32(c + d))
 12272  		v.AddArg(x)
 12273  		v.AddArg(flags)
 12274  		return true
 12275  	}
 12276  	return false
 12277  }
 12278  func rewriteValueARM_OpARMRSCshiftLL_0(v *Value) bool {
 12279  	b := v.Block
 12280  	// match: (RSCshiftLL (MOVWconst [c]) x [d] flags)
 12281  	// result: (SBCconst [c] (SLLconst <x.Type> x [d]) flags)
 12282  	for {
 12283  		d := v.AuxInt
 12284  		flags := v.Args[2]
 12285  		v_0 := v.Args[0]
 12286  		if v_0.Op != OpARMMOVWconst {
 12287  			break
 12288  		}
 12289  		c := v_0.AuxInt
 12290  		x := v.Args[1]
 12291  		v.reset(OpARMSBCconst)
 12292  		v.AuxInt = c
 12293  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 12294  		v0.AuxInt = d
 12295  		v0.AddArg(x)
 12296  		v.AddArg(v0)
 12297  		v.AddArg(flags)
 12298  		return true
 12299  	}
 12300  	// match: (RSCshiftLL x (MOVWconst [c]) [d] flags)
 12301  	// result: (RSCconst x [int64(int32(uint32(c)<<uint64(d)))] flags)
 12302  	for {
 12303  		d := v.AuxInt
 12304  		flags := v.Args[2]
 12305  		x := v.Args[0]
 12306  		v_1 := v.Args[1]
 12307  		if v_1.Op != OpARMMOVWconst {
 12308  			break
 12309  		}
 12310  		c := v_1.AuxInt
 12311  		v.reset(OpARMRSCconst)
 12312  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
 12313  		v.AddArg(x)
 12314  		v.AddArg(flags)
 12315  		return true
 12316  	}
 12317  	return false
 12318  }
 12319  func rewriteValueARM_OpARMRSCshiftLLreg_0(v *Value) bool {
 12320  	b := v.Block
 12321  	// match: (RSCshiftLLreg (MOVWconst [c]) x y flags)
 12322  	// result: (SBCconst [c] (SLL <x.Type> x y) flags)
 12323  	for {
 12324  		flags := v.Args[3]
 12325  		v_0 := v.Args[0]
 12326  		if v_0.Op != OpARMMOVWconst {
 12327  			break
 12328  		}
 12329  		c := v_0.AuxInt
 12330  		x := v.Args[1]
 12331  		y := v.Args[2]
 12332  		v.reset(OpARMSBCconst)
 12333  		v.AuxInt = c
 12334  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 12335  		v0.AddArg(x)
 12336  		v0.AddArg(y)
 12337  		v.AddArg(v0)
 12338  		v.AddArg(flags)
 12339  		return true
 12340  	}
 12341  	// match: (RSCshiftLLreg x y (MOVWconst [c]) flags)
 12342  	// result: (RSCshiftLL x y [c] flags)
 12343  	for {
 12344  		flags := v.Args[3]
 12345  		x := v.Args[0]
 12346  		y := v.Args[1]
 12347  		v_2 := v.Args[2]
 12348  		if v_2.Op != OpARMMOVWconst {
 12349  			break
 12350  		}
 12351  		c := v_2.AuxInt
 12352  		v.reset(OpARMRSCshiftLL)
 12353  		v.AuxInt = c
 12354  		v.AddArg(x)
 12355  		v.AddArg(y)
 12356  		v.AddArg(flags)
 12357  		return true
 12358  	}
 12359  	return false
 12360  }
 12361  func rewriteValueARM_OpARMRSCshiftRA_0(v *Value) bool {
 12362  	b := v.Block
 12363  	// match: (RSCshiftRA (MOVWconst [c]) x [d] flags)
 12364  	// result: (SBCconst [c] (SRAconst <x.Type> x [d]) flags)
 12365  	for {
 12366  		d := v.AuxInt
 12367  		flags := v.Args[2]
 12368  		v_0 := v.Args[0]
 12369  		if v_0.Op != OpARMMOVWconst {
 12370  			break
 12371  		}
 12372  		c := v_0.AuxInt
 12373  		x := v.Args[1]
 12374  		v.reset(OpARMSBCconst)
 12375  		v.AuxInt = c
 12376  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 12377  		v0.AuxInt = d
 12378  		v0.AddArg(x)
 12379  		v.AddArg(v0)
 12380  		v.AddArg(flags)
 12381  		return true
 12382  	}
 12383  	// match: (RSCshiftRA x (MOVWconst [c]) [d] flags)
 12384  	// result: (RSCconst x [int64(int32(c)>>uint64(d))] flags)
 12385  	for {
 12386  		d := v.AuxInt
 12387  		flags := v.Args[2]
 12388  		x := v.Args[0]
 12389  		v_1 := v.Args[1]
 12390  		if v_1.Op != OpARMMOVWconst {
 12391  			break
 12392  		}
 12393  		c := v_1.AuxInt
 12394  		v.reset(OpARMRSCconst)
 12395  		v.AuxInt = int64(int32(c) >> uint64(d))
 12396  		v.AddArg(x)
 12397  		v.AddArg(flags)
 12398  		return true
 12399  	}
 12400  	return false
 12401  }
 12402  func rewriteValueARM_OpARMRSCshiftRAreg_0(v *Value) bool {
 12403  	b := v.Block
 12404  	// match: (RSCshiftRAreg (MOVWconst [c]) x y flags)
 12405  	// result: (SBCconst [c] (SRA <x.Type> x y) flags)
 12406  	for {
 12407  		flags := v.Args[3]
 12408  		v_0 := v.Args[0]
 12409  		if v_0.Op != OpARMMOVWconst {
 12410  			break
 12411  		}
 12412  		c := v_0.AuxInt
 12413  		x := v.Args[1]
 12414  		y := v.Args[2]
 12415  		v.reset(OpARMSBCconst)
 12416  		v.AuxInt = c
 12417  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 12418  		v0.AddArg(x)
 12419  		v0.AddArg(y)
 12420  		v.AddArg(v0)
 12421  		v.AddArg(flags)
 12422  		return true
 12423  	}
 12424  	// match: (RSCshiftRAreg x y (MOVWconst [c]) flags)
 12425  	// result: (RSCshiftRA x y [c] flags)
 12426  	for {
 12427  		flags := v.Args[3]
 12428  		x := v.Args[0]
 12429  		y := v.Args[1]
 12430  		v_2 := v.Args[2]
 12431  		if v_2.Op != OpARMMOVWconst {
 12432  			break
 12433  		}
 12434  		c := v_2.AuxInt
 12435  		v.reset(OpARMRSCshiftRA)
 12436  		v.AuxInt = c
 12437  		v.AddArg(x)
 12438  		v.AddArg(y)
 12439  		v.AddArg(flags)
 12440  		return true
 12441  	}
 12442  	return false
 12443  }
 12444  func rewriteValueARM_OpARMRSCshiftRL_0(v *Value) bool {
 12445  	b := v.Block
 12446  	// match: (RSCshiftRL (MOVWconst [c]) x [d] flags)
 12447  	// result: (SBCconst [c] (SRLconst <x.Type> x [d]) flags)
 12448  	for {
 12449  		d := v.AuxInt
 12450  		flags := v.Args[2]
 12451  		v_0 := v.Args[0]
 12452  		if v_0.Op != OpARMMOVWconst {
 12453  			break
 12454  		}
 12455  		c := v_0.AuxInt
 12456  		x := v.Args[1]
 12457  		v.reset(OpARMSBCconst)
 12458  		v.AuxInt = c
 12459  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 12460  		v0.AuxInt = d
 12461  		v0.AddArg(x)
 12462  		v.AddArg(v0)
 12463  		v.AddArg(flags)
 12464  		return true
 12465  	}
 12466  	// match: (RSCshiftRL x (MOVWconst [c]) [d] flags)
 12467  	// result: (RSCconst x [int64(int32(uint32(c)>>uint64(d)))] flags)
 12468  	for {
 12469  		d := v.AuxInt
 12470  		flags := v.Args[2]
 12471  		x := v.Args[0]
 12472  		v_1 := v.Args[1]
 12473  		if v_1.Op != OpARMMOVWconst {
 12474  			break
 12475  		}
 12476  		c := v_1.AuxInt
 12477  		v.reset(OpARMRSCconst)
 12478  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
 12479  		v.AddArg(x)
 12480  		v.AddArg(flags)
 12481  		return true
 12482  	}
 12483  	return false
 12484  }
 12485  func rewriteValueARM_OpARMRSCshiftRLreg_0(v *Value) bool {
 12486  	b := v.Block
 12487  	// match: (RSCshiftRLreg (MOVWconst [c]) x y flags)
 12488  	// result: (SBCconst [c] (SRL <x.Type> x y) flags)
 12489  	for {
 12490  		flags := v.Args[3]
 12491  		v_0 := v.Args[0]
 12492  		if v_0.Op != OpARMMOVWconst {
 12493  			break
 12494  		}
 12495  		c := v_0.AuxInt
 12496  		x := v.Args[1]
 12497  		y := v.Args[2]
 12498  		v.reset(OpARMSBCconst)
 12499  		v.AuxInt = c
 12500  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 12501  		v0.AddArg(x)
 12502  		v0.AddArg(y)
 12503  		v.AddArg(v0)
 12504  		v.AddArg(flags)
 12505  		return true
 12506  	}
 12507  	// match: (RSCshiftRLreg x y (MOVWconst [c]) flags)
 12508  	// result: (RSCshiftRL x y [c] flags)
 12509  	for {
 12510  		flags := v.Args[3]
 12511  		x := v.Args[0]
 12512  		y := v.Args[1]
 12513  		v_2 := v.Args[2]
 12514  		if v_2.Op != OpARMMOVWconst {
 12515  			break
 12516  		}
 12517  		c := v_2.AuxInt
 12518  		v.reset(OpARMRSCshiftRL)
 12519  		v.AuxInt = c
 12520  		v.AddArg(x)
 12521  		v.AddArg(y)
 12522  		v.AddArg(flags)
 12523  		return true
 12524  	}
 12525  	return false
 12526  }
 12527  func rewriteValueARM_OpARMSBC_0(v *Value) bool {
 12528  	// match: (SBC (MOVWconst [c]) x flags)
 12529  	// result: (RSCconst [c] x flags)
 12530  	for {
 12531  		flags := v.Args[2]
 12532  		v_0 := v.Args[0]
 12533  		if v_0.Op != OpARMMOVWconst {
 12534  			break
 12535  		}
 12536  		c := v_0.AuxInt
 12537  		x := v.Args[1]
 12538  		v.reset(OpARMRSCconst)
 12539  		v.AuxInt = c
 12540  		v.AddArg(x)
 12541  		v.AddArg(flags)
 12542  		return true
 12543  	}
 12544  	// match: (SBC x (MOVWconst [c]) flags)
 12545  	// result: (SBCconst [c] x flags)
 12546  	for {
 12547  		flags := v.Args[2]
 12548  		x := v.Args[0]
 12549  		v_1 := v.Args[1]
 12550  		if v_1.Op != OpARMMOVWconst {
 12551  			break
 12552  		}
 12553  		c := v_1.AuxInt
 12554  		v.reset(OpARMSBCconst)
 12555  		v.AuxInt = c
 12556  		v.AddArg(x)
 12557  		v.AddArg(flags)
 12558  		return true
 12559  	}
 12560  	// match: (SBC x (SLLconst [c] y) flags)
 12561  	// result: (SBCshiftLL x y [c] flags)
 12562  	for {
 12563  		flags := v.Args[2]
 12564  		x := v.Args[0]
 12565  		v_1 := v.Args[1]
 12566  		if v_1.Op != OpARMSLLconst {
 12567  			break
 12568  		}
 12569  		c := v_1.AuxInt
 12570  		y := v_1.Args[0]
 12571  		v.reset(OpARMSBCshiftLL)
 12572  		v.AuxInt = c
 12573  		v.AddArg(x)
 12574  		v.AddArg(y)
 12575  		v.AddArg(flags)
 12576  		return true
 12577  	}
 12578  	// match: (SBC (SLLconst [c] y) x flags)
 12579  	// result: (RSCshiftLL x y [c] flags)
 12580  	for {
 12581  		flags := v.Args[2]
 12582  		v_0 := v.Args[0]
 12583  		if v_0.Op != OpARMSLLconst {
 12584  			break
 12585  		}
 12586  		c := v_0.AuxInt
 12587  		y := v_0.Args[0]
 12588  		x := v.Args[1]
 12589  		v.reset(OpARMRSCshiftLL)
 12590  		v.AuxInt = c
 12591  		v.AddArg(x)
 12592  		v.AddArg(y)
 12593  		v.AddArg(flags)
 12594  		return true
 12595  	}
 12596  	// match: (SBC x (SRLconst [c] y) flags)
 12597  	// result: (SBCshiftRL x y [c] flags)
 12598  	for {
 12599  		flags := v.Args[2]
 12600  		x := v.Args[0]
 12601  		v_1 := v.Args[1]
 12602  		if v_1.Op != OpARMSRLconst {
 12603  			break
 12604  		}
 12605  		c := v_1.AuxInt
 12606  		y := v_1.Args[0]
 12607  		v.reset(OpARMSBCshiftRL)
 12608  		v.AuxInt = c
 12609  		v.AddArg(x)
 12610  		v.AddArg(y)
 12611  		v.AddArg(flags)
 12612  		return true
 12613  	}
 12614  	// match: (SBC (SRLconst [c] y) x flags)
 12615  	// result: (RSCshiftRL x y [c] flags)
 12616  	for {
 12617  		flags := v.Args[2]
 12618  		v_0 := v.Args[0]
 12619  		if v_0.Op != OpARMSRLconst {
 12620  			break
 12621  		}
 12622  		c := v_0.AuxInt
 12623  		y := v_0.Args[0]
 12624  		x := v.Args[1]
 12625  		v.reset(OpARMRSCshiftRL)
 12626  		v.AuxInt = c
 12627  		v.AddArg(x)
 12628  		v.AddArg(y)
 12629  		v.AddArg(flags)
 12630  		return true
 12631  	}
 12632  	// match: (SBC x (SRAconst [c] y) flags)
 12633  	// result: (SBCshiftRA x y [c] flags)
 12634  	for {
 12635  		flags := v.Args[2]
 12636  		x := v.Args[0]
 12637  		v_1 := v.Args[1]
 12638  		if v_1.Op != OpARMSRAconst {
 12639  			break
 12640  		}
 12641  		c := v_1.AuxInt
 12642  		y := v_1.Args[0]
 12643  		v.reset(OpARMSBCshiftRA)
 12644  		v.AuxInt = c
 12645  		v.AddArg(x)
 12646  		v.AddArg(y)
 12647  		v.AddArg(flags)
 12648  		return true
 12649  	}
 12650  	// match: (SBC (SRAconst [c] y) x flags)
 12651  	// result: (RSCshiftRA x y [c] flags)
 12652  	for {
 12653  		flags := v.Args[2]
 12654  		v_0 := v.Args[0]
 12655  		if v_0.Op != OpARMSRAconst {
 12656  			break
 12657  		}
 12658  		c := v_0.AuxInt
 12659  		y := v_0.Args[0]
 12660  		x := v.Args[1]
 12661  		v.reset(OpARMRSCshiftRA)
 12662  		v.AuxInt = c
 12663  		v.AddArg(x)
 12664  		v.AddArg(y)
 12665  		v.AddArg(flags)
 12666  		return true
 12667  	}
 12668  	// match: (SBC x (SLL y z) flags)
 12669  	// result: (SBCshiftLLreg x y z flags)
 12670  	for {
 12671  		flags := v.Args[2]
 12672  		x := v.Args[0]
 12673  		v_1 := v.Args[1]
 12674  		if v_1.Op != OpARMSLL {
 12675  			break
 12676  		}
 12677  		z := v_1.Args[1]
 12678  		y := v_1.Args[0]
 12679  		v.reset(OpARMSBCshiftLLreg)
 12680  		v.AddArg(x)
 12681  		v.AddArg(y)
 12682  		v.AddArg(z)
 12683  		v.AddArg(flags)
 12684  		return true
 12685  	}
 12686  	// match: (SBC (SLL y z) x flags)
 12687  	// result: (RSCshiftLLreg x y z flags)
 12688  	for {
 12689  		flags := v.Args[2]
 12690  		v_0 := v.Args[0]
 12691  		if v_0.Op != OpARMSLL {
 12692  			break
 12693  		}
 12694  		z := v_0.Args[1]
 12695  		y := v_0.Args[0]
 12696  		x := v.Args[1]
 12697  		v.reset(OpARMRSCshiftLLreg)
 12698  		v.AddArg(x)
 12699  		v.AddArg(y)
 12700  		v.AddArg(z)
 12701  		v.AddArg(flags)
 12702  		return true
 12703  	}
 12704  	return false
 12705  }
 12706  func rewriteValueARM_OpARMSBC_10(v *Value) bool {
 12707  	// match: (SBC x (SRL y z) flags)
 12708  	// result: (SBCshiftRLreg x y z flags)
 12709  	for {
 12710  		flags := v.Args[2]
 12711  		x := v.Args[0]
 12712  		v_1 := v.Args[1]
 12713  		if v_1.Op != OpARMSRL {
 12714  			break
 12715  		}
 12716  		z := v_1.Args[1]
 12717  		y := v_1.Args[0]
 12718  		v.reset(OpARMSBCshiftRLreg)
 12719  		v.AddArg(x)
 12720  		v.AddArg(y)
 12721  		v.AddArg(z)
 12722  		v.AddArg(flags)
 12723  		return true
 12724  	}
 12725  	// match: (SBC (SRL y z) x flags)
 12726  	// result: (RSCshiftRLreg x y z flags)
 12727  	for {
 12728  		flags := v.Args[2]
 12729  		v_0 := v.Args[0]
 12730  		if v_0.Op != OpARMSRL {
 12731  			break
 12732  		}
 12733  		z := v_0.Args[1]
 12734  		y := v_0.Args[0]
 12735  		x := v.Args[1]
 12736  		v.reset(OpARMRSCshiftRLreg)
 12737  		v.AddArg(x)
 12738  		v.AddArg(y)
 12739  		v.AddArg(z)
 12740  		v.AddArg(flags)
 12741  		return true
 12742  	}
 12743  	// match: (SBC x (SRA y z) flags)
 12744  	// result: (SBCshiftRAreg x y z flags)
 12745  	for {
 12746  		flags := v.Args[2]
 12747  		x := v.Args[0]
 12748  		v_1 := v.Args[1]
 12749  		if v_1.Op != OpARMSRA {
 12750  			break
 12751  		}
 12752  		z := v_1.Args[1]
 12753  		y := v_1.Args[0]
 12754  		v.reset(OpARMSBCshiftRAreg)
 12755  		v.AddArg(x)
 12756  		v.AddArg(y)
 12757  		v.AddArg(z)
 12758  		v.AddArg(flags)
 12759  		return true
 12760  	}
 12761  	// match: (SBC (SRA y z) x flags)
 12762  	// result: (RSCshiftRAreg x y z flags)
 12763  	for {
 12764  		flags := v.Args[2]
 12765  		v_0 := v.Args[0]
 12766  		if v_0.Op != OpARMSRA {
 12767  			break
 12768  		}
 12769  		z := v_0.Args[1]
 12770  		y := v_0.Args[0]
 12771  		x := v.Args[1]
 12772  		v.reset(OpARMRSCshiftRAreg)
 12773  		v.AddArg(x)
 12774  		v.AddArg(y)
 12775  		v.AddArg(z)
 12776  		v.AddArg(flags)
 12777  		return true
 12778  	}
 12779  	return false
 12780  }
 12781  func rewriteValueARM_OpARMSBCconst_0(v *Value) bool {
 12782  	// match: (SBCconst [c] (ADDconst [d] x) flags)
 12783  	// result: (SBCconst [int64(int32(c-d))] x flags)
 12784  	for {
 12785  		c := v.AuxInt
 12786  		flags := v.Args[1]
 12787  		v_0 := v.Args[0]
 12788  		if v_0.Op != OpARMADDconst {
 12789  			break
 12790  		}
 12791  		d := v_0.AuxInt
 12792  		x := v_0.Args[0]
 12793  		v.reset(OpARMSBCconst)
 12794  		v.AuxInt = int64(int32(c - d))
 12795  		v.AddArg(x)
 12796  		v.AddArg(flags)
 12797  		return true
 12798  	}
 12799  	// match: (SBCconst [c] (SUBconst [d] x) flags)
 12800  	// result: (SBCconst [int64(int32(c+d))] x flags)
 12801  	for {
 12802  		c := v.AuxInt
 12803  		flags := v.Args[1]
 12804  		v_0 := v.Args[0]
 12805  		if v_0.Op != OpARMSUBconst {
 12806  			break
 12807  		}
 12808  		d := v_0.AuxInt
 12809  		x := v_0.Args[0]
 12810  		v.reset(OpARMSBCconst)
 12811  		v.AuxInt = int64(int32(c + d))
 12812  		v.AddArg(x)
 12813  		v.AddArg(flags)
 12814  		return true
 12815  	}
 12816  	return false
 12817  }
 12818  func rewriteValueARM_OpARMSBCshiftLL_0(v *Value) bool {
 12819  	b := v.Block
 12820  	// match: (SBCshiftLL (MOVWconst [c]) x [d] flags)
 12821  	// result: (RSCconst [c] (SLLconst <x.Type> x [d]) flags)
 12822  	for {
 12823  		d := v.AuxInt
 12824  		flags := v.Args[2]
 12825  		v_0 := v.Args[0]
 12826  		if v_0.Op != OpARMMOVWconst {
 12827  			break
 12828  		}
 12829  		c := v_0.AuxInt
 12830  		x := v.Args[1]
 12831  		v.reset(OpARMRSCconst)
 12832  		v.AuxInt = c
 12833  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 12834  		v0.AuxInt = d
 12835  		v0.AddArg(x)
 12836  		v.AddArg(v0)
 12837  		v.AddArg(flags)
 12838  		return true
 12839  	}
 12840  	// match: (SBCshiftLL x (MOVWconst [c]) [d] flags)
 12841  	// result: (SBCconst x [int64(int32(uint32(c)<<uint64(d)))] flags)
 12842  	for {
 12843  		d := v.AuxInt
 12844  		flags := v.Args[2]
 12845  		x := v.Args[0]
 12846  		v_1 := v.Args[1]
 12847  		if v_1.Op != OpARMMOVWconst {
 12848  			break
 12849  		}
 12850  		c := v_1.AuxInt
 12851  		v.reset(OpARMSBCconst)
 12852  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
 12853  		v.AddArg(x)
 12854  		v.AddArg(flags)
 12855  		return true
 12856  	}
 12857  	return false
 12858  }
 12859  func rewriteValueARM_OpARMSBCshiftLLreg_0(v *Value) bool {
 12860  	b := v.Block
 12861  	// match: (SBCshiftLLreg (MOVWconst [c]) x y flags)
 12862  	// result: (RSCconst [c] (SLL <x.Type> x y) flags)
 12863  	for {
 12864  		flags := v.Args[3]
 12865  		v_0 := v.Args[0]
 12866  		if v_0.Op != OpARMMOVWconst {
 12867  			break
 12868  		}
 12869  		c := v_0.AuxInt
 12870  		x := v.Args[1]
 12871  		y := v.Args[2]
 12872  		v.reset(OpARMRSCconst)
 12873  		v.AuxInt = c
 12874  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 12875  		v0.AddArg(x)
 12876  		v0.AddArg(y)
 12877  		v.AddArg(v0)
 12878  		v.AddArg(flags)
 12879  		return true
 12880  	}
 12881  	// match: (SBCshiftLLreg x y (MOVWconst [c]) flags)
 12882  	// result: (SBCshiftLL x y [c] flags)
 12883  	for {
 12884  		flags := v.Args[3]
 12885  		x := v.Args[0]
 12886  		y := v.Args[1]
 12887  		v_2 := v.Args[2]
 12888  		if v_2.Op != OpARMMOVWconst {
 12889  			break
 12890  		}
 12891  		c := v_2.AuxInt
 12892  		v.reset(OpARMSBCshiftLL)
 12893  		v.AuxInt = c
 12894  		v.AddArg(x)
 12895  		v.AddArg(y)
 12896  		v.AddArg(flags)
 12897  		return true
 12898  	}
 12899  	return false
 12900  }
 12901  func rewriteValueARM_OpARMSBCshiftRA_0(v *Value) bool {
 12902  	b := v.Block
 12903  	// match: (SBCshiftRA (MOVWconst [c]) x [d] flags)
 12904  	// result: (RSCconst [c] (SRAconst <x.Type> x [d]) flags)
 12905  	for {
 12906  		d := v.AuxInt
 12907  		flags := v.Args[2]
 12908  		v_0 := v.Args[0]
 12909  		if v_0.Op != OpARMMOVWconst {
 12910  			break
 12911  		}
 12912  		c := v_0.AuxInt
 12913  		x := v.Args[1]
 12914  		v.reset(OpARMRSCconst)
 12915  		v.AuxInt = c
 12916  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 12917  		v0.AuxInt = d
 12918  		v0.AddArg(x)
 12919  		v.AddArg(v0)
 12920  		v.AddArg(flags)
 12921  		return true
 12922  	}
 12923  	// match: (SBCshiftRA x (MOVWconst [c]) [d] flags)
 12924  	// result: (SBCconst x [int64(int32(c)>>uint64(d))] flags)
 12925  	for {
 12926  		d := v.AuxInt
 12927  		flags := v.Args[2]
 12928  		x := v.Args[0]
 12929  		v_1 := v.Args[1]
 12930  		if v_1.Op != OpARMMOVWconst {
 12931  			break
 12932  		}
 12933  		c := v_1.AuxInt
 12934  		v.reset(OpARMSBCconst)
 12935  		v.AuxInt = int64(int32(c) >> uint64(d))
 12936  		v.AddArg(x)
 12937  		v.AddArg(flags)
 12938  		return true
 12939  	}
 12940  	return false
 12941  }
 12942  func rewriteValueARM_OpARMSBCshiftRAreg_0(v *Value) bool {
 12943  	b := v.Block
 12944  	// match: (SBCshiftRAreg (MOVWconst [c]) x y flags)
 12945  	// result: (RSCconst [c] (SRA <x.Type> x y) flags)
 12946  	for {
 12947  		flags := v.Args[3]
 12948  		v_0 := v.Args[0]
 12949  		if v_0.Op != OpARMMOVWconst {
 12950  			break
 12951  		}
 12952  		c := v_0.AuxInt
 12953  		x := v.Args[1]
 12954  		y := v.Args[2]
 12955  		v.reset(OpARMRSCconst)
 12956  		v.AuxInt = c
 12957  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 12958  		v0.AddArg(x)
 12959  		v0.AddArg(y)
 12960  		v.AddArg(v0)
 12961  		v.AddArg(flags)
 12962  		return true
 12963  	}
 12964  	// match: (SBCshiftRAreg x y (MOVWconst [c]) flags)
 12965  	// result: (SBCshiftRA x y [c] flags)
 12966  	for {
 12967  		flags := v.Args[3]
 12968  		x := v.Args[0]
 12969  		y := v.Args[1]
 12970  		v_2 := v.Args[2]
 12971  		if v_2.Op != OpARMMOVWconst {
 12972  			break
 12973  		}
 12974  		c := v_2.AuxInt
 12975  		v.reset(OpARMSBCshiftRA)
 12976  		v.AuxInt = c
 12977  		v.AddArg(x)
 12978  		v.AddArg(y)
 12979  		v.AddArg(flags)
 12980  		return true
 12981  	}
 12982  	return false
 12983  }
 12984  func rewriteValueARM_OpARMSBCshiftRL_0(v *Value) bool {
 12985  	b := v.Block
 12986  	// match: (SBCshiftRL (MOVWconst [c]) x [d] flags)
 12987  	// result: (RSCconst [c] (SRLconst <x.Type> x [d]) flags)
 12988  	for {
 12989  		d := v.AuxInt
 12990  		flags := v.Args[2]
 12991  		v_0 := v.Args[0]
 12992  		if v_0.Op != OpARMMOVWconst {
 12993  			break
 12994  		}
 12995  		c := v_0.AuxInt
 12996  		x := v.Args[1]
 12997  		v.reset(OpARMRSCconst)
 12998  		v.AuxInt = c
 12999  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 13000  		v0.AuxInt = d
 13001  		v0.AddArg(x)
 13002  		v.AddArg(v0)
 13003  		v.AddArg(flags)
 13004  		return true
 13005  	}
 13006  	// match: (SBCshiftRL x (MOVWconst [c]) [d] flags)
 13007  	// result: (SBCconst x [int64(int32(uint32(c)>>uint64(d)))] flags)
 13008  	for {
 13009  		d := v.AuxInt
 13010  		flags := v.Args[2]
 13011  		x := v.Args[0]
 13012  		v_1 := v.Args[1]
 13013  		if v_1.Op != OpARMMOVWconst {
 13014  			break
 13015  		}
 13016  		c := v_1.AuxInt
 13017  		v.reset(OpARMSBCconst)
 13018  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
 13019  		v.AddArg(x)
 13020  		v.AddArg(flags)
 13021  		return true
 13022  	}
 13023  	return false
 13024  }
 13025  func rewriteValueARM_OpARMSBCshiftRLreg_0(v *Value) bool {
 13026  	b := v.Block
 13027  	// match: (SBCshiftRLreg (MOVWconst [c]) x y flags)
 13028  	// result: (RSCconst [c] (SRL <x.Type> x y) flags)
 13029  	for {
 13030  		flags := v.Args[3]
 13031  		v_0 := v.Args[0]
 13032  		if v_0.Op != OpARMMOVWconst {
 13033  			break
 13034  		}
 13035  		c := v_0.AuxInt
 13036  		x := v.Args[1]
 13037  		y := v.Args[2]
 13038  		v.reset(OpARMRSCconst)
 13039  		v.AuxInt = c
 13040  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 13041  		v0.AddArg(x)
 13042  		v0.AddArg(y)
 13043  		v.AddArg(v0)
 13044  		v.AddArg(flags)
 13045  		return true
 13046  	}
 13047  	// match: (SBCshiftRLreg x y (MOVWconst [c]) flags)
 13048  	// result: (SBCshiftRL x y [c] flags)
 13049  	for {
 13050  		flags := v.Args[3]
 13051  		x := v.Args[0]
 13052  		y := v.Args[1]
 13053  		v_2 := v.Args[2]
 13054  		if v_2.Op != OpARMMOVWconst {
 13055  			break
 13056  		}
 13057  		c := v_2.AuxInt
 13058  		v.reset(OpARMSBCshiftRL)
 13059  		v.AuxInt = c
 13060  		v.AddArg(x)
 13061  		v.AddArg(y)
 13062  		v.AddArg(flags)
 13063  		return true
 13064  	}
 13065  	return false
 13066  }
 13067  func rewriteValueARM_OpARMSLL_0(v *Value) bool {
 13068  	// match: (SLL x (MOVWconst [c]))
 13069  	// result: (SLLconst x [c&31])
 13070  	for {
 13071  		_ = v.Args[1]
 13072  		x := v.Args[0]
 13073  		v_1 := v.Args[1]
 13074  		if v_1.Op != OpARMMOVWconst {
 13075  			break
 13076  		}
 13077  		c := v_1.AuxInt
 13078  		v.reset(OpARMSLLconst)
 13079  		v.AuxInt = c & 31
 13080  		v.AddArg(x)
 13081  		return true
 13082  	}
 13083  	return false
 13084  }
 13085  func rewriteValueARM_OpARMSLLconst_0(v *Value) bool {
 13086  	// match: (SLLconst [c] (MOVWconst [d]))
 13087  	// result: (MOVWconst [int64(int32(uint32(d)<<uint64(c)))])
 13088  	for {
 13089  		c := v.AuxInt
 13090  		v_0 := v.Args[0]
 13091  		if v_0.Op != OpARMMOVWconst {
 13092  			break
 13093  		}
 13094  		d := v_0.AuxInt
 13095  		v.reset(OpARMMOVWconst)
 13096  		v.AuxInt = int64(int32(uint32(d) << uint64(c)))
 13097  		return true
 13098  	}
 13099  	return false
 13100  }
 13101  func rewriteValueARM_OpARMSRA_0(v *Value) bool {
 13102  	// match: (SRA x (MOVWconst [c]))
 13103  	// result: (SRAconst x [c&31])
 13104  	for {
 13105  		_ = v.Args[1]
 13106  		x := v.Args[0]
 13107  		v_1 := v.Args[1]
 13108  		if v_1.Op != OpARMMOVWconst {
 13109  			break
 13110  		}
 13111  		c := v_1.AuxInt
 13112  		v.reset(OpARMSRAconst)
 13113  		v.AuxInt = c & 31
 13114  		v.AddArg(x)
 13115  		return true
 13116  	}
 13117  	return false
 13118  }
 13119  func rewriteValueARM_OpARMSRAcond_0(v *Value) bool {
 13120  	// match: (SRAcond x _ (FlagEQ))
 13121  	// result: (SRAconst x [31])
 13122  	for {
 13123  		_ = v.Args[2]
 13124  		x := v.Args[0]
 13125  		v_2 := v.Args[2]
 13126  		if v_2.Op != OpARMFlagEQ {
 13127  			break
 13128  		}
 13129  		v.reset(OpARMSRAconst)
 13130  		v.AuxInt = 31
 13131  		v.AddArg(x)
 13132  		return true
 13133  	}
 13134  	// match: (SRAcond x y (FlagLT_ULT))
 13135  	// result: (SRA x y)
 13136  	for {
 13137  		_ = v.Args[2]
 13138  		x := v.Args[0]
 13139  		y := v.Args[1]
 13140  		v_2 := v.Args[2]
 13141  		if v_2.Op != OpARMFlagLT_ULT {
 13142  			break
 13143  		}
 13144  		v.reset(OpARMSRA)
 13145  		v.AddArg(x)
 13146  		v.AddArg(y)
 13147  		return true
 13148  	}
 13149  	// match: (SRAcond x _ (FlagLT_UGT))
 13150  	// result: (SRAconst x [31])
 13151  	for {
 13152  		_ = v.Args[2]
 13153  		x := v.Args[0]
 13154  		v_2 := v.Args[2]
 13155  		if v_2.Op != OpARMFlagLT_UGT {
 13156  			break
 13157  		}
 13158  		v.reset(OpARMSRAconst)
 13159  		v.AuxInt = 31
 13160  		v.AddArg(x)
 13161  		return true
 13162  	}
 13163  	// match: (SRAcond x y (FlagGT_ULT))
 13164  	// result: (SRA x y)
 13165  	for {
 13166  		_ = v.Args[2]
 13167  		x := v.Args[0]
 13168  		y := v.Args[1]
 13169  		v_2 := v.Args[2]
 13170  		if v_2.Op != OpARMFlagGT_ULT {
 13171  			break
 13172  		}
 13173  		v.reset(OpARMSRA)
 13174  		v.AddArg(x)
 13175  		v.AddArg(y)
 13176  		return true
 13177  	}
 13178  	// match: (SRAcond x _ (FlagGT_UGT))
 13179  	// result: (SRAconst x [31])
 13180  	for {
 13181  		_ = v.Args[2]
 13182  		x := v.Args[0]
 13183  		v_2 := v.Args[2]
 13184  		if v_2.Op != OpARMFlagGT_UGT {
 13185  			break
 13186  		}
 13187  		v.reset(OpARMSRAconst)
 13188  		v.AuxInt = 31
 13189  		v.AddArg(x)
 13190  		return true
 13191  	}
 13192  	return false
 13193  }
 13194  func rewriteValueARM_OpARMSRAconst_0(v *Value) bool {
 13195  	// match: (SRAconst [c] (MOVWconst [d]))
 13196  	// result: (MOVWconst [int64(int32(d)>>uint64(c))])
 13197  	for {
 13198  		c := v.AuxInt
 13199  		v_0 := v.Args[0]
 13200  		if v_0.Op != OpARMMOVWconst {
 13201  			break
 13202  		}
 13203  		d := v_0.AuxInt
 13204  		v.reset(OpARMMOVWconst)
 13205  		v.AuxInt = int64(int32(d) >> uint64(c))
 13206  		return true
 13207  	}
 13208  	// match: (SRAconst (SLLconst x [c]) [d])
 13209  	// cond: objabi.GOARM==7 && uint64(d)>=uint64(c) && uint64(d)<=31
 13210  	// result: (BFX [(d-c)|(32-d)<<8] x)
 13211  	for {
 13212  		d := v.AuxInt
 13213  		v_0 := v.Args[0]
 13214  		if v_0.Op != OpARMSLLconst {
 13215  			break
 13216  		}
 13217  		c := v_0.AuxInt
 13218  		x := v_0.Args[0]
 13219  		if !(objabi.GOARM == 7 && uint64(d) >= uint64(c) && uint64(d) <= 31) {
 13220  			break
 13221  		}
 13222  		v.reset(OpARMBFX)
 13223  		v.AuxInt = (d - c) | (32-d)<<8
 13224  		v.AddArg(x)
 13225  		return true
 13226  	}
 13227  	return false
 13228  }
 13229  func rewriteValueARM_OpARMSRL_0(v *Value) bool {
 13230  	// match: (SRL x (MOVWconst [c]))
 13231  	// result: (SRLconst x [c&31])
 13232  	for {
 13233  		_ = v.Args[1]
 13234  		x := v.Args[0]
 13235  		v_1 := v.Args[1]
 13236  		if v_1.Op != OpARMMOVWconst {
 13237  			break
 13238  		}
 13239  		c := v_1.AuxInt
 13240  		v.reset(OpARMSRLconst)
 13241  		v.AuxInt = c & 31
 13242  		v.AddArg(x)
 13243  		return true
 13244  	}
 13245  	return false
 13246  }
 13247  func rewriteValueARM_OpARMSRLconst_0(v *Value) bool {
 13248  	// match: (SRLconst [c] (MOVWconst [d]))
 13249  	// result: (MOVWconst [int64(int32(uint32(d)>>uint64(c)))])
 13250  	for {
 13251  		c := v.AuxInt
 13252  		v_0 := v.Args[0]
 13253  		if v_0.Op != OpARMMOVWconst {
 13254  			break
 13255  		}
 13256  		d := v_0.AuxInt
 13257  		v.reset(OpARMMOVWconst)
 13258  		v.AuxInt = int64(int32(uint32(d) >> uint64(c)))
 13259  		return true
 13260  	}
 13261  	// match: (SRLconst (SLLconst x [c]) [d])
 13262  	// cond: objabi.GOARM==7 && uint64(d)>=uint64(c) && uint64(d)<=31
 13263  	// result: (BFXU [(d-c)|(32-d)<<8] x)
 13264  	for {
 13265  		d := v.AuxInt
 13266  		v_0 := v.Args[0]
 13267  		if v_0.Op != OpARMSLLconst {
 13268  			break
 13269  		}
 13270  		c := v_0.AuxInt
 13271  		x := v_0.Args[0]
 13272  		if !(objabi.GOARM == 7 && uint64(d) >= uint64(c) && uint64(d) <= 31) {
 13273  			break
 13274  		}
 13275  		v.reset(OpARMBFXU)
 13276  		v.AuxInt = (d - c) | (32-d)<<8
 13277  		v.AddArg(x)
 13278  		return true
 13279  	}
 13280  	return false
 13281  }
 13282  func rewriteValueARM_OpARMSUB_0(v *Value) bool {
 13283  	// match: (SUB (MOVWconst [c]) x)
 13284  	// result: (RSBconst [c] x)
 13285  	for {
 13286  		x := v.Args[1]
 13287  		v_0 := v.Args[0]
 13288  		if v_0.Op != OpARMMOVWconst {
 13289  			break
 13290  		}
 13291  		c := v_0.AuxInt
 13292  		v.reset(OpARMRSBconst)
 13293  		v.AuxInt = c
 13294  		v.AddArg(x)
 13295  		return true
 13296  	}
 13297  	// match: (SUB x (MOVWconst [c]))
 13298  	// result: (SUBconst [c] x)
 13299  	for {
 13300  		_ = v.Args[1]
 13301  		x := v.Args[0]
 13302  		v_1 := v.Args[1]
 13303  		if v_1.Op != OpARMMOVWconst {
 13304  			break
 13305  		}
 13306  		c := v_1.AuxInt
 13307  		v.reset(OpARMSUBconst)
 13308  		v.AuxInt = c
 13309  		v.AddArg(x)
 13310  		return true
 13311  	}
 13312  	// match: (SUB x (SLLconst [c] y))
 13313  	// result: (SUBshiftLL x y [c])
 13314  	for {
 13315  		_ = v.Args[1]
 13316  		x := v.Args[0]
 13317  		v_1 := v.Args[1]
 13318  		if v_1.Op != OpARMSLLconst {
 13319  			break
 13320  		}
 13321  		c := v_1.AuxInt
 13322  		y := v_1.Args[0]
 13323  		v.reset(OpARMSUBshiftLL)
 13324  		v.AuxInt = c
 13325  		v.AddArg(x)
 13326  		v.AddArg(y)
 13327  		return true
 13328  	}
 13329  	// match: (SUB (SLLconst [c] y) x)
 13330  	// result: (RSBshiftLL x y [c])
 13331  	for {
 13332  		x := v.Args[1]
 13333  		v_0 := v.Args[0]
 13334  		if v_0.Op != OpARMSLLconst {
 13335  			break
 13336  		}
 13337  		c := v_0.AuxInt
 13338  		y := v_0.Args[0]
 13339  		v.reset(OpARMRSBshiftLL)
 13340  		v.AuxInt = c
 13341  		v.AddArg(x)
 13342  		v.AddArg(y)
 13343  		return true
 13344  	}
 13345  	// match: (SUB x (SRLconst [c] y))
 13346  	// result: (SUBshiftRL x y [c])
 13347  	for {
 13348  		_ = v.Args[1]
 13349  		x := v.Args[0]
 13350  		v_1 := v.Args[1]
 13351  		if v_1.Op != OpARMSRLconst {
 13352  			break
 13353  		}
 13354  		c := v_1.AuxInt
 13355  		y := v_1.Args[0]
 13356  		v.reset(OpARMSUBshiftRL)
 13357  		v.AuxInt = c
 13358  		v.AddArg(x)
 13359  		v.AddArg(y)
 13360  		return true
 13361  	}
 13362  	// match: (SUB (SRLconst [c] y) x)
 13363  	// result: (RSBshiftRL x y [c])
 13364  	for {
 13365  		x := v.Args[1]
 13366  		v_0 := v.Args[0]
 13367  		if v_0.Op != OpARMSRLconst {
 13368  			break
 13369  		}
 13370  		c := v_0.AuxInt
 13371  		y := v_0.Args[0]
 13372  		v.reset(OpARMRSBshiftRL)
 13373  		v.AuxInt = c
 13374  		v.AddArg(x)
 13375  		v.AddArg(y)
 13376  		return true
 13377  	}
 13378  	// match: (SUB x (SRAconst [c] y))
 13379  	// result: (SUBshiftRA x y [c])
 13380  	for {
 13381  		_ = v.Args[1]
 13382  		x := v.Args[0]
 13383  		v_1 := v.Args[1]
 13384  		if v_1.Op != OpARMSRAconst {
 13385  			break
 13386  		}
 13387  		c := v_1.AuxInt
 13388  		y := v_1.Args[0]
 13389  		v.reset(OpARMSUBshiftRA)
 13390  		v.AuxInt = c
 13391  		v.AddArg(x)
 13392  		v.AddArg(y)
 13393  		return true
 13394  	}
 13395  	// match: (SUB (SRAconst [c] y) x)
 13396  	// result: (RSBshiftRA x y [c])
 13397  	for {
 13398  		x := v.Args[1]
 13399  		v_0 := v.Args[0]
 13400  		if v_0.Op != OpARMSRAconst {
 13401  			break
 13402  		}
 13403  		c := v_0.AuxInt
 13404  		y := v_0.Args[0]
 13405  		v.reset(OpARMRSBshiftRA)
 13406  		v.AuxInt = c
 13407  		v.AddArg(x)
 13408  		v.AddArg(y)
 13409  		return true
 13410  	}
 13411  	// match: (SUB x (SLL y z))
 13412  	// result: (SUBshiftLLreg x y z)
 13413  	for {
 13414  		_ = v.Args[1]
 13415  		x := v.Args[0]
 13416  		v_1 := v.Args[1]
 13417  		if v_1.Op != OpARMSLL {
 13418  			break
 13419  		}
 13420  		z := v_1.Args[1]
 13421  		y := v_1.Args[0]
 13422  		v.reset(OpARMSUBshiftLLreg)
 13423  		v.AddArg(x)
 13424  		v.AddArg(y)
 13425  		v.AddArg(z)
 13426  		return true
 13427  	}
 13428  	// match: (SUB (SLL y z) x)
 13429  	// result: (RSBshiftLLreg x y z)
 13430  	for {
 13431  		x := v.Args[1]
 13432  		v_0 := v.Args[0]
 13433  		if v_0.Op != OpARMSLL {
 13434  			break
 13435  		}
 13436  		z := v_0.Args[1]
 13437  		y := v_0.Args[0]
 13438  		v.reset(OpARMRSBshiftLLreg)
 13439  		v.AddArg(x)
 13440  		v.AddArg(y)
 13441  		v.AddArg(z)
 13442  		return true
 13443  	}
 13444  	return false
 13445  }
 13446  func rewriteValueARM_OpARMSUB_10(v *Value) bool {
 13447  	// match: (SUB x (SRL y z))
 13448  	// result: (SUBshiftRLreg x y z)
 13449  	for {
 13450  		_ = v.Args[1]
 13451  		x := v.Args[0]
 13452  		v_1 := v.Args[1]
 13453  		if v_1.Op != OpARMSRL {
 13454  			break
 13455  		}
 13456  		z := v_1.Args[1]
 13457  		y := v_1.Args[0]
 13458  		v.reset(OpARMSUBshiftRLreg)
 13459  		v.AddArg(x)
 13460  		v.AddArg(y)
 13461  		v.AddArg(z)
 13462  		return true
 13463  	}
 13464  	// match: (SUB (SRL y z) x)
 13465  	// result: (RSBshiftRLreg x y z)
 13466  	for {
 13467  		x := v.Args[1]
 13468  		v_0 := v.Args[0]
 13469  		if v_0.Op != OpARMSRL {
 13470  			break
 13471  		}
 13472  		z := v_0.Args[1]
 13473  		y := v_0.Args[0]
 13474  		v.reset(OpARMRSBshiftRLreg)
 13475  		v.AddArg(x)
 13476  		v.AddArg(y)
 13477  		v.AddArg(z)
 13478  		return true
 13479  	}
 13480  	// match: (SUB x (SRA y z))
 13481  	// result: (SUBshiftRAreg x y z)
 13482  	for {
 13483  		_ = v.Args[1]
 13484  		x := v.Args[0]
 13485  		v_1 := v.Args[1]
 13486  		if v_1.Op != OpARMSRA {
 13487  			break
 13488  		}
 13489  		z := v_1.Args[1]
 13490  		y := v_1.Args[0]
 13491  		v.reset(OpARMSUBshiftRAreg)
 13492  		v.AddArg(x)
 13493  		v.AddArg(y)
 13494  		v.AddArg(z)
 13495  		return true
 13496  	}
 13497  	// match: (SUB (SRA y z) x)
 13498  	// result: (RSBshiftRAreg x y z)
 13499  	for {
 13500  		x := v.Args[1]
 13501  		v_0 := v.Args[0]
 13502  		if v_0.Op != OpARMSRA {
 13503  			break
 13504  		}
 13505  		z := v_0.Args[1]
 13506  		y := v_0.Args[0]
 13507  		v.reset(OpARMRSBshiftRAreg)
 13508  		v.AddArg(x)
 13509  		v.AddArg(y)
 13510  		v.AddArg(z)
 13511  		return true
 13512  	}
 13513  	// match: (SUB x x)
 13514  	// result: (MOVWconst [0])
 13515  	for {
 13516  		x := v.Args[1]
 13517  		if x != v.Args[0] {
 13518  			break
 13519  		}
 13520  		v.reset(OpARMMOVWconst)
 13521  		v.AuxInt = 0
 13522  		return true
 13523  	}
 13524  	// match: (SUB a (MUL x y))
 13525  	// cond: objabi.GOARM == 7
 13526  	// result: (MULS x y a)
 13527  	for {
 13528  		_ = v.Args[1]
 13529  		a := v.Args[0]
 13530  		v_1 := v.Args[1]
 13531  		if v_1.Op != OpARMMUL {
 13532  			break
 13533  		}
 13534  		y := v_1.Args[1]
 13535  		x := v_1.Args[0]
 13536  		if !(objabi.GOARM == 7) {
 13537  			break
 13538  		}
 13539  		v.reset(OpARMMULS)
 13540  		v.AddArg(x)
 13541  		v.AddArg(y)
 13542  		v.AddArg(a)
 13543  		return true
 13544  	}
 13545  	return false
 13546  }
 13547  func rewriteValueARM_OpARMSUBD_0(v *Value) bool {
 13548  	// match: (SUBD a (MULD x y))
 13549  	// cond: a.Uses == 1 && objabi.GOARM >= 6
 13550  	// result: (MULSD a x y)
 13551  	for {
 13552  		_ = v.Args[1]
 13553  		a := v.Args[0]
 13554  		v_1 := v.Args[1]
 13555  		if v_1.Op != OpARMMULD {
 13556  			break
 13557  		}
 13558  		y := v_1.Args[1]