]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR69545: revert patch
authorSebastian Pop <s.pop@samsung.com>
Fri, 29 Jan 2016 04:31:40 +0000 (04:31 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Fri, 29 Jan 2016 04:31:40 +0000 (04:31 +0000)
Revert 'assert instead of silently failing code gen' that produces an ICE with isl-0.14.

From-SVN: r232966

gcc/ChangeLog
gcc/graphite-isl-ast-to-gimple.c

index fb0fb88d60df2fbe5f07cd36fdf5c8150ef654c6..bbdc5f7b92f9ecf72b0f02640a4131f930d82c3c 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-28  Sebastian Pop  <s.pop@samsung.com>
+
+       * graphite-isl-ast-to-gimple.c (get_rename_from_scev): Revert assert
+       back to setting codegen_error to fail codegen.
+
 2016-01-28  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/69459
index 161b43476995feff9b2243b06678999173794975..d3614e48cd8f6ebfe9917b616a1c999e561ca22f 100644 (file)
@@ -1587,17 +1587,28 @@ get_rename_from_scev (tree old_name, gimple_seq *stmts, loop_p loop,
   tree scev = scalar_evolution_in_region (region->region, loop, old_name);
 
   /* At this point we should know the exact scev for each
-     scalar SSA_NAME used in the scop.  */
-  gcc_assert (!chrec_contains_undetermined (scev));
+     scalar SSA_NAME used in the scop: all the other scalar
+     SSA_NAMEs should have been translated out of SSA using
+     arrays with one element.  */
+  tree new_expr;
+  if (chrec_contains_undetermined (scev))
+    {
+      codegen_error = true;
+      return build_zero_cst (TREE_TYPE (old_name));
+    }
 
-  tree new_expr = chrec_apply_map (scev, iv_map);
+  new_expr = chrec_apply_map (scev, iv_map);
 
   /* The apply should produce an expression tree containing
      the uses of the new induction variables.  We should be
      able to use new_expr instead of the old_name in the newly
      generated loop nest.  */
-  gcc_assert (!chrec_contains_undetermined (new_expr)
-             && !tree_contains_chrecs (new_expr, NULL));
+  if (chrec_contains_undetermined (new_expr)
+      || tree_contains_chrecs (new_expr, NULL))
+    {
+      codegen_error = true;
+      return build_zero_cst (TREE_TYPE (old_name));
+    }
 
   if (TREE_CODE (new_expr) == SSA_NAME)
     {