arm: fix typo in dg-require-effective-target [PR118089]
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vector-11.c
blobb1f0c74152a433b2ee65ba6d081dd2517a867760
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-forwprop1-details -Wno-psabi" } */
3 /* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */
5 typedef int vec __attribute__((vector_size (4 * sizeof (int))));
7 void f1 (vec *p_v_in, vec *p_v_out_1, vec *p_v_out_2)
9 vec sel00 = { 2, 3, 2, 2 };
10 vec sel01 = { 1, 0, 1, 1 };
11 vec sel10 = { 3, 2, 3, 3 };
12 vec sel11 = { 0, 1, 0, 0 };
13 vec sel = { 0, 5, 2, 7 };
14 vec v_1, v_2, v_x, v_y, v_out_1, v_out_2;
15 vec v_in = *p_v_in;
17 /* First vec perm sequence. */
18 v_1 = __builtin_shuffle (v_in, v_in, sel00);
19 v_2 = __builtin_shuffle (v_in, v_in, sel01);
20 v_x = v_2 - v_1;
21 v_y = v_1 + v_2;
22 v_out_1 = __builtin_shuffle (v_y, v_x, sel);
24 /* Second vec perm sequence. */
25 v_1 = __builtin_shuffle (v_in, v_in, sel10);
26 v_2 = __builtin_shuffle (v_in, v_in, sel11);
27 v_x = v_2 - v_1;
28 v_y = v_1 + v_2;
29 v_out_2 = __builtin_shuffle (v_y, v_x, sel);
31 *p_v_out_1 = v_out_1;
32 *p_v_out_2 = v_out_2;
35 /* { dg-final { scan-tree-dump "Vec perm simplify sequences have been blended" "forwprop1" { target { aarch64*-*-* i?86-*-* x86_64-*-* } } } } */
36 /* { dg-final { scan-tree-dump "VEC_PERM_EXPR.*{ 2, 7, 2, 6 }" "forwprop1" { target { aarch64*-*-* i?86-*-* x86_64-*-* } } } } */