aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2011-02-02 15:52:21 +0000
committerSebastian Pop <spop@gcc.gnu.org>2011-02-02 15:52:21 +0000
commit9dac82c4dac4a4e47756c5a16067672339804cf0 (patch)
tree1625443d0948a9b0f09c519269bd5dfc6bd1c511
parent14dd9aabd6cdb21bd3c482452239f06230be84c3 (diff)
downloadgcc-9dac82c4dac4a4e47756c5a16067672339804cf0.zip
gcc-9dac82c4dac4a4e47756c5a16067672339804cf0.tar.gz
gcc-9dac82c4dac4a4e47756c5a16067672339804cf0.tar.bz2
Fix PR40979 and PR47044: after LIM call copy_prop and DCE to clean up.
2011-02-02 Sebastian Pop <sebastian.pop@amd.com> Richard Guenther <rguenther@suse.de> PR tree-optimization/40979 PR bootstrap/47044 * passes.c (init_optimization_passes): After LIM call copy_prop and DCE to clean up. * tree-ssa-loop.c (pass_graphite_transforms): Add TODO_dump_func. * gcc.dg/graphite/graphite.exp (DEFAULT_VECTCFLAGS): Add -ffast-math. * gcc.dg/graphite/pr35356-2.c: Adjust pattern. * gfortran.dg/graphite/graphite.exp: Run vect_files conditionally to check_vect_support_and_set_flags. * gfortran.dg/graphite/vect-pr40979.f90: New. Co-Authored-By: Richard Guenther <rguenther@suse.de> From-SVN: r169531
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/passes.c2
-rw-r--r--gcc/testsuite/ChangeLog11
-rw-r--r--gcc/testsuite/gcc.dg/graphite/graphite.exp2
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr35356-2.c4
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/graphite.exp6
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f9026
-rw-r--r--gcc/tree-ssa-loop.c2
8 files changed, 56 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cbe95a0..79a140b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,13 @@
2011-02-02 Sebastian Pop <sebastian.pop@amd.com>
+ Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/40979
+ PR bootstrap/47044
+ * passes.c (init_optimization_passes): After LIM call copy_prop
+ and DCE to clean up.
+ * tree-ssa-loop.c (pass_graphite_transforms): Add TODO_dump_func.
+
+2011-02-02 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/47576
PR tree-optimization/47555
diff --git a/gcc/passes.c b/gcc/passes.c
index 90d61e3..bf1bd4b 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -892,9 +892,9 @@ init_optimization_passes (void)
{
struct opt_pass **p = &pass_graphite.pass.sub;
NEXT_PASS (pass_graphite_transforms);
+ NEXT_PASS (pass_lim);
NEXT_PASS (pass_copy_prop);
NEXT_PASS (pass_dce_loop);
- NEXT_PASS (pass_lim);
}
NEXT_PASS (pass_iv_canon);
NEXT_PASS (pass_if_conversion);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6b460a1..c4dd8ac 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2011-02-02 Sebastian Pop <sebastian.pop@amd.com>
+ Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/40979
+ PR bootstrap/47044
+ * gcc.dg/graphite/graphite.exp (DEFAULT_VECTCFLAGS): Add -ffast-math.
+ * gcc.dg/graphite/pr35356-2.c: Adjust pattern.
+ * gfortran.dg/graphite/graphite.exp: Run vect_files conditionally to
+ check_vect_support_and_set_flags.
+ * gfortran.dg/graphite/vect-pr40979.f90: New.
+
2011-02-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/47572
diff --git a/gcc/testsuite/gcc.dg/graphite/graphite.exp b/gcc/testsuite/gcc.dg/graphite/graphite.exp
index 74e1ed8..cdf35eb 100644
--- a/gcc/testsuite/gcc.dg/graphite/graphite.exp
+++ b/gcc/testsuite/gcc.dg/graphite/graphite.exp
@@ -58,7 +58,7 @@ dg-runtest $block_files "" "-O2 -floop-block -fno-loop-strip-mine -fno-loo
# Vectorizer tests, to be run or compiled, depending on target capabilities.
global DEFAULT_VECTCFLAGS
-set DEFAULT_VECTCFLAGS "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details"
+set DEFAULT_VECTCFLAGS "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math"
if [check_vect_support_and_set_flags] {
dg-runtest $vect_files "" $DEFAULT_VECTCFLAGS
diff --git a/gcc/testsuite/gcc.dg/graphite/pr35356-2.c b/gcc/testsuite/gcc.dg/graphite/pr35356-2.c
index e5b0213..66cfdea 100644
--- a/gcc/testsuite/gcc.dg/graphite/pr35356-2.c
+++ b/gcc/testsuite/gcc.dg/graphite/pr35356-2.c
@@ -39,6 +39,6 @@ foo (int bar, int n, int k)
*/
-/* { dg-final { scan-tree-dump-times "MIN_EXPR" 2 "graphite" } } */
-/* { dg-final { scan-tree-dump-times "MAX_EXPR" 2 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "MIN_EXPR" 4 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "MAX_EXPR" 4 "graphite" } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gfortran.dg/graphite/graphite.exp b/gcc/testsuite/gfortran.dg/graphite/graphite.exp
index 3d43b55..73c2aee 100644
--- a/gcc/testsuite/gfortran.dg/graphite/graphite.exp
+++ b/gcc/testsuite/gfortran.dg/graphite/graphite.exp
@@ -51,7 +51,11 @@ gfortran-dg-runtest $scop_files "-O2 -fgraphite -fdump-tree-graphite-all"
gfortran-dg-runtest $id_files "-O2 -fgraphite-identity -ffast-math"
gfortran-dg-runtest $interchange_files "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all"
gfortran-dg-runtest $block_files "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all"
-gfortran-dg-runtest $vect_files "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details"
+
+# Vectorizer tests, to be run or compiled, depending on target capabilities.
+if [check_vect_support_and_set_flags] {
+ gfortran-dg-runtest $vect_files "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math"
+}
# Tests to be run.
set dg-do-what-default run
diff --git a/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90 b/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
new file mode 100644
index 0000000..21758e9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+! { dg-require-effective-target vect_int }
+
+module mqc_m
+integer, parameter, private :: longreal = selected_real_kind(15,90)
+contains
+ subroutine mutual_ind_quad_cir_coil (m, l12)
+ real (kind = longreal), dimension(9), save :: w2gauss, w1gauss
+ real (kind = longreal) :: l12_lower, num, l12
+ real (kind = longreal), dimension(3) :: current, coil
+ w2gauss(1) = 16.0_longreal/81.0_longreal
+ w1gauss(5) = 0.3302393550_longreal
+ do i = 1, 2*m
+ do j = 1, 9
+ do k = 1, 9
+ num = w1gauss(j) * w2gauss(k) * dot_product(coil,current)
+ l12_lower = l12_lower + num
+ end do
+ end do
+ end do
+ l12 = l12_lower
+ end subroutine mutual_ind_quad_cir_coil
+end module mqc_m
+
+! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
+! { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index 656d2b6..43693ea 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -309,7 +309,7 @@ struct gimple_opt_pass pass_graphite_transforms =
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- 0 /* todo_flags_finish */
+ TODO_dump_func /* todo_flags_finish */
}
};