Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/pr119084.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-O2 -mlsx" } */
3 /* { dg-require-effective-target loongarch_sx_hw } */
4
5 typedef signed char V16QI __attribute__ ((vector_size (16)));
6 static char x[128];
7
8 __attribute__ ((noipa)) int
9 noopt (int x)
10 {
11 return x;
12 }
13
14 int
15 main (void)
16 {
17 int t = noopt (32);
18
19 x[32] = 1;
20
21 V16QI y = __builtin_lsx_vldx (x, t);
22 if (y[0] != 1)
23 __builtin_trap ();
24 }