aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-11-14 10:06:12 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2017-11-14 09:06:12 +0000
commited10d09bcc8e7af47896f9ca1f5dbc5fd710929d (patch)
tree3a6b8461491456a3149ce524eb1e518bda31b711 /gcc/testsuite
parent9b24c104aeb9dcaa06c0fe1324b8d9ef1fc2d92a (diff)
downloadgcc-ed10d09bcc8e7af47896f9ca1f5dbc5fd710929d.zip
gcc-ed10d09bcc8e7af47896f9ca1f5dbc5fd710929d.tar.gz
gcc-ed10d09bcc8e7af47896f9ca1f5dbc5fd710929d.tar.bz2
ipa-split.c (struct split_point): Add count.
* ipa-split.c (struct split_point): Add count. (consider_split): Do not compute incoming frequency; compute incoming count and store it to split_point. (split_function): Set count of the call to split part correctly. * testsuite/gcc.dg/tree-ssa/fnsplit-2.c: New testcase. From-SVN: r254720
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/fnsplit-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/fnsplit-2.c33
3 files changed, 38 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3c4c37d..11a4a12 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2017-11-13 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/tree-ssa/fnsplit-2.c: New testcase.
+
2017-11-13 Fritz Reese <fritzoreese@gmail.com>
PR fortran/78240
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/fnsplit-1.c b/gcc/testsuite/gcc.dg/tree-ssa/fnsplit-1.c
index ad5fc10..1b9696d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/fnsplit-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/fnsplit-1.c
@@ -19,4 +19,5 @@ main(void)
return 0;
}
/* { dg-final { scan-tree-dump-times "Splitting function at:" 1 "fnsplit"} } */
+/* { dg-final { scan-tree-dump-times "Invalid sum" 0 "fnsplit"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/fnsplit-2.c b/gcc/testsuite/gcc.dg/tree-ssa/fnsplit-2.c
new file mode 100644
index 0000000..c00213c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/fnsplit-2.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-fnsplit-blocks-details" } */
+void q (void);
+int b;
+void test (void);
+void
+split_me (int *a)
+{
+ if (__builtin_expect (a==0, 0))
+ do
+ {
+ test();
+ test();
+ test();
+ test();
+ test();
+ }
+ while (b);
+ else
+ q();
+}
+
+int
+main(void)
+{
+ int i;
+ for (i = 0; i < 1000; i++)
+ split_me(&i);
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Splitting function at:" 1 "fnsplit"} } */
+/* { dg-final { scan-tree-dump-times "Invalid sum" 0 "fnsplit"} } */