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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [autopar/] [pr49580.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR debug/49580 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details" } */
4
 
5
#include <stdarg.h>
6
#include <stdlib.h>
7
 
8
#define N 1600
9
 
10
unsigned int ub[N];
11
unsigned char reg_has_output_reload[N];
12
unsigned int uc[N];
13
 
14
 __attribute__ ((noinline))
15
 void main2 (unsigned int regno, unsigned int n_reloads)
16
 {
17
  unsigned int nr=0;
18
 
19
  if (regno> ub[regno])
20
    nr=regno;
21
  else
22
    nr=ub[nr];
23
 
24
  while (nr-- > 0)
25
    if (n_reloads == 0 || reg_has_output_reload[regno + nr] == 0)
26
      ub[regno + nr] = 0;
27
}
28
 
29
int main (void)
30
{
31
  main2 (799, 0);
32
  return 0;
33
}
34
 
35
 
36
/* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops" } } */
37
/* { dg-final { cleanup-tree-dump "parloops" } } */
38
 

powered by: WebSVN 2.1.0

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