annotate gcc/testsuite/gcc.dg/tree-ssa/builtin-expect-5.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-options "-O2 -fdump-tree-forwprop" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 void a (void);
kono
parents:
diff changeset
5 void b (void);
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 void
kono
parents:
diff changeset
8 f (int i, float j, int i2, float j2)
kono
parents:
diff changeset
9 {
kono
parents:
diff changeset
10 if (__builtin_expect ((i * i2) > 0 && __builtin_expect ((j * j2) != 0, 1), 0))
kono
parents:
diff changeset
11 a ();
kono
parents:
diff changeset
12 else
kono
parents:
diff changeset
13 b ();
kono
parents:
diff changeset
14 }
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 /* { dg-final { scan-tree-dump-times { if } 2 "forwprop1"} } */
kono
parents:
diff changeset
17 /* { dg-final { scan-tree-dump {builtin_expect[^\n]*, 0\);\n[^\n]*if} "forwprop1"} } */
kono
parents:
diff changeset
18 /* { dg-final { scan-tree-dump {builtin_expect[^\n]*, 1\);\n[^\n]*if} "forwprop1"} } */