libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-early-break_88.c
blob59ed57c5fb5f3e8197fc20058eeb0a81a55815cc
1 /* { dg-add-options vect_early_break } */
2 /* { dg-require-effective-target vect_early_break_hw } */
3 /* { dg-require-effective-target vect_int } */
5 /* { dg-additional-options "-Ofast --param vect-partial-vector-usage=2" } */
6 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "arm*-*-*" } } } } */
8 #include "tree-vect.h"
10 #ifndef N
11 #define N 5
12 #endif
13 float vect_a[N] = { 5.1f, 4.2f, 8.0f, 4.25f, 6.5f };
14 unsigned vect_b[N] = { 0 };
16 __attribute__ ((noinline, noipa))
17 unsigned test4(double x)
19 unsigned ret = 0;
20 for (int i = 0; i < N; i++)
22 if (vect_a[i] > x)
23 break;
24 vect_a[i] = x;
27 return ret;
30 extern void abort ();
32 int main ()
34 check_vect ();
36 if (test4 (7.0) != 0)
37 abort ();
39 if (vect_b[2] != 0 && vect_b[1] == 0)
40 abort ();