aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorWei Mi <wmi@google.com>2013-12-03 18:35:24 +0000
committerWei Mi <wmi@gcc.gnu.org>2013-12-03 18:35:24 +0000
commitba4fa5819f91c7e82eb08ff33fd61b106715a54e (patch)
treec7fa75151c5a9cc592c2871ba91390f22dffed86 /gcc/testsuite
parent05db108d6b1f073795f7aae33a30791f343c2f60 (diff)
downloadgcc-ba4fa5819f91c7e82eb08ff33fd61b106715a54e.zip
gcc-ba4fa5819f91c7e82eb08ff33fd61b106715a54e.tar.gz
gcc-ba4fa5819f91c7e82eb08ff33fd61b106715a54e.tar.bz2
re PR rtl-optimization/59020 (internal compiler error: in maybe_add_or_update_dep_1, at sched-deps.c:933)
2013-12-03 Wei Mi <wmi@google.com> PR rtl-optimization/59020 * sched-deps.c (try_group_insn): Move it from haifa-sched.c to here. (sched_analyze_insn): Call try_group_insn. (sched_analyze): Cleanup SCHED_GROUP_P before start the analysis. * haifa-sched.c (try_group_insn): Moved to sched-deps.c. (group_insns_for_macro_fusion): Removed. (sched_init): Remove calling group_insns_for_macro_fusion. 2013-12-03 Wei Mi <wmi@google.com> PR rtl-optimization/59020 * testsuite/gcc.dg/pr59020.c: New. * testsuite/gcc.dg/macro-fusion-1.c: New. * testsuite/gcc.dg/macro-fusion-2.c: New. From-SVN: r205644
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gcc.dg/macro-fusion-1.c13
-rw-r--r--gcc/testsuite/gcc.dg/macro-fusion-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr59020.c15
4 files changed, 51 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a8ea26c..c1a0f54 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2013-12-03 Wei Mi <wmi@google.com>
+
+ PR rtl-optimization/59020
+ * testsuite/gcc.dg/pr59020.c: New.
+ * testsuite/gcc.dg/macro-fusion-1.c: New.
+ * testsuite/gcc.dg/macro-fusion-2.c: New.
+
2013-12-03 Yury Gribov <y.gribov@samsung.com>
PR sanitizer/59063
diff --git a/gcc/testsuite/gcc.dg/macro-fusion-1.c b/gcc/testsuite/gcc.dg/macro-fusion-1.c
new file mode 100644
index 0000000..4ac9866
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/macro-fusion-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -mtune=corei7 -fdump-rtl-sched2" } */
+/* { dg-final { scan-rtl-dump-not "compare.*insn.*jump_insn.*jump_insn" "sched2" } } */
+
+int a[100];
+
+double bar (double sum)
+{
+ int i;
+ for (i = 0; i < 1000000; i++)
+ sum += (0.5 + (a[i%100] - 128));
+ return sum;
+}
diff --git a/gcc/testsuite/gcc.dg/macro-fusion-2.c b/gcc/testsuite/gcc.dg/macro-fusion-2.c
new file mode 100644
index 0000000..638350d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/macro-fusion-2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -mtune=corei7-avx -fdump-rtl-sched2" } */
+/* { dg-final { scan-rtl-dump-not "compare.*insn.*jump_insn.*jump_insn" "sched2" } } */
+
+int a[100];
+
+double bar (double sum)
+{
+ int i = 100000;
+ while (i != 0)
+ {
+ sum += (0.5 + (a[i%100] - 128));
+ i--;
+ }
+ return sum;
+}
diff --git a/gcc/testsuite/gcc.dg/pr59020.c b/gcc/testsuite/gcc.dg/pr59020.c
new file mode 100644
index 0000000..696c9df
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59020.c
@@ -0,0 +1,15 @@
+/* PR rtl-optimization/59020 */
+
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -fmodulo-sched -fno-inline -march=corei7" } */
+
+int a, b, d;
+unsigned c;
+
+void f()
+{
+ unsigned q;
+ for(; a; a++)
+ if(((c %= d && 1) ? : 1) & 1)
+ for(; b; q++);
+}