[AArch64] Improve SIMD store of zero.
authorJackson Woodruff <jackson.woodruff@arm.com>
Thu, 17 Aug 2017 12:54:10 +0000 (12:54 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Thu, 17 Aug 2017 12:54:10 +0000 (12:54 +0000)
commitea58eb88d9b440773e146bd6cb39abb9a9fb894f
tree8729a6dc4aabe8ec96b44681dc1cb6dc1f1ddbc5
parent0fc81d78f9e97d0fb9b7a6c051189758b1d2ab01
[AArch64] Improve SIMD store of zero.

This patch changes patterns in aarch64-simd.md to replace

    movi    v0.4s, 0
    str    q0, [x0, 16]

With:

    stp xzr, xzr, [x0, 16]

When we are storing zeros to vectors like this:

    void f(uint32x4_t *p) {
      uint32x4_t x = { 0, 0, 0, 0};
      p[1] = x;
    }

gcc/
2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>

* aarch64-simd.md (mov<mode>): No longer force zero immediate into
register.
(*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.

gcc/testsuite/
2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>

* gcc.target/aarch64/simd/vect_str_zero.c: New testcase.

From-SVN: r251149
gcc/ChangeLog
gcc/config/aarch64/aarch64-simd.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/simd/vect_str_zero.c [new file with mode: 0644]