Mercurial > hg > CbC > CbC_gcc
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 |
rev | line source |
---|---|
111 | 1 /* PR54219 */ |
2 /* { dg-do run } */ | |
3 | |
4 extern void abort (void); | |
5 | |
6 typedef int v2si __attribute__((vector_size(2*sizeof(int)))); | |
7 | |
8 void f(v2si *x) | |
9 { | |
10 /* This requires canonicalization of the mask to { 1, 0 }. */ | |
11 *x = __builtin_shuffle(*x, *x, (v2si) { 5, 0 }); | |
12 } | |
13 | |
14 int main() | |
15 { | |
16 v2si y = { 1, 2 }; | |
17 f(&y); | |
18 if (y[0] != 2 || y[1] != 1) | |
19 abort (); | |
20 return 0; | |
21 } |