aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-generic.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2014-12-11 11:07:58 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2014-12-11 11:07:58 +0000
commit20bd649ae4d750de74647a354c856d05de2acb0c (patch)
tree22c03e8da3a902dc6f9f55eeee02c2dfeda09227 /gcc/tree-vect-generic.c
parentf63950e56178b03d3adffc818b247eb6e1c6d340 (diff)
downloadgcc-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/tree-vect-generic.c')
-rw-r--r--gcc/tree-vect-generic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index a8a8ecd..de09ff0 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -926,14 +926,14 @@ expand_vector_operation (gimple_stmt_iterator *gsi, tree type, tree compute_type
{
case PLUS_EXPR:
case MINUS_EXPR:
- if (!TYPE_OVERFLOW_TRAPS (type))
+ if (ANY_INTEGRAL_TYPE_P (type) && !TYPE_OVERFLOW_TRAPS (type))
return expand_vector_addition (gsi, do_binop, do_plus_minus, type,
gimple_assign_rhs1 (assign),
gimple_assign_rhs2 (assign), code);
break;
case NEGATE_EXPR:
- if (!TYPE_OVERFLOW_TRAPS (type))
+ if (ANY_INTEGRAL_TYPE_P (type) && !TYPE_OVERFLOW_TRAPS (type))
return expand_vector_addition (gsi, do_unop, do_negate, type,
gimple_assign_rhs1 (assign),
NULL_TREE, code);