summaryrefslogtreecommitdiffstats
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-03 09:59:38 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-03 09:59:38 +0000
commitb92381b69baa2334e7976d7abc4b6e52ba3ab035 (patch)
treeab5d9744d365b3c1b20dc31edbcd78f31b409562 /gcc/tree-data-ref.c
parentbd24f1786770f64eda7c2c6b60cdcf8a2e9d5e5f (diff)
downloadppe42-gcc-b92381b69baa2334e7976d7abc4b6e52ba3ab035.tar.gz
ppe42-gcc-b92381b69baa2334e7976d7abc4b6e52ba3ab035.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112635 138bc75d-0d04-0410-961f-82ee72b054a4
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 1421e7d3a28..30b491b30f7 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;
}
OpenPOWER on IntegriCloud