2015-05-04 Sandra Loosemore <sandra@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / vector-shuffle1.c
blob14e435b8ad76e8780dfcd04f923ad5d37a8be572
1 /* PR54219 */
2 /* { dg-do run } */
4 extern void abort (void);
6 typedef int v2si __attribute__((vector_size(2*sizeof(int))));
8 void f(v2si *x)
10 /* This requires canonicalization of the mask to { 1, 0 }. */
11 *x = __builtin_shuffle(*x, *x, (v2si) { 5, 0 });
14 int main()
16 v2si y = { 1, 2 };
17 f(&y);
18 if (y[0] != 2 || y[1] != 1)
19 abort ();
20 return 0;