On 08/18/2017 02:13 AM, Richard Sandiford wrote:
> This patch adds a partial_integral_type_p function, to go along
> with the full_integral_type_p added by the previous patch.
>
> Of the changes that didn't previously have an INTEGRAL_TYPE_P check:
>
> - the convert_to_integer_1 hunks are dominated by a case version
> of INTEGRAL_TYPE_P.
>
> - the merge_ranges hunk is dominated by an ENUMERAL_TYPE case.
>
> - vectorizable_reduction has the comment:
>
> /* Do not try to vectorize bit-precision reductions. */
>
> and so I think was only concerned with integers.
>
> - vectorizable_assignment has the comment:
>
> /* We do not handle bit-precision changes. */
>
> and the later:
>
> /* But a conversion that does not change the bit-pattern is ok. */
> && !((TYPE_PRECISION (TREE_TYPE (scalar_dest))
> > TYPE_PRECISION (TREE_TYPE (op)))
> && TYPE_UNSIGNED (TREE_TYPE (op)))
>
> would only make sense if OP is also an integral type.
>
> - vectorizable_shift is inherently restricted to integers.
>
> Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install?
>
> Richard
>
>
> 2017-08-17 Richard Sandiford <richard.sandif...@linaro.org>
> Alan Hayward <alan.hayw...@arm.com>
> David Sherwood <david.sherw...@arm.com>
>
> gcc/
> * tree.h (partial_integral_type_p): New function.
> * convert.c (convert_to_integer_1): Use it.
> * expr.c (store_fieldexpand_expr_real_2, expand_expr_real_1): Likewise.
> * fold-const.c (merge_ranges): 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-stmts.c (vectorizable_conversion): Likewise.
> (vectorizable_assignment, vectorizable_shift): Likewise.
OK.
jeff