Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/acle/general/deref_1.c

raw
1 /* { dg-options "-O2" } */
2
3 #include <arm_sve.h>
4
5 uint64_t
6 f1 (int32_t *x, int32_t *y)
7 {
8 union { uint64_t x; char c[8]; } u;
9 svbool_t pg = svptrue_b32 ();
10 *(svbool_t *)&u.c[0] = svcmpeq (pg, svld1 (pg, x), 0);
11 *(svbool_t *)&u.c[4] = svcmpeq (pg, svld1 (pg, y), 1);
12 return u.x;
13 }
14
15 typedef unsigned int v4si __attribute__((vector_size(16)));
16
17 /* The aliasing is somewhat dubious here, but it must compile. */
18
19 v4si
20 f2 (void)
21 {
22 v4si res;
23 *(svuint32_t *) &res = svindex_u32 (0, 1);
24 return res;
25 }