Debian Codegraph @

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

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target riscv_v_ok } */
3 /* { dg-options "-march=rv64gcv -mabi=lp64d -O1 -Wno-overflow" } */
4
5 typedef char int8_t;
6 typedef unsigned char uint8_t;
7 typedef short int16_t;
8 typedef int int32_t;
9 typedef unsigned int uint32_t;
10 typedef long int64_t;
11 typedef unsigned long uint64_t;
12
13 typedef uint8_t a;
14 typedef a b __attribute__((vector_size(4)));
15 typedef a c __attribute__((vector_size(8)));
16 int d[10];
17 struct {
18 int16_t e;
19 } f;
20 int64_t g;
21 int32_t j(int32_t, int32_t, int8_t, uint8_t, int64_t) {
22 c k = {20927, 0, 9, 6, 6, 2};
23 int *l = &d[1];
24 for (;;) {
25 asm goto("" : : : : m);
26 k = __builtin_shufflevector(
27 __builtin_shufflevector(k, k, 3, 1, 1, 9, 4, 5, 9, 0),
28 __builtin_shufflevector((b){}, (b){}, 1, 3, 7, 6, 0, 0, 6, 2), 10, 2, 1,
29 7, 7, 7, 4, 5);
30 for (; f.e >= 0;) {
31 *l = k[7];
32 uint32_t n[][7][6] = {};
33 return n[0][5][0];
34 m:
35 }
36 }
37 }
38
39 int main() {
40 uint64_t o = 1;
41 j(o, g, g, o, 0);
42 int BS_CHECKSUM = 5;
43 for (int i = 0; i < 10; i++)
44 BS_CHECKSUM ^= d[i];
45 if (BS_CHECKSUM != 7)
46 __builtin_abort ();
47 }