URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* { dg-require-effective-target vect_int } */
|
/* { dg-require-effective-target vect_int } */
|
|
|
#include <stdarg.h>
|
#include <stdarg.h>
|
#include "tree-vect.h"
|
#include "tree-vect.h"
|
|
|
#define N 128
|
#define N 128
|
|
|
short sa[N];
|
short sa[N];
|
short sb[N];
|
short sb[N];
|
|
|
int main1 ()
|
int main1 ()
|
{
|
{
|
int i;
|
int i;
|
|
|
for (i = 0; i < N; i++)
|
for (i = 0; i < N; i++)
|
{
|
{
|
sb[i] = 5;
|
sb[i] = 5;
|
}
|
}
|
|
|
/* check results: */
|
/* check results: */
|
for (i = 0; i < N; i++)
|
for (i = 0; i < N; i++)
|
{
|
{
|
if (sb[i] != 5)
|
if (sb[i] != 5)
|
abort ();
|
abort ();
|
}
|
}
|
|
|
for (i = 0; i < N; i++)
|
for (i = 0; i < N; i++)
|
{
|
{
|
sa[i] = sb[i] + (short)100;
|
sa[i] = sb[i] + (short)100;
|
}
|
}
|
|
|
/* check results: */
|
/* check results: */
|
for (i = 0; i < N; i++)
|
for (i = 0; i < N; i++)
|
{
|
{
|
if (sa[i] != 105)
|
if (sa[i] != 105)
|
abort ();
|
abort ();
|
}
|
}
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
int main (void)
|
int main (void)
|
{
|
{
|
check_vect ();
|
check_vect ();
|
|
|
return main1 ();
|
return main1 ();
|
}
|
}
|
|
|
/* Fails for 32-bit targets that don't vectorize PLUS. */
|
/* Fails for 32-bit targets that don't vectorize PLUS. */
|
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
|
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
|
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
|
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
|
/* { dg-final { cleanup-tree-dump "vect" } } */
|
/* { dg-final { cleanup-tree-dump "vect" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.