1  /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" { target { ! ilp32 } } } } */
       2  
       3  #include "test_sve_acle.h"
       4  
       5  /*
       6  ** ldff1_gather_u64_tied1:
       7  **	ldff1d	z0\.d, p0/z, \[z0\.d\]
       8  **	ret
       9  */
      10  TEST_LOAD_GATHER_ZS (ldff1_gather_u64_tied1, svuint64_t, svuint64_t,
      11  		     z0_res = svldff1_gather_u64base_u64 (p0, z0),
      12  		     z0_res = svldff1_gather_u64 (p0, z0))
      13  
      14  /*
      15  ** ldff1_gather_u64_untied:
      16  **	ldff1d	z0\.d, p0/z, \[z1\.d\]
      17  **	ret
      18  */
      19  TEST_LOAD_GATHER_ZS (ldff1_gather_u64_untied, svuint64_t, svuint64_t,
      20  		     z0_res = svldff1_gather_u64base_u64 (p0, z1),
      21  		     z0_res = svldff1_gather_u64 (p0, z1))
      22  
      23  /*
      24  ** ldff1_gather_x0_u64_offset:
      25  **	ldff1d	z0\.d, p0/z, \[x0, z0\.d\]
      26  **	ret
      27  */
      28  TEST_LOAD_GATHER_ZS (ldff1_gather_x0_u64_offset, svuint64_t, svuint64_t,
      29  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, x0),
      30  		     z0_res = svldff1_gather_offset_u64 (p0, z0, x0))
      31  
      32  /*
      33  ** ldff1_gather_m8_u64_offset:
      34  **	mov	(x[0-9]+), #?-8
      35  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
      36  **	ret
      37  */
      38  TEST_LOAD_GATHER_ZS (ldff1_gather_m8_u64_offset, svuint64_t, svuint64_t,
      39  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, -8),
      40  		     z0_res = svldff1_gather_offset_u64 (p0, z0, -8))
      41  
      42  /*
      43  ** ldff1_gather_0_u64_offset:
      44  **	ldff1d	z0\.d, p0/z, \[z0\.d\]
      45  **	ret
      46  */
      47  TEST_LOAD_GATHER_ZS (ldff1_gather_0_u64_offset, svuint64_t, svuint64_t,
      48  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, 0),
      49  		     z0_res = svldff1_gather_offset_u64 (p0, z0, 0))
      50  
      51  /*
      52  ** ldff1_gather_9_u64_offset:
      53  **	mov	(x[0-9]+), #?9
      54  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
      55  **	ret
      56  */
      57  TEST_LOAD_GATHER_ZS (ldff1_gather_9_u64_offset, svuint64_t, svuint64_t,
      58  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, 9),
      59  		     z0_res = svldff1_gather_offset_u64 (p0, z0, 9))
      60  
      61  /*
      62  ** ldff1_gather_10_u64_offset:
      63  **	mov	(x[0-9]+), #?10
      64  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
      65  **	ret
      66  */
      67  TEST_LOAD_GATHER_ZS (ldff1_gather_10_u64_offset, svuint64_t, svuint64_t,
      68  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, 10),
      69  		     z0_res = svldff1_gather_offset_u64 (p0, z0, 10))
      70  
      71  /*
      72  ** ldff1_gather_11_u64_offset:
      73  **	mov	(x[0-9]+), #?11
      74  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
      75  **	ret
      76  */
      77  TEST_LOAD_GATHER_ZS (ldff1_gather_11_u64_offset, svuint64_t, svuint64_t,
      78  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, 11),
      79  		     z0_res = svldff1_gather_offset_u64 (p0, z0, 11))
      80  
      81  /*
      82  ** ldff1_gather_12_u64_offset:
      83  **	mov	(x[0-9]+), #?12
      84  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
      85  **	ret
      86  */
      87  TEST_LOAD_GATHER_ZS (ldff1_gather_12_u64_offset, svuint64_t, svuint64_t,
      88  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, 12),
      89  		     z0_res = svldff1_gather_offset_u64 (p0, z0, 12))
      90  
      91  /*
      92  ** ldff1_gather_13_u64_offset:
      93  **	mov	(x[0-9]+), #?13
      94  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
      95  **	ret
      96  */
      97  TEST_LOAD_GATHER_ZS (ldff1_gather_13_u64_offset, svuint64_t, svuint64_t,
      98  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, 13),
      99  		     z0_res = svldff1_gather_offset_u64 (p0, z0, 13))
     100  
     101  /*
     102  ** ldff1_gather_14_u64_offset:
     103  **	mov	(x[0-9]+), #?14
     104  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
     105  **	ret
     106  */
     107  TEST_LOAD_GATHER_ZS (ldff1_gather_14_u64_offset, svuint64_t, svuint64_t,
     108  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, 14),
     109  		     z0_res = svldff1_gather_offset_u64 (p0, z0, 14))
     110  
     111  /*
     112  ** ldff1_gather_15_u64_offset:
     113  **	mov	(x[0-9]+), #?15
     114  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
     115  **	ret
     116  */
     117  TEST_LOAD_GATHER_ZS (ldff1_gather_15_u64_offset, svuint64_t, svuint64_t,
     118  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, 15),
     119  		     z0_res = svldff1_gather_offset_u64 (p0, z0, 15))
     120  
     121  /*
     122  ** ldff1_gather_16_u64_offset:
     123  **	ldff1d	z0\.d, p0/z, \[z0\.d, #16\]
     124  **	ret
     125  */
     126  TEST_LOAD_GATHER_ZS (ldff1_gather_16_u64_offset, svuint64_t, svuint64_t,
     127  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, 16),
     128  		     z0_res = svldff1_gather_offset_u64 (p0, z0, 16))
     129  
     130  /*
     131  ** ldff1_gather_248_u64_offset:
     132  **	ldff1d	z0\.d, p0/z, \[z0\.d, #248\]
     133  **	ret
     134  */
     135  TEST_LOAD_GATHER_ZS (ldff1_gather_248_u64_offset, svuint64_t, svuint64_t,
     136  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, 248),
     137  		     z0_res = svldff1_gather_offset_u64 (p0, z0, 248))
     138  
     139  /*
     140  ** ldff1_gather_256_u64_offset:
     141  **	mov	(x[0-9]+), #?256
     142  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
     143  **	ret
     144  */
     145  TEST_LOAD_GATHER_ZS (ldff1_gather_256_u64_offset, svuint64_t, svuint64_t,
     146  		     z0_res = svldff1_gather_u64base_offset_u64 (p0, z0, 256),
     147  		     z0_res = svldff1_gather_offset_u64 (p0, z0, 256))
     148  
     149  /*
     150  ** ldff1_gather_x0_u64_index:
     151  **	lsl	(x[0-9]+), x0, #?3
     152  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
     153  **	ret
     154  */
     155  TEST_LOAD_GATHER_ZS (ldff1_gather_x0_u64_index, svuint64_t, svuint64_t,
     156  		     z0_res = svldff1_gather_u64base_index_u64 (p0, z0, x0),
     157  		     z0_res = svldff1_gather_index_u64 (p0, z0, x0))
     158  
     159  /*
     160  ** ldff1_gather_m1_u64_index:
     161  **	mov	(x[0-9]+), #?-8
     162  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
     163  **	ret
     164  */
     165  TEST_LOAD_GATHER_ZS (ldff1_gather_m1_u64_index, svuint64_t, svuint64_t,
     166  		     z0_res = svldff1_gather_u64base_index_u64 (p0, z0, -1),
     167  		     z0_res = svldff1_gather_index_u64 (p0, z0, -1))
     168  
     169  /*
     170  ** ldff1_gather_0_u64_index:
     171  **	ldff1d	z0\.d, p0/z, \[z0\.d\]
     172  **	ret
     173  */
     174  TEST_LOAD_GATHER_ZS (ldff1_gather_0_u64_index, svuint64_t, svuint64_t,
     175  		     z0_res = svldff1_gather_u64base_index_u64 (p0, z0, 0),
     176  		     z0_res = svldff1_gather_index_u64 (p0, z0, 0))
     177  
     178  /*
     179  ** ldff1_gather_5_u64_index:
     180  **	ldff1d	z0\.d, p0/z, \[z0\.d, #40\]
     181  **	ret
     182  */
     183  TEST_LOAD_GATHER_ZS (ldff1_gather_5_u64_index, svuint64_t, svuint64_t,
     184  		     z0_res = svldff1_gather_u64base_index_u64 (p0, z0, 5),
     185  		     z0_res = svldff1_gather_index_u64 (p0, z0, 5))
     186  
     187  /*
     188  ** ldff1_gather_31_u64_index:
     189  **	ldff1d	z0\.d, p0/z, \[z0\.d, #248\]
     190  **	ret
     191  */
     192  TEST_LOAD_GATHER_ZS (ldff1_gather_31_u64_index, svuint64_t, svuint64_t,
     193  		     z0_res = svldff1_gather_u64base_index_u64 (p0, z0, 31),
     194  		     z0_res = svldff1_gather_index_u64 (p0, z0, 31))
     195  
     196  /*
     197  ** ldff1_gather_32_u64_index:
     198  **	mov	(x[0-9]+), #?256
     199  **	ldff1d	z0\.d, p0/z, \[\1, z0\.d\]
     200  **	ret
     201  */
     202  TEST_LOAD_GATHER_ZS (ldff1_gather_32_u64_index, svuint64_t, svuint64_t,
     203  		     z0_res = svldff1_gather_u64base_index_u64 (p0, z0, 32),
     204  		     z0_res = svldff1_gather_index_u64 (p0, z0, 32))
     205  
     206  /*
     207  ** ldff1_gather_x0_u64_s64offset:
     208  **	ldff1d	z0\.d, p0/z, \[x0, z0\.d\]
     209  **	ret
     210  */
     211  TEST_LOAD_GATHER_SZ (ldff1_gather_x0_u64_s64offset, svuint64_t, uint64_t, svint64_t,
     212  		     z0_res = svldff1_gather_s64offset_u64 (p0, x0, z0),
     213  		     z0_res = svldff1_gather_offset (p0, x0, z0))
     214  
     215  /*
     216  ** ldff1_gather_tied1_u64_s64offset:
     217  **	ldff1d	z0\.d, p0/z, \[x0, z0\.d\]
     218  **	ret
     219  */
     220  TEST_LOAD_GATHER_SZ (ldff1_gather_tied1_u64_s64offset, svuint64_t, uint64_t, svint64_t,
     221  		     z0_res = svldff1_gather_s64offset_u64 (p0, x0, z0),
     222  		     z0_res = svldff1_gather_offset (p0, x0, z0))
     223  
     224  /*
     225  ** ldff1_gather_untied_u64_s64offset:
     226  **	ldff1d	z0\.d, p0/z, \[x0, z1\.d\]
     227  **	ret
     228  */
     229  TEST_LOAD_GATHER_SZ (ldff1_gather_untied_u64_s64offset, svuint64_t, uint64_t, svint64_t,
     230  		     z0_res = svldff1_gather_s64offset_u64 (p0, x0, z1),
     231  		     z0_res = svldff1_gather_offset (p0, x0, z1))
     232  
     233  /*
     234  ** ldff1_gather_ext_u64_s64offset:
     235  **	ldff1d	z0\.d, p0/z, \[x0, z1\.d, sxtw\]
     236  **	ret
     237  */
     238  TEST_LOAD_GATHER_SZ (ldff1_gather_ext_u64_s64offset, svuint64_t, uint64_t, svint64_t,
     239  		     z0_res = svldff1_gather_s64offset_u64 (p0, x0, svextw_s64_x (p0, z1)),
     240  		     z0_res = svldff1_gather_offset (p0, x0, svextw_x (p0, z1)))
     241  
     242  /*
     243  ** ldff1_gather_x0_u64_u64offset:
     244  **	ldff1d	z0\.d, p0/z, \[x0, z0\.d\]
     245  **	ret
     246  */
     247  TEST_LOAD_GATHER_SZ (ldff1_gather_x0_u64_u64offset, svuint64_t, uint64_t, svuint64_t,
     248  		     z0_res = svldff1_gather_u64offset_u64 (p0, x0, z0),
     249  		     z0_res = svldff1_gather_offset (p0, x0, z0))
     250  
     251  /*
     252  ** ldff1_gather_tied1_u64_u64offset:
     253  **	ldff1d	z0\.d, p0/z, \[x0, z0\.d\]
     254  **	ret
     255  */
     256  TEST_LOAD_GATHER_SZ (ldff1_gather_tied1_u64_u64offset, svuint64_t, uint64_t, svuint64_t,
     257  		     z0_res = svldff1_gather_u64offset_u64 (p0, x0, z0),
     258  		     z0_res = svldff1_gather_offset (p0, x0, z0))
     259  
     260  /*
     261  ** ldff1_gather_untied_u64_u64offset:
     262  **	ldff1d	z0\.d, p0/z, \[x0, z1\.d\]
     263  **	ret
     264  */
     265  TEST_LOAD_GATHER_SZ (ldff1_gather_untied_u64_u64offset, svuint64_t, uint64_t, svuint64_t,
     266  		     z0_res = svldff1_gather_u64offset_u64 (p0, x0, z1),
     267  		     z0_res = svldff1_gather_offset (p0, x0, z1))
     268  
     269  /*
     270  ** ldff1_gather_ext_u64_u64offset:
     271  **	ldff1d	z0\.d, p0/z, \[x0, z1\.d, uxtw\]
     272  **	ret
     273  */
     274  TEST_LOAD_GATHER_SZ (ldff1_gather_ext_u64_u64offset, svuint64_t, uint64_t, svuint64_t,
     275  		     z0_res = svldff1_gather_u64offset_u64 (p0, x0, svextw_u64_x (p0, z1)),
     276  		     z0_res = svldff1_gather_offset (p0, x0, svextw_x (p0, z1)))
     277  
     278  /*
     279  ** ldff1_gather_x0_u64_s64index:
     280  **	ldff1d	z0\.d, p0/z, \[x0, z0\.d, lsl 3\]
     281  **	ret
     282  */
     283  TEST_LOAD_GATHER_SZ (ldff1_gather_x0_u64_s64index, svuint64_t, uint64_t, svint64_t,
     284  		     z0_res = svldff1_gather_s64index_u64 (p0, x0, z0),
     285  		     z0_res = svldff1_gather_index (p0, x0, z0))
     286  
     287  /*
     288  ** ldff1_gather_tied1_u64_s64index:
     289  **	ldff1d	z0\.d, p0/z, \[x0, z0\.d, lsl 3\]
     290  **	ret
     291  */
     292  TEST_LOAD_GATHER_SZ (ldff1_gather_tied1_u64_s64index, svuint64_t, uint64_t, svint64_t,
     293  		     z0_res = svldff1_gather_s64index_u64 (p0, x0, z0),
     294  		     z0_res = svldff1_gather_index (p0, x0, z0))
     295  
     296  /*
     297  ** ldff1_gather_untied_u64_s64index:
     298  **	ldff1d	z0\.d, p0/z, \[x0, z1\.d, lsl 3\]
     299  **	ret
     300  */
     301  TEST_LOAD_GATHER_SZ (ldff1_gather_untied_u64_s64index, svuint64_t, uint64_t, svint64_t,
     302  		     z0_res = svldff1_gather_s64index_u64 (p0, x0, z1),
     303  		     z0_res = svldff1_gather_index (p0, x0, z1))
     304  
     305  /*
     306  ** ldff1_gather_ext_u64_s64index:
     307  **	ldff1d	z0\.d, p0/z, \[x0, z1\.d, sxtw 3\]
     308  **	ret
     309  */
     310  TEST_LOAD_GATHER_SZ (ldff1_gather_ext_u64_s64index, svuint64_t, uint64_t, svint64_t,
     311  		     z0_res = svldff1_gather_s64index_u64 (p0, x0, svextw_s64_x (p0, z1)),
     312  		     z0_res = svldff1_gather_index (p0, x0, svextw_x (p0, z1)))
     313  
     314  /*
     315  ** ldff1_gather_x0_u64_u64index:
     316  **	ldff1d	z0\.d, p0/z, \[x0, z0\.d, lsl 3\]
     317  **	ret
     318  */
     319  TEST_LOAD_GATHER_SZ (ldff1_gather_x0_u64_u64index, svuint64_t, uint64_t, svuint64_t,
     320  		     z0_res = svldff1_gather_u64index_u64 (p0, x0, z0),
     321  		     z0_res = svldff1_gather_index (p0, x0, z0))
     322  
     323  /*
     324  ** ldff1_gather_tied1_u64_u64index:
     325  **	ldff1d	z0\.d, p0/z, \[x0, z0\.d, lsl 3\]
     326  **	ret
     327  */
     328  TEST_LOAD_GATHER_SZ (ldff1_gather_tied1_u64_u64index, svuint64_t, uint64_t, svuint64_t,
     329  		     z0_res = svldff1_gather_u64index_u64 (p0, x0, z0),
     330  		     z0_res = svldff1_gather_index (p0, x0, z0))
     331  
     332  /*
     333  ** ldff1_gather_untied_u64_u64index:
     334  **	ldff1d	z0\.d, p0/z, \[x0, z1\.d, lsl 3\]
     335  **	ret
     336  */
     337  TEST_LOAD_GATHER_SZ (ldff1_gather_untied_u64_u64index, svuint64_t, uint64_t, svuint64_t,
     338  		     z0_res = svldff1_gather_u64index_u64 (p0, x0, z1),
     339  		     z0_res = svldff1_gather_index (p0, x0, z1))
     340  
     341  /*
     342  ** ldff1_gather_ext_u64_u64index:
     343  **	ldff1d	z0\.d, p0/z, \[x0, z1\.d, uxtw 3\]
     344  **	ret
     345  */
     346  TEST_LOAD_GATHER_SZ (ldff1_gather_ext_u64_u64index, svuint64_t, uint64_t, svuint64_t,
     347  		     z0_res = svldff1_gather_u64index_u64 (p0, x0, svextw_u64_x (p0, z1)),
     348  		     z0_res = svldff1_gather_index (p0, x0, svextw_x (p0, z1)))