libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-perm-2.c
blob1a4ab4065de0c495f7545106cf4cfdcbb201b3b3
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-fre1" } */
4 typedef int veci __attribute__ ((vector_size (4 * sizeof (int))));
5 typedef unsigned int vecu __attribute__ ((vector_size (4 * sizeof (unsigned int))));
7 void fun (veci *a, veci *b, veci *c)
9 veci r1 = __builtin_shufflevector (*a, *b, 0, 5, 2, 7);
10 vecu r2 = __builtin_convertvector (r1, vecu);
11 vecu r3 = __builtin_shufflevector (r2, r2, 2, 3, 1, 0);
12 *c = __builtin_convertvector (r3, veci);
15 /* { dg-final { scan-tree-dump "VEC_PERM_EXPR.*{ 2, 7, 5, 0 }" "fre1" } } */
16 /* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 1 "fre1" } } */