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.sandif...@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. >