From: Matthew Wahab Date: Thu, 26 Nov 2015 13:50:47 +0000 (+0000) Subject: [AArch64] Add sqrdmah, sqrdmsh instructions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57b26d65cd33a98131cc54f4709959371cdc7789;p=gcc.git [AArch64] Add sqrdmah, sqrdmsh instructions. * config/aarch64/aarch64-simd.md (aarch64_sqmovun): Fix some white-space. (aarch64_qmovun): Likewise. (aarch64_sqrdmlh): New. (aarch64_sqrdmlh_lane): New. (aarch64_sqrdmlh_laneq): New. * config/aarch64/iterators.md (UNSPEC_SQRDMLAH): New. (UNSPEC_SQRDMLSH): New. (SQRDMLH_AS): New. (rdma_as): New. From-SVN: r230959 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c626a6ce6c4..6c0d4d86427 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2015-11-26 Matthew Wahab + + * config/aarch64/aarch64-simd.md + (aarch64_sqmovun): Fix some white-space. + (aarch64_qmovun): Likewise. + (aarch64_sqrdmlh): New. + (aarch64_sqrdmlh_lane): New. + (aarch64_sqrdmlh_laneq): New. + * config/aarch64/iterators.md (UNSPEC_SQRDMLAH): New. + (UNSPEC_SQRDMLSH): New. + (SQRDMLH_AS): New. + (rdma_as): New. + 2015-11-26 Richard Biener PR tree-optimization/66721 diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index 79be6beec49..7910484baf0 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -3081,7 +3081,7 @@ "TARGET_SIMD" "sqxtun\\t%0, %1" [(set_attr "type" "neon_sat_shift_imm_narrow_q")] - ) +) ;; sqmovn and uqmovn @@ -3092,7 +3092,7 @@ "TARGET_SIMD" "qxtn\\t%0, %1" [(set_attr "type" "neon_sat_shift_imm_narrow_q")] - ) +) ;; q @@ -3180,6 +3180,96 @@ [(set_attr "type" "neon_sat_mul__scalar")] ) +;; sqrdml[as]h. + +(define_insn "aarch64_sqrdmlh" + [(set (match_operand:VSDQ_HSI 0 "register_operand" "=w") + (unspec:VSDQ_HSI + [(match_operand:VSDQ_HSI 1 "register_operand" "0") + (match_operand:VSDQ_HSI 2 "register_operand" "w") + (match_operand:VSDQ_HSI 3 "register_operand" "w")] + SQRDMLH_AS))] + "TARGET_SIMD_RDMA" + "sqrdmlh\\t%0, %2, %3" + [(set_attr "type" "neon_sat_mla__long")] +) + +;; sqrdml[as]h_lane. + +(define_insn "aarch64_sqrdmlh_lane" + [(set (match_operand:VDQHS 0 "register_operand" "=w") + (unspec:VDQHS + [(match_operand:VDQHS 1 "register_operand" "0") + (match_operand:VDQHS 2 "register_operand" "w") + (vec_select: + (match_operand: 3 "register_operand" "w") + (parallel [(match_operand:SI 4 "immediate_operand" "i")]))] + SQRDMLH_AS))] + "TARGET_SIMD_RDMA" + { + operands[4] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[4]))); + return + "sqrdmlh\\t%0., %2., %3.[%4]"; + } + [(set_attr "type" "neon_sat_mla__scalar_long")] +) + +(define_insn "aarch64_sqrdmlh_lane" + [(set (match_operand:SD_HSI 0 "register_operand" "=w") + (unspec:SD_HSI + [(match_operand:SD_HSI 1 "register_operand" "0") + (match_operand:SD_HSI 2 "register_operand" "w") + (vec_select: + (match_operand: 3 "register_operand" "w") + (parallel [(match_operand:SI 4 "immediate_operand" "i")]))] + SQRDMLH_AS))] + "TARGET_SIMD_RDMA" + { + operands[4] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[4]))); + return + "sqrdmlh\\t%0, %2, %3.[%4]"; + } + [(set_attr "type" "neon_sat_mla__scalar_long")] +) + +;; sqrdml[as]h_laneq. + +(define_insn "aarch64_sqrdmlh_laneq" + [(set (match_operand:VDQHS 0 "register_operand" "=w") + (unspec:VDQHS + [(match_operand:VDQHS 1 "register_operand" "0") + (match_operand:VDQHS 2 "register_operand" "w") + (vec_select: + (match_operand: 3 "register_operand" "w") + (parallel [(match_operand:SI 4 "immediate_operand" "i")]))] + SQRDMLH_AS))] + "TARGET_SIMD_RDMA" + { + operands[4] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[4]))); + return + "sqrdmlh\\t%0., %2., %3.[%4]"; + } + [(set_attr "type" "neon_sat_mla__scalar_long")] +) + +(define_insn "aarch64_sqrdmlh_laneq" + [(set (match_operand:SD_HSI 0 "register_operand" "=w") + (unspec:SD_HSI + [(match_operand:SD_HSI 1 "register_operand" "0") + (match_operand:SD_HSI 2 "register_operand" "w") + (vec_select: + (match_operand: 3 "register_operand" "w") + (parallel [(match_operand:SI 4 "immediate_operand" "i")]))] + SQRDMLH_AS))] + "TARGET_SIMD_RDMA" + { + operands[4] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[4]))); + return + "sqrdmlh\\t%0, %2, %3.[%4]"; + } + [(set_attr "type" "neon_sat_mla__scalar_long")] +) + ;; vqdml[sa]l (define_insn "aarch64_sqdmll" diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md index d6a57f68b80..9343c9cd1c8 100644 --- a/gcc/config/aarch64/iterators.md +++ b/gcc/config/aarch64/iterators.md @@ -304,6 +304,8 @@ UNSPEC_PMULL2 ; Used in aarch64-simd.md. UNSPEC_REV_REGLIST ; Used in aarch64-simd.md. UNSPEC_VEC_SHR ; Used in aarch64-simd.md. + UNSPEC_SQRDMLAH ; Used in aarch64-simd.md. + UNSPEC_SQRDMLSH ; Used in aarch64-simd.md. ]) ;; ------------------------------------------------------------------ @@ -975,6 +977,8 @@ UNSPEC_SQSHRN UNSPEC_UQSHRN UNSPEC_SQRSHRN UNSPEC_UQRSHRN]) +(define_int_iterator SQRDMLH_AS [UNSPEC_SQRDMLAH UNSPEC_SQRDMLSH]) + (define_int_iterator PERMUTE [UNSPEC_ZIP1 UNSPEC_ZIP2 UNSPEC_TRN1 UNSPEC_TRN2 UNSPEC_UZP1 UNSPEC_UZP2]) @@ -1149,3 +1153,5 @@ (UNSPEC_SHA1M "m")]) (define_int_attr sha256_op [(UNSPEC_SHA256H "") (UNSPEC_SHA256H2 "2")]) + +(define_int_attr rdma_as [(UNSPEC_SQRDMLAH "a") (UNSPEC_SQRDMLSH "s")])