| 1 |
/* PR target/99195. */ |
| 2 |
/* Check that we take advantage of 64-bit Advanced SIMD operations clearing |
| 3 |
the top half of the vector register and no explicit zeroing instructions |
| 4 |
are emitted. */ |
| 5 |
/* { dg-do compile } */ |
| 6 |
/* { dg-options "-O" } */ |
| 7 |
|
| 8 |
#include <arm_neon.h> |
| 9 |
|
| 10 |
#define MYOP(OT,IT1,OP,S,OS) \ |
| 11 |
OT \ |
| 12 |
foo_##OP##_##S##OS (IT1 a) \ |
| 13 |
{ \ |
| 14 |
IT1 zeros = vcreate_##S##OS (0); \ |
| 15 |
return vcombine_##S##OS (v##OP##_##S##OS (a, 3), zeros); \ |
| 16 |
} \ |
| 17 |
OT \ |
| 18 |
foo_##OP##_##S##OS##_s (IT1 a) \ |
| 19 |
{ \ |
| 20 |
IT1 zeros = vcreate_##S##OS (0); \ |
| 21 |
return vcombine_##S##OS (v##OP##_##S##OS (a, OS - 1), zeros); \ |
| 22 |
} |
| 23 |
|
| 24 |
MYOP (int8x16_t, int8x8_t, shr_n, s, 8) |
| 25 |
MYOP (int16x8_t, int16x4_t, shr_n, s, 16) |
| 26 |
MYOP (int32x4_t, int32x2_t, shr_n, s, 32) |
| 27 |
MYOP (uint8x16_t, uint8x8_t, shr_n, u, 8) |
| 28 |
MYOP (uint16x8_t, uint16x4_t, shr_n, u, 16) |
| 29 |
MYOP (uint32x4_t, uint32x2_t, shr_n, u, 32) |
| 30 |
MYOP (int8x16_t, int8x8_t, shl_n, s, 8) |
| 31 |
MYOP (int16x8_t, int16x4_t, shl_n, s, 16) |
| 32 |
MYOP (int32x4_t, int32x2_t, shl_n, s, 32) |
| 33 |
MYOP (uint8x16_t, uint8x8_t, shl_n, u, 8) |
| 34 |
MYOP (uint16x8_t, uint16x4_t, shl_n, u, 16) |
| 35 |
MYOP (uint32x4_t, uint32x2_t, shl_n, u, 32) |
| 36 |
|
| 37 |
/* { dg-final { scan-assembler-not {\tfmov\t} } } */ |
| 38 |
/* { dg-final { scan-assembler-not {\tmov\t} } } */ |
| 39 |
|