Debian Codegraph @

gcc/testsuite/gcc.dg/torture/pr123175-2.c

raw
1 /* { dg-do run } */
2 /* { dg-additional-options "-fgimple" } */
3
4 typedef int v4si __attribute__((vector_size(16)));
5 typedef int v2si __attribute__((vector_size(8)));
6 typedef char v4qi __attribute__((vector_size(4)));
7
8 v4si res;
9 v2si a;
10 v2si b;
11
12 void __attribute__((noipa)) __GIMPLE() foo ()
13 {
14 v2si a_;
15 v2si b_;
16 v4si res_;
17 a_ = a;
18 b_ = b;
19 res_ = __VEC_PERM (a_, b_, _Literal (v4qi) { 0, 2, 2, 1 });
20 res = res_;
21 }
22
23 int main()
24 {
25 a = (v2si){ 4, 3 };
26 b = (v2si){ 2, 1 };
27 foo ();
28 if (res[0] != 4 || res[1] != 2 || res[2] != 2 || res[3] != 3)
29 __builtin_abort ();
30 return 0;
31 }