aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorSebastian Pop <spop@gcc.gnu.org>2010-12-07 15:27:50 +0000
committerSebastian Pop <spop@gcc.gnu.org>2010-12-07 15:27:50 +0000
commit5a1f5f9a3c83a1e1c5a6d61625909a451effae15 (patch)
tree668496f7d548657f65ecf68df3be53bc300d3fa7 /gcc/tree-data-ref.c
parentac819ba59a7462c52e2fbdf84a7eb8830ee3a0bf (diff)
downloadgcc-5a1f5f9a3c83a1e1c5a6d61625909a451effae15.zip
gcc-5a1f5f9a3c83a1e1c5a6d61625909a451effae15.tar.gz
gcc-5a1f5f9a3c83a1e1c5a6d61625909a451effae15.tar.bz2
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
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 094d168..4dfcd5c 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -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_b = chrec_convert (type, access_fun_b, NULL);
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
captured by the classic distance vector representation. */
@@ -3496,7 +3497,8 @@ omega_setup_subscript (tree access_fun_a, tree access_fun_b,
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);
if (!init_omega_eq_with_af (pb, eq, DDR_NB_LOOPS (ddr), fun_a, ddr)