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
This commit is contained in:
Sebastian Pop 2011-02-02 15:52:21 +00:00 committed by Sebastian Pop
parent 14dd9aabd6
commit 9dac82c4da
8 changed files with 56 additions and 6 deletions

View File

@ -1,3 +1,12 @@
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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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" } } */

View File

@ -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

View File

@ -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" } }

View File

@ -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 */
}
};