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 <stdio.h>
|
#include <stdio.h>
|
#include <stdarg.h>
|
#include <stdarg.h>
|
#include "tree-vect.h"
|
#include "tree-vect.h"
|
|
|
int main1 (int len)
|
int main1 (int len)
|
{
|
{
|
int s = 0;
|
int s = 0;
|
int i = len;
|
int i = len;
|
|
|
/* vectorization of induction with reduction. */
|
/* vectorization of induction with reduction. */
|
for ( ; i > 1; i -=2)
|
for ( ; i > 1; i -=2)
|
s += i;
|
s += i;
|
|
|
return s;
|
return s;
|
}
|
}
|
|
|
int main (void)
|
int main (void)
|
{
|
{
|
int s;
|
int s;
|
check_vect ();
|
check_vect ();
|
|
|
s = main1 (26);
|
s = main1 (26);
|
if (s != 182)
|
if (s != 182)
|
abort ();
|
abort ();
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
|
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "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.