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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183055
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
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);
+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,
--- /dev/null
+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" } } */
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" } } */
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" } }
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" } }
! 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" } }