Debian Codegraph @

gcc/testsuite/gcc.dg/vect/pr96783-2.c

raw
1 #include "tree-vect.h"
2
3 long a[1024];
4 long b[1024];
5
6 void __attribute__((noipa)) foo ()
7 {
8 for (int i = 0; i < 256; ++i)
9 {
10 a[3*i] = b[1023 - 3*i - 2];
11 a[3*i + 1] = b[1023 - 3*i - 1];
12 a[3*i + 2] = b[1023 - 3*i];
13 }
14 }
15
16 int main()
17 {
18 for (int i = 0; i < 1024; ++i)
19 b[i] = i;
20 foo ();
21 #pragma GCC novector
22 for (int i = 0; i < 256; ++i)
23 if (a[3*i] != 1023 - 3*i - 2
24 || a[3*i+1] != 1023 - 3*i - 1
25 || a[3*i+2] != 1023 - 3*i)
26 __builtin_abort ();
27 return 0;
28 }