aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/builtin-expect-5.c
blob: d0b251db17b0c52f3b15ce99650cfacbc7db60fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-forwprop" } */

f (int i, float j, int i2, float j2) 
{ 
  if (__builtin_expect ((i * i2) > 0 && __builtin_expect ((j * j2) != 0, 1), 0))
    a ();
  else
    b ();
} 

/* { dg-final { scan-tree-dump-times { if } 2 "forwprop1"} } */
/* { dg-final { scan-tree-dump {builtin_expect[^\n]*, 0\);\n[^\n]*if} "forwprop1"} } */
/* { dg-final { scan-tree-dump {builtin_expect[^\n]*, 1\);\n[^\n]*if} "forwprop1"} } */
/* { dg-final { cleanup-tree-dump "forwprop?" } } */