(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
s390/
vector/
vec-sub-1.c
       1  /* { dg-do compile { target { s390*-*-* } } } */
       2  /* { dg-options "-O3 -mzarch -march=z13" } */
       3  
       4  /* { dg-final { scan-assembler-times "vsb" 2 } } */
       5  /* { dg-final { scan-assembler-times "vsh" 2 } } */
       6  /* { dg-final { scan-assembler-times "vsf" 2 } } */
       7  /* { dg-final { scan-assembler-times "vsg" 2 } } */
       8  /* { dg-final { scan-assembler-times "vfs" 1 } } */
       9  
      10  
      11  typedef unsigned char     uv16qi __attribute__((vector_size(16)));
      12  typedef signed char        v16qi __attribute__((vector_size(16)));
      13  typedef unsigned short     uv8hi __attribute__((vector_size(16)));
      14  typedef signed short        v8hi __attribute__((vector_size(16)));
      15  typedef unsigned int       uv4si __attribute__((vector_size(16)));
      16  typedef signed int          v4si __attribute__((vector_size(16)));
      17  typedef unsigned long long uv2di __attribute__((vector_size(16)));
      18  typedef signed long long    v2di __attribute__((vector_size(16)));
      19  typedef double              v2df __attribute__((vector_size(16)));
      20  
      21  uv16qi g_uvqi0, g_uvqi1, g_uvqi2;
      22  v16qi g_vqi0, g_vqi1, g_vqi2;
      23  
      24  uv8hi g_uvhi0, g_uvhi1, g_uvhi2;
      25  v8hi g_vhi0, g_vhi1, g_vhi2;
      26  
      27  uv4si g_uvsi0, g_uvsi1, g_uvsi2;
      28  v4si g_vsi0, g_vsi1, g_vsi2;
      29  
      30  uv2di g_uvdi0, g_uvdi1, g_uvdi2;
      31  v2di g_vdi0, g_vdi1, g_vdi2;
      32  
      33  v2df g_vdf0, g_vdf1, g_vdf2;
      34  
      35  void
      36  sub1 ()
      37  {
      38    g_vqi0 = g_vqi1 - g_vqi2;
      39    g_uvqi0 = g_uvqi1 - g_uvqi2;
      40  
      41    g_vhi0 = g_vhi1 - g_vhi2;
      42    g_uvhi0 = g_uvhi1 - g_uvhi2;
      43  
      44    g_vsi0 = g_vsi1 - g_vsi2;
      45    g_uvsi0 = g_uvsi1 - g_uvsi2;
      46  
      47    g_vdi0 = g_vdi1 - g_vdi2;
      48    g_uvdi0 = g_uvdi1 - g_uvdi2;
      49  
      50    g_vdf0 = g_vdf1 - g_vdf2;
      51  }