(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
sve2/
acle/
general/
match_3.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2" } */
       3  
       4  #include <arm_sve.h>
       5  
       6  void
       7  test1 (svbool_t pg, svint16_t x, svint16_t y, int *any, svbool_t *ptr)
       8  {
       9    svbool_t res = svmatch (pg, x, y);
      10    *any = svptest_any (pg, res);
      11    *ptr = res;
      12  }
      13  
      14  int
      15  test2 (svbool_t pg, svint16_t x, svint16_t y, int *any)
      16  {
      17    svbool_t res = svmatch (pg, x, y);
      18    return svptest_any (pg, res);
      19  }
      20  
      21  /* These four are always false, but we don't realize that yet.  */
      22  
      23  void
      24  test3 (svbool_t pg, svint16_t x, svint16_t y, int *any, svbool_t *ptr)
      25  {
      26    svbool_t res = svmatch (svptrue_b8 (), x, y);
      27    *any = svptest_last (svptrue_b8 (), res);
      28    *ptr = res;
      29  }
      30  
      31  int
      32  test4 (svbool_t pg, svint16_t x, svint16_t y, int *any)
      33  {
      34    svbool_t res = svmatch (svptrue_b8 (), x, y);
      35    return svptest_last (svptrue_b8 (), res);
      36  }
      37  
      38  void
      39  test5 (svbool_t pg, svint16_t x, svint16_t y, int *any, svbool_t *ptr)
      40  {
      41    svbool_t res = svmatch (svptrue_b16 (), x, y);
      42    *any = svptest_last (svptrue_b8 (), res);
      43    *ptr = res;
      44  }
      45  
      46  int
      47  test6 (svbool_t pg, svint16_t x, svint16_t y, int *any)
      48  {
      49    svbool_t res = svmatch (svptrue_b16 (), x, y);
      50    return svptest_last (svptrue_b8 (), res);
      51  }
      52  
      53  /* { dg-final { scan-assembler-times {\tmatch\t} 6 } } */
      54  /* { dg-final { scan-assembler-times {\tptest\t} 6 } } */