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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ifc-20040816-1.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-c -O2 -ftree-vectorize -fdump-tree-ifcvt-stats" { target *-*-* } } */
3
 
4
#include <stdarg.h>
5
 
6
#define N 16
7
#define MAX 42
8
 
9
int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11};
10
 
11
extern void abort(void);
12
 
13
int main1 ()
14
{
15
  int i, j;
16
 
17
  for (i = 0; i < N; i++)
18
    {
19
      j = A[i];
20
      A[i] = ( j >= MAX ? MAX : 0);
21
    }
22
 
23
  /* check results:  */
24
  for (i = 0; i < N; i++)
25
    {
26
      if (A[i] > MAX)
27
        abort ();
28
    }
29
 
30
  return 0;
31
}
32
 
33
 
34
 
35
/* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "ifcvt" } } */
36
/* { dg-final { cleanup-tree-dump "ifcvt" } } */

powered by: WebSVN 2.1.0

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