1  /* Check that the vec_init expander does its job.  */
       2  
       3  /* { dg-do compile } */
       4  /* { dg-options "-O3 -mzarch -march=z13" } */
       5  /* { dg-require-effective-target int128 } */
       6  
       7  
       8  
       9  
      10  typedef __attribute__((vector_size(16))) double v2df;
      11  typedef __attribute__((vector_size(16))) long long v2di;
      12  
      13  typedef __attribute__((vector_size(16))) long double v1tf;
      14  typedef __attribute__((vector_size(16))) __int128 v1ti;
      15  
      16  v1tf gld;
      17  
      18  v1tf
      19  f (long double a)
      20  {
      21    return (v1tf){ a };
      22  }
      23  
      24  v1ti
      25  g (__int128 a)
      26  {
      27    return (v1ti){ a };
      28  }
      29  /* { dg-final { scan-assembler-times "vl\t" 2 } } */
      30  
      31  v1tf
      32  h ()
      33  {
      34    long double a;
      35    asm volatile ("" : "=f" (a));
      36    return (v1tf){ a };
      37  }
      38  
      39  /* { dg-final { scan-assembler-times "vmrhg\t" 1 } } */
      40  
      41  v1ti
      42  i ()
      43  {
      44    __int128 a;
      45    asm volatile ("" : "=d" (a));
      46    return (v1ti){ a };
      47  }
      48  /* { dg-final { scan-assembler-times "vlvgp\t" 1 } } */