aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/torture/vshuf-2.inc
blob: ef778e59418c82765878fcabeeb18c2da1a61c1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Test fragment for vectors of 2 elements.  */

#ifndef UNSUPPORTED

struct S
{
  V in;
  VI mask;
  V out;
};

struct S tests[] = {
  { { A, B }, { 0, 1 }, { A, B } },
  { { A, B }, { -16, -1 }, { A, B } },
  { { A, B }, { 1, 0 }, { B, A } },
  { { A, B }, { 0, 0 }, { A, A } },
  { { X, Y }, { 1, 1 }, { Y, Y } },
  { { X, Y }, { 1, 0 }, { Y, X } },
};

struct S2
{
  V in1, in2;
  VI mask;
  V out;
};

struct S2 tests2[] = {
  { { A, B }, { X, Y }, { 0, 1 }, { A, B } },
  { { A, B }, { X, Y }, { 2, 3 }, { X, Y } },
  { { A, B }, { X, Y }, { 0, 2 }, { A, X } },
  { { A, B }, { X, Y }, { 2, 1 }, { X, B } },
  { { A, B }, { X, Y }, { 3, 0 }, { Y, A } },
  { { A, B }, { X, Y }, { 0, 0 }, { A, A } },
  { { A, B }, { X, Y }, { 3, 3 }, { Y, Y } },
};

#endif