| 1 |
/* { dg-do compile { target { aarch64*-*-* } } } */ |
| 2 |
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */ |
| 3 |
|
| 4 |
#include <arm_neon.h> |
| 5 |
|
| 6 |
uint8x16_t foo (uint32x4_t a, uint32x4_t b) |
| 7 |
{ |
| 8 |
uint16x4_t a1 = vrshrn_n_u32 (a, 16); |
| 9 |
uint16x8_t b1 = vrshrn_high_n_u32 (a1, b, 16); |
| 10 |
return vrshrn_high_n_u16 (vrshrn_n_u16 (b1, 8), b1, 8); |
| 11 |
} |
| 12 |
|
| 13 |
/* { dg-final { scan-assembler-times {\tmovi\t} 1 } } */ |
| 14 |
/* { dg-final { scan-assembler-times {\traddhn\t} 2 } } */ |
| 15 |
/* { dg-final { scan-assembler-times {\traddhn2\t} 2 } } */ |