aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2015-07-24 23:45:42 -0600
committerJeff Law <law@gcc.gnu.org>2015-07-24 23:45:42 -0600
commit8edd0f66d80adb3950a35fc0dc47af2355c73fc4 (patch)
treea75562053452d53e0094d28158099c6d6d69d68f /gcc/testsuite
parent64d7fb90be5b6aba8ae99e3510faec8d73df879e (diff)
downloadgcc-8edd0f66d80adb3950a35fc0dc47af2355c73fc4.zip
gcc-8edd0f66d80adb3950a35fc0dc47af2355c73fc4.tar.gz
gcc-8edd0f66d80adb3950a35fc0dc47af2355c73fc4.tar.bz2
revert: re PR lto/66752 (spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG)
Revert: PR lto/66752 * tree-ssa-threadedge.c (simplify_conrol_stmt_condition): If we are unable to find X NE 0 in the tables, return X as the simplified condition. (fsm_find_control_statement_thread_paths): If nodes in NEXT_PATH are in VISISTED_BBS, then return failure. Else add nodes from NEXT_PATH to VISISTED_BBS. */ * tree-ssa-threadupdate.c (duplicate_thread_path): Fix up edge flags after removing the control flow statement and unnecessary edges. testsuite/ PR lto/66752 * gcc.dg/tree-ssa/pr66752-2.c: New test. * gcc.dg/torture/pr66752-1.c: New test * g++.dg/torture/pr66752-2.C: New test. From-SVN: r226206
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/g++.dg/torture/pr66752-2.C60
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr66752-1.c27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c39
4 files changed, 8 insertions, 126 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a05f16c..8cb2011 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2015-07-25 Jeff Law <law@redhat.com>
+
+ Revert:
+ PR lto/66752
+ * gcc.dg/tree-ssa/pr66752-2.c: New test.
+ * gcc.dg/torture/pr66752-1.c: New test
+ * g++.dg/torture/pr66752-2.C: New test.
+
2015-07-25 David Edelsohn <dje.gcc@gmail.com>
Revert:
diff --git a/gcc/testsuite/g++.dg/torture/pr66752-2.C b/gcc/testsuite/g++.dg/torture/pr66752-2.C
deleted file mode 100644
index 96d3fe9..0000000
--- a/gcc/testsuite/g++.dg/torture/pr66752-2.C
+++ /dev/null
@@ -1,60 +0,0 @@
-/* { dg-do compile } */
-extern "C"
-{
- typedef struct _IO_FILE FILE;
- extern int fprintf (FILE * __restrict __stream,
- const char *__restrict __format, ...);
-}
-typedef union tree_node *tree;
-class ipa_polymorphic_call_context
-{
-};
-class ipcp_value_base
-{
-};
-template < typename valtype > class ipcp_value:public ipcp_value_base
-{
-public:valtype value;
- ipcp_value *next;
-};
-
-template < typename valtype > class ipcp_lattice
-{
-public:ipcp_value < valtype > *values;
- void print (FILE * f, bool dump_sources, bool dump_benefits);
-};
-
-class ipcp_param_lattices
-{
-public:ipcp_lattice < tree > itself;
- ipcp_lattice < ipa_polymorphic_call_context > ctxlat;
-};
-template < typename valtype > void ipcp_lattice < valtype >::print (FILE * f,
- bool
- dump_sources,
- bool
- dump_benefits)
-{
- ipcp_value < valtype > *val;
- bool prev = false;
- for (val = values; val; val = val->next)
- {
- if (dump_benefits && prev)
- fprintf (f, " ");
- else if (!dump_benefits && prev)
- fprintf (f, ", ");
- else
- prev = true;
- if (dump_sources)
- fprintf (f, "]");
- if (dump_benefits)
- fprintf (f, "shit");
- }
-}
-
-void
-print_all_lattices (FILE * f, bool dump_sources, bool dump_benefits)
-{
- struct ipcp_param_lattices *plats;
- plats->ctxlat.print (f, dump_sources, dump_benefits);
-}
diff --git a/gcc/testsuite/gcc.dg/torture/pr66752-1.c b/gcc/testsuite/gcc.dg/torture/pr66752-1.c
deleted file mode 100644
index a742555..0000000
--- a/gcc/testsuite/gcc.dg/torture/pr66752-1.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* { dg-do compile } */
-
-typedef unsigned int size_t;
-struct fde_vector
-{
- size_t count;
- const struct dwarf_fde *array[];
-};
-struct object;
-typedef struct dwarf_fde fde;
-typedef int (*fde_compare_t) (struct object *, const fde *, const fde *);
-void
-fde_merge (struct object *ob, fde_compare_t fde_compare,
- struct fde_vector *v1, struct fde_vector *v2)
-{
- size_t i1, i2;
- const fde *fde2;
- do
- {
- i2--;
- while (i1 > 0 && fde_compare (ob, v1->array[i1 - 1], fde2) > 0)
- {
- i1--;
- }
- }
- while (i2 > 0);
-}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c
deleted file mode 100644
index f15b598..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom1-details -fdump-tree-optimized" } */
-
-extern int status, pt;
-extern int count;
-void
-foo (int N, int c, int b, int *a)
-{
- int i, flag;
- i = b -1;
- flag = 1;
- if (status && i < N && a[i] == b) {
- N--;
- flag = 0;
- if (pt)
- count++;
- }
- else
- for (i = -1, flag = 1; ++i < N && flag;)
- if (a[i] == b)
- {
- --N;
- flag = 0;
- if (i < N)
- a[i] = a[N];
- else
- a[i] = 0;
- if (pt)
- count++;
- }
- if(status && flag)
- pt--;
-}
-
-/* There are 3 FSM jump threading opportunities. */
-/* { dg-final { scan-tree-dump-times "FSM" 3 "dom1"} } */
-
-/* There should be no assignments or references to FLAG. */
-/* { dg-final { scan-tree-dump-not "flag" "optimized"} } */