(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
sve/
acle/
asm/
st4_bf16.c
       1  /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" { target { ! ilp32 } } } } */
       2  
       3  #include "test_sve_acle.h"
       4  
       5  /*
       6  ** st4_bf16_base:
       7  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
       8  **	ret
       9  */
      10  TEST_STORE (st4_bf16_base, svbfloat16x4_t, bfloat16_t,
      11  	    svst4_bf16 (p0, x0, z0),
      12  	    svst4 (p0, x0, z0))
      13  
      14  /*
      15  ** st4_bf16_index:
      16  **	st4h	{z0\.h - z3\.h}, p0, \[x0, x1, lsl 1\]
      17  **	ret
      18  */
      19  TEST_STORE (st4_bf16_index, svbfloat16x4_t, bfloat16_t,
      20  	    svst4_bf16 (p0, x0 + x1, z0),
      21  	    svst4 (p0, x0 + x1, z0))
      22  
      23  /* Moving the constant into a register would also be OK.  */
      24  /*
      25  ** st4_bf16_1:
      26  **	incb	x0
      27  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
      28  **	ret
      29  */
      30  TEST_STORE (st4_bf16_1, svbfloat16x4_t, bfloat16_t,
      31  	    svst4_bf16 (p0, x0 + svcnth (), z0),
      32  	    svst4 (p0, x0 + svcnth (), z0))
      33  
      34  /* Moving the constant into a register would also be OK.  */
      35  /*
      36  ** st4_bf16_2:
      37  **	incb	x0, all, mul #2
      38  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
      39  **	ret
      40  */
      41  TEST_STORE (st4_bf16_2, svbfloat16x4_t, bfloat16_t,
      42  	    svst4_bf16 (p0, x0 + svcnth () * 2, z0),
      43  	    svst4 (p0, x0 + svcnth () * 2, z0))
      44  
      45  /* Moving the constant into a register would also be OK.  */
      46  /*
      47  ** st4_bf16_3:
      48  **	incb	x0, all, mul #3
      49  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
      50  **	ret
      51  */
      52  TEST_STORE (st4_bf16_3, svbfloat16x4_t, bfloat16_t,
      53  	    svst4_bf16 (p0, x0 + svcnth () * 3, z0),
      54  	    svst4 (p0, x0 + svcnth () * 3, z0))
      55  
      56  /*
      57  ** st4_bf16_4:
      58  **	st4h	{z0\.h - z3\.h}, p0, \[x0, #4, mul vl\]
      59  **	ret
      60  */
      61  TEST_STORE (st4_bf16_4, svbfloat16x4_t, bfloat16_t,
      62  	    svst4_bf16 (p0, x0 + svcnth () * 4, z0),
      63  	    svst4 (p0, x0 + svcnth () * 4, z0))
      64  
      65  /*
      66  ** st4_bf16_28:
      67  **	st4h	{z0\.h - z3\.h}, p0, \[x0, #28, mul vl\]
      68  **	ret
      69  */
      70  TEST_STORE (st4_bf16_28, svbfloat16x4_t, bfloat16_t,
      71  	    svst4_bf16 (p0, x0 + svcnth () * 28, z0),
      72  	    svst4 (p0, x0 + svcnth () * 28, z0))
      73  
      74  /*
      75  ** st4_bf16_32:
      76  **	[^{]*
      77  **	st4h	{z0\.h - z3\.h}, p0, \[x[0-9]+\]
      78  **	ret
      79  */
      80  TEST_STORE (st4_bf16_32, svbfloat16x4_t, bfloat16_t,
      81  	    svst4_bf16 (p0, x0 + svcnth () * 32, z0),
      82  	    svst4 (p0, x0 + svcnth () * 32, z0))
      83  
      84  /* Moving the constant into a register would also be OK.  */
      85  /*
      86  ** st4_bf16_m1:
      87  **	decb	x0
      88  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
      89  **	ret
      90  */
      91  TEST_STORE (st4_bf16_m1, svbfloat16x4_t, bfloat16_t,
      92  	    svst4_bf16 (p0, x0 - svcnth (), z0),
      93  	    svst4 (p0, x0 - svcnth (), z0))
      94  
      95  /* Moving the constant into a register would also be OK.  */
      96  /*
      97  ** st4_bf16_m2:
      98  **	decb	x0, all, mul #2
      99  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
     100  **	ret
     101  */
     102  TEST_STORE (st4_bf16_m2, svbfloat16x4_t, bfloat16_t,
     103  	    svst4_bf16 (p0, x0 - svcnth () * 2, z0),
     104  	    svst4 (p0, x0 - svcnth () * 2, z0))
     105  
     106  /* Moving the constant into a register would also be OK.  */
     107  /*
     108  ** st4_bf16_m3:
     109  **	decb	x0, all, mul #3
     110  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
     111  **	ret
     112  */
     113  TEST_STORE (st4_bf16_m3, svbfloat16x4_t, bfloat16_t,
     114  	    svst4_bf16 (p0, x0 - svcnth () * 3, z0),
     115  	    svst4 (p0, x0 - svcnth () * 3, z0))
     116  
     117  /*
     118  ** st4_bf16_m4:
     119  **	st4h	{z0\.h - z3\.h}, p0, \[x0, #-4, mul vl\]
     120  **	ret
     121  */
     122  TEST_STORE (st4_bf16_m4, svbfloat16x4_t, bfloat16_t,
     123  	    svst4_bf16 (p0, x0 - svcnth () * 4, z0),
     124  	    svst4 (p0, x0 - svcnth () * 4, z0))
     125  
     126  /*
     127  ** st4_bf16_m32:
     128  **	st4h	{z0\.h - z3\.h}, p0, \[x0, #-32, mul vl\]
     129  **	ret
     130  */
     131  TEST_STORE (st4_bf16_m32, svbfloat16x4_t, bfloat16_t,
     132  	    svst4_bf16 (p0, x0 - svcnth () * 32, z0),
     133  	    svst4 (p0, x0 - svcnth () * 32, z0))
     134  
     135  /*
     136  ** st4_bf16_m36:
     137  **	[^{]*
     138  **	st4h	{z0\.h - z3\.h}, p0, \[x[0-9]+\]
     139  **	ret
     140  */
     141  TEST_STORE (st4_bf16_m36, svbfloat16x4_t, bfloat16_t,
     142  	    svst4_bf16 (p0, x0 - svcnth () * 36, z0),
     143  	    svst4 (p0, x0 - svcnth () * 36, z0))
     144  
     145  /*
     146  ** st4_vnum_bf16_0:
     147  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
     148  **	ret
     149  */
     150  TEST_STORE (st4_vnum_bf16_0, svbfloat16x4_t, bfloat16_t,
     151  	    svst4_vnum_bf16 (p0, x0, 0, z0),
     152  	    svst4_vnum (p0, x0, 0, z0))
     153  
     154  /* Moving the constant into a register would also be OK.  */
     155  /*
     156  ** st4_vnum_bf16_1:
     157  **	incb	x0
     158  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
     159  **	ret
     160  */
     161  TEST_STORE (st4_vnum_bf16_1, svbfloat16x4_t, bfloat16_t,
     162  	    svst4_vnum_bf16 (p0, x0, 1, z0),
     163  	    svst4_vnum (p0, x0, 1, z0))
     164  
     165  /* Moving the constant into a register would also be OK.  */
     166  /*
     167  ** st4_vnum_bf16_2:
     168  **	incb	x0, all, mul #2
     169  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
     170  **	ret
     171  */
     172  TEST_STORE (st4_vnum_bf16_2, svbfloat16x4_t, bfloat16_t,
     173  	    svst4_vnum_bf16 (p0, x0, 2, z0),
     174  	    svst4_vnum (p0, x0, 2, z0))
     175  
     176  /* Moving the constant into a register would also be OK.  */
     177  /*
     178  ** st4_vnum_bf16_3:
     179  **	incb	x0, all, mul #3
     180  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
     181  **	ret
     182  */
     183  TEST_STORE (st4_vnum_bf16_3, svbfloat16x4_t, bfloat16_t,
     184  	    svst4_vnum_bf16 (p0, x0, 3, z0),
     185  	    svst4_vnum (p0, x0, 3, z0))
     186  
     187  /*
     188  ** st4_vnum_bf16_4:
     189  **	st4h	{z0\.h - z3\.h}, p0, \[x0, #4, mul vl\]
     190  **	ret
     191  */
     192  TEST_STORE (st4_vnum_bf16_4, svbfloat16x4_t, bfloat16_t,
     193  	    svst4_vnum_bf16 (p0, x0, 4, z0),
     194  	    svst4_vnum (p0, x0, 4, z0))
     195  
     196  /*
     197  ** st4_vnum_bf16_28:
     198  **	st4h	{z0\.h - z3\.h}, p0, \[x0, #28, mul vl\]
     199  **	ret
     200  */
     201  TEST_STORE (st4_vnum_bf16_28, svbfloat16x4_t, bfloat16_t,
     202  	    svst4_vnum_bf16 (p0, x0, 28, z0),
     203  	    svst4_vnum (p0, x0, 28, z0))
     204  
     205  /*
     206  ** st4_vnum_bf16_32:
     207  **	[^{]*
     208  **	st4h	{z0\.h - z3\.h}, p0, \[x[0-9]+\]
     209  **	ret
     210  */
     211  TEST_STORE (st4_vnum_bf16_32, svbfloat16x4_t, bfloat16_t,
     212  	    svst4_vnum_bf16 (p0, x0, 32, z0),
     213  	    svst4_vnum (p0, x0, 32, z0))
     214  
     215  /* Moving the constant into a register would also be OK.  */
     216  /*
     217  ** st4_vnum_bf16_m1:
     218  **	decb	x0
     219  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
     220  **	ret
     221  */
     222  TEST_STORE (st4_vnum_bf16_m1, svbfloat16x4_t, bfloat16_t,
     223  	    svst4_vnum_bf16 (p0, x0, -1, z0),
     224  	    svst4_vnum (p0, x0, -1, z0))
     225  
     226  /* Moving the constant into a register would also be OK.  */
     227  /*
     228  ** st4_vnum_bf16_m2:
     229  **	decb	x0, all, mul #2
     230  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
     231  **	ret
     232  */
     233  TEST_STORE (st4_vnum_bf16_m2, svbfloat16x4_t, bfloat16_t,
     234  	    svst4_vnum_bf16 (p0, x0, -2, z0),
     235  	    svst4_vnum (p0, x0, -2, z0))
     236  
     237  /* Moving the constant into a register would also be OK.  */
     238  /*
     239  ** st4_vnum_bf16_m3:
     240  **	decb	x0, all, mul #3
     241  **	st4h	{z0\.h - z3\.h}, p0, \[x0\]
     242  **	ret
     243  */
     244  TEST_STORE (st4_vnum_bf16_m3, svbfloat16x4_t, bfloat16_t,
     245  	    svst4_vnum_bf16 (p0, x0, -3, z0),
     246  	    svst4_vnum (p0, x0, -3, z0))
     247  
     248  /*
     249  ** st4_vnum_bf16_m4:
     250  **	st4h	{z0\.h - z3\.h}, p0, \[x0, #-4, mul vl\]
     251  **	ret
     252  */
     253  TEST_STORE (st4_vnum_bf16_m4, svbfloat16x4_t, bfloat16_t,
     254  	    svst4_vnum_bf16 (p0, x0, -4, z0),
     255  	    svst4_vnum (p0, x0, -4, z0))
     256  
     257  /*
     258  ** st4_vnum_bf16_m32:
     259  **	st4h	{z0\.h - z3\.h}, p0, \[x0, #-32, mul vl\]
     260  **	ret
     261  */
     262  TEST_STORE (st4_vnum_bf16_m32, svbfloat16x4_t, bfloat16_t,
     263  	    svst4_vnum_bf16 (p0, x0, -32, z0),
     264  	    svst4_vnum (p0, x0, -32, z0))
     265  
     266  /*
     267  ** st4_vnum_bf16_m36:
     268  **	[^{]*
     269  **	st4h	{z0\.h - z3\.h}, p0, \[x[0-9]+\]
     270  **	ret
     271  */
     272  TEST_STORE (st4_vnum_bf16_m36, svbfloat16x4_t, bfloat16_t,
     273  	    svst4_vnum_bf16 (p0, x0, -36, z0),
     274  	    svst4_vnum (p0, x0, -36, z0))
     275  
     276  /* Using MUL to calculate an index would also be OK.  */
     277  /*
     278  ** st4_vnum_bf16_x1:
     279  **	cntb	(x[0-9]+)
     280  **	madd	(x[0-9]+), (x1, \1|\1, x1), x0
     281  **	st4h	{z0\.h - z3\.h}, p0, \[\2\]
     282  **	ret
     283  */
     284  TEST_STORE (st4_vnum_bf16_x1, svbfloat16x4_t, bfloat16_t,
     285  	    svst4_vnum_bf16 (p0, x0, x1, z0),
     286  	    svst4_vnum (p0, x0, x1, z0))