Debian Codegraph @

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

raw
1 #include "tree-vect.h"
2
3 void __attribute__((noipa))
4 foo (long *a, int off, int n)
5 {
6 for (int i = 0; i < n; ++i)
7 {
8 long tem1 = a[0];
9 long tem2 = a[1];
10 long tem3 = a[2];
11 long tem4 = a[off + 1];
12 a[0] = tem4;
13 long tem5 = a[off + 2];
14 a[1] = tem5;
15 long tem6 = a[off + 3];
16 a[2] = tem6;
17 a[off + 1] = tem1;
18 a[off + 2] = tem2;
19 a[off + 3] = tem3;
20 a -= 3;
21 }
22 }
23
24 int main ()
25 {
26 long a[3 * 9];
27 check_vect ();
28 for (int i = 0; i < 3 * 9; ++i)
29 a[i] = i;
30 foo (a + 3 * 5, 6-1, 5);
31 const long b[3 * 8] = { 0, 1, 2, 21, 22, 23, 18, 19, 20, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 };
32 #pragma GCC novector
33 for (int i = 0; i < 3 * 8; ++i)
34 if (a[i] != b[i])
35 __builtin_abort ();
36 return 0;
37 }