aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-data-refs.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-12-03 08:38:10 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-12-03 08:38:10 +0000
commit8349b02428926171736d2db4e075566b98b1604c (patch)
tree12a9f2c531db92894e2ef42c6beb8b035894705d /gcc/tree-vect-data-refs.c
parentd8e3e8a57158160de8da130667c19796fe6e79d5 (diff)
downloadgcc-8349b02428926171736d2db4e075566b98b1604c.zip
gcc-8349b02428926171736d2db4e075566b98b1604c.tar.gz
gcc-8349b02428926171736d2db4e075566b98b1604c.tar.bz2
re PR tree-optimization/68639 (ICE: Floating point exception)
2015-12-03 Richard Biener <rguenther@suse.de> PR tree-optimization/68639 * tree-vect-data-refs.c (dr_group_sort_cmp): Split groups belonging to different loops. (vect_analyze_data_ref_accesses): Likewise. * gfortran.fortran-torture/compile/pr68639.f90: New testcase. From-SVN: r231220
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r--gcc/tree-vect-data-refs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index b59b40c..8810af1 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -2597,6 +2597,12 @@ dr_group_sort_cmp (const void *dra_, const void *drb_)
if (dra == drb)
return 0;
+ /* DRs in different loops never belong to the same group. */
+ loop_p loopa = gimple_bb (DR_STMT (dra))->loop_father;
+ loop_p loopb = gimple_bb (DR_STMT (drb))->loop_father;
+ if (loopa != loopb)
+ return loopa->num < loopb->num ? -1 : 1;
+
/* Ordering of DRs according to base. */
if (!operand_equal_p (DR_BASE_ADDRESS (dra), DR_BASE_ADDRESS (drb), 0))
{
@@ -2688,6 +2694,12 @@ vect_analyze_data_ref_accesses (vec_info *vinfo)
matters we can push those to a worklist and re-iterate
over them. The we can just skip ahead to the next DR here. */
+ /* DRs in a different loop should not be put into the same
+ interleaving group. */
+ if (gimple_bb (DR_STMT (dra))->loop_father
+ != gimple_bb (DR_STMT (drb))->loop_father)
+ break;
+
/* Check that the data-refs have same first location (except init)
and they are both either store or load (not load and store,
not masked loads or stores). */