* asan.c (create_cond_insert_point): Maintain profile.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ifc-pr56541.c
blob71d6398897adbd97e39b2c2961d927b47b52288f
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-ifcvt-stats-blocks-details" } */
4 float a,b,c,d;
6 float z[1024]; int ok[1024];
7 const float rBig = 150.;
9 void foo()
11 int i;
13 for (i=0; i!=1024; ++i)
15 float rR = a*z[i];
16 float rL = b*z[i];
17 float rMin = (rR<rL) ? rR : rL;
18 float rMax = (rR<rL) ? rL : rR;
19 rMin = (rMax>0) ? rMin : rBig;
20 rMin = (rMin>0) ? rMin : rMax;
21 ok[i] = rMin-c<rMax+d;
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" } } */