[AArch64] Use SVE ADR to optimise shift-add sequences
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 14 Aug 2019 08:58:40 +0000 (08:58 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 14 Aug 2019 08:58:40 +0000 (08:58 +0000)
commita229966c9c76afe0cf18c566a3c13ddde3878288
tree36e43f5e15e510d575e2979b9a8436c4e5950ea7
parent917d611c56a58c38f2b6a7ba808d7a7ae7ed145c
[AArch64] Use SVE ADR to optimise shift-add sequences

This patch uses SVE ADR to optimise shift-and-add and uxtw-and-add
sequences.

2019-08-14  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/aarch64/predicates.md (const_1_to_3_operand): New predicate.
* config/aarch64/aarch64-sve.md (*aarch64_adr_uxtw)
(*aarch64_adr<mode>_shift, *aarch64_adr_shift_uxtw): New patterns.

gcc/testsuite/
* gcc.target/aarch64/sve/adr_1.c: New test.
* gcc.target/aarch64/sve/adr_1_run.c: Likewise.
* gcc.target/aarch64/sve/adr_2.c: Likewise.
* gcc.target/aarch64/sve/adr_2_run.c: Likewise.
* gcc.target/aarch64/sve/adr_3.c: Likewise.
* gcc.target/aarch64/sve/adr_3_run.c: Likewise.
* gcc.target/aarch64/sve/adr_4.c: Likewise.
* gcc.target/aarch64/sve/adr_4_run.c: Likewise.
* gcc.target/aarch64/sve/adr_5.c: Likewise.
* gcc.target/aarch64/sve/adr_5_run.c: Likewise.

From-SVN: r274436
14 files changed:
gcc/ChangeLog
gcc/config/aarch64/aarch64-sve.md
gcc/config/aarch64/predicates.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/adr_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/adr_1_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/adr_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/adr_2_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/adr_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/adr_3_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/adr_4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/adr_4_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/adr_5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/adr_5_run.c [new file with mode: 0644]