From patchwork Mon Dec 9 15:05:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 2020123 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Fvu89JwZ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Y6QK45269z1yRl for ; Tue, 10 Dec 2024 02:10:15 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0723E385841D for ; Mon, 9 Dec 2024 15:10:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0723E385841D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Fvu89JwZ 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 076AD3858416 for ; Mon, 9 Dec 2024 15:05:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 076AD3858416 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 076AD3858416 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=1733756743; cv=none; b=TbiONAy6cb/qSeuhK1iKKfswnSO8GD+y8RLaOsgUI7TKF6CWb+dut8g+LLBhALD5IJeT8VMqZckiEdHSp/kBrW4BLSvxBnivSIF8pDC5LkvfkD0p0jvCV0L/7iRCjNBdDAvTL2T2YDjRA9SZ/a2wUDjSHaTQ+7/51mMtQH/PLvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1733756743; c=relaxed/simple; bh=MwoLnXbBZQaDexF9ls39Byrqh7geFyppkJV/gr1thcQ=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=UnDpPAd7ZIUTvQObtWPFFRM8bbMWsgykNbHoabQiEGhzAtiCdtZM1Hms9fdyGIIgYehgi/g7Rh43xGWTQNC1Hk+ppXIzfHsv7YZb4FAsd5ydhiQkefoxVbOaJdC/xEbzmIRvYrFYmFFXr93EjdB5n8eHcBQ5uyRDuCr7W5v7vZ8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 076AD3858416 Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-5f2af291e13so620405eaf.1 for ; Mon, 09 Dec 2024 07:05:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733756742; x=1734361542; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=s+yNdOD26qQCwQmzZyg01mJXAV2iVdDHLehlvS4mY2c=; b=Fvu89JwZJ8cPbCRcSxn/vGMjU6ynmbdj+LjY9Xp7TbgJfaXX2RSjTxR8LzeZZAkc8F 8WlxJIr5YYXlx0D20JekCdyB0JPq6LgOK0z5Xo7xjbb0Hc3S5VtNnU6na4V6mbHf1thL ZxCxa0U7JOaTB0nqEECBL/WXPWtjylaXIe21gSGU1ypsTYCLhcDpK+iojjuLDgHyfPTW WESdWZWzRqfxB2H05OVznqmX/l8WY85YZiJvVMohjOxedhhQmWUllNEop+Q3HpU9wBpp O4OxSJssv58u5XE3vgbCiGqxTSNRXoFibcrYHplmr3keP9AIejaZE4YMVXKppICOZvZB HThQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733756742; x=1734361542; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s+yNdOD26qQCwQmzZyg01mJXAV2iVdDHLehlvS4mY2c=; b=ozDxvVK09BquskjqhOtiPTW/MvNvpQ5GFdHpOJc6aMxrLQKqSXLDbad7SiULGhTnU7 xvxA/eGk8KyV3wi66j/QiSpeqNmsFLh25oA2VrP0VVBF8vbR4d85bWIZ7WT9E3Tq2wbQ CYc1PLrJYnxDibg+fbvWI2KoOJdvTzKeOpzuHusnrFbIFxWIYxnGmrl0lvih1CaZ/SPU Lfe+XdNoDVST7eVBoXB3zVxQ8rWZhoV6bHm7EImNE1lteXUBoN7BjL5FaD9OS+QWW1/1 8ry1b2PvKB5Z5I8KjoAOw9KzxcirS+tO+qSbA+0eC9tdmWX7ivAygZvx4TQSlTiUvWiF oLdw== X-Gm-Message-State: AOJu0Yz9uSOxEIIHj7lgvvTu9/At5j7j2LHl1rVJMIlSPpLpTLsg9dC6 b2c44JVx+Qx2L4wiYpjxL+mQFHgGUw7MeH/3jz9t8InktsECLZtfZIRPEPUSQjsW1VoCmXlEMPH wagMYmw== X-Gm-Gg: ASbGnctpiFluQ6Y+JCvg15u5dcr0LvFhJ3duJZvsu9KgzxhAEXoascqYF11euz82kmm rPtme3pcyggsRyu8UKX1Zv5DIbTuactERLgzZ/bV035L74auhppS3z71PQur0NEzvpzND7zETM0 F8UgA9Iv0Ztd3kDU3iKcn4i9FeKYhjDdtUfHq5P3yEARoH//T8XbxP12n/df9as9ERYui5CWVvA LmkAMy8k26mu/sfCPiOKgKm4AE2tXZNubL477dIwRqvouZc63Q6KnIgaiJBo8iZPy1etfVX X-Google-Smtp-Source: AGHT+IFrtPaLnhnP0Nx18GoT6Rdha6UnZstuVoWZqLimfy2M3Z/OStT4XDmCYbY+B+GtnkOpdbew5A== X-Received: by 2002:a05:6820:1841:b0:5f2:bb17:f070 with SMTP id 006d021491bc7-5f2bb17f789mr2618188eaf.3.1733756741993; Mon, 09 Dec 2024 07:05:41 -0800 (PST) Received: from localhost.localdomain ([139.178.84.207]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-71df6987f26sm490435a34.68.2024.12.09.07.05.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 07:05:41 -0800 (PST) From: Christophe Lyon To: gcc-patches@gcc.gnu.org, richard.earnshaw@arm.com, andre.simoesdiasvieira@arm.com, ramanara@nvidia.com Cc: Christophe Lyon Subject: [PATCH v2 0/4] arm: [MVE intrinsics] Rework intrinsics for loads/stores/ tuples Date: Mon, 9 Dec 2024 15:05:28 +0000 Message-Id: <20241209150532.2174817-1-christophe.lyon@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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~incoming=patchwork.ozlabs.org@gcc.gnu.org Changes v1->v2: - Keep MAX_TUPLE_SIZE=0 and update accesses to acle_vector_types accordingly. - implement arm_array_mode in patch 4/4 instead of 2/4 to avoid temporary regressions when running the testsuite at patch 2/4 (helps future bisects) This patch series re-implements the intrinscs for loads and stores of 2- and 4- tuples using the new framework. Most of the code is very similar to the aarch64 counterpart. Patch #1 adds new modes, similar to aarch64's Advanced SIMD ones for q-registers. Patch #2 updates and fixes support for tuple types in the MVE intrinsics framework. Patch #3 makes use of the fixes in patch #2 to include tuples in the store shape description. Patch #4 is the main one, which updates a few places in arm.cc where we handled only VALID_NEON_STRUCT_MODE: since we now have a different VALID_MVE_STRUCT_MODE, a couple of placed needed a fix. The introduction of all these new modes instead of just OImode and XImode makes a few parts more verbose though. This patch series applies on top of the previous one "Rework store_scatter and load_gather intrinsics". Christophe Lyon (4): arm: [MVE intrinsics] add modes for tuples arm: [MVE intrinsics] add support for tuples arm: [MVE intrinsics] fix store shape to support tuples arm: [MVE intrinsics] rework vst2q vst4q vld2q vld4q gcc/config/arm/arm-modes.def | 22 + gcc/config/arm/arm-mve-builtins-base.cc | 71 +++ gcc/config/arm/arm-mve-builtins-base.def | 8 + gcc/config/arm/arm-mve-builtins-base.h | 4 + gcc/config/arm/arm-mve-builtins-shapes.cc | 6 +- gcc/config/arm/arm-mve-builtins.cc | 78 ++- gcc/config/arm/arm-mve-builtins.h | 3 +- gcc/config/arm/arm.cc | 43 +- gcc/config/arm/arm.h | 13 +- gcc/config/arm/arm_mve.h | 628 ---------------------- gcc/config/arm/arm_mve_builtins.def | 4 - gcc/config/arm/iterators.md | 36 +- gcc/config/arm/mve.md | 47 +- gcc/config/arm/vec-common.md | 76 ++- 14 files changed, 343 insertions(+), 696 deletions(-)