aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorSebastian Pop <pop@cri.ensmp.fr>2006-04-03 11:59:38 +0200
committerSebastian Pop <spop@gcc.gnu.org>2006-04-03 09:59:38 +0000
commit16a2acea0aca10ade467f2e15bde2bc956d6528e (patch)
treeab5d9744d365b3c1b20dc31edbcd78f31b409562 /gcc/tree-data-ref.c
parente15e9be3a89ff6ca1efba612f9732d568e1ef3fc (diff)
downloadgcc-16a2acea0aca10ade467f2e15bde2bc956d6528e.zip
gcc-16a2acea0aca10ade467f2e15bde2bc956d6528e.tar.gz
gcc-16a2acea0aca10ade467f2e15bde2bc956d6528e.tar.bz2
re PR tree-optimization/26992 (Internal Compiler Error in dwarf2out.c:7607 build_polynomial_chrec)
PR bootstrap/26992 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop, chrec_is_positive, set_nb_iterations_in_loop): Use a variable for the type of nb_iter. (instantiate_parameters_1): Convert the operands before calling chrec_fold_minus, chrec_fold_plus, or chrec_fold_multiply. * tree-data-ref.c (can_use_analyze_subscript_affine_affine): Same. From-SVN: r112635
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 1421e7d..30b491b 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -3035,15 +3035,18 @@ end_analyze_subs_aa:
static bool
can_use_analyze_subscript_affine_affine (tree *chrec_a, tree *chrec_b)
{
- tree diff;
+ tree diff, type, left_a, left_b, right_b;
if (chrec_contains_symbols (CHREC_RIGHT (*chrec_a))
|| chrec_contains_symbols (CHREC_RIGHT (*chrec_b)))
/* FIXME: For the moment not handled. Might be refined later. */
return false;
- diff = chrec_fold_minus (chrec_type (*chrec_a), CHREC_LEFT (*chrec_a),
- CHREC_LEFT (*chrec_b));
+ type = chrec_type (*chrec_a);
+ left_a = CHREC_LEFT (*chrec_a);
+ left_b = chrec_convert (type, CHREC_LEFT (*chrec_b), NULL_TREE);
+ diff = chrec_fold_minus (type, left_a, left_b);
+
if (!evolution_function_is_constant_p (diff))
return false;
@@ -3052,9 +3055,10 @@ can_use_analyze_subscript_affine_affine (tree *chrec_a, tree *chrec_b)
*chrec_a = build_polynomial_chrec (CHREC_VARIABLE (*chrec_a),
diff, CHREC_RIGHT (*chrec_a));
+ right_b = chrec_convert (type, CHREC_RIGHT (*chrec_b), NULL_TREE);
*chrec_b = build_polynomial_chrec (CHREC_VARIABLE (*chrec_b),
- integer_zero_node,
- CHREC_RIGHT (*chrec_b));
+ convert (type, integer_zero_node),
+ right_b);
return true;
}