From patchwork Tue Jan 30 14:31:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Andre Vieira (lists)" X-Patchwork-Id: 1893011 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4TPSM35Zrbz23fD for ; Wed, 31 Jan 2024 01:33:03 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C25723857C46 for ; Tue, 30 Jan 2024 14:33:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id B9C763858425 for ; Tue, 30 Jan 2024 14:32:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B9C763858425 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B9C763858425 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706625147; cv=none; b=PAhmZZhEBCYuEyY5TChcSp+0wEWAIzFnke3lEK4Vs0Nm/GtGkdxRuNTRTfyyhaW5zWuhgxi9mWK5VTrjKNqNUBJyJKRdds0W1sBOAb0wEEHOD1vYwmNIznHPMXqOY8JIUDgitwW/B35R0uPy//mmrWTQhlakR5XigJQ9uSoPofI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706625147; c=relaxed/simple; bh=RGU2LQh7fRSGLk3IRNeCR/evwP75S5OWZWZWX5p1VB4=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=wS0mzMrvtwP8kD+8fIaoDYAMt7MoA00/pyjvEW1RI+KQrLhr2H6O7bO1fVSAODBhUa/8w1ix8biV6y1zk4BhgnpEJXpN7bXGU4/M0v7nQRO/7aubUcOeaCrMSKf17WHojTz+emWnSlu2Ddxvm0iBfEWI4ZVZIBoQrXU80KIjeis= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6D0DA1692; Tue, 30 Jan 2024 06:33:07 -0800 (PST) Received: from e107157-lin.cambridge.arm.com (e107157-lin.cambridge.arm.com [10.2.78.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 756E03F762; Tue, 30 Jan 2024 06:32:22 -0800 (PST) From: Andre Vieira To: gcc-patches@gcc.gnu.org Cc: Richard.Sandiford@arm.com, rguenther@suse.de, Andre Vieira Subject: [PATCH 2/3] vect: disable multiple calls of poly simdclones Date: Tue, 30 Jan 2024 14:31:31 +0000 Message-Id: <20240130143132.9575-3-andre.simoesdiasvieira@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240130143132.9575-1-andre.simoesdiasvieira@arm.com> References: <20240130143132.9575-1-andre.simoesdiasvieira@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, 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+incoming=patchwork.ozlabs.org@gcc.gnu.org The current codegen code to support VF's that are multiples of a simdclone simdlen rely on BIT_FIELD_REF to create multiple input vectors. This does not work for non-constant simdclones, so we should disable using such clones when the VF is a multiple of the non-constant simdlen until we change the codegen to support those. gcc/ChangeLog: * tree-vect-stmts.cc (vectorizable_simd_clone_call): Reject simdclones with non-constant simdlen when VF is not exactly the same. diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index da02082c034..9bfb898683d 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -4068,7 +4068,10 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info, if (!constant_multiple_p (vf * group_size, n->simdclone->simdlen, &num_calls) || (!n->simdclone->inbranch && (masked_call_offset > 0)) - || (nargs != simd_nargs)) + || (nargs != simd_nargs) + /* Currently we do not support multiple calls of non-constant + simdlen as poly vectors can not be accessed by BIT_FIELD_REF. */ + || (!n->simdclone->simdlen.is_constant () && num_calls != 1)) continue; if (num_calls != 1) this_badness += floor_log2 (num_calls) * 4096;