aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-01-10 09:14:51 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-01-10 09:14:51 +0000
commit390b24dcc579ae723bdfe1e5954c01bae0bda5b2 (patch)
tree4e9eb878be42284e75db29e96c58802dd7c87793 /gcc
parentf148a434f6a8e22a3db9176cc787aa2fc8aac4c7 (diff)
downloadgcc-390b24dcc579ae723bdfe1e5954c01bae0bda5b2.zip
gcc-390b24dcc579ae723bdfe1e5954c01bae0bda5b2.tar.gz
gcc-390b24dcc579ae723bdfe1e5954c01bae0bda5b2.tar.bz2
re PR tree-optimization/50913 (ICE in scan_tree_for_params_right_scev, at graphite-sese-to-poly.c:633 compiling libgfortran with -floop-interchange -m32)
2012-01-10 Richard Guenther <rguenther@suse.de> PR tree-optimization/50913 * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Require data-refs to be representable by Graphite with respect to any loop nest. * gcc.dg/graphite/interchange-16.c: New testcase. * gcc.dg/graphite/scop-20.c: XFAIL. * gfortran.dg/graphite/interchange-1.f: Likewise. * gfortran.dg/graphite/block-1.f90: Likewise. * gfortran.dg/graphite/block-2.f: Likewise. From-SVN: r183055
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/graphite-scop-detection.c32
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gcc.dg/graphite/interchange-16.c22
-rw-r--r--gcc/testsuite/gcc.dg/graphite/scop-20.c2
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/block-1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/block-2.f2
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/interchange-1.f2
8 files changed, 62 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 290b976..771c337 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2012-01-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/50913
+ * graphite-scop-detection.c (stmt_has_simple_data_refs_p):
+ Require data-refs to be representable by Graphite with respect
+ to any loop nest.
+
2012-01-10 Uros Bizjak <ubizjak@gmail.com>
* config/i386/constraints.md ("L"): Return true for 0xffffffff.
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index e8370ef..0a3680b 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -258,25 +258,33 @@ graphite_can_represent_expr (basic_block scop_entry, loop_p loop,
Graphite. */
static bool
-stmt_has_simple_data_refs_p (loop_p outermost_loop, gimple stmt)
+stmt_has_simple_data_refs_p (loop_p outermost_loop ATTRIBUTE_UNUSED,
+ gimple stmt)
{
data_reference_p dr;
unsigned i;
int j;
bool res = true;
- VEC (data_reference_p, heap) *drs = VEC_alloc (data_reference_p, heap, 5);
+ VEC (data_reference_p, heap) *drs = NULL;
+ loop_p outer;
- graphite_find_data_references_in_stmt (outermost_loop,
- loop_containing_stmt (stmt),
- stmt, &drs);
+ for (outer = loop_containing_stmt (stmt); outer; outer = loop_outer (outer))
+ {
+ graphite_find_data_references_in_stmt (outer,
+ loop_containing_stmt (stmt),
+ stmt, &drs);
- FOR_EACH_VEC_ELT (data_reference_p, drs, j, dr)
- for (i = 0; i < DR_NUM_DIMENSIONS (dr); i++)
- if (!graphite_can_represent_scev (DR_ACCESS_FN (dr, i)))
- {
- res = false;
- goto done;
- }
+ FOR_EACH_VEC_ELT (data_reference_p, drs, j, dr)
+ for (i = 0; i < DR_NUM_DIMENSIONS (dr); i++)
+ if (!graphite_can_represent_scev (DR_ACCESS_FN (dr, i)))
+ {
+ res = false;
+ goto done;
+ }
+
+ free_data_refs (drs);
+ drs = NULL;
+ }
done:
free_data_refs (drs);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index aa61ed4..02e8b55 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2012-01-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/50913
+ * gcc.dg/graphite/interchange-16.c: New testcase.
+ * gcc.dg/graphite/scop-20.c: XFAIL.
+ * gfortran.dg/graphite/interchange-1.f: Likewise.
+ * gfortran.dg/graphite/block-1.f90: Likewise.
+ * gfortran.dg/graphite/block-2.f: Likewise.
+
2012-01-10 Richard Henderson <rth@redhat.com>
* lib/target-supports.exp (check_effective_target_vect_perm,
diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-16.c b/gcc/testsuite/gcc.dg/graphite/interchange-16.c
new file mode 100644
index 0000000..0d07d81
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/interchange-16.c
@@ -0,0 +1,22 @@
+void spread_i1 (int *rptr, int *sptr, int ncopies, int *extent, int rdelta, int m)
+{
+ int *dest;
+ int n;
+
+ while (m--)
+ {
+ dest = rptr;
+ for (n = 0; n < ncopies; n ++)
+ {
+ *dest = *sptr;
+ dest += rdelta;
+ }
+ if (extent [n])
+ if (n)
+ rptr ++;
+ }
+}
+
+int main() { return 0; }
+
+/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/scop-20.c b/gcc/testsuite/gcc.dg/graphite/scop-20.c
index cbba351..f90b174 100644
--- a/gcc/testsuite/gcc.dg/graphite/scop-20.c
+++ b/gcc/testsuite/gcc.dg/graphite/scop-20.c
@@ -23,5 +23,5 @@ int toto()
return a[3][5] + b[1];
}
-/* { dg-final { scan-tree-dump-times "number of SCoPs: 2" 1 "graphite"} } */
+/* { dg-final { scan-tree-dump-times "number of SCoPs: 2" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gfortran.dg/graphite/block-1.f90 b/gcc/testsuite/gfortran.dg/graphite/block-1.f90
index cea307e..115549b 100644
--- a/gcc/testsuite/gfortran.dg/graphite/block-1.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/block-1.f90
@@ -7,7 +7,7 @@ c=0.d0
end subroutine matrix_multiply
-! { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite" } }
+! { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite" { xfail *-*-* } } }
! { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" { xfail *-*-* } } }
! { dg-final { cleanup-tree-dump "graphite" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/block-2.f b/gcc/testsuite/gfortran.dg/graphite/block-2.f
index 75fccca..047d478 100644
--- a/gcc/testsuite/gfortran.dg/graphite/block-2.f
+++ b/gcc/testsuite/gfortran.dg/graphite/block-2.f
@@ -16,6 +16,6 @@
RETURN
END
-! { dg-final { scan-tree-dump-times "number of SCoPs: 2" 1 "graphite" } }
+! { dg-final { scan-tree-dump-times "number of SCoPs: 2" 1 "graphite" { xfail *-*-* } } }
! { dg-final { scan-tree-dump-times "will be loop blocked" 2 "graphite" { xfail *-*-* } } }
! { dg-final { cleanup-tree-dump "graphite" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/interchange-1.f b/gcc/testsuite/gfortran.dg/graphite/interchange-1.f
index fad61e2..334fbd8 100644
--- a/gcc/testsuite/gfortran.dg/graphite/interchange-1.f
+++ b/gcc/testsuite/gfortran.dg/graphite/interchange-1.f
@@ -41,5 +41,5 @@
! known to be 4 in the inner two loops. See interchange-2.f for the
! kernel from bwaves.
-! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } }
+! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } }
! { dg-final { cleanup-tree-dump "graphite" } }