1 /* { dg-require-effective-target vect_int } */
8 unsigned char uX[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
9 unsigned short uresult[N];
10 signed char X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
13 /* Unsigned type promotion (qi->hi) */
14 __attribute__ ((noinline)) int
18 for (i=0; i<len; i++) {
19 uresult[i] = (unsigned short)uX[i];
23 /* Signed type promotion (qi->hi) */
24 __attribute__ ((noinline)) int
28 for (i=0; i<len; i++) {
29 result[i] = (short)X[i];
47 if (uresult[i] != (unsigned short)uX[i])
54 if (result[i] != (short)X[i])
61 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
62 /* { dg-final { cleanup-tree-dump "vect" } } */