annotate gcc/testsuite/gcc.dg/torture/vector-shuffle1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR54219 */
kono
parents:
diff changeset
2 /* { dg-do run } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 extern void abort (void);
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 typedef int v2si __attribute__((vector_size(2*sizeof(int))));
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 void f(v2si *x)
kono
parents:
diff changeset
9 {
kono
parents:
diff changeset
10 /* This requires canonicalization of the mask to { 1, 0 }. */
kono
parents:
diff changeset
11 *x = __builtin_shuffle(*x, *x, (v2si) { 5, 0 });
kono
parents:
diff changeset
12 }
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 int main()
kono
parents:
diff changeset
15 {
kono
parents:
diff changeset
16 v2si y = { 1, 2 };
kono
parents:
diff changeset
17 f(&y);
kono
parents:
diff changeset
18 if (y[0] != 2 || y[1] != 1)
kono
parents:
diff changeset
19 abort ();
kono
parents:
diff changeset
20 return 0;
kono
parents:
diff changeset
21 }