Fix pdr accesses order
2016-04-09 Tom de Vries <tom@codesourcery.com> PR tree-optimization/68953 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Order accesses from first to last subscript. * gcc.dg/graphite/pr68953.c: New test. From-SVN: r234851
This commit is contained in:
parent
138c3c1a78
commit
09bf990eb8
|
@ -1,3 +1,9 @@
|
|||
2016-04-09 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR tree-optimization/68953
|
||||
* graphite-sese-to-poly.c (pdr_add_memory_accesses): Order accesses from
|
||||
first to last subscript.
|
||||
|
||||
2016-04-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/70586
|
||||
|
|
|
@ -672,7 +672,7 @@ pdr_add_memory_accesses (isl_map *acc, dr_info &dri)
|
|||
|
||||
aff = extract_affine (scop, afn,
|
||||
isl_space_domain (isl_map_get_space (acc)));
|
||||
acc = set_index (acc, i + 1, aff);
|
||||
acc = set_index (acc, nb_subscripts - i , aff);
|
||||
}
|
||||
|
||||
return isl_map_coalesce (acc);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2016-04-09 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR tree-optimization/68953
|
||||
* gcc.dg/graphite/pr68953.c: New test.
|
||||
|
||||
2016-04-09 Dominique d'Humieres <dominiq@lps.ens.fr>
|
||||
|
||||
PR fortran/70592
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-options "-O1 -floop-nest-optimize" } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
int yu[4][1] = { { 1 }, { 2 }, { 3 }, { 4 } };
|
||||
|
||||
static void __attribute__((noinline,noclone))
|
||||
foo (void)
|
||||
{
|
||||
int zh, ro;
|
||||
|
||||
for (zh = 0; zh < 2; ++zh)
|
||||
for (ro = 0; ro < 3; ++ro)
|
||||
yu[ro][0] = yu[zh + 1][0];
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
foo ();
|
||||
|
||||
if (yu[0][0] != 2
|
||||
|| yu[1][0] != 2
|
||||
|| yu[2][0] != 2
|
||||
|| yu[3][0] != 4)
|
||||
abort ();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue