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
...@@ -27,7 +33,7 @@ ...@@ -27,7 +33,7 @@
* targhook.h: Declare it. * targhook.h: Declare it.
* doc/tm.texi.in: New hook TARGET_PREFERRED_RENAME_CLASS. * doc/tm.texi.in: New hook TARGET_PREFERRED_RENAME_CLASS.
* doc/tm.texi: Regenerate. * doc/tm.texi: Regenerate.
2010-12-07 Jakub Jelinek <jakub@redhat.com> 2010-12-07 Jakub Jelinek <jakub@redhat.com>
PR debug/46799 PR debug/46799
...@@ -186,7 +192,7 @@ ...@@ -186,7 +192,7 @@
* c-family/c-format.c: Same change. * c-family/c-format.c: Same change.
* c-family/stub-objc.c: Same change. * c-family/stub-objc.c: Same change.
* c-decl.c: Include c-family/c-objc.h. * c-decl.c: Include c-family/c-objc.h.
* c-parser.c: Same change. * c-parser.c: Same change.
* c-typeck.c: Same change. * c-typeck.c: Same change.
* c-config-lang.in (gtfiles): Added c-family/c-objc.h. * c-config-lang.in (gtfiles): Added c-family/c-objc.h.
* Makefile.in (c-decl.o): Depend on c-family/c-objc.h. * Makefile.in (c-decl.o): Depend on c-family/c-objc.h.
...@@ -196,7 +202,7 @@ ...@@ -196,7 +202,7 @@
(c-family/stub-objc.o): Same change. (c-family/stub-objc.o): Same change.
(c-family/c-common.o): Same change. (c-family/c-common.o): Same change.
(PLUGIN_HEADERS): Added c-family/c-objc.h. (PLUGIN_HEADERS): Added c-family/c-objc.h.
2010-12-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> 2010-12-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* config.gcc [hppa[12]*-*-hpux10*, hppa[12]*-*-hpux11*]: Ignore * config.gcc [hppa[12]*-*-hpux10*, hppa[12]*-*-hpux11*]: Ignore
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