From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id E94813858D1E for ; Tue, 18 Apr 2023 18:36:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E94813858D1E 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-x635.google.com with SMTP id l21so10117265pla.5 for ; Tue, 18 Apr 2023 11:36:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681842977; x=1684434977; 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=pU3so6DFePaTGCu2RTRb53P37PaI3PKTezJyOa8ivLE=; b=hV97fd43XoY9vGM2WAs6faPZ8c7OQQRqWcb4/ENcyjXh8azb7YLcyQJS9QxSuS/fMr 9RZdpYAgbugXvnIk6+WR7MFdZGhD/fN2oSPz/BrJuirVMQVfRtqaa70tMjYVsYCD3ZdC dyPlFpwF8UVV0ti9hCaYVqL+j5KkPEkL63LYJ+BrY9PMw24HQLZR7r99A2zwCcKvzw6T 5N+EYOLTOVVTLV1p40+vgWMOqGwHpAoPNp0rP3eDNrEP0k2RMJz66e2vUmkgFHEPRnxa E5Bq0SsG3KX9W+NJ5cp9RODVSdVRxwffev6XR2xZvlrWhkD2jCueIGMxprhgycPu/+Yw OVDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681842977; x=1684434977; 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=pU3so6DFePaTGCu2RTRb53P37PaI3PKTezJyOa8ivLE=; b=Yb+HsF5su8gtaJ2rQuMCtUlt+ZYSLKeRAnM7yMbkzUDYfjQFVvZfY0JLyTSoXPaBxp 4eR8WdN7xQ2Hd7kgJpq/yNGlCfzRntKy6iZAT8RHn3T03iuy2HD8rPdGdhqogLCBP9yy JrpaHjBx86B84FB5ydwKP08CXI1dthlJtJg2WrTbLvE04KFyHGmrHB+ktyJ9VlXysXvH nkXFVREzjD0DDRg/RauNNcNs8WQzuH+mSMV2cRpii4WvdqZtp2kyNRJ4+z90kxwZ1u0X YXT1W95jTkHChJoTkog+ZxCoHDU1JZkeOs7Wt70Ui0yV9UmAAzd+x1zDjcK8DHSp7ses TJjg== X-Gm-Message-State: AAQBX9erhgQb3XbRVv6BSH0MV2TWfIk0KSX3n5Ki4XgsaQNaJukWChBU 3OTQ2OhAdGiW7CkzZInaZSo= X-Google-Smtp-Source: AKy350Zoggld2F4+WTerMYVzYL4E94HiFAaqu8k3HynIF0Wo8LsXQQZZbbe4VNurcf2AtA+Cf3lxcg== X-Received: by 2002:a05:6a20:2448:b0:f0:515d:1742 with SMTP id t8-20020a056a20244800b000f0515d1742mr581537pzc.53.1681842976600; Tue, 18 Apr 2023 11:36:16 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id j14-20020a62e90e000000b005ac419804d5sm9807368pfh.98.2023.04.18.11.36.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Apr 2023 11:36:16 -0700 (PDT) Message-ID: <680c7bbe-5d6e-07cd-8468-247afc65e1dd@gmail.com> Date: Tue, 18 Apr 2023 12:36:14 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] riscv: relax splitter restrictions for creating pseudos Content-Language: en-US To: Vineet Gupta , gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, Palmer Dabbelt , Philipp Tomsich , Christoph Mullner , gnu-toolchain@rivosinc.co References: <20230418143635.980594-1-vineetg@rivosinc.com> From: Jeff Law In-Reply-To: <20230418143635.980594-1-vineetg@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 4/18/23 08:36, Vineet Gupta wrote: > [partial addressing of PR/109279] > > RISCV splitters have restrictions to not create pesudos due to a combine > limitatation. And despite this being a split-during-combine limitation, > all split passes take the hit due to way define*_split are used in gcc. > > With the original combine issue being fixed 61bee6aed2 ("combine: Don't > record for UNDO_MODE pointers into regno_reg_rtx array [PR104985]") > the RV splitters can now be relaxed. > > This improves the codegen in general. e.g. > > long long f(void) { return 0x0101010101010101ull; } > > Before > > li a0,0x01010000 > addi a0,0x0101 > slli a0,a0,16 > addi a0,a0,0x0101 > slli a0,a0,16 > addi a0,a0,0x0101 > ret > > With patch > > li a5,0x01010000 > addi a5,a5,0x0101 > mv a0,a5 > slli a5,a5,32 > add a0,a5,a0 > ret > > This is testsuite clean, no regression w/ patch. > > ========= Summary of gcc testsuite ========= > | # of unexpected case / # of unique unexpected case > | gcc | g++ | gfortran | > rv64imafdc/ lp64d/ medlow | 2 / 2 | 1 / 1 | 6 / 1 | > rv64imac/ lp64/ medlow | 3 / 3 | 1 / 1 | 43 / 8 | > rv32imafdc/ ilp32d/ medlow | 1 / 1 | 3 / 2 | 6 / 1 | > rv32imac/ ilp32/ medlow | 1 / 1 | 3 / 2 | 43 / 8 | > > This came up as part of IRC chat on PR/109279 and was suggested by > Andrew Pinski. > > Signed-off-by: Vineet Gupta > --- > gcc/config/riscv/riscv-protos.h | 4 +-- > gcc/config/riscv/riscv.cc | 46 +++++++++++++-------------------- > gcc/config/riscv/riscv.md | 8 +++--- > 3 files changed, 24 insertions(+), 34 deletions(-) This looks fine, except that you don't have a ChangeLog. It also looks like you don't have write permissions in the repository (not listed in the MAINTAINERS file). We might as well fix the latter. You can then add a ChangeLog and push this yourself. Start with this form: https://sourceware.org/cgi-bin/pdw/ps_form.cgi Go ahead and list me as approving your request. Thanks, jeff