aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/loop-unswitch-18.c
blob: 91dc2014922c65640c4ed0825890a2afe6367249 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O3 -fdump-tree-unswitch-optimized" } */

void bar();
void foo (int x, int n, int m)
{
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j)
      if (x)
        bar ();
}

/* { dg-final { scan-tree-dump "unswitching outer loop" "unswitch" } } */