OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [pr31699.c] - Rev 816

Go to most recent revision | Compare with Previous | Blame | View Log

/* { dg-require-effective-target vect_double } */
 
#include <stdlib.h>
#include <stdarg.h>
#include "tree-vect.h"
 
float x[256];
 
__attribute__ ((noinline))
double *foo(void)
{
 double *z = malloc (sizeof(double) * 256);
 
 int i;
 for (i=0; i<256; ++i)
   z[i] = x[i] + 1.0f;
 
 return z;
}
 
 
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" } } */
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.