Re: [AArch64] Fix cost of (plus ... (const_int -C))

2019-09-25 Thread James Greenhalgh
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. > >

[AArch64] Fix cost of (plus ... (const_int -C))

2019-09-23 Thread Richard Sandiford
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? Richard