2011-03-25 Richard Guenther <rguenther@suse.de>
* passes.c (init_optimization_passes): Add FRE pass after
early SRA.
* g++.dg/tree-ssa/pr41186.C: Scan the appropriate FRE dump.
* g++.dg/tree-ssa/pr8781.C: Likewise.
* gcc.dg/ipa/ipa-pta-13.c: Likewise.
* gcc.dg/ipa/ipa-pta-3.c: Likewise.
* gcc.dg/ipa/ipa-pta-4.c: Likewise.
* gcc.dg/tree-ssa/
20041122-1.c: Likewise.
* gcc.dg/tree-ssa/alias-18.c: Likewise.
* gcc.dg/tree-ssa/foldstring-1.c: Likewise.
* gcc.dg/tree-ssa/forwprop-10.c: Likewise.
* gcc.dg/tree-ssa/forwprop-9.c: Likewise.
* gcc.dg/tree-ssa/fre-vce-1.c: Likewise.
* gcc.dg/tree-ssa/loadpre6.c: Likewise.
* gcc.dg/tree-ssa/pr21574.c: Likewise.
* gcc.dg/tree-ssa/ssa-dom-cse-1.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-1.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-11.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-12.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-13.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-14.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-15.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-16.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-17.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-18.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-19.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-2.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-21.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-22.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-23.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-24.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-25.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-26.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-27.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-3.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-4.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-5.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-6.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-7.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-8.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-9.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-10.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-26.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-7.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-8.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-9.c: Likewise.
* gcc.dg/tree-ssa/ssa-sccvn-1.c: Likewise.
* gcc.dg/tree-ssa/ssa-sccvn-2.c: Likewise.
* gcc.dg/tree-ssa/ssa-sccvn-3.c: Likewise.
* gcc.dg/tree-ssa/ssa-sccvn-4.c: Likewise.
* gcc.dg/tree-ssa/struct-aliasing-1.c: Likewise.
* gcc.dg/tree-ssa/struct-aliasing-2.c: Likewise.
* c-c++-common/pr46562-2.c: Likewise.
* gfortran.dg/pr42108.f90: Likewise.
* gcc.dg/torture/pta-structcopy-1.c: Scan ealias dump, force
foo to be inlined even at -O1.
* gcc.dg/tree-ssa/ssa-dce-4.c: Disable FRE.
* gcc.dg/ipa/ipa-pta-14.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-1.c: Adjust.
* gcc.dg/matrix/matrix.exp: Disable FRE.
From-SVN: r171450
+2011-03-25 Richard Guenther <rguenther@suse.de>
+
+ * passes.c (init_optimization_passes): Add FRE pass after
+ early SRA.
+
2011-03-25 Bernd Schmidt <bernds@codesourcery.com>
Andrew Stubbs <ams@codesourcery.com>
locals into SSA form if possible. */
NEXT_PASS (pass_build_ealias);
NEXT_PASS (pass_sra_early);
+ NEXT_PASS (pass_fre);
NEXT_PASS (pass_copy_prop);
NEXT_PASS (pass_merge_phi);
NEXT_PASS (pass_cd_dce);
+2011-03-25 Richard Guenther <rguenther@suse.de>
+
+ * g++.dg/tree-ssa/pr41186.C: Scan the appropriate FRE dump.
+ * g++.dg/tree-ssa/pr8781.C: Likewise.
+ * gcc.dg/ipa/ipa-pta-13.c: Likewise.
+ * gcc.dg/ipa/ipa-pta-3.c: Likewise.
+ * gcc.dg/ipa/ipa-pta-4.c: Likewise.
+ * gcc.dg/tree-ssa/20041122-1.c: Likewise.
+ * gcc.dg/tree-ssa/alias-18.c: Likewise.
+ * gcc.dg/tree-ssa/foldstring-1.c: Likewise.
+ * gcc.dg/tree-ssa/forwprop-10.c: Likewise.
+ * gcc.dg/tree-ssa/forwprop-9.c: Likewise.
+ * gcc.dg/tree-ssa/fre-vce-1.c: Likewise.
+ * gcc.dg/tree-ssa/loadpre6.c: Likewise.
+ * gcc.dg/tree-ssa/pr21574.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-dom-cse-1.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-1.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-11.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-12.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-13.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-14.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-15.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-16.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-17.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-18.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-19.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-2.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-21.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-22.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-23.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-24.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-25.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-26.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-27.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-3.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-4.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-5.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-6.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-7.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-8.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-9.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-pre-10.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-pre-26.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-pre-7.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-pre-8.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-pre-9.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-sccvn-1.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-sccvn-2.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-sccvn-3.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-sccvn-4.c: Likewise.
+ * gcc.dg/tree-ssa/struct-aliasing-1.c: Likewise.
+ * gcc.dg/tree-ssa/struct-aliasing-2.c: Likewise.
+ * c-c++-common/pr46562-2.c: Likewise.
+ * gfortran.dg/pr42108.f90: Likewise.
+ * gcc.dg/torture/pta-structcopy-1.c: Scan ealias dump, force
+ foo to be inlined even at -O1.
+ * gcc.dg/tree-ssa/ssa-dce-4.c: Disable FRE.
+ * gcc.dg/ipa/ipa-pta-14.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-1.c: Adjust.
+ * gcc.dg/matrix/matrix.exp: Disable FRE.
+
2011-03-24 Jakub Jelinek <jakub@redhat.com>
PR debug/48204
/* { dg-do compile } */
-/* { dg-options "-O -fno-tree-ccp -fno-tree-forwprop -fdump-tree-fre" } */
+/* { dg-options "-O -fno-tree-ccp -fno-tree-forwprop -fdump-tree-fre1" } */
static const int a[4] = {};
int foo(void)
return *p;
}
-/* { dg-final { scan-tree-dump "= 0;" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "= 0;" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
struct Foo {
Foo() {};
return 0;
}
-/* { dg-final { scan-tree-dump "Replaced b1.b with 1" "fre" } } */
-/* { dg-final { scan-tree-dump "Replaced b1.i with 0" "fre" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump "Replaced b1.f with 1" "fre" { xfail *-*-* } } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced b1.b with 1" "fre1" } } */
+/* { dg-final { scan-tree-dump "Replaced b1.i with 0" "fre1" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump "Replaced b1.f with 1" "fre1" { xfail *-*-* } } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
int f();
/* We should optimize this to a direct call. */
-/* { dg-final { scan-tree-dump "Replacing call target with f" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replacing call target with f" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do link } */
-/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details -fdump-tree-fre" } */
+/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details -fdump-tree-fre2" } */
static int x, y;
local_address_taken (&y);
/* As we are computing flow- and context-insensitive we may not
CSE the load of x here. */
- /* { dg-final { scan-tree-dump " = x;" "fre" } } */
+ /* { dg-final { scan-tree-dump " = x;" "fre2" } } */
return x;
}
/* { dg-final { cleanup-ipa-dump "pta" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { cleanup-tree-dump "fre2" } } */
/* { dg-do run } */
-/* { dg-options "-O2 -fipa-pta -fno-tree-sra -fdump-ipa-pta-details" } */
+/* { dg-options "-O2 -fipa-pta -fno-tree-fre -fno-tree-sra -fdump-ipa-pta-details" } */
struct X {
int i;
/* { dg-do run } */
-/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details -fdump-tree-fre-details" } */
+/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details -fdump-tree-fre2-details" } */
static int __attribute__((noinline,noclone))
foo (int *p, int *q)
/* { dg-final { scan-ipa-dump "foo.arg0 = &a" "pta" } } */
/* { dg-final { scan-ipa-dump "foo.arg1 = &b" "pta" } } */
-/* { dg-final { scan-tree-dump "Replaced \\\*p_1\\\(D\\\) with 1" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\*p_1\\\(D\\\) with 1" "fre2" } } */
+/* { dg-final { cleanup-tree-dump "fre2" } } */
/* { dg-final { cleanup-ipa-dump "pta" } } */
/* { dg-do run } */
-/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details -fdump-tree-fre-details" } */
+/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details -fdump-tree-fre2-details" } */
int a, b;
/* { dg-final { scan-ipa-dump "foo.arg0 = &a" "pta" } } */
/* { dg-final { scan-ipa-dump "foo.arg1 = &b" "pta" } } */
-/* { dg-final { scan-tree-dump "Replaced \\\*p_1\\\(D\\\) with 1" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\*p_1\\\(D\\\) with 1" "fre2" } } */
+/* { dg-final { cleanup-tree-dump "fre2" } } */
/* { dg-final { cleanup-ipa-dump "pta" } } */
load_lib gcc-dg.exp
load_lib target-supports.exp
-set DEFAULT_MATCFLAGS "-O3 -fipa-matrix-reorg -fdump-ipa-matrix-reorg -fwhole-program"
+set DEFAULT_MATCFLAGS "-O3 -fipa-matrix-reorg -fdump-ipa-matrix-reorg -fwhole-program -fno-tree-fre"
# Initialize `dg'.
dg-init
# These are globals used by profopt-execute. The first is options
# needed to generate profile data, the second is options to use the
# profile data.
-set profile_option "-fprofile-generate -O3"
-set feedback_option "-fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program"
+set profile_option "-fprofile-generate -O3 -fno-tree-fre"
+set feedback_option "-fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program -fno-tree-fre"
foreach src [lsort [glob -nocomplain $srcdir/$subdir/transpose-*.c]] {
# If we're only testing specific files and this isn't one of them, skip it.
/* { dg-do run } */
-/* { dg-options "-fno-tree-sra -fdump-tree-alias" } */
+/* { dg-options "-fdump-tree-ealias" } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
struct X
} y;
};
int i;
-static int
+static int __attribute__((always_inline))
foo (struct X *x)
{
struct Y y = x->y;
+ /* In the inlined instance the dereferenced pointer needs to point to i. */
*y.p = 0;
i = 1;
return *y.p;
return 0;
}
-/* { dg-final { scan-tree-dump "points-to vars: { i }" "alias" } } */
-/* { dg-final { cleanup-tree-dump "alias" } } */
+/* { dg-final { scan-tree-dump "points-to vars: { i }" "ealias" } } */
+/* { dg-final { cleanup-tree-dump "ealias" } } */
/* { dg-do compile } */
-/* { dg-options "-O1 -fstrict-aliasing -fdump-tree-fre" } */
+/* { dg-options "-O1 -fstrict-aliasing -fdump-tree-fre1" } */
__extension__ typedef __SIZE_TYPE__ size_t;
extern void *xmalloc (size_t) __attribute__ ((__malloc__));
able to determine that modifying e->dest->flags does not
modify e or e->dest if we can assert strict-aliasing rules.
The net result is that we only need one load of e->dest. */
-/* { dg-final { scan-tree-dump-times "->dest" 1 "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "->dest" 1 "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fre-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fdump-tree-fre1-details -fdump-tree-optimized" } */
struct A {
int i;
return *q;
}
-/* { dg-final { scan-tree-dump "with 0" "fre" } } */
-/* { dg-final { scan-tree-dump "with 1" "fre" } } */
-/* { dg-final { scan-tree-dump "with 3" "fre" } } */
-/* { dg-final { scan-tree-dump "with 4" "fre" } } */
-/* { dg-final { scan-tree-dump "with 5" "fre" } } */
-/* { dg-final { scan-tree-dump "with 8" "fre" } } */
+/* { dg-final { scan-tree-dump "with 0" "fre1" } } */
+/* { dg-final { scan-tree-dump "with 1" "fre1" } } */
+/* { dg-final { scan-tree-dump "with 3" "fre1" } } */
+/* { dg-final { scan-tree-dump "with 4" "fre1" } } */
+/* { dg-final { scan-tree-dump "with 5" "fre1" } } */
+/* { dg-final { scan-tree-dump "with 8" "fre1" } } */
/* { dg-final { scan-tree-dump-not "return 2;" "optimized" } } */
/* { dg-final { scan-tree-dump-not "return 6;" "optimized" } } */
/* { dg-final { scan-tree-dump-not "return 7;" "optimized" } } */
/* { dg-final { scan-tree-dump-not "return -1;" "optimized" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-fre" } */
+/* { dg-options "-O1 -fdump-tree-fre1" } */
void
arf ()
if (""[0] == 0)
blah ();
}
-/* { dg-final { scan-tree-dump-times "= 0;" 1 "fre"} } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "= 0;" 1 "fre1"} } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
int b;
unsigned a;
conversion to int. FRE should then be able to replace
the rhs of the store to b by 1. */
-/* { dg-final { scan-tree-dump "Replaced\[^\\n\]*with 1" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced\[^\\n\]*with 1" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-optimized -fdump-tree-fre -W -Wall -fno-early-inlining" } */
+/* { dg-options "-O1 -fdump-tree-optimized -fdump-tree-fre1 -W -Wall -fno-early-inlining" } */
int b;
unsigned a;
/* We should have converted the assignments to two = 1. FRE does this. */
/* { dg-final { scan-tree-dump-times " = 1" 2 "optimized"} } */
-/* { dg-final { scan-tree-dump-not " = a;" "fre"} } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-not " = a;" "fre1"} } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
-/* { dg-options "-O2 -fdump-tree-fre -w" } */
-/* { dg-options "-O2 -fdump-tree-fre -w -msse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -fdump-tree-fre1 -w" } */
+/* { dg-options "-O2 -fdump-tree-fre1 -w -msse" { target { i?86-*-* x86_64-*-* } } } */
/* { dg-do compile } */
#define vector __attribute__((vector_size(sizeof(int)*4) ))
struct s { vector int i; };
g(&sv, *(float*)&sv.i);
}
-/* { dg-final { scan-tree-dump-times "sv_\[0-9\]\\\(D\\\)->i" 2 "fre" } } */
-/* { dg-final { scan-tree-dump-times "sv.i" 2 "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "sv_\[0-9\]\\\(D\\\)->i" 2 "fre1" } } */
+/* { dg-final { scan-tree-dump-times "sv.i" 2 "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-pre-stats -fdump-tree-fre" } */
+/* { dg-options "-O2 -fdump-tree-pre-stats -fdump-tree-fre1" } */
#include <stddef.h>
union tree_node;
return 0;
}
-/* { dg-final { scan-tree-dump-not "= unexpanded_var_list;" "fre" } } */
+/* { dg-final { scan-tree-dump-not "= unexpanded_var_list;" "fre1" } } */
/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre" } } */
/* { dg-final { scan-tree-dump-times "Insertions: 2" 1 "pre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-final { cleanup-tree-dump "pre" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
int
foo (int *p)
}
/* The store to *p should be propagated to the load statement. */
-/* { dg-final { scan-tree-dump "Replaced \\\*p_.\\\(D\\\) with 0" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\*p_.\\\(D\\\) with 0" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-cddce1" } */
+/* { dg-options "-O -fno-tree-fre -fdump-tree-cddce1" } */
int foo(int b)
{
return a[2] + b;
}
+/* Verify DCE removes all accesses to a but the last store and the
+ read from a[2]. */
/* { dg-final { scan-tree-dump-times "a\\\[\[^\n\]\\\]" 2 "cddce1" } } */
/* { dg-final { cleanup-tree-dump "cddce1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fre-details" } */
+/* { dg-options "-O2 -fdump-tree-fre1-details" } */
int t(int a) __attribute__ ((const));
void q (void);
void
}
}
/* We should thread the jump twice and eliminate it. */
-/* { dg-final { scan-tree-dump-times "Replaced.* t " 1 "fre"} } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "Replaced.* t " 1 "fre1"} } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
/* From PR27090. */
return *c + t;
}
-/* { dg-final { scan-tree-dump "Replaced \\\*a_\[^\n\].*with t_" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\*c_\[^\n\].*with t_" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
struct
{
return (x);
}
-/* { dg-final { scan-tree-dump "Replaced S\\\[5\\\].x with 4" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced S\\\[5\\\].x with 4" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
struct
{
return (x);
}
-/* { dg-final { scan-tree-dump "Replaced S\\\[5\\\].x with 4" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced S\\\[5\\\].x with 4" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fstrict-aliasing -fno-tree-sra -fdump-tree-fre-details" } */
+/* { dg-options "-O -fstrict-aliasing -fno-tree-sra -fdump-tree-fre1-details" } */
/* Should be optimized, propagating &a into (*p)[i]. */
}
}
-/* { dg-final { scan-tree-dump "Replaced tmp1_.\\\(D\\\)->data with &a" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced tmp1_.\\\(D\\\)->data with &a" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-details" } */
+/* { dg-options "-O -fno-tree-sra -fdump-tree-fre1-details" } */
/* Should be optimized, propagating &a into (*p)[i]. */
bar(a);
}
-/* { dg-final { scan-tree-dump "Replaced tmp1.data with &a" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced tmp1.data with &a" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-details" } */
+/* { dg-options "-O -fno-tree-sra -fdump-tree-fre1-details" } */
/* Should be optimized, propagating &a into (*p)[i]. */
bar(a);
}
-/* { dg-final { scan-tree-dump "Replaced" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre" } */
+/* { dg-options "-O -fdump-tree-fre1" } */
/* FRE should be able to combine i and j and perform simplification
on the condition. */
link_error ();
}
-/* { dg-final { scan-tree-dump-not "link_error" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-not "link_error" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details -fno-tree-sra" } */
+/* { dg-options "-O -fdump-tree-fre1-details -fno-tree-sra" } */
struct Bar {
int dom;
return f.doms[0LL].dom;
}
-/* { dg-final { scan-tree-dump "Replaced f.doms\\\[0\\\].dom with i_" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced f.doms\\\[0\\\].dom with i_" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre" } */
+/* { dg-options "-O -fdump-tree-fre1" } */
struct a
{
/* We should have CSEd the load from c->a. */
-/* { dg-final { scan-tree-dump-times "c_.*\\\.a" 1 "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "c_.*\\\.a" 1 "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre" } */
+/* { dg-options "-O -fdump-tree-fre1" } */
struct a
{
/* We should have CSEd the load from c->a. */
-/* { dg-final { scan-tree-dump-times "c_.*\\\.a" 1 "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "c_.*\\\.a" 1 "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
/* From PR14287. */
h = c;
}
-/* { dg-final { scan-tree-dump "Replaced \\\(short int\\\) c_.*with b_" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\(short int\\\) c_.*with b_" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre" } */
+/* { dg-options "-O -fdump-tree-fre1" } */
struct f {
float a;
h(a1, b, c, d);
}
-/* { dg-final { scan-tree-dump-not "a\\\.? = " "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-not "a\\\.? = " "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre" } */
+/* { dg-options "-O -fdump-tree-fre1" } */
int i;
int foo (void)
/* We should eliminate the redundant load of i. */
-/* { dg-final { scan-tree-dump-not "= i;" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-not "= i;" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre" } */
+/* { dg-options "-O -fdump-tree-fre1" } */
int f(int t, int a, int b)
{
return c+d;
}
-/* { dg-final { scan-tree-dump-times "PHI" 1 "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "PHI" 1 "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fno-tree-sra -fdump-tree-fre" } */
+/* { dg-options "-O -fno-tree-sra -fdump-tree-fre1" } */
int foo(void)
{
return b.i;
}
-/* { dg-final { scan-tree-dump-times "= 0;" 5 "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "= 0;" 5 "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fno-tree-sra -fdump-tree-fre" } */
+/* { dg-options "-O -fno-tree-sra -fdump-tree-fre1" } */
struct X { int i; int j; };
void bar (struct X *);
/* We should optimize this to return 0. */
-/* { dg-final { scan-tree-dump "= 0;" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "= 0;" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-details" } */
+/* { dg-options "-O -fno-tree-sra -fdump-tree-fre1-details" } */
union U {
float f;
}
/* avr has 16 bit int and 32 bit float */
-/* { dg-final { scan-tree-dump "Replaced u.i with 0 in" "fre" {xfail avr-*-* } } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced u.i with 0 in" "fre1" {xfail avr-*-* } } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
int *q;
void __attribute__((noinline))
return x;
}
-/* { dg-final { scan-tree-dump "Replaced x with 0" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced x with 0" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
When the condition is true, we distribute "(int) (a + b)" as
"(int) a + (int) b", otherwise we keep the original. */
/* { dg-do compile { target { { ! mips64 } && { ! spu-*-* } } } } */
-/* { dg-options "-O -fwrapv -fdump-tree-fre-details" } */
+/* { dg-options "-O -fwrapv -fdump-tree-fre1-details" } */
/* From PR14844. */
return aa + bb;
}
-/* { dg-final { scan-tree-dump "Replaced \\\(int\\\) aa_.*with a_" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\(int\\\) aa_.*with a_" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* If the target returns false for TARGET_PROMOTE_PROTOTYPES, then there
will be no casts for FRE to eliminate and the test will fail. */
/* { dg-do compile { target i?86-*-* x86_64-*-* hppa*-*-* mips*-*-* m68k*-*-* } } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
/* From PR21608. */
return wrap(f);
}
-/* { dg-final { scan-tree-dump "Replaced \\\(char\\\) .*with " "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\(char\\\) .*with " "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
/* From PR19792. */
return a == t;
}
-/* { dg-final { scan-tree-dump "Replaced \\\(unsigned int\\\) a_.*with t_" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\(unsigned int\\\) a_.*with t_" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
int i; int foo(void) { i = 2; int j = i * 2; int k = i + 2; return j == k; }
-/* { dg-final { scan-tree-dump-times "Replaced " 5 "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "Replaced " 5 "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-details -fdump-tree-optimized" } */
+/* { dg-options "-O -fno-tree-sra -fdump-tree-fre1-details -fdump-tree-optimized" } */
#if (__SIZEOF_INT__ == __SIZEOF_FLOAT__)
typedef int intflt;
#elif (__SIZEOF_LONG__ == __SIZEOF_FLOAT__)
return a.u.k;
}
-/* { dg-final { scan-tree-dump-times "Inserted pretmp" 1 "fre" } } */
-/* { dg-final { scan-tree-dump-times "Replaced a.u.f with pretmp" 3 "fre" } } */
-/* { dg-final { scan-tree-dump-times "Replaced a.u.k with j" 1 "fre" } } */
-/* { dg-final { scan-tree-dump "= VIEW_CONVERT_EXPR<float>\\\(j_" "fre" } } */
+/* { dg-final { scan-tree-dump-times "Inserted pretmp" 1 "fre1" } } */
+/* { dg-final { scan-tree-dump-times "Replaced a.u.f with pretmp" 3 "fre1" } } */
+/* { dg-final { scan-tree-dump-times "Replaced a.u.k with j" 1 "fre1" } } */
+/* { dg-final { scan-tree-dump "= VIEW_CONVERT_EXPR<float>\\\(j_" "fre1" } } */
/* { dg-final { scan-tree-dump "return j" "optimized" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-details" } */
+/* { dg-options "-O -fno-tree-sra -fdump-tree-fre1-details" } */
#if (__SIZEOF_INT__ == __SIZEOF_FLOAT__)
typedef int intflt;
#elif (__SIZEOF_LONG__ == __SIZEOF_FLOAT__)
}
}
-/* { dg-final { scan-tree-dump-times "Replaced u.f with pretmp" 2 "fre" } } */
-/* { dg-final { scan-tree-dump-times "Inserted pretmp" 2 "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "Replaced u.f with pretmp" 2 "fre1" } } */
+/* { dg-final { scan-tree-dump-times "Inserted pretmp" 2 "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-stats" } */
+/* { dg-options "-O -fno-tree-sra -fdump-tree-fre1-stats" } */
union loc {
unsigned reg;
}
}
-/* { dg-final { scan-tree-dump-times "Eliminated: 1" 2 "fre" } } */
-/* { dg-final { scan-tree-dump-times "Insertions: 1" 2 "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 1" 2 "fre1" } } */
+/* { dg-final { scan-tree-dump-times "Insertions: 1" 2 "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-fre-stats" } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-fre-stats -fno-finite-math-only" { target sh*-*-* } } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-fre1-stats" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-fre1-stats -fno-finite-math-only" { target sh*-*-* } } */
double cos (double);
void link_error();
void f(double a)
link_error();
}
-/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "fre"} } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "fre1"} } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre-details" } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
typedef union
{
pResult->data = pResult->data;
}
-/* { dg-final { scan-tree-dump "Deleted redundant store" "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Deleted redundant store" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-fre-stats" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-fre1-stats" } */
int
foo (int *array)
{
return 0;
}
/* We should eliminate one load. */
-/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "fre"} } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "fre1"} } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-fre-stats" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-fre1-stats" } */
struct s {
int *n;
};
/* We should eliminate two address calculations, and one load. */
/* We used to eliminate a cast but that was before POINTER_PLUS_EXPR
was added. */
-/* { dg-final { scan-tree-dump-times "Eliminated: 3" 1 "fre"} } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 3" 1 "fre1"} } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-fre-stats" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-fre1-stats" } */
int
foo (unsigned long a)
{
return 1;
return 0;
}
-/* { dg-final { scan-tree-dump-times "return 0;" 0 "fre"} } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "return 0;" 0 "fre1"} } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fre-stats" } */
+/* { dg-options "-O2 -fdump-tree-fre1-stats" } */
void vnum_test8(int *data)
{
}
}
/* We should eliminate m - n, and set n = n + k into n = m. */
-/* { dg-final { scan-tree-dump-times "Eliminated: 3" 1 "fre"} } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 3" 1 "fre1"} } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fre-stats" } */
+/* { dg-options "-O2 -fdump-tree-fre1-stats" } */
int vnum_test8(int *data)
{
}
/* We should eliminate m - n, and set n = n + k into n = m, and
set p to 0 */
-/* { dg-final { scan-tree-dump-times "Eliminated: 4" 1 "fre"} } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 4" 1 "fre1"} } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fre-stats" } */
+/* { dg-options "-O2 -fdump-tree-fre1-stats" } */
int main(int argc, char **argv)
{
int *p;
return result;
}
/* We should eliminate result = *p by saying it has the value 2. */
-/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "fre"} } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "fre1"} } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fre-stats" } */
+/* { dg-options "-O2 -fdump-tree-fre1-stats" } */
int vnum_test8(int *data)
{
}
/* We should eliminate m - n, n + k, set data[5] = 0, eliminate the
address arithmetic for data[5], and set p = 0.
-/* { dg-final { scan-tree-dump-times "Eliminated: 5" 1 "fre"} } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 5" 1 "fre1"} } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fre-details" } */
+/* { dg-options "-O2 -fdump-tree-fre1-details" } */
struct S { float f; };
int __attribute__((noinline))
return i + *q;
}
-/* { dg-final { scan-tree-dump "Replaced\[^\n\]*with i_." "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced\[^\n\]*with i_." "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fre" } */
+/* { dg-options "-O2 -fdump-tree-fre1" } */
struct S { unsigned f; };
/* There should only be one load of p->f because fwprop can change
*(int *)&p->f into just (int)p->f. */
-/* { dg-final { scan-tree-dump-times "= \[^\n\]*p_.\\\(D\\\)" 1 "fre" } } */
-/* { dg-final { cleanup-tree-dump "fre" } } */
+/* { dg-final { scan-tree-dump-times "= \[^\n\]*p_.\\\(D\\\)" 1 "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
! { dg-do compile }
-! { dg-options "-O2 -fdump-tree-fre" }
+! { dg-options "-O2 -fdump-tree-fre1" }
subroutine eval(foo1,foo2,foo3,foo4,x,n,nnd)
implicit real*8 (a-h,o-z)
! There should be only one load from n left
-! { dg-final { scan-tree-dump-times "\\*n_" 1 "fre" } }
-! { dg-final { cleanup-tree-dump "fre" } }
+! { dg-final { scan-tree-dump-times "\\*n_" 1 "fre1" } }
+! { dg-final { cleanup-tree-dump "fre1" } }