* asan.c (create_cond_insert_point): Maintain profile.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ifc-20040816-1.c
blobb55a533e374fba04cae76b1b56c3ed6a56111760
1 /* { dg-do compile } */
2 /* { dg-options "-c -O2 -ftree-vectorize -fdump-tree-ifcvt-stats-blocks-details" { target *-*-* } } */
4 #include <stdarg.h>
6 #define N 16
7 #define MAX 42
9 int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11};
11 extern void abort(void);
13 int main1 ()
15 int i, j;
17 for (i = 0; i < N; i++)
19 j = A[i];
20 A[i] = ( j >= MAX ? MAX : 0);
23 /* check results: */
24 for (i = 0; i < N; i++)
26 if (A[i] > MAX)
27 abort ();
30 return 0;
35 /* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "ifcvt" } } */
37 /* We insert into code
38 if (LOOP_VECTORIZED (...))
39 which is folded by vectorizer. Both outgoing edges must have probability
40 100% so the resulting profile match after folding. */
41 /* { dg-final { scan-tree-dump-times "Invalid sum of outgoing probabilities 200.0" 1 "ifcvt" } } */
42 /* { dg-final { scan-tree-dump-times "Invalid sum of incoming counts" 1 "ifcvt" } } */