aarch64: Use an expander for quad-word vec_pack_trunc pattern
authorJonathan Wright <jonathan.wright@arm.com>
Sun, 16 May 2021 12:01:47 +0000 (13:01 +0100)
committerJonathan Wright <jonathan.wright@arm.com>
Wed, 19 May 2021 13:45:17 +0000 (14:45 +0100)
commit577d5819e0cada818aca975752809d55ccecc6e8
treeb8b80ff13cf38f91bd09424932030b966db01c11
parenta680be25aa3da89c2d94dba3f76e1e1d2d81e756
aarch64: Use an expander for quad-word vec_pack_trunc pattern

The existing vec_pack_trunc RTL pattern emits an opaque two-
instruction assembly code sequence that prevents proper instruction
scheduling. This commit changes the pattern to an expander that emits
individual xtn and xtn2 instructions.

This commit also consolidates the duplicate truncation patterns.

gcc/ChangeLog:

2021-05-17  Jonathan Wright  <jonathan.wright@arm.com>

* config/aarch64/aarch64-simd.md (aarch64_simd_vec_pack_trunc_<mode>):
Remove as duplicate of...
(aarch64_xtn<mode>): This.
(aarch64_xtn2<mode>_le): Move position in file.
(aarch64_xtn2<mode>_be): Move position in file.
(aarch64_xtn2<mode>): Move position in file.
(vec_pack_trunc_<mode>): Define as an expander.
gcc/config/aarch64/aarch64-simd.md