view gcc/testsuite/gcc.dg/vect/pr89440.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

/* { 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 < 4; ++j)
	{
	  a += 1;
	  x += a;
	}
    }
  return x;
}

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

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