aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/branch-cost3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/i386/branch-cost3.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/branch-cost3.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/branch-cost3.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/branch-cost3.c
new file mode 100644
index 000000000..3b69f503f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/branch-cost3.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-gimple -mbranch-cost=2" } */
+
+extern int doo (void);
+
+int
+foo (_Bool a, _Bool b)
+{
+ if (a && b)
+ return doo ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "if " 1 "gimple" } } */
+/* { dg-final { scan-tree-dump-times " & " 1 "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */