1  /* PR target/95905 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O2 -mavx2" } */
       4  /* { dg-final { scan-assembler-times "\tvpmovzxbw\t" 4 } } */
       5  /* { dg-final { scan-assembler-times "\tvpmovzxwd\t" 4 } } */
       6  /* { dg-final { scan-assembler-times "\tvpmovzxdq\t" 4 } } */
       7  
       8  typedef unsigned char V1 __attribute__((vector_size (32)));
       9  typedef unsigned short V2 __attribute__((vector_size (32)));
      10  typedef unsigned int V3 __attribute__((vector_size (32)));
      11  
      12  V1
      13  f1 (V1 x)
      14  {
      15    return __builtin_shuffle (x, (V1) {}, (V1) { 0, 32, 1, 33, 2, 34, 3, 35, 4, 36, 5, 37, 6, 38, 7, 39, 8, 40, 9, 41, 10, 42, 11, 43, 12, 44, 13, 45, 14, 46, 15, 47 });
      16  }
      17  
      18  V2
      19  f2 (V2 x)
      20  {
      21    return __builtin_shuffle (x, (V2) {}, (V2) { 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23 });
      22  }
      23  
      24  V3
      25  f3 (V3 x)
      26  {
      27    return __builtin_shuffle (x, (V3) {}, (V3) { 0, 8, 1, 9, 2, 10, 3, 11 });
      28  }
      29  
      30  V1
      31  f4 (V1 *x)
      32  {
      33    return __builtin_shuffle (*x, (V1) {}, (V1) { 0, 32, 1, 33, 2, 34, 3, 35, 4, 36, 5, 37, 6, 38, 7, 39, 8, 40, 9, 41, 10, 42, 11, 43, 12, 44, 13, 45, 14, 46, 15, 47 });
      34  }
      35  
      36  V2
      37  f5 (V2 *x)
      38  {
      39    return __builtin_shuffle (*x, (V2) {}, (V2) { 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23 });
      40  }
      41  
      42  V3
      43  f6 (V3 *x)
      44  {
      45    return __builtin_shuffle (*x, (V3) {}, (V3) { 0, 8, 1, 9, 2, 10, 3, 11 });
      46  }
      47  
      48  V1
      49  f7 (V1 x)
      50  {
      51    return __builtin_shuffle ((V1) {}, x, (V1) { 32, 0, 33, 1, 34, 2, 35, 3, 36, 4, 37, 5, 38, 6, 39, 7, 40, 8, 41, 9, 42, 10, 43, 11, 44, 12, 45, 13, 46, 14, 47, 15 });
      52  }
      53  
      54  V2
      55  f8 (V2 x)
      56  {
      57    return __builtin_shuffle ((V2) {}, x, (V2) { 16, 0, 17, 1, 18, 2, 19, 3, 20, 4, 21, 5, 22, 6, 23, 7 });
      58  }
      59  
      60  V3
      61  f9 (V3 x)
      62  {
      63    return __builtin_shuffle ((V3) {}, x, (V3) { 8, 0, 9, 1, 10, 2, 11, 3 });
      64  }
      65  
      66  V1
      67  f10 (V1 *x)
      68  {
      69    return __builtin_shuffle ((V1) {}, *x, (V1) { 32, 0, 33, 1, 34, 2, 35, 3, 36, 4, 37, 5, 38, 6, 39, 7, 40, 8, 41, 9, 42, 10, 43, 11, 44, 12, 45, 13, 46, 14, 47, 15 });
      70  }
      71  
      72  V2
      73  f11 (V2 *x)
      74  {
      75    return __builtin_shuffle ((V2) {}, *x, (V2) { 16, 0, 17, 1, 18, 2, 19, 3, 20, 4, 21, 5, 22, 6, 23, 7 });
      76  }
      77  
      78  V3
      79  f12 (V3 *x)
      80  {
      81    return __builtin_shuffle ((V3) {}, *x, (V3) { 8, 0, 9, 1, 10, 2, 11, 3 });
      82  }