On Tue, May 22, 2018 at 10:06:15AM -0500, Kyrill Tkachov wrote: > [sending on behalf of Jackson Woodruff] > > Hi all, > > This patch removes a lot of duplicated code in aarch64-ldpstp.md. > > The patterns that did not previously generate a base register now > do not check for aarch64_mem_pair_operand in the pattern. This has > been extracted to a check in aarch64_operands_ok_for_ldpstp. > > All patterns in the file used to have explicit switching code to > swap loads and stores that were in the wrong order. > > This has been extracted into aarch64_operands_ok_for_ldpstp > as a final operation after all the checks have been performed. > > This patch is based on the patch here: > https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01129.html > > > Bootstrap and regtest OK on AArch64. > > OK for trunk?
OK. Thnaks, James > > Jackson. > > gcc/ > > 2018-05-22 Jackson Woodruff <jackson.woodr...@arm.com> > Kyrylo Tkachov <kyrylo.tkac...@arm.com> > > * config/aarch64/aarch64-ldpstp.md: Replace uses of > aarch64_mem_pair_operand with memory_operand and delete operand swapping > code. > * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp): > Add check for legitimate_address. > (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate. > (aarch64_swap_ldrstr_operands): New. > * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands): > Define prototype.