From 6be74c4f5c988270ef3e4d4664a15b2b2e205f9a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 6 Jun 2005 21:27:55 +0200 Subject: tree-chrec.c (reset_evolution_in_loop): Use build3 instead of build2. * tree-chrec.c (reset_evolution_in_loop): Use build3 instead of build2. From-SVN: r100675 --- gcc/ChangeLog | 3 +++ gcc/tree-chrec.c | 16 ++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2007efc..0bbc3a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2005-06-06 Jakub Jelinek + * tree-chrec.c (reset_evolution_in_loop): Use build3 instead of + build2. + * fold-const.c (operand_equal_p): Don't return 1, if element chains for 2 VECTOR_CSTs are not the same length. diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index bd8bafc..1a7e8c8 100644 --- a/gcc/tree-chrec.c +++ b/gcc/tree-chrec.c @@ -725,12 +725,16 @@ reset_evolution_in_loop (unsigned loop_num, { if (TREE_CODE (chrec) == POLYNOMIAL_CHREC && CHREC_VARIABLE (chrec) > loop_num) - return build2 - (TREE_CODE (chrec), - build_int_cst (NULL_TREE, CHREC_VARIABLE (chrec)), - reset_evolution_in_loop (loop_num, CHREC_LEFT (chrec), new_evol), - reset_evolution_in_loop (loop_num, CHREC_RIGHT (chrec), new_evol)); - + { + tree left = reset_evolution_in_loop (loop_num, CHREC_LEFT (chrec), + new_evol); + tree right = reset_evolution_in_loop (loop_num, CHREC_RIGHT (chrec), + new_evol); + return build3 (POLYNOMIAL_CHREC, TREE_TYPE (left), + build_int_cst (NULL_TREE, CHREC_VARIABLE (chrec)), + left, right); + } + while (TREE_CODE (chrec) == POLYNOMIAL_CHREC && CHREC_VARIABLE (chrec) == loop_num) chrec = CHREC_LEFT (chrec); -- cgit v1.1