Add a type_has_mode_precision_p helper function
commit654ba22c41f2123cd3a44fb63399abc04926a696
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Aug 2017 14:50:56 +0000 (21 14:50 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Aug 2017 14:50:56 +0000 (21 14:50 +0000)
treea5f3b1eb5eba6d6c7a010dd6ece0a25d1e89b38a
parent6b0b3b89d26cad26f29b1f2cef36b580d78fdcb7
Add a type_has_mode_precision_p helper function

...to replace instances of:

    TYPE_PRECISION (t) == GET_MODE_PRECISION (TYPE_MODE (t))

These conditions would need to be rewritten with variable-sized
modes anyway.

2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree.h (type_has_mode_precision_p): New function.
* convert.c (convert_to_integer_1): Use it.
* expr.c (expand_expr_real_2): Likewise.
(expand_expr_real_1): Likewise.
* fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
* match.pd: Likewise.
* tree-ssa-forwprop.c (simplify_rotate): Likewise.
* tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
* tree-tailcall.c (process_assignment): Likewise.
* tree-vect-loop.c (vectorizable_reduction): Likewise.
* tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
(vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
* tree-vect-stmts.c (vectorizable_conversion): Likewise.
(vectorizable_assignment): Likewise.
(vectorizable_shift): Likewise.
(vectorizable_operation): Likewise.
* tree-vrp.c (register_edge_assert_for_2): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251231 138bc75d-0d04-0410-961f-82ee72b054a4
13 files changed:
gcc/ChangeLog
gcc/convert.c
gcc/expr.c
gcc/fold-const.c
gcc/match.pd
gcc/tree-ssa-forwprop.c
gcc/tree-ssa-math-opts.c
gcc/tree-tailcall.c
gcc/tree-vect-loop.c
gcc/tree-vect-patterns.c
gcc/tree-vect-stmts.c
gcc/tree-vrp.c
gcc/tree.h