Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/pr121742.c

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target riscv_v_ok } */
3 /* { dg-options "-march=rv64gcv -mabi=lp64d -O2" } */
4
5 typedef unsigned long uint64_t;
6 typedef unsigned int uint32_t;
7 typedef unsigned char uint8_t;
8 typedef uint8_t a __attribute__((vector_size(4)));
9 int b, c;
10
11 uint64_t d() {
12 a e = {5, 9, 1, 5};
13 a bla = {0, 0, 0, 0};
14 int *f = &b;
15 uint32_t g = 0;
16 int i = 0;
17 for (; i < 2; i++)
18 for (c = 0; c <= 2; c++) {
19 *f ^= e[3] + 9;
20 e = __builtin_shufflevector(
21 ~__builtin_shufflevector(bla, e, 1, 4, 3, 4), e, 0, 1, 1, 7);
22 }
23 return g;
24 }
25
26 int main() {
27 int j = d ();
28 if (b != 0)
29 __builtin_abort ();
30 }