[gcc/]
* graphite-isl-ast-to-gimple.c: (translate_isl_ast_node_user): Use nb_loops instead of loop->num + 1. [gcc/testsuite] * gcc.dg/graphite/isl-ast-gen-user-1.c: New testcase. From-SVN: r213774
This commit is contained in:
parent
361f3f5f12
commit
b5bdf598f9
3 changed files with 35 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2014-08-09 Roman Gareev <gareevroman@gmail.com>
|
||||
|
||||
* graphite-isl-ast-to-gimple.c:
|
||||
(translate_isl_ast_node_user): Use nb_loops instead of loop->num + 1.
|
||||
|
||||
* gcc.dg/graphite/isl-ast-gen-user-1.c: New testcase.
|
||||
|
||||
2014-08-08 Guozhi Wei <carrot@google.com>
|
||||
|
||||
* config/rs6000/rs6000.md (*movdi_internal64): Add a new constraint.
|
||||
|
|
|
@ -632,9 +632,9 @@ translate_isl_ast_node_user (__isl_keep isl_ast_node *node,
|
|||
gcc_assert (GBB_BB (gbb) != ENTRY_BLOCK_PTR_FOR_FN (cfun) &&
|
||||
"The entry block should not even appear within a scop");
|
||||
|
||||
loop_p loop = gbb_loop (gbb);
|
||||
iv_map.create (loop->num + 1);
|
||||
iv_map.safe_grow_cleared (loop->num + 1);
|
||||
int nb_loops = number_of_loops (cfun);
|
||||
iv_map.create (nb_loops);
|
||||
iv_map.safe_grow_cleared (nb_loops);
|
||||
|
||||
build_iv_mapping (iv_map, gbb, user_expr, ip, SCOP_REGION (pbb->scop));
|
||||
isl_ast_expr_free (user_expr);
|
||||
|
|
25
gcc/testsuite/gcc.dg/graphite/isl-ast-gen-user-1.c
Normal file
25
gcc/testsuite/gcc.dg/graphite/isl-ast-gen-user-1.c
Normal file
|
@ -0,0 +1,25 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static const int N = 12;
|
||||
|
||||
void Crystal_Cholesky (int nSlip, int a[N][N])
|
||||
{
|
||||
int i, j, k, fdot = 0;
|
||||
|
||||
for ( i = 1; i < nSlip; i++)
|
||||
{
|
||||
for ( j = i+1; j < nSlip; j++)
|
||||
{
|
||||
for ( k = 0; k < i; k++)
|
||||
fdot += a[i][k] * a[k][j];
|
||||
a[i][j] = a[i][j] - fdot;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue