summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ifc-7.c
blob: 4d26dc7650d595991bb3d2b82e8396f66a92928f (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
/* { dg-do compile } */
/* { dg-options "-c -O2 -ftree-vectorize" { target *-*-* } } */

typedef struct eqn_d
{
  int *coef;
} *eqn;
typedef struct omega_pb_d
{
  eqn subs;
} *omega_pb;

omega_pb omega_solve_problem (omega_pb);

omega_pb
omega_solve_geq (omega_pb pb, int n)
{
  int i, e;
  int j = 0;

  for (e = n - 1; e >= 0; e--)
    if (pb->subs[e].coef[i] != pb->subs[e].coef[j])
      {
	pb->subs[e].coef[i] = j;
	pb->subs[e].coef[j] = i;
      }

  return omega_solve_problem (pb);
}