On Sun, 16 Nov 2014, Marc Glisse wrote:
On Sun, 16 Nov 2014, Richard Biener wrote:
I think the element_mode is the way to go.
The following passed bootstrap+testsuite.
2014-11-16 Marc Glisse <marc.gli...@inria.fr>
* tree.c (element_mode, integer_truep): New functions.
* tree.h (element_mode, integer_truep): Declare them.
* fold-const.c (negate_expr_p, fold_negate_expr, combine_comparisons,
fold_cond_expr_with_comparison, fold_real_zero_addition_p,
fold_comparison, fold_ternary_loc, tree_call_nonnegative_warnv_p,
fold_strip_sign_ops): Use element_mode.
(fold_binary_loc): Use element_mode and element_precision.
* match.pd: Use integer_truep, element_mode, element_precision,
VECTOR_TYPE_P and build_one_cst. Extend some transformations to
vectors. Simplify A/-A.
Hmm, that left before I wrote any explanation... There are occurences of
HONOR_XXX (TYPE_MODE (t)) in other files (reassoc for instance), but we
have to start somewhere, so I only touched match.pd and fold-const.c. I
did not change the cases where it was clear that the type had to be a
scalar.
--
Marc Glisse