Debian Codegraph @

gcc/testsuite/gcc.dg/vect/bb-slp-pr101615-1.c

raw
1 /* { dg-additional-options "-w -Wno-psabi" } */
2
3 #include "tree-vect.h"
4
5 typedef int v4si __attribute__((vector_size(16)));
6
7 int a[4];
8 int b[4];
9
10 void __attribute__((noipa))
11 foo (v4si x)
12 {
13 b[0] = a[3] + x[0];
14 b[1] = a[2] + x[1];
15 b[2] = a[1] + x[2];
16 b[3] = a[0] + x[3];
17 }
18
19 int main()
20 {
21 check_vect ();
22 for (int i = 0; i < 4; ++i)
23 a[i] = i;
24 v4si x = (v4si) { 8, 6, 4, 2 };
25 foo (x);
26 if (b[0] != 11 || b[1] != 8 || b[2] != 5 || b[3] != 2)
27 __builtin_abort ();
28 return 0;
29 }