+2015-10-21 Aditya Kumar <aditya.k7@samsung.com>
+ Sebastian Pop <s.pop@samsung.com>
+
+ * graphite-isl-ast-to-gimple.c (graphite_create_new_loop_guard): Do not call
+ create_empty_if_region_on_edge when cond_expr is true.
+ (translate_isl_ast_node_for): Check whether a guard has been generated.
+
2015-10-21 Aditya Kumar <aditya.k7@samsung.com>
* graphite-poly.h (struct dr_info): Added invalid_alias_set number.
cond_expr = fold_build2 (LT_EXPR, boolean_type_node, *lb, ub_one);
}
- exit_edge = create_empty_if_region_on_edge (entry_edge, cond_expr);
+ if (integer_onep (cond_expr))
+ exit_edge = entry_edge;
+ else
+ exit_edge = create_empty_if_region_on_edge (entry_edge, cond_expr);
return exit_edge;
}
tree type, lb, ub;
edge last_e = graphite_create_new_loop_guard (next_e, node, &type,
&lb, &ub, ip);
- edge true_e = get_true_edge_from_guard_bb (next_e->dest);
- translate_isl_ast_for_loop (context_loop, node, true_e,
- type, lb, ub, ip);
+ if (last_e == next_e)
+ /* There was no guard generated. */
+ return translate_isl_ast_for_loop (context_loop, node, last_e,
+ type, lb, ub, ip);
+
+ edge true_e = get_true_edge_from_guard_bb (next_e->dest);
+ translate_isl_ast_for_loop (context_loop, node, true_e, type, lb, ub, ip);
return last_e;
}