| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -ftree-vectorize" } */ |
| 3 |
|
| 4 |
void |
| 5 |
f (short *restrict s, signed char *restrict c) |
| 6 |
{ |
| 7 |
for (int i = 0; i < 8; i += 2) |
| 8 |
{ |
| 9 |
s[i] = c[i]; |
| 10 |
s[i + 1] = c[i]; |
| 11 |
} |
| 12 |
} |
| 13 |
|
| 14 |
/* Ideally this would use LD1SB, but currently we use LD1B and |
| 15 |
sign-extend it after the permute. */ |
| 16 |
/* { dg-final { scan-assembler {\tptrue\tp[0-7]\.h, vl6\n} } } */ |
| 17 |
/* { dg-final { scan-assembler {\tld1s?b\tz[0-9]+\.h} } } */ |
| 18 |
/* { dg-final { scan-assembler {\ttrn1\tz[0-9]+\.h,} } } */ |