[AArch64] Fix cost of (plus ... (const_int -C))
James Greenhalgh
james.greenhalgh@arm.com
Wed Sep 25 21:26:00 GMT 2019
On Mon, Sep 23, 2019 at 10:45:29AM +0100, Richard Sandiford wrote:
> The PLUS handling in aarch64_rtx_costs only checked for nonnegative
> constants, meaning that simple immediate subtractions like:
>
> (set (reg R1) (plus (reg R2) (const_int -8)))
>
> had a cost of two instructions.
>
> Tested on aarch64-linux-gnu (with and without SVE). OK to install?
OK.
Thanks,
James
>
> Richard
>
>
> 2019-09-23 Richard Sandiford <richard.sandiford@arm.com>
>
> gcc/
> * config/aarch64/aarch64.c (aarch64_rtx_costs): Use
> aarch64_plus_immediate rather than aarch64_uimm12_shift
> to test for valid PLUS immediates.
>
More information about the Gcc-patches
mailing list