aarch64: Relax aarch64_sqxtun2<mode> RTL pattern
authorJonathan Wright <jonathan.wright@arm.com>
Fri, 14 May 2021 13:49:47 +0000 (14:49 +0100)
committerJonathan Wright <jonathan.wright@arm.com>
Wed, 19 May 2021 13:44:26 +0000 (14:44 +0100)
Use UNSPEC_SQXTUN instead of UNSPEC_SQXTUN2 in aarch64_sqxtun2<mode>
patterns. This allows for more more aggressive combinations and
ultimately better code generation. The now redundant UNSPEC_SQXTUN2
is removed.

gcc/ChangeLog:

2021-05-14  Jonathn Wright  <jonathan.wright@arm.com>

* config/aarch64/aarch64-simd.md: Use UNSPEC_SQXTUN instead
of UNSPEC_SQXTUN2.
* config/aarch64/iterators.md: Remove UNSPEC_SQXTUN2.

gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/iterators.md

index 5473d61..7952309 100644 (file)
        (vec_concat:<VNARROWQ2>
          (match_operand:<VNARROWQ> 1 "register_operand" "0")
          (unspec:<VNARROWQ>
-           [(match_operand:VQN 2 "register_operand" "w")] UNSPEC_SQXTUN2)))]
+           [(match_operand:VQN 2 "register_operand" "w")] UNSPEC_SQXTUN)))]
   "TARGET_SIMD && !BYTES_BIG_ENDIAN"
   "sqxtun2\\t%0.<V2ntype>, %2.<Vtype>"
    [(set_attr "type" "neon_sat_shift_imm_narrow_q")]
   [(set (match_operand:<VNARROWQ2> 0 "register_operand" "=w")
        (vec_concat:<VNARROWQ2>
          (unspec:<VNARROWQ>
-           [(match_operand:VQN 2 "register_operand" "w")] UNSPEC_SQXTUN2)
+           [(match_operand:VQN 2 "register_operand" "w")] UNSPEC_SQXTUN)
          (match_operand:<VNARROWQ> 1 "register_operand" "0")))]
   "TARGET_SIMD && BYTES_BIG_ENDIAN"
   "sqxtun2\\t%0.<V2ntype>, %2.<Vtype>"
   [(match_operand:<VNARROWQ2> 0 "register_operand")
    (match_operand:<VNARROWQ> 1 "register_operand")
    (unspec:<VNARROWQ>
-     [(match_operand:VQN 2 "register_operand")] UNSPEC_SQXTUN2)]
+     [(match_operand:VQN 2 "register_operand")] UNSPEC_SQXTUN)]
   "TARGET_SIMD"
   {
     if (BYTES_BIG_ENDIAN)
index 29ce669..0ec93b0 100644 (file)
     UNSPEC_USQADD      ; Used in aarch64-simd.md.
     UNSPEC_SUQADD      ; Used in aarch64-simd.md.
     UNSPEC_SQXTUN      ; Used in aarch64-simd.md.
-    UNSPEC_SQXTUN2     ; Used in aarch64-simd.md.
     UNSPEC_SSRA                ; Used in aarch64-simd.md.
     UNSPEC_USRA                ; Used in aarch64-simd.md.
     UNSPEC_SRSRA       ; Used in aarch64-simd.md.