]> gcc.gnu.org Git - gcc.git/commit
aarch64: Model zero-high-half semantics of XTN instruction in RTL
authorJonathan Wright <jonathan.wright@arm.com>
Fri, 11 Jun 2021 14:48:51 +0000 (15:48 +0100)
committerJonathan Wright <jonathan.wright@arm.com>
Wed, 16 Jun 2021 13:21:52 +0000 (14:21 +0100)
commitd8a88cdae9c0c42ab7c5c65a5043c4f8bad349d2
tree43c2e4ceeabbc60b031b56d11965cecb77dbe074
parentac6c858d072016ad2c409f1593fa290ad0d87e11
aarch64: Model zero-high-half semantics of XTN instruction in RTL

Modeling the zero-high-half semantics of the XTN narrowing
instruction in RTL indicates to the compiler that this is a totally
destructive operation. This enables more RTL simplifications and also
prevents some register allocation issues.

Add new tests to narrow_zero_high_half.c to verify the benefit of
this change.

gcc/ChangeLog:

2021-06-11  Jonathan Wright  <jonathan.wright@arm.com>

* config/aarch64/aarch64-simd.md (aarch64_xtn<mode>_insn_le):
Define - modeling zero-high-half semantics.
(aarch64_xtn<mode>): Change to an expander that emits the
appropriate instruction depending on endianness.
(aarch64_xtn<mode>_insn_be): Define - modeling zero-high-half
semantics.
(aarch64_xtn2<mode>_le): Rename to...
(aarch64_xtn2<mode>_insn_le): This.
(aarch64_xtn2<mode>_be): Rename to...
(aarch64_xtn2<mode>_insn_be): This.
(vec_pack_trunc_<mode>): Emit truncation instruction instead
of aarch64_xtn.
* config/aarch64/iterators.md (Vnarrowd): Add Vnarrowd mode
attribute iterator.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/narrow_zero_high_half.c: Add new tests.
gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/iterators.md
gcc/testsuite/gcc.target/aarch64/narrow_zero_high_half.c
This page took 0.069521 seconds and 6 git commands to generate.