gcc/testsuite/gcc.target/aarch64/sve/acle/general/deref_2.c
raw| 1 | /* { dg-options "-O2" } */ |
| 2 | |
| 3 | #include <arm_sve.h> |
| 4 | #include <string.h> |
| 5 | |
| 6 | inline void |
| 7 | copy (void *dst, svbool_t src) |
| 8 | { |
| 9 | memcpy (dst, &src, svcntd ()); |
| 10 | } |
| 11 | |
| 12 | uint64_t |
| 13 | f (int32_t *x, int32_t *y) |
| 14 | { |
| 15 | union { uint64_t x; char c[8]; } u; |
| 16 | svbool_t pg = svptrue_b32 (); |
| 17 | copy (u.c, svcmpeq (pg, svld1 (pg, x), 0)); |
| 18 | copy (u.c + 4, svcmpeq (pg, svld1 (pg, y), 1)); |
| 19 | return u.x; |
| 20 | } |