Hi,

Version 2 of the patch adds tests to verify the benefit of this change.

Ok for master?

Thanks,
Jonathan

---
gcc/ChangeLog:

2021-06-14  Jonathan Wright  <jonathan.wri...@arm.com>

        * config/aarch64/aarch64-simd-builtins.def: Split generator
        for aarch64_sqmovun builtins into scalar and vector variants.
        * config/aarch64/aarch64-simd.md (aarch64_sqmovun<mode>):
        Split into scalar and vector variants. Change vector variant
        to an expander that emits the correct instruction depending
        on endianness.
        (aarch64_sqmovun<mode>_insn_le): Define.
        (aarch64_sqmovun<mode>_insn_be): Define.

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/narrow_zero_high_half.c: Add new tests.

From: Gcc-patches <gcc-patches-bounces+jonathan.wright=arm....@gcc.gnu.org> on 
behalf of Jonathan Wright via Gcc-patches <gcc-patches@gcc.gnu.org>
Sent: 15 June 2021 10:52
To: gcc-patches@gcc.gnu.org <gcc-patches@gcc.gnu.org>
Subject: [PATCH] aarch64: Model zero-high-half semantics of SQXTUN instruction 
in RTL 
 
Hi,

As subject, this patch first splits the aarch64_sqmovun<mode> pattern
into separate scalar and vector variants. It then further split the vector
pattern into big/little endian variants that model the zero-high-half
semantics of the underlying instruction. Modeling these semantics
allows for better RTL combinations while also removing some register
allocation issues as the compiler now knows that the operation is
totally destructive.

Regression tested and bootstrapped on aarch64-none-linux-gnu - no
issues.

Ok for master?

Thanks,
Jonathan

---

gcc/ChangeLog:

2021-06-14  Jonathan Wright  <jonathan.wri...@arm.com>

        * config/aarch64/aarch64-simd-builtins.def: Split generator
        for aarch64_sqmovun builtins into scalar and vector variants.
        * config/aarch64/aarch64-simd.md (aarch64_sqmovun<mode>):
        Split into scalar and vector variants. Change vector variant
        to an expander that emits the correct instruction depending
        on endianness.
        (aarch64_sqmovun<mode>_insn_le): Define.
        (aarch64_sqmovun<mode>_insn_be): Define.

Attachment: rb14564.patch
Description: rb14564.patch

Reply via email to