OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-ifcvt-9.c] - Blame information for rev 405

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-require-effective-target vect_condition } */
2
 
3
#include <stdarg.h>
4
#include <signal.h>
5
#include "tree-vect.h"
6
 
7
#define N 16
8
#define MAX 42
9
 
10
extern void abort(void);
11
 
12
int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11};
13
int B[N] = {0,0,42,42,42,0,0,0,0,0,42,42,42,42,42,0};
14
void foo ()  __attribute__((always_inline));
15
void foo ()
16
{
17
  int i, j;
18
 
19
  for (i = 0; i < 16; i++)
20
    A[i] = ( A[i] >= MAX ? MAX : 0);
21
}
22
 
23
int main ()
24
{
25
 
26
  int i, j;
27
  check_vect ();
28
  foo ();
29
  /* check results:  */
30
  for (i = 0; i < N; i++)
31
    if (A[i] != B[i])
32
      abort ();
33
 
34
  return 0;
35
}
36
 
37
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
38
/* { dg-final { cleanup-tree-dump "vect" } } */

powered by: WebSVN 2.1.0

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