1  /* { dg-do compile } */
       2  /* { dg-require-effective-target arm_simd32_ok } */
       3  /* { dg-add-options arm_simd32 } */
       4  
       5  #include <arm_acle.h>
       6  
       7  int16x2_t
       8  test_sxtab16 (int16x2_t a, int8x4_t b)
       9  {
      10    return __sxtab16 (a, b);
      11  }
      12  
      13  /* { dg-final { scan-assembler-times "sxtab16\t...?, ...?, ...?" 1 } } */
      14  
      15  
      16  int16x2_t
      17  test_sxtb16 (int8x4_t a)
      18  {
      19    return __sxtb16 (a);
      20  }
      21  
      22  /* { dg-final { scan-assembler-times "sxtab16\t...?, ...?" 1 } } */
      23  
      24  int8x4_t
      25  test_qadd8 (int8x4_t a, int8x4_t b)
      26  {
      27    return __qadd8 (a, b);
      28  }
      29  
      30  /* { dg-final { scan-assembler-times "\tqadd8\t...?, ...?, ...?" 1 } } */
      31  
      32  int8x4_t
      33  test_qsub8 (int8x4_t a, int8x4_t b)
      34  {
      35    return __qsub8 (a, b);
      36  }
      37  
      38  /* { dg-final { scan-assembler-times "\tqsub8\t...?, ...?, ...?" 1 } } */
      39  
      40  int8x4_t
      41  test_shadd8 (int8x4_t a, int8x4_t b)
      42  {
      43    return __shadd8 (a, b);
      44  }
      45  
      46  /* { dg-final { scan-assembler-times "\tshadd8\t...?, ...?, ...?" 1 } } */
      47  
      48  int8x4_t
      49  test_shsub8 (int8x4_t a, int8x4_t b)
      50  {
      51    return __shsub8 (a, b);
      52  }
      53  
      54  /* { dg-final { scan-assembler-times "\tshsub8\t...?, ...?, ...?" 1 } } */
      55  
      56  uint8x4_t
      57  test_uhadd8 (uint8x4_t a, uint8x4_t b)
      58  {
      59    return __uhadd8 (a, b);
      60  }
      61  
      62  /* { dg-final { scan-assembler-times "\tuhadd8\t...?, ...?, ...?" 1 } } */
      63  
      64  uint8x4_t
      65  test_uhsub8 (uint8x4_t a, uint8x4_t b)
      66  {
      67    return __uhsub8 (a, b);
      68  }
      69  
      70  /* { dg-final { scan-assembler-times "\tuhsub8\t...?, ...?, ...?" 1 } } */
      71  
      72  uint8x4_t
      73  test_uqadd8 (uint8x4_t a, uint8x4_t b)
      74  {
      75    return __uqadd8 (a, b);
      76  }
      77  
      78  /* { dg-final { scan-assembler-times "\tuqadd8\t...?, ...?, ...?" 1 } } */
      79  
      80  uint8x4_t
      81  test_uqsub8 (uint8x4_t a, uint8x4_t b)
      82  {
      83    return __uqsub8 (a, b);
      84  }
      85  
      86  /* { dg-final { scan-assembler-times "\tuqsub8\t...?, ...?, ...?" 1 } } */
      87  
      88  int16x2_t
      89  test_qadd16 (int16x2_t a, int16x2_t b)
      90  {
      91    return __qadd16 (a, b);
      92  }
      93  
      94  /* { dg-final { scan-assembler-times "\tqadd16\t...?, ...?, ...?" 1 } } */
      95  
      96  int16x2_t
      97  test_qasx (int16x2_t a, int16x2_t b)
      98  {
      99    return __qasx (a, b);
     100  }
     101  
     102  /* { dg-final { scan-assembler-times "\tqasx\t...?, ...?, ...?" 1 } } */
     103  
     104  int16x2_t
     105  test_qsax (int16x2_t a, int16x2_t b)
     106  {
     107    return __qsax (a, b);
     108  }
     109  
     110  /* { dg-final { scan-assembler-times "\tqsax\t...?, ...?, ...?" 1 } } */
     111  
     112  int16x2_t
     113  test_qsub16 (int16x2_t a, int16x2_t b)
     114  {
     115    return __qsub16 (a, b);
     116  }
     117  
     118  /* { dg-final { scan-assembler-times "\tqsub16\t...?, ...?, ...?" 1 } } */
     119  
     120  int16x2_t
     121  test_shadd16 (int16x2_t a, int16x2_t b)
     122  {
     123    return __shadd16 (a, b);
     124  }
     125  
     126  /* { dg-final { scan-assembler-times "\tshadd16\t...?, ...?, ...?" 1 } } */
     127  
     128  int16x2_t
     129  test_shasx (int16x2_t a, int16x2_t b)
     130  {
     131    return __shasx (a, b);
     132  }
     133  
     134  /* { dg-final { scan-assembler-times "\tshasx\t...?, ...?, ...?" 1 } } */
     135  
     136  int16x2_t
     137  test_shsax (int16x2_t a, int16x2_t b)
     138  {
     139    return __shsax (a, b);
     140  }
     141  
     142  /* { dg-final { scan-assembler-times "\tshsax\t...?, ...?, ...?" 1 } } */
     143  
     144  int16x2_t
     145  test_shsub16 (int16x2_t a, int16x2_t b)
     146  {
     147    return __shsub16 (a, b);
     148  }
     149  
     150  /* { dg-final { scan-assembler-times "\tshsub16\t...?, ...?, ...?" 1 } } */
     151  
     152  uint16x2_t
     153  test_uhadd16 (uint16x2_t a, uint16x2_t b)
     154  {
     155    return __uhadd16 (a, b);
     156  }
     157  
     158  /* { dg-final { scan-assembler-times "\tuhadd16\t...?, ...?, ...?" 1 } } */
     159  
     160  uint16x2_t
     161  test_uhasx (uint16x2_t a, uint16x2_t b)
     162  {
     163    return __uhasx (a, b);
     164  }
     165  
     166  /* { dg-final { scan-assembler-times "\tuhasx\t...?, ...?, ...?" 1 } } */
     167  
     168  uint16x2_t
     169  test_uhsax (uint16x2_t a, uint16x2_t b)
     170  {
     171    return __uhsax (a, b);
     172  }
     173  
     174  /* { dg-final { scan-assembler-times "\tuhsax\t...?, ...?, ...?" 1 } } */
     175  
     176  uint16x2_t
     177  test_uhsub16 (uint16x2_t a, uint16x2_t b)
     178  {
     179    return __uhsub16 (a, b);
     180  }
     181  
     182  /* { dg-final { scan-assembler-times "\tuhsub16\t...?, ...?, ...?" 1 } } */
     183  
     184  uint16x2_t
     185  test_uqadd16 (uint16x2_t a, uint16x2_t b)
     186  {
     187    return __uqadd16 (a, b);
     188  }
     189  
     190  /* { dg-final { scan-assembler-times "\tuqadd16\t...?, ...?, ...?" 1 } } */
     191  
     192  uint16x2_t
     193  test_uqasx (uint16x2_t a, uint16x2_t b)
     194  {
     195    return __uqasx (a, b);
     196  }
     197  
     198  /* { dg-final { scan-assembler-times "\tuqasx\t...?, ...?, ...?" 1 } } */
     199  
     200  uint16x2_t
     201  test_uqsax (uint16x2_t a, uint16x2_t b)
     202  {
     203    return __uqsax (a, b);
     204  }
     205  
     206  /* { dg-final { scan-assembler-times "\tuqsax\t...?, ...?, ...?" 1 } } */
     207  
     208  uint16x2_t
     209  test_uqsub16 (uint16x2_t a, uint16x2_t b)
     210  {
     211    return __uqsub16 (a, b);
     212  }
     213  
     214  /* { dg-final { scan-assembler-times "\tuqsub16\t...?, ...?, ...?" 1 } } */
     215  
     216  int32_t
     217  test_smusd (int16x2_t a, int16x2_t b)
     218  {
     219    return __smusd (a, b);
     220  }
     221  
     222  /* { dg-final { scan-assembler-times "\tsmusd\t...?, ...?, ...?" 1 } } */
     223  
     224  int32_t
     225  test_smusdx (int16x2_t a, int16x2_t b)
     226  {
     227    return __smusdx (a, b);
     228  }
     229  
     230  /* { dg-final { scan-assembler-times "\tsmusdx\t...?, ...?, ...?" 1 } } */
     231  
     232  uint32_t
     233  test_usad8 (uint8x4_t a, uint8x4_t b)
     234  {
     235    return __usad8 (a, b);
     236  }
     237  
     238  /* { dg-final { scan-assembler-times "\tusad8\t...?, ...?, ...?" 1 } } */
     239  
     240  uint32_t
     241  test_usada8 (uint8x4_t a, uint8x4_t b, uint32_t c)
     242  {
     243    return __usada8 (a, b, c);
     244  }
     245  
     246  /* { dg-final { scan-assembler-times "\tusada8\t...?, ...?, ...?, ...?" 1 } } */
     247  
     248  int64_t
     249  test_smlald (int16x2_t a, int16x2_t b, int64_t c)
     250  {
     251    return __smlald (a, b, c);
     252  }
     253  
     254  /* { dg-final { scan-assembler-times "\tsmlald\t...?, ...?, ...?, ...?" 1 } } */
     255  
     256  int64_t
     257  test_smlaldx (int16x2_t a, int16x2_t b, int64_t c)
     258  {
     259    return __smlaldx (a, b, c);
     260  }
     261  
     262  /* { dg-final { scan-assembler-times "\tsmlaldx\t...?, ...?, ...?, ...?" 1 } } */
     263  
     264  int64_t
     265  test_smlsld (int16x2_t a, int16x2_t b, int64_t c)
     266  {
     267    return __smlsld (a, b, c);
     268  }
     269  
     270  /* { dg-final { scan-assembler-times "\tsmlsld\t...?, ...?, ...?, ...?" 1 } } */
     271  
     272  int64_t
     273  test_smlsldx (int16x2_t a, int16x2_t b, int64_t c)
     274  {
     275    return __smlsldx (a, b, c);
     276  }
     277  
     278  /* { dg-final { scan-assembler-times "\tsmlsldx\t...?, ...?, ...?, ...?" 1 } } */
     279  
     280  int8x4_t
     281  test_sadd8 (int8x4_t a, int8x4_t b)
     282  {
     283    return __sadd8 (a, b);
     284  }
     285  
     286  /* { dg-final { scan-assembler-times "\tsadd8\t...?, ...?, ...?" 1 } } */
     287  
     288  int8x4_t
     289  test_ssub8 (int8x4_t a, int8x4_t b)
     290  {
     291    return __ssub8 (a, b);
     292  }
     293  
     294  /* { dg-final { scan-assembler-times "\tssub8\t...?, ...?, ...?" 1 } } */
     295  
     296  uint8x4_t
     297  test_uadd8 (uint8x4_t a, uint8x4_t b)
     298  {
     299    return __uadd8 (a, b);
     300  }
     301  
     302  /* { dg-final { scan-assembler-times "\tuadd8\t...?, ...?, ...?" 1 } } */
     303  
     304  uint8x4_t
     305  test_usub8 (uint8x4_t a, uint8x4_t b)
     306  {
     307    return __usub8 (a, b);
     308  }
     309  
     310  /* { dg-final { scan-assembler-times "\tusub8\t...?, ...?, ...?" 1 } } */
     311  
     312  int16x2_t
     313  test_sadd16 (int16x2_t a, int16x2_t b)
     314  {
     315    return __sadd16 (a, b);
     316  }
     317  
     318  /* { dg-final { scan-assembler-times "\tsadd8\t...?, ...?, ...?" 1 } } */
     319  
     320  int16x2_t
     321  test_sasx (int16x2_t a, int16x2_t b)
     322  {
     323    return __sasx (a, b);
     324  }
     325  
     326  /* { dg-final { scan-assembler-times "\tsasx\t...?, ...?, ...?" 1 } } */
     327  
     328  int16x2_t
     329  test_ssax (int16x2_t a, int16x2_t b)
     330  {
     331    return __ssax (a, b);
     332  }
     333  
     334  /* { dg-final { scan-assembler-times "\tssax\t...?, ...?, ...?" 1 } } */
     335  
     336  int16x2_t
     337  test_ssub16 (int16x2_t a, int16x2_t b)
     338  {
     339    return __ssub16 (a, b);
     340  }
     341  
     342  /* { dg-final { scan-assembler-times "\tssub16\t...?, ...?, ...?" 1 } } */
     343  
     344  uint16x2_t
     345  test_uadd16 (uint16x2_t a, uint16x2_t b)
     346  {
     347    return __uadd16 (a, b);
     348  }
     349  
     350  /* { dg-final { scan-assembler-times "\tuadd16\t...?, ...?, ...?" 1 } } */
     351  
     352  uint16x2_t
     353  test_uasx (uint16x2_t a, uint16x2_t b)
     354  {
     355    return __uasx (a, b);
     356  }
     357  
     358  /* { dg-final { scan-assembler-times "\tuasx\t...?, ...?, ...?" 1 } } */
     359  
     360  uint16x2_t
     361  test_usax (uint16x2_t a, uint16x2_t b)
     362  {
     363    return __usax (a, b);
     364  }
     365  
     366  /* { dg-final { scan-assembler-times "\tusax\t...?, ...?, ...?" 1 } } */
     367  
     368  uint16x2_t
     369  test_usub16 (uint16x2_t a, uint16x2_t b)
     370  {
     371    return __usub16 (a, b);
     372  }
     373  
     374  /* { dg-final { scan-assembler-times "\tusub16\t...?, ...?, ...?" 1 } } */
     375  
     376  int32_t
     377  test_smlad (int16x2_t a, int16x2_t b, int32_t c)
     378  {
     379    return __smlad (a, b, c);
     380  }
     381  
     382  /* { dg-final { scan-assembler-times "\tsmlad\t...?, ...?, ...?, ...?" 1 } } */
     383  
     384  int32_t
     385  test_smladx (int16x2_t a, int16x2_t b, int32_t c)
     386  {
     387    return __smladx (a, b, c);
     388  }
     389  
     390  /* { dg-final { scan-assembler-times "\tsmladx\t...?, ...?, ...?, ...?" 1 } } */
     391  
     392  int32_t
     393  test_smlsd (int16x2_t a, int16x2_t b, int32_t c)
     394  {
     395    return __smlsd (a, b, c);
     396  }
     397  
     398  /* { dg-final { scan-assembler-times "\tsmlsd\t...?, ...?, ...?, ...?" 1 } } */
     399  
     400  int32_t
     401  test_smlsdx (int16x2_t a, int16x2_t b, int32_t c)
     402  {
     403    return __smlsdx (a, b, c);
     404  }
     405  
     406  /* { dg-final { scan-assembler-times "\tsmlsdx\t...?, ...?, ...?, ...?" 1 } } */
     407  
     408  int32_t
     409  test_smuad (int16x2_t a, int16x2_t b)
     410  {
     411    return __smuad (a, b);
     412  }
     413  
     414  /* { dg-final { scan-assembler-times "\tsmuad\t...?, ...?, ...?" 1 } } */
     415  
     416  int32_t
     417  test_smuadx (int16x2_t a, int16x2_t b)
     418  {
     419    return __smuadx (a, b);
     420  }
     421  
     422  /* { dg-final { scan-assembler-times "\tsmuadx\t...?, ...?, ...?" 1 } } */
     423  
     424  int16x2_t
     425  test_ssat16 (int16x2_t a)
     426  {
     427    return __ssat16 (a, 13);
     428  }
     429  
     430  /* { dg-final { scan-assembler-times "\tssat16\t...?, #13, ...?" 1 } } */
     431  
     432  int16x2_t
     433  test_usat16 (int16x2_t a)
     434  {
     435    return __usat16 (a, 15);
     436  }
     437  
     438  /* { dg-final { scan-assembler-times "\tusat16\t...?, #15, ...?" 1 } } */