(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
sve/
acle/
general/
ptrue_pat_5.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2" } */
       3  
       4  #include <arm_sve.h>
       5  
       6  void
       7  b8_b16_1 (int *any, svbool_t *ptr)
       8  {
       9    svbool_t res = svptrue_pat_b8 (SV_VL64);
      10    *any = svptest_any (svptrue_b16 (), res);
      11    *ptr = res;
      12  }
      13  
      14  int
      15  b8_b16_2 ()
      16  {
      17    svbool_t res = svptrue_pat_b8 (SV_VL64);
      18    return svptest_any (svptrue_b16 (), res);
      19  }
      20  
      21  void
      22  b8_b32_1 (int *any, svbool_t *ptr)
      23  {
      24    svbool_t res = svptrue_pat_b8 (SV_VL32);
      25    *any = svptest_any (svptrue_b32 (), res);
      26    *ptr = res;
      27  }
      28  
      29  int
      30  b8_b32_2 ()
      31  {
      32    svbool_t res = svptrue_pat_b8 (SV_VL32);
      33    return svptest_any (svptrue_b32 (), res);
      34  }
      35  
      36  void
      37  b8_b64_1 (int *any, svbool_t *ptr)
      38  {
      39    svbool_t res = svptrue_pat_b8 (SV_VL128);
      40    *any = svptest_any (svptrue_b64 (), res);
      41    *ptr = res;
      42  }
      43  
      44  int
      45  b8_b64_2 ()
      46  {
      47    svbool_t res = svptrue_pat_b8 (SV_VL128);
      48    return svptest_any (svptrue_b64 (), res);
      49  }
      50  
      51  void
      52  b16_b8_1 (int *any, svbool_t *ptr)
      53  {
      54    svbool_t res = svptrue_pat_b16 (SV_VL32);
      55    *any = svptest_any (svptrue_b8 (), res);
      56    *ptr = res;
      57  }
      58  
      59  int
      60  b16_b8_2 ()
      61  {
      62    svbool_t res = svptrue_pat_b16 (SV_VL32);
      63    return svptest_any (svptrue_b8 (), res);
      64  }
      65  
      66  void
      67  b16_b32_1 (int *any, svbool_t *ptr)
      68  {
      69    svbool_t res = svptrue_pat_b16 (SV_VL16);
      70    *any = svptest_any (svptrue_b32 (), res);
      71    *ptr = res;
      72  }
      73  
      74  int
      75  b16_b32_2 ()
      76  {
      77    svbool_t res = svptrue_pat_b16 (SV_VL16);
      78    return svptest_any (svptrue_b32 (), res);
      79  }
      80  
      81  void
      82  b16_b64_1 (int *any, svbool_t *ptr)
      83  {
      84    svbool_t res = svptrue_pat_b16 (SV_VL64);
      85    *any = svptest_any (svptrue_b64 (), res);
      86    *ptr = res;
      87  }
      88  
      89  int
      90  b16_b64_2 ()
      91  {
      92    svbool_t res = svptrue_pat_b16 (SV_VL64);
      93    return svptest_any (svptrue_b64 (), res);
      94  }
      95  
      96  void
      97  b32_b8_1 (int *any, svbool_t *ptr)
      98  {
      99    svbool_t res = svptrue_pat_b32 (SV_VL16);
     100    *any = svptest_any (svptrue_b8 (), res);
     101    *ptr = res;
     102  }
     103  
     104  int
     105  b32_b8_2 ()
     106  {
     107    svbool_t res = svptrue_pat_b32 (SV_VL16);
     108    return svptest_any (svptrue_b8 (), res);
     109  }
     110  
     111  void
     112  b32_b16_1 (int *any, svbool_t *ptr)
     113  {
     114    svbool_t res = svptrue_pat_b32 (SV_VL6);
     115    *any = svptest_any (svptrue_b16 (), res);
     116    *ptr = res;
     117  }
     118  
     119  int
     120  b32_b16_2 ()
     121  {
     122    svbool_t res = svptrue_pat_b32 (SV_VL6);
     123    return svptest_any (svptrue_b16 (), res);
     124  }
     125  
     126  void
     127  b32_b64_1 (int *any, svbool_t *ptr)
     128  {
     129    svbool_t res = svptrue_pat_b32 (SV_VL32);
     130    *any = svptest_any (svptrue_b64 (), res);
     131    *ptr = res;
     132  }
     133  
     134  int
     135  b32_b64_2 ()
     136  {
     137    svbool_t res = svptrue_pat_b32 (SV_VL32);
     138    return svptest_any (svptrue_b64 (), res);
     139  }
     140  
     141  void
     142  b64_b8_1 (int *any, svbool_t *ptr)
     143  {
     144    svbool_t res = svptrue_pat_b64 (SV_VL7);
     145    *any = svptest_any (svptrue_b8 (), res);
     146    *ptr = res;
     147  }
     148  
     149  int
     150  b64_b8_2 ()
     151  {
     152    svbool_t res = svptrue_pat_b64 (SV_VL7);
     153    return svptest_any (svptrue_b8 (), res);
     154  }
     155  
     156  void
     157  b64_b16_1 (int *any, svbool_t *ptr)
     158  {
     159    svbool_t res = svptrue_pat_b64 (SV_VL16);
     160    *any = svptest_any (svptrue_b16 (), res);
     161    *ptr = res;
     162  }
     163  
     164  int
     165  b64_b16_2 ()
     166  {
     167    svbool_t res = svptrue_pat_b64 (SV_VL16);
     168    return svptest_any (svptrue_b16 (), res);
     169  }
     170  
     171  void
     172  b64_b32_1 (int *any, svbool_t *ptr)
     173  {
     174    svbool_t res = svptrue_pat_b64 (SV_VL32);
     175    *any = svptest_any (svptrue_b32 (), res);
     176    *ptr = res;
     177  }
     178  
     179  int
     180  b64_b32_2 ()
     181  {
     182    svbool_t res = svptrue_pat_b64 (SV_VL32);
     183    return svptest_any (svptrue_b32 (), res);
     184  }
     185  
     186  /* { dg-final { scan-assembler-not {\tptrues\n} } } */
     187  /* { dg-final { scan-assembler-times {\tptrue\t} 48 } } */
     188  /* { dg-final { scan-assembler-times {\tptest\t} 24 } } */