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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ifc-20040816-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

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