From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 8C1A23858D1E for ; Wed, 31 Jan 2024 13:52:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C1A23858D1E 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 8C1A23858D1E 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=1706709164; cv=none; b=nmpZEuhutwzOnhP7INGMT1h2izZ0wJgp69WJdFVQYhp8wGh9y8mpJc7R4FAIzG+44oFlwT6sYnSPcGDHMEcL23mD1r2gmZrFZKDFyKfPTOxnESfDy5lfWFIXiWhcdkDd1RpiMIzQkmqPhTdWRcA9wzqyZ9WU5Yr58coD04EbQcI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706709164; c=relaxed/simple; bh=I9tM9XnUc1Uk+s+hCqTd0UkAsav+uXoWfC+kwuXBua8=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=YOplCYy35TbvqpkyN2wDUmh9urVb5UAOLE8nIawrh6gCCsS//2jaiWlvhdbQRs+74lRaQGHdunQbkd1L/GltRlcDt4p9Ofrjmf/YJ+u1ibptsqpz+8/PoTSA5iFcqidFki9dmpUpJsZMtpaHbCzdC3MzgiggxwcAUYJrkVqvf0E= 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 9C4B0DA7; Wed, 31 Jan 2024 05:53:25 -0800 (PST) Received: from [10.57.78.243] (unknown [10.57.78.243]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BA4583F738; Wed, 31 Jan 2024 05:52:41 -0800 (PST) Message-ID: <47e1aeb2-94ac-4733-b49f-ea97932cc49f@arm.com> Date: Wed, 31 Jan 2024 13:52:36 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE Content-Language: en-US To: Richard Biener Cc: gcc-patches@gcc.gnu.org, Richard.Sandiford@arm.com References: <20240130143132.9575-1-andre.simoesdiasvieira@arm.com> <20240130143132.9575-2-andre.simoesdiasvieira@arm.com> From: "Andre Vieira (lists)" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 31/01/2024 12:13, Richard Biener wrote: > On Wed, 31 Jan 2024, Richard Biener wrote: > >> On Tue, 30 Jan 2024, Andre Vieira wrote: >> >>> >>> This patch adds stmt_vec_info to TARGET_SIMD_CLONE_USABLE to make sure the >>> target can reject a simd_clone based on the vector mode it is using. >>> This is needed because for VLS SVE vectorization the vectorizer accepts >>> Advanced SIMD simd clones when vectorizing using SVE types because the simdlens >>> might match. This will cause type errors later on. >>> >>> Other targets do not currently need to use this argument. >> >> Can you instead pass down the mode? > > Thinking about that again the cgraph_simd_clone info in the clone > should have sufficient information to disambiguate. If it doesn't > then we should amend it. > > Richard. Hi Richard, Thanks for the review, I don't think cgraph_simd_clone_info is the right place to pass down this information, since this is information about the caller rather than the simdclone itself. What we are trying to achieve here is making the vectorizer being able to accept or reject simdclones based on the ISA we are vectorizing for. To distinguish between SVE and Advanced SIMD ISAs we use modes, I am also not sure that's ideal but it is what we currently use. So to answer your earlier question, yes I can also pass down mode if that's preferable. Regards, Andre