| 1 |
/* PR target/92658 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O2 -mtune=icelake-server -ftree-vectorize -msse4.1" } */ |
| 4 |
|
| 5 |
typedef unsigned char v4qi __attribute__((vector_size (4))); |
| 6 |
typedef unsigned short v2hi __attribute__((vector_size (4))); |
| 7 |
|
| 8 |
void |
| 9 |
foo_u8_u16 (v2hi * dst, v4qi * __restrict src) |
| 10 |
{ |
| 11 |
unsigned short tem[2]; |
| 12 |
tem[0] = (*src)[0]; |
| 13 |
tem[1] = (*src)[1]; |
| 14 |
dst[0] = *(v2hi *) tem; |
| 15 |
} |
| 16 |
|
| 17 |
void |
| 18 |
bar_u8_u16 (v2hi * dst, v4qi src) |
| 19 |
{ |
| 20 |
unsigned short tem[4]; |
| 21 |
tem[0] = src[0]; |
| 22 |
tem[1] = src[1]; |
| 23 |
dst[0] = *(v2hi *) tem; |
| 24 |
} |
| 25 |
|
| 26 |
/* { dg-final { scan-assembler-times "pmovzxbw" 2 } } */ |