+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.
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);
--- /dev/null
+/* { 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;
+ }
+ }
+}
+
+
+