* asan.c (create_cond_insert_point): Maintain profile.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ifc-pr69489-2.c
blobc9e7c1b96ea1022d70fc8a304fbfb4ebf8f13c1d
1 /* { dg-do compile } */
2 /* { dg-options "-S -O2 -ftree-vectorize -fdump-tree-ifcvt-stats-blocks-details" { target *-*-* } } */
4 double
5 foo (const char *u, const char *v, long n)
7 long i, n1 = 0, n2 = 0;
9 for (i = 0; i < n; i++)
11 n2 += (u[i] && !v[i]);
12 n1 += (!u[i] && v[i]);
14 return (2.0 * n2 * n1);
17 /* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "ifcvt" } } */
19 /* We insert into code
20 if (LOOP_VECTORIZED (...))
21 which is folded by vectorizer. Both outgoing edges must have probability
22 100% so the resulting profile match after folding. */
23 /* { dg-final { scan-tree-dump-times "Invalid sum of outgoing probabilities 200.0" 1 "ifcvt" } } */
24 /* { dg-final { scan-tree-dump-times "Invalid sum of incoming counts" 1 "ifcvt" } } */