From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 99CBE385840F for ; Tue, 25 Jul 2023 17:51:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99CBE385840F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1bba04b9df3so19478455ad.0 for ; Tue, 25 Jul 2023 10:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690307504; x=1690912304; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=/GrfwGC7YpGq2cble3flOhTBs1sUJQCgfE6lUqwajEQ=; b=Ll81gVOQMX2FZtIvUgpVHPAPvO/tTgpa3Wrz7DGzfMtoKT4gf5sWpaUdVnIubm3jav 7DAslB+ITk2tDaGoU/q1V95cIRduygSYJQhK4kJnEFbdiRLNFXYUZxiDQNcrcYv/qU/J QMC3ifdD+IwPMK2X+r9yENLity2bT/5kqJ0zj2edtFr+ViKI7kzMPWjP/h1BnMTbZprZ swr6nV4cAjJNxLC4BkqtFZpYG8EwmKoPqQo7pJ7fQdnQqZvPf3WJj/kLABiUmUMfP1kQ 9mQq8ZpPHTyeNlGjMQ1mS2KHAbjzIFmD8uHXyixG2NVzFjLeID/OH+BM2unRLOefk/7q Wkmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690307504; x=1690912304; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/GrfwGC7YpGq2cble3flOhTBs1sUJQCgfE6lUqwajEQ=; b=RCWF8XEtNpA/0N7jfN4JpD8fwlAFfRcRKXm8NXhaQ4hcW+FgWqoxu0sRppza4Amof5 gwnR1Hy2Ede8kj13byfE8Zqrf24ISMNwb38iDmgxnzeaT62+rqZFISdyyI3ZlYVZhNMG i1NZqqWUNZLbBGjS1The65H1rdXIXKjuV6Od33MpRlsCUfm/mMBfy1u7amcvZDgGm9G5 2m84l3saMIuryRtrgi5zmFL5xIMgqHqlAB6k9l09C9h5lrA9PUZkJIXxSIFhCPllBguL yuUvyNynPyQ1QiKXtg5swrXBGSFStZTW77Z+cbVky6jHPxTI7TTgjWkSVDhyz4NuU2Q7 e70Q== X-Gm-Message-State: ABy/qLZrGgIyFtFq7T96mw7/4S1RiXiB8d+iafzGtGGxOygFlxSUtmbZ V2O1dkbQeAtxJh4gfK5Jb0Y= X-Google-Smtp-Source: APBJJlGGky2M0k94/A+n37alPRf/KVPTGvZ4w6oABtAlGB9TPp1ESMJvb5O5F4vWaCneDlvKFGdUAw== X-Received: by 2002:a17:902:b90c:b0:1bb:bc6d:466 with SMTP id bf12-20020a170902b90c00b001bbbc6d0466mr2418258plb.48.1690307504151; Tue, 25 Jul 2023 10:51:44 -0700 (PDT) Received: from [172.31.1.103] ([172.56.168.109]) by smtp.gmail.com with ESMTPSA id t14-20020a170902b20e00b001b9da7b6bc3sm11310433plr.184.2023.07.25.10.51.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Jul 2023 10:51:43 -0700 (PDT) Message-ID: Date: Tue, 25 Jul 2023 11:51:40 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 0/5] Recognize Zicond extension Content-Language: en-US To: Xiao Zeng , gcc-patches@gcc.gnu.org Cc: research_trasio@irq.a4lg.com, kito.cheng@gmail.com, zhengyu@eswincomputing.com, eri-sw-toolchain@eswincomputing.com References: <20230719101156.21771-1-zengxiao@eswincomputing.com> From: Jeff Law In-Reply-To: <20230719101156.21771-1-zengxiao@eswincomputing.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: On 7/19/23 04:11, Xiao Zeng wrote: > Hi all RISC-V folks: > > This series of patches completes support for the riscv architecture's > Zicond standard extension instruction set. > > Currently, Zicond is in a frozen state. > > See the Zicond specification for details: > https://github.com/riscv/riscv-zicond/releases/download/v1.0-rc2/riscv-zicond-v1.0-rc2.pdf > > Prior to this, other community members have also done related work, as shown in: > https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611767.html > https://sourceware.org/pipermail/binutils/2023-January/125773.html > > Xiao Zeng (5): > [RISC-V] Recognize Zicond extension > [RISC-V] Generate Zicond instruction for basic semantics > [RISC-V] Generate Zicond instruction for select pattern with condition > eq or neq to 0 > [RISC-V] Generate Zicond instruction for select pattern with condition > eq or neq to non-zero > [RISC-V] Generate Zicond instruction for conditional execution [ ... ] So what I'm thinking for the overall kit is to stage it in a bit differently given we have some bits which clearly can go forward as-is or with very minor changes and others that are going to need some iteration/refinement. So I'm going to suggest a few changes so that bits which are non controversial can move forward immediately. 1/5 looked fine as-is. I would split 2/5. The first two patterns you added are non-controversial and could go in immediately. The other 4 patterns (which require some operand matching) will likely need at least one round of iteration and should be a distinct patch. I would split 3/5 as well. 3a would be the costing which I think just needs to use COSTS_N_INSNS (1) rather than 0 for the cost of a conditional move and could then move forward immediately. The bits to wire everything up into the conditional move pattern would be a distinct patch. We did something similar internally in Ventana and I'd like to take the time to make sure the issues we ran into are addressed in your version then do an evaluation of the two approaches. I think patch 4 is probably going to need some work too. I *think* what we did internally at Ventana will work better (utilizing scc for a non-trivial condition). Let's defer patch #5 initially as well. It's going to get tangled up in a whole bunch of changes I think we need to make to ifcvt.cc. The point being that with the bits from #1, #2 and #3 we can get some initial support in immediately. eswincomputing and ventana can both reduce our divergence from the trunk and work together on the rest of the bits. Does that work for you? jeff