Commit 5a1f5f9a by Sebastian Pop

Fix PR42327: use build_int_cst.

2010-12-07  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/42327
	* tree-data-ref.c (omega_setup_subscript): Call build_int_cst
	instead of using integer_minus_one_node.

	* gcc.dg/tree-ssa/pr42327.c: New.

From-SVN: r167548
parent ac819ba5
2010-12-07 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/42327
* tree-data-ref.c (omega_setup_subscript): Call build_int_cst
instead of using integer_minus_one_node.
2010-12-07 Nathan Froyd <froydnj@codesourcery.com> 2010-12-07 Nathan Froyd <froydnj@codesourcery.com>
PR c++/45330 PR c++/45330
2010-12-06 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/42327
* gcc.dg/tree-ssa/pr42327.c: New.
2010-12-07 Nathan Froyd <froydnj@codesourcery.com> 2010-12-07 Nathan Froyd <froydnj@codesourcery.com>
PR c++/45330 PR c++/45330
......
/* { dg-do compile } */
/* { dg-options "-O1 -fcheck-data-deps" } */
void foo(char *str)
{
while (*str != 0) *str++ = 0;
}
...@@ -3482,6 +3482,7 @@ omega_setup_subscript (tree access_fun_a, tree access_fun_b, ...@@ -3482,6 +3482,7 @@ omega_setup_subscript (tree access_fun_a, tree access_fun_b,
tree fun_a = chrec_convert (type, access_fun_a, NULL); tree fun_a = chrec_convert (type, access_fun_a, NULL);
tree fun_b = chrec_convert (type, access_fun_b, NULL); tree fun_b = chrec_convert (type, access_fun_b, NULL);
tree difference = chrec_fold_minus (type, fun_a, fun_b); tree difference = chrec_fold_minus (type, fun_a, fun_b);
tree minus_one;
/* When the fun_a - fun_b is not constant, the dependence is not /* When the fun_a - fun_b is not constant, the dependence is not
captured by the classic distance vector representation. */ captured by the classic distance vector representation. */
...@@ -3496,7 +3497,8 @@ omega_setup_subscript (tree access_fun_a, tree access_fun_b, ...@@ -3496,7 +3497,8 @@ omega_setup_subscript (tree access_fun_a, tree access_fun_b,
return true; return true;
} }
fun_b = chrec_fold_multiply (type, fun_b, integer_minus_one_node); minus_one = build_int_cst (type, -1);
fun_b = chrec_fold_multiply (type, fun_b, minus_one);
eq = omega_add_zero_eq (pb, omega_black); eq = omega_add_zero_eq (pb, omega_black);
if (!init_omega_eq_with_af (pb, eq, DDR_NB_LOOPS (ddr), fun_a, ddr) if (!init_omega_eq_with_af (pb, eq, DDR_NB_LOOPS (ddr), fun_a, ddr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment