1 /* { dg-options "-O2 -fgraphite-identity -fdump-tree-graphite-all" } */
2 
3 
4 int winner, numf2s;
5 double **tds;
6 double d, tsum;
7 
8 typedef struct {
9   double y;
10 } xyz;
11 
12 xyz *Y;
13 int ti;
14 
15 double
match(void)16 match (void)
17 {
18   int tj, tresult;
19 
20   for (tj = 0; tj < numf2s; tj++)
21     if (tj == winner
22 	&& Y[tj].y > 0)
23       tsum += tds[ti][tj] * d;
24 
25   return tsum;
26 }
27 
28 /* There should be no loops generated for this testcase, instead we
29    should generate the following:
30 
31    | if (winner >= 0 && winner < numf2s && Y[winner].y > 0)
32    |   tsum += tds[ti][winner] * d;
33 
34    For the moment this is XFAILed as this loop is not detected as a
35    SCoP by graphite: we depend on data in one of the conditions,
36    "Y[winner].y > 0".  This could be fixed when we will use predicates
37    for such cases.  */
38 
39 /* { dg-final { scan-tree-dump-times "loop_1" 0 "graphite" } } */
40