(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
s390/
htm-builtins-z13-1.c
       1  /* Verify if VRs are saved and restored.  */
       2  
       3  /* { dg-do run } */
       4  /* { dg-require-effective-target s390_vx } */
       5  /* { dg-options "-O3 -march=z13 -mzarch" } */
       6  
       7  typedef int __attribute__((vector_size(16))) v4si;
       8  
       9  v4si __attribute__((noinline))
      10  foo (v4si a)
      11  {
      12    a += (v4si){ 1, 1, 1, 1 };
      13    if (__builtin_tbegin (0) == 0)
      14      {
      15        a += (v4si){ 1, 1, 1, 1 };
      16        __builtin_tabort (256);
      17        __builtin_tend ();
      18      }
      19    else
      20      a -= (v4si){ 1, 1, 1, 1 };
      21  
      22    return a;
      23  }
      24  
      25  int
      26  main ()
      27  {
      28    v4si a = (v4si){ 0, 0, 0, 0 };
      29  
      30    a = foo (a);
      31  
      32    if (a[0] != 0)
      33      __builtin_abort ();
      34  }