blob: cbc596d467f0467c6baeb0c69e5a5f2c6a683904 (
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
32
33
34
35
36
|
/* { dg-require-effective-target vect_double } */
#include <stdlib.h>
#include <stdarg.h>
#include "tree-vect.h"
float x[256];
void foo(void)
{
double *z = malloc (sizeof(double) * 256);
int i;
for (i=0; i<256; ++i)
z[i] = x[i] + 1.0f;
}
int main()
{
int i;
check_vect ();
for (i = 0; i < 256; i++)
x[i] = (float) i;
foo();
return 0;
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_intfloat_cvt } } } */
/* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { ! vector_alignment_reachable } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
|