From patchwork Wed Sep 4 13:26:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 97056 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DD173384AB66 for ; Wed, 4 Sep 2024 13:31:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) by sourceware.org (Postfix) with ESMTPS id 5A984385841C for ; Wed, 4 Sep 2024 13:27:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A984385841C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5A984385841C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c2e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725456449; cv=none; b=IjYJuOwfvbV/grQU0zGmIqB5IHbUU8ITUEnwQY07uYN9pcFDGyALsIfj8BcGQWBkgcFCfe6QBvNozDJU4pSZr0qeaaqJJecVo6o73yLIR0FEXyjcC2eSDFt99Lp9LzFAySHcadIgjP9c3J0uPigxAJ6z9YfhoF1MtprAmfXNE1E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725456449; c=relaxed/simple; bh=GSUmtEFh5DleYuiDOMHilNX8ilYxVwGu/DmvqInkka4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=mNj1R4S1jSgAFV1EUSvtEJDRs7RGDZ0Uwcrlj2RH3sqzaE+7Igbus8JVdTtbePtU4xmpXDaI8nxFncpK8/2c6eQvJsA7J8s4Ln9G6WY38Sjx4ugAMT8WTkbbAXR+O4aaQa7a0x2OndLZPSLQyI6xoMbV8Su2SF8o8Y5nSughobE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-5dfa315ffbdso3815526eaf.3 for ; Wed, 04 Sep 2024 06:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725456443; x=1726061243; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GSgOrcsmlrnGXzPoglW5v0sK7DHH7K2tBTYcnt3+ia8=; b=DWPAs/2rUzH+uNF/9F9HVfKhrrflihWjvPDK/KkuPBDtsp9QoZDLunjcLJWqfKs3X6 lmmXc8DNv022HA0VhjeQBqMdm9AaEqG34/y5RERJhvk2kUFpR43RmZqFp6qupWZ9nF30 6hVbfw2kAp64LFJpKjgQctbYGhipvvPzrm+IJroIqUR6QInkz0telxddZSRGsA8Uyicw h53Szkl5jdlJkT33GWPxD5gAIQRbQgs7bXP0YmPqW43NOR++jzm77bEeKN4Ep9R4Fz4G OSZQ6s7Iwa7RnZSgF2qXA+73+kefYg+xTTBbkvVkATv0C6OZ0hMoFYNOdHO/CXlFy14a CDxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725456443; x=1726061243; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GSgOrcsmlrnGXzPoglW5v0sK7DHH7K2tBTYcnt3+ia8=; b=fPK9QO0TlpzFPUMu2Msu+4Tj32vbU1oiHsGuPx2COu/Mgv0mlhXiXUUghV1LDrGsMi 4iwOZeZWtHHEI6Y8aTjjN5VhQU8Lqgo2ra6db80cRrfp8Va2dbbSCdimwHmzgZFd31ct GCANMWuepkCWzeZMMRYFuXvLSSZqBhH+suSHWX+a9hmCxkWl9sva2A9kVIsZn4zeSP5i KYkBsrRpvNx9kuq2TJkE2HfquBi6p/yLDB8AYZON61V32AgUMdVzB0JOQVP26bAJOTt+ Q3QL1SCZqI+UB8KieQrnYpTq2YjIlZZxxABiaXkTgpxqbWhB2pfLMvCaIEMjR/dxjDKu 0WlA== X-Gm-Message-State: AOJu0YyEhgQRS45uCPE6EJ2eL1SF63PXKqreitJA9Yk8tvsB827loqFr 4ka0ntgwKolInQFqn79VbMhhuvVbhIJi8byUO7irpiqr2BirQOnUjVK+kszki+moEmbRm0Qfe7q /ldmm8g== X-Google-Smtp-Source: AGHT+IGI1RY4pZvvPXo9ZCr8LMw7yNAvdhT8N21bP7dRTDfE6FN6J1rZCWAf66eXeUWcw1dLwaFjDQ== X-Received: by 2002:a05:6820:1e13:b0:5da:b29a:3c84 with SMTP id 006d021491bc7-5dfaced6f2fmr15959043eaf.5.1725456443228; Wed, 04 Sep 2024 06:27:23 -0700 (PDT) Received: from localhost.localdomain ([139.178.84.207]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5dfa0580692sm2308062eaf.46.2024.09.04.06.27.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 06:27:22 -0700 (PDT) From: Christophe Lyon To: gcc-patches@gcc.gnu.org, richard.earnshaw@arm.com, ramanara@nvidia.com Cc: Christophe Lyon Subject: [PATCH v2 04/36] arm: [MVE intrinsics] factorize vcvtq Date: Wed, 4 Sep 2024 13:26:18 +0000 Message-Id: <20240904132650.2720446-5-christophe.lyon@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240904132650.2720446-1-christophe.lyon@linaro.org> References: <20240711214305.3193022-1-christophe.lyon@linaro.org> <20240904132650.2720446-1-christophe.lyon@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org Factorize vcvtq so that they use parameterized names. 2024-07-11 Christophe Lyon gcc/ * config/arm/iterators.md (mve_insn): Add VCVTQ_FROM_F_S, VCVTQ_FROM_F_U, VCVTQ_M_FROM_F_S, VCVTQ_M_FROM_F_U, VCVTQ_M_N_FROM_F_S, VCVTQ_M_N_FROM_F_U, VCVTQ_M_N_TO_F_S, VCVTQ_M_N_TO_F_U, VCVTQ_M_TO_F_S, VCVTQ_M_TO_F_U, VCVTQ_N_FROM_F_S, VCVTQ_N_FROM_F_U, VCVTQ_N_TO_F_S, VCVTQ_N_TO_F_U, VCVTQ_TO_F_S, VCVTQ_TO_F_U. * config/arm/mve.md (mve_vcvtq_to_f_): Rename into @mve_q_to_f_. (mve_vcvtq_from_f_): Rename into @mve_q_from_f_. (mve_vcvtq_n_to_f_): Rename into @mve_q_n_to_f_. (mve_vcvtq_n_from_f_): Rename into @mve_q_n_from_f_. (mve_vcvtq_m_to_f_): Rename into @mve_q_m_to_f_. (mve_vcvtq_m_n_from_f_): Rename into @mve_q_m_n_from_f_. (mve_vcvtq_m_from_f_): Rename into @mve_q_m_from_f_. (mve_vcvtq_m_n_to_f_): Rename into @mve_q_m_n_to_f_. --- gcc/config/arm/iterators.md | 8 +++++ gcc/config/arm/mve.md | 64 ++++++++++++++++++------------------- 2 files changed, 40 insertions(+), 32 deletions(-) diff --git a/gcc/config/arm/iterators.md b/gcc/config/arm/iterators.md index b9ff01cb104..bf800625fac 100644 --- a/gcc/config/arm/iterators.md +++ b/gcc/config/arm/iterators.md @@ -964,6 +964,14 @@ (define_int_attr mve_insn [ (VCMLAQ_M_F "vcmla") (VCMLAQ_ROT90_M_F "vcmla") (VCMLAQ_ROT180_M_F "vcmla") (VCMLAQ_ROT270_M_F "vcmla") (VCMULQ_M_F "vcmul") (VCMULQ_ROT90_M_F "vcmul") (VCMULQ_ROT180_M_F "vcmul") (VCMULQ_ROT270_M_F "vcmul") (VCREATEQ_S "vcreate") (VCREATEQ_U "vcreate") (VCREATEQ_F "vcreate") + (VCVTQ_FROM_F_S "vcvt") (VCVTQ_FROM_F_U "vcvt") + (VCVTQ_M_FROM_F_S "vcvt") (VCVTQ_M_FROM_F_U "vcvt") + (VCVTQ_M_N_FROM_F_S "vcvt") (VCVTQ_M_N_FROM_F_U "vcvt") + (VCVTQ_M_N_TO_F_S "vcvt") (VCVTQ_M_N_TO_F_U "vcvt") + (VCVTQ_M_TO_F_S "vcvt") (VCVTQ_M_TO_F_U "vcvt") + (VCVTQ_N_FROM_F_S "vcvt") (VCVTQ_N_FROM_F_U "vcvt") + (VCVTQ_N_TO_F_S "vcvt") (VCVTQ_N_TO_F_U "vcvt") + (VCVTQ_TO_F_S "vcvt") (VCVTQ_TO_F_U "vcvt") (VDUPQ_M_N_S "vdup") (VDUPQ_M_N_U "vdup") (VDUPQ_M_N_F "vdup") (VDUPQ_N_S "vdup") (VDUPQ_N_U "vdup") (VDUPQ_N_F "vdup") (VEORQ_M_S "veor") (VEORQ_M_U "veor") (VEORQ_M_F "veor") diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md index 706a45c7d66..95c615c1534 100644 --- a/gcc/config/arm/mve.md +++ b/gcc/config/arm/mve.md @@ -248,17 +248,17 @@ (define_insn "mve_vcvtbq_f32_f16v4sf" ]) ;; -;; [vcvtq_to_f_s, vcvtq_to_f_u]) +;; [vcvtq_to_f_s, vcvtq_to_f_u] ;; -(define_insn "mve_vcvtq_to_f_" +(define_insn "@mve_q_to_f_" [ (set (match_operand:MVE_0 0 "s_register_operand" "=w") (unspec:MVE_0 [(match_operand: 1 "s_register_operand" "w")] VCVTQ_TO_F)) ] "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT" - "vcvt.f%#.%#\t%q0, %q1" - [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_vcvtq_to_f_")) + ".f%#.%#\t%q0, %q1" + [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_q_to_f_")) (set_attr "type" "mve_move") ]) @@ -278,17 +278,17 @@ (define_insn "@mve_q_" ]) ;; -;; [vcvtq_from_f_s, vcvtq_from_f_u]) +;; [vcvtq_from_f_s, vcvtq_from_f_u] ;; -(define_insn "mve_vcvtq_from_f_" +(define_insn "@mve_q_from_f_" [ (set (match_operand:MVE_5 0 "s_register_operand" "=w") (unspec:MVE_5 [(match_operand: 1 "s_register_operand" "w")] VCVTQ_FROM_F)) ] "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT" - "vcvt.%#.f%#\t%q0, %q1" - [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_vcvtq_from_f_")) + ".%#.f%#\t%q0, %q1" + [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_q_from_f_")) (set_attr "type" "mve_move") ]) @@ -581,9 +581,9 @@ (define_insn "@mve_q_n_f" ]) ;; -;; [vcvtq_n_to_f_s, vcvtq_n_to_f_u]) +;; [vcvtq_n_to_f_s, vcvtq_n_to_f_u] ;; -(define_insn "mve_vcvtq_n_to_f_" +(define_insn "@mve_q_n_to_f_" [ (set (match_operand:MVE_0 0 "s_register_operand" "=w") (unspec:MVE_0 [(match_operand: 1 "s_register_operand" "w") @@ -591,8 +591,8 @@ (define_insn "mve_vcvtq_n_to_f_" VCVTQ_N_TO_F)) ] "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT" - "vcvt.f.\t%q0, %q1, %2" - [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_vcvtq_n_to_f_")) + ".f.\t%q0, %q1, %2" + [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_q_n_to_f_")) (set_attr "type" "mve_move") ]) @@ -679,9 +679,9 @@ (define_insn "mve_vshrq_n_u_imm" ]) ;; -;; [vcvtq_n_from_f_s, vcvtq_n_from_f_u]) +;; [vcvtq_n_from_f_s, vcvtq_n_from_f_u] ;; -(define_insn "mve_vcvtq_n_from_f_" +(define_insn "@mve_q_n_from_f_" [ (set (match_operand:MVE_5 0 "s_register_operand" "=w") (unspec:MVE_5 [(match_operand: 1 "s_register_operand" "w") @@ -689,8 +689,8 @@ (define_insn "mve_vcvtq_n_from_f_" VCVTQ_N_FROM_F)) ] "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT" - "vcvt..f\t%q0, %q1, %2" - [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_vcvtq_n_from_f_")) + "..f\t%q0, %q1, %2" + [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_q_n_from_f_")) (set_attr "type" "mve_move") ]) @@ -1672,9 +1672,9 @@ (define_insn "mve_vcvtaq_m_" (set_attr "length""8")]) ;; -;; [vcvtq_m_to_f_s, vcvtq_m_to_f_u]) +;; [vcvtq_m_to_f_s, vcvtq_m_to_f_u] ;; -(define_insn "mve_vcvtq_m_to_f_" +(define_insn "@mve_q_m_to_f_" [ (set (match_operand:MVE_0 0 "s_register_operand" "=w") (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0") @@ -1683,8 +1683,8 @@ (define_insn "mve_vcvtq_m_to_f_" VCVTQ_M_TO_F)) ] "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT" - "vpst\;vcvtt.f%#.%#\t%q0, %q2" - [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_vcvtq_to_f_")) + "vpst\;t.f%#.%#\t%q0, %q2" + [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_q_to_f_")) (set_attr "type" "mve_move") (set_attr "length""8")]) @@ -2651,9 +2651,9 @@ (define_insn "mve_vcvtnq_m_" (set_attr "length""8")]) ;; -;; [vcvtq_m_n_from_f_s, vcvtq_m_n_from_f_u]) +;; [vcvtq_m_n_from_f_s, vcvtq_m_n_from_f_u] ;; -(define_insn "mve_vcvtq_m_n_from_f_" +(define_insn "@mve_q_m_n_from_f_" [ (set (match_operand:MVE_5 0 "s_register_operand" "=w") (unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0") @@ -2663,8 +2663,8 @@ (define_insn "mve_vcvtq_m_n_from_f_" VCVTQ_M_N_FROM_F)) ] "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT" - "vpst\;vcvtt.%#.f%#\t%q0, %q2, %3" - [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_vcvtq_n_from_f_")) + "vpst\;t.%#.f%#\t%q0, %q2, %3" + [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_q_n_from_f_")) (set_attr "type" "mve_move") (set_attr "length""8")]) @@ -2686,9 +2686,9 @@ (define_insn "@mve_q_m_" (set_attr "length""8")]) ;; -;; [vcvtq_m_from_f_u, vcvtq_m_from_f_s]) +;; [vcvtq_m_from_f_u, vcvtq_m_from_f_s] ;; -(define_insn "mve_vcvtq_m_from_f_" +(define_insn "@mve_q_m_from_f_" [ (set (match_operand:MVE_5 0 "s_register_operand" "=w") (unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0") @@ -2697,8 +2697,8 @@ (define_insn "mve_vcvtq_m_from_f_" VCVTQ_M_FROM_F)) ] "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT" - "vpst\;vcvtt.%#.f%#\t%q0, %q2" - [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_vcvtq_from_f_")) + "vpst\;t.%#.f%#\t%q0, %q2" + [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_q_from_f_")) (set_attr "type" "mve_move") (set_attr "length""8")]) @@ -2757,9 +2757,9 @@ (define_insn "@mve_q_m_n_" (set_attr "length" "8")]) ;; -;; [vcvtq_m_n_to_f_u, vcvtq_m_n_to_f_s]) +;; [vcvtq_m_n_to_f_u, vcvtq_m_n_to_f_s] ;; -(define_insn "mve_vcvtq_m_n_to_f_" +(define_insn "@mve_q_m_n_to_f_" [ (set (match_operand:MVE_0 0 "s_register_operand" "=w") (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0") @@ -2769,8 +2769,8 @@ (define_insn "mve_vcvtq_m_n_to_f_" VCVTQ_M_N_TO_F)) ] "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT" - "vpst\;vcvtt.f%#.%#\t%q0, %q2, %3" - [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_vcvtq_n_to_f_")) + "vpst\;t.f%#.%#\t%q0, %q2, %3" + [(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_q_n_to_f_")) (set_attr "type" "mve_move") (set_attr "length""8")])