Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/torture/vector-shuffle1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
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 } |