aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr89440.c
blob: 06049696912e1280b8dd8704d887fe5e59c584a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* { dg-additional-options "-ffast-math" } */

#include "tree-vect.h"

float __attribute__((noinline,noclone))
f (float x)
{
  int i;
  float j;
  float a = 0;
  for (i = 0; i < 4; ++i)
    {
      for (j = 0; j < 32; ++j)
	{
	  a += 1;
	  x += a;
	}
    }
  return x;
}

int
main()
{
  check_vect ();
  if (f (1.0f) != 8257.0f)
    abort ();
  return 0;
}

/* { dg-final { scan-tree-dump "OUTER LOOP VECTORIZED" "vect" { target vect_float } } } */