* asan.c (create_cond_insert_point): Maintain profile.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ifc-cd.c
blob4932cd75a13167a8d94752b5a91bd3919d5bb139
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-ifcvt-details-blocks-details -ftree-loop-if-convert-stores" } */
4 void foo (int *x1, int *x2, int *x3, int *x4, int *y)
6 int i;
7 int a1, a2, a3, b1, b2;
9 for (i=0; i<128; i++)
11 a1 = x1[i];
12 a2 = x2[i];
13 a3 = x3[i];
14 y[i] = 0;
15 if (x4[i] == 0)
17 b1 = a1 + 1;
18 if (a2 > 0)
19 b1++;
20 a1++;
21 if (a3 < 0)
22 b1--;
23 y[i] = b1;
28 /* { dg-final { scan-tree-dump-times "Use predicate of bb" 4 "ifcvt" } } */
30 /* We insert into code
31 if (LOOP_VECTORIZED (...))
32 which is folded by vectorizer. Both outgoing edges must have probability
33 100% so the resulting profile match after folding. */
34 /* { dg-final { scan-tree-dump-times "Invalid sum of outgoing probabilities 200.0" 1 "ifcvt" } } */
35 /* { dg-final { scan-tree-dump-times "Invalid sum of incoming counts" 1 "ifcvt" } } */