* loop-unswitch.c (unswitch_loop): Pass probabilities to loopify.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / update-unswitch-1.c
blob499b78b01376f585e1fddce56d0b3023db2fa73a
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -funswitch-loops -fdump-tree-unswitch-blocks" } */
4 int bla(int p)
6 unsigned i, s = 1;
8 for (i = 4; i < 100; i++)
10 if (p)
11 s += i/2;
12 else
13 s *= i/2;
16 return s;
19 /* We used to make the probability that the first of the loops created
20 by unswitching is entered 100%, which is not correct. */
22 /* { dg-final { scan-tree-dump-not "Invalid sum" "unswitch"} } */
23 /* { dg-final { scan-tree-dump-not "SUCC: 3 .100.0%" "unswitch"} } */
24 /* { dg-final { cleanup-tree-dump "unswitch" } } */