summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/vect-lroundf_1.c
blob: 92a722ed099e0ab9ae292be1cf92d1752c75dd08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-require-effective-target arm_v8_neon_ok } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize -fdump-tree-vect-all" } */
/* { dg-add-options arm_v8_neon } */

#define N 32

float __attribute__((aligned(16))) input[N];
int __attribute__((aligned(16))) output[N];

void
foo ()
{
  int i = 0;
  /* Vectorizable.  */
  for (i = 0; i < N; i++)
    output[i] = __builtin_lroundf (input[i]);
}

/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */