comparison gcc/testsuite/gcc.target/i386/avx512bw-pr94509-2.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
18:1830386684a0 19:2b5abeee2509
1 /* PR target/94509 */
2 /* { dg-do run { target avx512bw } } */
3 /* { dg-options "-O2 -mavx512bw" } */
4
5 #define AVX512BW
6 #include "avx512f-helper.h"
7
8 typedef unsigned char __attribute__ ((__vector_size__ (64))) V;
9
10 __attribute__((noipa)) V
11 foo (V x)
12 {
13 return __builtin_shuffle (x, (V) { 0, 1, 0, 1, 0, 1, 0, 1,
14 0, 1, 0, 1, 0, 1, 0, 1,
15 30, 31, 30, 31, 30, 31, 30, 31,
16 30, 31, 30, 31, 30, 31, 30, 31,
17 0, 1, 0, 1, 0, 1, 0, 1,
18 0, 1, 0, 1, 0, 1, 0, 1,
19 30, 31, 30, 31, 30, 31, 30, 31,
20 30, 31, 30, 31, 30, 31, 30, 31 });
21 }
22
23 static void
24 TEST (void)
25 {
26 V v = foo ((V) { 1, 2, 3, 4, 5, 6, 7, 8,
27 9, 10, 11, 12, 13, 14, 15, 16,
28 17, 18, 19, 20, 21, 22, 23, 24,
29 25, 26, 27, 28, 29, 30, 31, 32,
30 33, 34, 35, 36, 37, 38, 39, 40,
31 41, 42, 43, 44, 45, 46, 47, 48,
32 49, 50, 51, 52, 53, 54, 55, 56,
33 57, 58, 59, 60, 61, 62, 63, 64 });
34 unsigned int i;
35 for (i = 0; i < sizeof (v) / sizeof (v[0]); i++)
36 if (v[i] != ((i & 16) ? 31 : 1) + (i & 1))
37 abort ();
38 }