aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-05-04 09:04:53 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-05-04 09:04:53 +0000
commitd35936ab70051f5bb7e3e7b9d069cc648f5dac6c (patch)
tree5c3cd9ce515aaedc793b4255fad9d3b6f6f3f621 /gcc/gimple-fold.c
parent8992c063a6de3bce68f41c42147e829bf0fd671f (diff)
downloadgcc-d35936ab70051f5bb7e3e7b9d069cc648f5dac6c.zip
gcc-d35936ab70051f5bb7e3e7b9d069cc648f5dac6c.tar.gz
gcc-d35936ab70051f5bb7e3e7b9d069cc648f5dac6c.tar.bz2
tree.h (int_const_binop): Remove notrunc argument.
2011-05-04 Richard Guenther <rguenther@suse.de> * tree.h (int_const_binop): Remove notrunc argument. * fold-const.c (int_const_binop): Remove notrunc argument. Always create integer constants that are properly truncated. (extract_muldiv_1): Expand one notrunc int_const_binop caller. (const_binop): Remove zero notrunc argument to int_const_binop. (size_binop_loc): Likewise. (fold_div_compare): Likewise. (maybe_canonicalize_comparison_1): Likewise. (fold_comparison): Likewise. (fold_binary_loc): Likewise. (multiple_of_p): Likewise. * expr.c (store_constructor): Likewise. * gimple-fold.c (maybe_fold_offset_to_array_ref): Likewise. (maybe_fold_stmt_addition): Likewise. * ipa-prop.c (ipa_modify_call_arguments): Likewise. * stor-layout.c (layout_type): Likewise. * tree-data-ref.c (tree_fold_divides_p): Likewise. * tree-sra.c (build_ref_for_offset): Likewise. (build_user_friendly_ref_for_offset): Likewise. * tree-ssa-address.c (maybe_fold_tmr): Likewise. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise. * tree-ssa-loop-niter.c (inverse): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise. * tree-ssa.c (maybe_rewrite_mem_ref_base): Likewise. * tree-switch-conversion.c (check_range): Likewise. (build_constructors): Likewise. * tree-vect-generic.c (expand_vector_piecewise): Likewise. * tree-vrp.c (set_and_canonicalize_value_range): Likewise. (extract_range_from_assert): Likewise. (vrp_int_const_binop): Likewise. (extract_range_from_binary_expr): Likewise. (extract_range_from_unary_expr): Likewise. (check_array_ref): Likewise. (find_case_label_range): Likewise. (simplify_div_or_mod_using_ranges): Likewise. * tree-cfg.c (group_case_labels_stmt): Use double-ints for comparing case labels for merging. ada/ * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to int_const_binop. (pos_to_constructor): Likewise. fortran/ * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc argument to int_const_binop. From-SVN: r173356
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r--gcc/gimple-fold.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index f425119..e5303e3 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -230,7 +230,7 @@ maybe_fold_offset_to_array_ref (location_t loc, tree base, tree offset)
|| TREE_CODE (elt_offset) != INTEGER_CST)
return NULL_TREE;
- elt_offset = int_const_binop (MINUS_EXPR, elt_offset, low_bound, 0);
+ elt_offset = int_const_binop (MINUS_EXPR, elt_offset, low_bound);
base = TREE_OPERAND (base, 0);
}
@@ -300,9 +300,9 @@ maybe_fold_offset_to_array_ref (location_t loc, tree base, tree offset)
}
if (!integer_zerop (min_idx))
- idx = int_const_binop (PLUS_EXPR, idx, min_idx, 0);
+ idx = int_const_binop (PLUS_EXPR, idx, min_idx);
if (!integer_zerop (elt_offset))
- idx = int_const_binop (PLUS_EXPR, idx, elt_offset, 0);
+ idx = int_const_binop (PLUS_EXPR, idx, elt_offset);
/* Make sure to possibly truncate late after offsetting. */
idx = fold_convert (idx_type, idx);
@@ -517,17 +517,17 @@ maybe_fold_stmt_addition (location_t loc, tree res_type, tree op0, tree op1)
array_idx = fold_convert (TREE_TYPE (min_idx), array_idx);
if (!integer_zerop (min_idx))
array_idx = int_const_binop (MINUS_EXPR, array_idx,
- min_idx, 0);
+ min_idx);
}
}
/* Convert the index to a byte offset. */
array_idx = fold_convert (sizetype, array_idx);
- array_idx = int_const_binop (MULT_EXPR, array_idx, elt_size, 0);
+ array_idx = int_const_binop (MULT_EXPR, array_idx, elt_size);
/* Update the operands for the next round, or for folding. */
op1 = int_const_binop (PLUS_EXPR,
- array_idx, op1, 0);
+ array_idx, op1);
op0 = array_obj;
}