aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/sms-2.c
blob: 897e5d4b17374195cf5f2e8d07bc7820ae0653c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* The same test as 921011-1.c.  It can fails on gcc 4.1 due to a dfs
   traversal of the loops after versioning.  */

/* { dg-do compile } */
/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms" } */

int th, h, em, nlwm, nlwS, nlw, sy;
void
fun (nb)
     int nb;
{

  while (nb--)
    while (h--)
      {
	nlw = nlwm;
	while (nlw)
	  {
	    if (nlwS == 1)
	      {
	      }
	    else
	      if (nlwS == 1)
		{
		}
	    nlwS--; nlw--;
	  }
	if (em)
	  nlwS--;
	if (++sy == th)
	  sy = 0;
      }
}

/* { dg-final { scan-rtl-dump-times "SMS loop many exits" 1 "sms" { target spu-*-* powerpc*-*-* } } } */
/* { dg-final { cleanup-rtl-dump "sms" } } */