| 1 |
/* PR target/111023 */ |
| 2 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 3 |
/* { dg-options "-O2 -mtune=icelake-server -ftree-vectorize -msse2 -mno-sse4.1" } */ |
| 4 |
|
| 5 |
typedef unsigned char v8qi __attribute__((vector_size (8))); |
| 6 |
typedef unsigned short v4hi __attribute__((vector_size (8))); |
| 7 |
typedef unsigned int v2si __attribute__((vector_size (8))); |
| 8 |
|
| 9 |
void |
| 10 |
v4hi_v4qi (v4hi *dst, v8qi src) |
| 11 |
{ |
| 12 |
unsigned short tem[4]; |
| 13 |
tem[0] = src[0]; |
| 14 |
tem[1] = src[1]; |
| 15 |
tem[2] = src[2]; |
| 16 |
tem[3] = src[3]; |
| 17 |
dst[0] = *(v4hi *) tem; |
| 18 |
} |
| 19 |
|
| 20 |
/* { dg-final { scan-assembler "punpcklbw" } } */ |
| 21 |
|
| 22 |
void |
| 23 |
v2si_v2hi (v2si *dst, v4hi src) |
| 24 |
{ |
| 25 |
unsigned int tem[2]; |
| 26 |
tem[0] = src[0]; |
| 27 |
tem[1] = src[1]; |
| 28 |
dst[0] = *(v2si *) tem; |
| 29 |
} |
| 30 |
|
| 31 |
/* { dg-final { scan-assembler "punpcklwd" } } */ |