On Thu, Jul 13, 2017 at 10:00:03AM +0100, Richard Sandiford wrote:
> This patch makes the AArch64 port use scalar_int_mode in various places.
> Other ports won't need this kind of change; we only need it for AArch64
> because of the variable-sized SVE modes.
> 
> The only change in functionality is in the rtx_costs handling
> of CONST_INT.  If the caller doesn't supply a mode, we now pass
> word_mode rather than VOIDmode to aarch64_internal_mov_immediate.
> aarch64_movw_imm will therefore not now truncate large constants
> in this situation.

OK.

Thanks,
James


> 
> 2017-07-13  Richard Sandiford  <richard.sandif...@linaro.org>
>           Alan Hayward  <alan.hayw...@arm.com>
>           David Sherwood  <david.sherw...@arm.com>
> 
> gcc/
>       * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
>       Take a scalar_int_mode instead of a machine_mode.
>       (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
>       (aarch64_move_imm): Likewise.
>       (aarch64_output_scalar_simd_mov_immediate): Likewise.
>       (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
>       (aarch64_simd_attr_length_rglist): Delete.
>       * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
>       a scalar_int_mode instead of a machine_mode.
>       (aarch64_add_offset): Likewise.
>       (aarch64_internal_mov_immediate): Likewise
>       (aarch64_add_constant_internal): Likewise.
>       (aarch64_add_constant): Likewise.
>       (aarch64_movw_imm): Likewise.
>       (aarch64_move_imm): Likewise.
>       (aarch64_rtx_arith_op_extract_p): Likewise.
>       (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
>       (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
>       Remove assert that the mode isn't a vector.
>       (aarch64_output_scalar_simd_mov_immediate): Likewise.
>       (aarch64_expand_mov_immediate): Update calls after above changes.
>       (aarch64_output_casesi): Use as_a <scalar_int_mode>.
>       (aarch64_and_bitmask_imm): Check for scalar integer modes.
>       (aarch64_strip_extend): Likewise.
>       (aarch64_extr_rtx_p): Likewise.
>       (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
>       a CONST_INT when the mode parameter is VOIDmode.
> 

Reply via email to