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 AC3703858C78 for ; Tue, 12 Dec 2023 10:33:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AC3703858C78 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=foss.arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AC3703858C78 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=1702377194; cv=none; b=SiU9Q0x/PcAffKV6AY3lpZcbUrBpLg161E7HQirXZyH1/aTif5Cs8rAhwx43bUxQNF3OR0EzRgyK8/NlB8Y6yKRLcMJPrKBWkdMDdZzISMnhSB0AI/Kimnxe9MyCI91ttSKK7o9McIW5AtEa7gqROzqQ8dZu/e2xF+qpPtofocY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702377194; c=relaxed/simple; bh=ncZwpIpD4GLDOg7FCw18dBn9+W5av+plu2MKBa5v5h4=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=W4DyEgqa4NCwTB7W9bx3Ln5DPBLG/DWYyiunAJv1zaItsMq9k/1wN0HQoAhlXOztRgTytzXBgkT+Z7+EEghVwRWLIHz+VgHJSUX4BNLtTmvqO4XBSet0Byy9YLXVVSsP6PMDaHKOWroY0hYWdb2fdeBjD5c/htwkQb3aCNRx62c= 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 CD7FE143D; Tue, 12 Dec 2023 02:33:59 -0800 (PST) Received: from [10.57.2.196] (unknown [10.57.2.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6C28D3F762; Tue, 12 Dec 2023 02:33:12 -0800 (PST) Message-ID: <63733136-6274-4d83-9cb4-b1b0c1f8b499@foss.arm.com> Date: Tue, 12 Dec 2023 10:33:11 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] arm: Add define_attr to to create a mapping between MVE predicated and unpredicated insns To: Stamatis Markianos-Wright , "gcc-patches@gcc.gnu.org" Cc: Kyrylo Tkachov , Richard Earnshaw , richard.sandiford@arm.com, ramana.gcc@gmail.com References: <701bb1cb-e7e5-4b3a-ab87-11d03647644e@arm.com> Content-Language: en-GB From: Richard Earnshaw In-Reply-To: <701bb1cb-e7e5-4b3a-ab87-11d03647644e@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3489.0 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,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 06/11/2023 11:20, Stamatis Markianos-Wright wrote: > Patch has already been approved at: > > https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630326.html > > > ... But I'm sending this again for archiving on the list after rebasing A couple of minor nits: 1) +#define MVE_VPT_PREDICABLE_INSN_P(INSN) \ + (recog_memoized (INSN) >= 0 \ + && get_attr_mve_unpredicated_insn (INSN) != 0) \ I think it's better to write "!= CODE_FOR_nothing". +(define_attr "mve_unpredicated_insn" "" (const_int 0)) + And the default value here should similarly be 'symbol_ref "CODE_FOR_nothing"'. So that the style matches the symbol refs elsewhere. 2) +(define_insn "*predicated_doloop_end_internal" + [(set (pc) + (if_then_else + (ge (plus:SI (reg:SI LR_REGNUM) + (match_operand:SI 0 "const_int_operand" "")) + (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc))) + (set (reg:SI LR_REGNUM) + (plus:SI (reg:SI LR_REGNUM) (match_dup 0))) + (clobber (reg:CC CC_REGNUM))] + "TARGET_32BIT && TARGET_HAVE_LOB && TARGET_HAVE_MVE && TARGET_THUMB2" TARGET_THUMB2 => TARGET_32BIT, so the first test is redundant. In fact, given that TARGET_HAVE_LOB => armv8.1-m.main => thumb2, why do we need either? So TARGET_HAVE_LOB && TARGET_HAVE_MVE should be sufficient. +(define_insn "dlstp_insn" + [ + (set (reg:SI LR_REGNUM) + (unspec:SI [(match_operand:SI 0 "s_register_operand" "r")] + DLSTP)) + ] + "TARGET_32BIT && TARGET_HAVE_LOB && TARGET_HAVE_MVE && TARGET_THUMB2" Same here. Otherwise, OK. R.