diff options
author | Marek Polacek <polacek@redhat.com> | 2014-12-11 11:07:58 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2014-12-11 11:07:58 +0000 |
commit | 20bd649ae4d750de74647a354c856d05de2acb0c (patch) | |
tree | 22c03e8da3a902dc6f9f55eeee02c2dfeda09227 /gcc/gimple-ssa-strength-reduction.c | |
parent | f63950e56178b03d3adffc818b247eb6e1c6d340 (diff) | |
download | gcc-20bd649ae4d750de74647a354c856d05de2acb0c.zip gcc-20bd649ae4d750de74647a354c856d05de2acb0c.tar.gz gcc-20bd649ae4d750de74647a354c856d05de2acb0c.tar.bz2 |
fold-const.c (fold_negate_expr): Add ANY_INTEGRAL_TYPE_P check.
* fold-const.c (fold_negate_expr): Add ANY_INTEGRAL_TYPE_P check.
(extract_muldiv_1): Likewise.
(maybe_canonicalize_comparison_1): Likewise.
(fold_comparison): Likewise.
(tree_binary_nonnegative_warnv_p): Likewise.
(tree_binary_nonzero_warnv_p): Likewise.
* gimple-ssa-strength-reduction.c (legal_cast_p_1): Likewise.
* tree-scalar-evolution.c (simple_iv): Likewise.
(scev_const_prop): Likewise.
* tree-ssa-loop-niter.c (expand_simple_operations): Likewise.
* tree-vect-generic.c (expand_vector_operation): Likewise.
* tree.h (ANY_INTEGRAL_TYPE_CHECK): Define.
(ANY_INTEGRAL_TYPE_P): Define.
(TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED, TYPE_OVERFLOW_TRAPS):
Add ANY_INTEGRAL_TYPE_CHECK.
(any_integral_type_check): New function.
From-SVN: r218621
Diffstat (limited to 'gcc/gimple-ssa-strength-reduction.c')
-rw-r--r-- | gcc/gimple-ssa-strength-reduction.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index 547327c..945075c 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -1487,8 +1487,8 @@ legal_cast_p_1 (tree lhs, tree rhs) rhs_type = TREE_TYPE (rhs); lhs_size = TYPE_PRECISION (lhs_type); rhs_size = TYPE_PRECISION (rhs_type); - lhs_wraps = TYPE_OVERFLOW_WRAPS (lhs_type); - rhs_wraps = TYPE_OVERFLOW_WRAPS (rhs_type); + lhs_wraps = ANY_INTEGRAL_TYPE_P (lhs_type) && TYPE_OVERFLOW_WRAPS (lhs_type); + rhs_wraps = ANY_INTEGRAL_TYPE_P (rhs_type) && TYPE_OVERFLOW_WRAPS (rhs_type); if (lhs_size < rhs_size || (rhs_wraps && !lhs_wraps) |