aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ifc-12.c
blob: 89d42b4d6fd0add66e53d35742aee8778a266cca (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
/* { dg-do compile } */
/* { dg-options "-Ofast -fdump-tree-ifcvt-stats" } */
/* { dg-require-visibility "" } */

struct st
{
  int a[1024];
  int b[1024];
};

struct st s = {0};
int foo (int x)
{
  int i;
  struct st *p = &s;

  for (i = 0; i < 1024; i++)
    {
      if (x > i)
	p->a[i] = p->b[i];
    }

  return 0;
}
/* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "ifcvt" } } */