1  /* { dg-do compile } */
       2  /* { dg-options "-O2" } */
       3  
       4  typedef char v8qi __attribute__ ((vector_size (8)));
       5  typedef char v16qi __attribute__ ((vector_size (16)));
       6  typedef short v4hi __attribute__ ((vector_size (8)));
       7  typedef short v8hi __attribute__ ((vector_size (16)));
       8  typedef int v2si __attribute__ ((vector_size (8)));
       9  typedef int v4si __attribute__ ((vector_size (16)));
      10  typedef long long v2di __attribute__ ((vector_size (16)));
      11  
      12  typedef __fp16 v4hf __attribute__ ((vector_size (8)));
      13  typedef __fp16 v8hf __attribute__ ((vector_size (16)));
      14  typedef float v2sf __attribute__ ((vector_size (8)));
      15  typedef float v4sf __attribute__ ((vector_size (16)));
      16  typedef double v2df __attribute__ ((vector_size (16)));
      17  
      18  #define FUNC2(T, IT)    \
      19  T                       \
      20  foo_##T (IT *a, IT *b)  \
      21  {                       \
      22    T res = { *a, *b };   \
      23    return res;           \
      24  }
      25  
      26  FUNC2(v2di, long long)
      27  FUNC2(v2si, int)
      28  FUNC2(v2df, double)
      29  FUNC2(v2sf, float)
      30  
      31  #define FUNC4(T, IT)    \
      32  T                       \
      33  foo_##T (IT *a, IT *b, IT *c, IT *d)    \
      34  {                                       \
      35    T res = { *a, *b, *c, *d };           \
      36    return res;                           \
      37  }
      38  
      39  FUNC4(v4si, int)
      40  FUNC4(v4hi, short)
      41  FUNC4(v4sf, float)
      42  FUNC4(v4hf, __fp16)
      43  
      44  #define FUNC8(T, IT)    \
      45  T                       \
      46  foo_##T (IT *a, IT *b, IT *c, IT *d, IT *e, IT *f, IT *g, IT *h)        \
      47  {                                                                       \
      48    T res = { *a, *b, *c, *d, *e, *f, *g, *h };                           \
      49    return res;                                                           \
      50  }
      51  
      52  FUNC8(v8hi, short)
      53  FUNC8(v8qi, char)
      54  FUNC8(v8hf, __fp16)
      55  
      56  
      57  v16qi
      58  foo_v16qi (char *a, char *a1, char *a2, char *a3, char *a4, char *a5,
      59       char *a6, char *a7, char *a8, char *a9, char *a10, char *a11, char *a12,
      60       char *a13, char *a14, char *a15)
      61  {
      62    v16qi res = { *a, *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8, *a9, *a10,
      63                 *a11, *a12, *a13, *a14, *a15 };
      64    return res;
      65  }
      66  
      67  /* { dg-final { scan-assembler-not "ld1r\t" } } */
      68  /* { dg-final { scan-assembler-not "dup\t" } } */
      69  /* { dg-final { scan-assembler-not "ins\t" } } */