From patchwork Thu Nov 7 17:57:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Dapp X-Patchwork-Id: 2008109 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=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=QNY0T/Fo; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4XkqZ85kV3z1xyb for ; Fri, 8 Nov 2024 04:58:40 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ADBEB3858D21 for ; Thu, 7 Nov 2024 17:58:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 03F093858D20 for ; Thu, 7 Nov 2024 17:57:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 03F093858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 03F093858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731002287; cv=none; b=jagCF20LrOA3BJ9hEQIAtsmVQVPsg7v0hcKEj9l69jU8Ur+/RlLu6qFxYXSJWSkMqgqkTqS1mauGuBU2v2oM9ch/5L+AKdSy4fY8mKM6crX7lL+b/V8l3x/ztQubVOS/GHmNVwYwVk50FTdZZ4Ne1T42FiUratNWsxerZzh59OQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731002287; c=relaxed/simple; bh=M2N++OQFPzY4HEy6BgD40GSJRN0UsG76pYj5I4OqcJw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=KYYRLuXoTcCWmyv3EH9VVKy+HyUYq6IDBxsu55pA55fmv2t97W74tbiXw2DV0qSzx0IzhZb3GS/Ylm0hELZTwc5gulAyibpBi90lh+qs7I/iiY8vL52v2wds7IPc6QJSuRLHGjiDZm5oKcEbaOnXF8EYEVdivx2ctZ+Rm1qkEMQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a99f3a5a44cso164062466b.3 for ; Thu, 07 Nov 2024 09:57:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731002275; x=1731607075; 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=qOtzdg2ns3warqfP6YiZPC4CqKtol2aS+6tkqNSGn80=; b=QNY0T/Fo3LzCDQpylmuVCeGmlQFEqphCLYFWv/LLpmqk3IszhrPdbJmOPIbEGUrBDd ACvg2sArhGzrnZWv+3TONj588e91/fwwcfAd4vKWCKWT8durnZpJw6Ub4v0y6DUQN4bs Q0zTNoyc/BiKUttIlpTjLeLOEdsEVFTD0V+CNoN2qOJ1daL6dynQJmRMJlZGED70I1fY La5GAyKzn8aU7GBwal9EI45DJ/8H+NZP+MHMe+F6Je360KwMYtYBzE/VVQ1umE71d1RO n9aLeFcn2Eh2/TSgpbI1na3THkGRJKddbyVCuXHLn0tQwM8nd6TNd4zZ9NydlPPjilor Ar9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731002275; x=1731607075; 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=qOtzdg2ns3warqfP6YiZPC4CqKtol2aS+6tkqNSGn80=; b=POdCQZn5VW4JlnqW+vfOSfP4bBFnWAjtg2V5GCJ4sTodnZgPhFZsb63ezOqKK0TCXE m9QCPgzuOsVIa9GZlblDSI1+HUD7QZtDSKO4uMyYldZ7jIyaJ2F+rvktUhivR3wwZLHk TzHPAIff82FK+vpojSb46ExaSd00igmEGp/OwvCJfjuTtOgComFWohugFdpTrXgUe47J DTpL90Ib0dYR2w7plhN+Yqkec8BVOxC1OWCyy41tgD5l83CPw4wUfOXP6VEa2QFobvYa nQWgkiwvHsZZwg5f+1s+Xahjg0Uy80fYgOyr+w5Vlpr+D6q+f0U0QgF0Bwu0Ayctbr3J 5cYw== X-Gm-Message-State: AOJu0Yyq3+jtkaBoHuQyxxQ9gY7tF/DeyCa9T91aeb0gI+lDLGlLljqo 1W1mSnYFTNqygGBCxvPVOSuIgrOTlOWClqfMPXYA3tstqXWSvd5XhlXTjQ== X-Google-Smtp-Source: AGHT+IEs6Yd+/DLLNoFbXUwqF0lYWCfYO5NR1GjExQDEm68xZPIjHuiN8xMskORI7MVHZ3YejBfnxg== X-Received: by 2002:a17:906:6a09:b0:a99:ffdb:6fef with SMTP id a640c23a62f3a-a9de61cef8amr4643006266b.46.1731002274843; Thu, 07 Nov 2024 09:57:54 -0800 (PST) Received: from x1c10.fritz.box (ip-149-172-150-237.um42.pools.vodafone-ip.de. [149.172.150.237]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0defc3csm124324966b.166.2024.11.07.09.57.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 09:57:54 -0800 (PST) From: Robin Dapp To: gcc-patches@gcc.gnu.org Cc: rdapp.gcc@gmail.com, rguenther@suse.de, richard.sandiford@arm.com, jeffreyalaw@gmail.com, ams@baylibre.com, crazylht@gmail.com Subject: [PATCH v4 0/8] Add maskload else operand. Date: Thu, 7 Nov 2024 18:57:45 +0100 Message-ID: <20241107175753.322338-1-rdapp.gcc@gmail.com> X-Mailer: git-send-email 2.47.0 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 From: Robin Dapp Hi, changes from v3: - Check if we support vec_cond_expr for the selected mode in case we need to set the inactive elements to zero. - Add another undef operand to gcn. - Remove unnecessary changes in i386 patch. Robin Dapp (8): docs: Document maskload else operand and behavior. ifn: Add else-operand handling. tree-ifcvt: Add zero maskload else value. vect: Add maskload else value support. aarch64: Add masked-load else operands. gcn: Add else operand to masked loads. i386: Add zero maskload else operand. RISC-V: Add else operand to masked loads [PR115336]. .../aarch64/aarch64-sve-builtins-base.cc | 24 +- gcc/config/aarch64/aarch64-sve-builtins.cc | 12 +- gcc/config/aarch64/aarch64-sve-builtins.h | 2 +- gcc/config/aarch64/aarch64-sve.md | 52 ++- gcc/config/aarch64/aarch64-sve2.md | 3 +- gcc/config/aarch64/iterators.md | 4 - gcc/config/aarch64/predicates.md | 4 + gcc/config/gcn/gcn-valu.md | 23 +- gcc/config/gcn/predicates.md | 2 + gcc/config/i386/sse.md | 21 +- gcc/config/riscv/autovec.md | 50 +-- gcc/config/riscv/predicates.md | 3 + gcc/config/riscv/riscv-v.cc | 30 +- gcc/doc/md.texi | 63 ++-- gcc/internal-fn.cc | 148 ++++++-- gcc/internal-fn.h | 13 +- gcc/optabs-query.cc | 70 +++- gcc/optabs-query.h | 3 +- gcc/optabs-tree.cc | 66 +++- gcc/optabs-tree.h | 8 +- .../gcc.target/riscv/rvv/autovec/pr115336.c | 20 ++ .../gcc.target/riscv/rvv/autovec/pr116059.c | 15 + gcc/tree-if-conv.cc | 12 +- gcc/tree-vect-data-refs.cc | 74 ++-- gcc/tree-vect-patterns.cc | 12 +- gcc/tree-vect-slp.cc | 25 +- gcc/tree-vect-stmts.cc | 326 +++++++++++++++--- gcc/tree-vectorizer.h | 10 +- 28 files changed, 854 insertions(+), 241 deletions(-) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/pr115336.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/pr116059.c