This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [61/77] Use scalar_int_mode in the AArch64 port
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at linaro dot org
- Date: Thu, 24 Aug 2017 15:36:36 -0600
- Subject: Re: [61/77] Use scalar_int_mode in the AArch64 port
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1D2AC4A6F8
- References: <8760ewohsv.fsf@linaro.org> <87tw2gd84s.fsf@linaro.org>
On 07/13/2017 03:00 AM, 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.
>
> 2017-07-13 Richard Sandiford <richard.sandiford@linaro.org>
> Alan Hayward <alan.hayward@arm.com>
> David Sherwood <david.sherwood@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.
I'll let the aarch64 owners ack this one... You might know one or two
of 'em :-)
jeff