1  /* { dg-do compile } */
       2  /* { dg-options "-mavx2 -O2 -mno-avx512f" } */
       3  /* { dg-final { scan-assembler-times {(?n)vpcmpeq[bwdq]} 12 } } */
       4  /* { dg-final { scan-assembler-times {(?n)vp?blendv} 12 } } */
       5  
       6  typedef char v32qi __attribute__ ((vector_size (32)));
       7  typedef char v16qi __attribute__ ((vector_size (16)));
       8  
       9  typedef short v16hi __attribute__ ((vector_size (32)));
      10  typedef short v8hi __attribute__ ((vector_size (16)));
      11  
      12  typedef int v8si __attribute__ ((vector_size (32)));
      13  typedef int v4si __attribute__ ((vector_size (16)));
      14  
      15  typedef long long v4di __attribute__ ((vector_size (32)));
      16  typedef long long v2di __attribute__ ((vector_size (16)));
      17  
      18  typedef float v8sf __attribute__ ((vector_size (32)));
      19  typedef float v4sf __attribute__ ((vector_size (16)));
      20  
      21  typedef double v4df __attribute__ ((vector_size (32)));
      22  typedef double v2df __attribute__ ((vector_size (16)));
      23  
      24  #define FOO(VTYPE, TYPE)			\
      25    VTYPE						\
      26    __attribute__ ((noipa))			\
      27    foo_##VTYPE (VTYPE a, TYPE b, unsigned int c)	\
      28    {						\
      29      a[c] = b;					\
      30      return a;					\
      31    }						\
      32  
      33  FOO (v16qi, char);
      34  FOO (v32qi, char);
      35  
      36  FOO (v8hi, short);
      37  FOO (v16hi, short);
      38  
      39  FOO (v4si, int);
      40  FOO (v8si, int);
      41  
      42  FOO (v2di, long long);
      43  FOO (v4di, long long);
      44  
      45  FOO (v4sf, float);
      46  FOO (v8sf, float);
      47  
      48  FOO (v2df, double);
      49  FOO (v4df, double);