* asan.c (create_cond_insert_point): Maintain profile.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ifc-12.c
blob9468c070489bd29016eaeab5a895ad782bb33267
1 /* { dg-do compile } */
2 /* { dg-options "-Ofast -fdump-tree-ifcvt-stats-blocks-details" } */
3 /* { dg-require-visibility "" } */
5 struct st
7 int a[1024];
8 int b[1024];
9 };
11 struct st s = {0};
12 int foo (int x)
14 int i;
15 struct st *p = &s;
17 for (i = 0; i < 1024; i++)
19 if (x > i)
20 p->a[i] = p->b[i];
23 return 0;
25 /* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "ifcvt" } } */
27 /* We insert into code
28 if (LOOP_VECTORIZED (...))
29 which is folded by vectorizer. Both outgoing edges must have probability
30 100% so the resulting profile match after folding. */
31 /* { dg-final { scan-tree-dump-times "Invalid sum of outgoing probabilities 200.0" 1 "ifcvt" } } */
32 /* { dg-final { scan-tree-dump-times "Invalid sum of incoming counts" 1 "ifcvt" } } */