Imported Upstream version 4.7.3
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.c-torture / execute / vshuf-2.inc
1 /* Test fragment for vectors of 2 elements.  */
2
3 #ifndef UNSUPPORTED
4
5 struct S
6 {
7   V in;
8   VI mask;
9   V out;
10 };
11
12 struct S tests[] = {
13   { { A, B }, { 0, 1 }, { A, B } },
14   { { A, B }, { -16, -1 }, { A, B } },
15   { { A, B }, { 1, 0 }, { B, A } },
16   { { A, B }, { 0, 0 }, { A, A } },
17   { { X, Y }, { 1, 1 }, { Y, Y } },
18   { { X, Y }, { 1, 0 }, { Y, X } },
19 };
20
21 struct S2
22 {
23   V in1, in2;
24   VI mask;
25   V out;
26 };
27
28 struct S2 tests2[] = {
29   { { A, B }, { X, Y }, { 0, 1 }, { A, B } },
30   { { A, B }, { X, Y }, { 2, 3 }, { X, Y } },
31   { { A, B }, { X, Y }, { 0, 2 }, { A, X } },
32   { { A, B }, { X, Y }, { 2, 1 }, { X, B } },
33   { { A, B }, { X, Y }, { 3, 0 }, { Y, A } },
34   { { A, B }, { X, Y }, { 0, 0 }, { A, A } },
35   { { A, B }, { X, Y }, { 3, 3 }, { Y, Y } },
36 };
37
38 #endif