From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 6C00D3858D1E for ; Tue, 18 Apr 2023 19:02:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6C00D3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pl1-x62a.google.com with SMTP id w11so28068587plp.13 for ; Tue, 18 Apr 2023 12:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1681844578; x=1684436578; 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=xTWQOgMthqeB+93tQ9C/Hf1DO9pSeBALJ+UePMk4MtE=; b=G8VqoF5c2X5Gpy6BRZmv0L7Ev1TPie1sh6d+BCj0Dz0+dASS0bpTHT2PmHQFkm7mp8 5nPNYidcOdrzzBElAQCK3dc7ErOkBn+qABTqrDUX4WDIJbc5w5XUo3LoLFalT79uE5fO aSkZryRuFFqfQ8w6woUBj90c3GR+Eb1JWhe9p0BVHWcjUZSsFtAcKjiNuGza7aSHoltK A4G6qCL/HKXZs+okgT3LlnJ0SYDPFwmcUEZNP6ihXDFTZqwdesPdM5j4aPhvkoaTdjYe 2ojyTPJWR4c6PFYWIYTS4zP5DHykyrKMOu6XAysJxORa6RSVxcc3zcPk4sesMNuMycgq BQJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681844578; x=1684436578; 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=xTWQOgMthqeB+93tQ9C/Hf1DO9pSeBALJ+UePMk4MtE=; b=SAT+gucHiPW0lrJPyOI6VzXgO5d1lrQGh41Ufaf0NADLW85BlZymryDRDVPNBZnyIP Rs3gCtSLQNS5Oz/uuHbXg2FHlCBsLYyMsxXk2LFHkeZ+2mvpPpRL/V5VMHpf+iBxwZM2 BHtZT0kqmC4Dh8C9VlSUQyyaTC2MXFd9AYtejvd9VGlRTJ+DzgfYu5Zh1lOJOo9Vto1Y 7wvzCSgNoW5r9faQcF1C/mHfFpJ1AUT1SDylPO5b6Xvnr13DDGx6eV/dkqqhVYw5ZKx8 2hL+gaJZYgHbz5LlmTFCu7JyEhH+YvdLoqBJNvvGHWPqGSm0XIN0ijypHd97HeW+u4QB 2tvA== X-Gm-Message-State: AAQBX9cPZ6goSYVYT7h377ueww1Dxr8lKe48tqMuPO9freZ54Y0ITCKy FBuIHv0G8+zjSjn6tmwPobA2OQ== X-Google-Smtp-Source: AKy350Y2DfYtviuuHzLvFok71iW5Jhi4i2saV9SkUjMWhK7yfZxA1qHNUjbFQPOClXucULJYKL7vlA== X-Received: by 2002:a05:6a20:8f0b:b0:ee:4210:6ca with SMTP id b11-20020a056a208f0b00b000ee421006camr735638pzk.7.1681844578055; Tue, 18 Apr 2023 12:02:58 -0700 (PDT) Received: from [192.168.50.116] ([71.202.114.183]) by smtp.gmail.com with ESMTPSA id c6-20020aa781c6000000b0063d24d5f9b6sm3507688pfn.210.2023.04.18.12.02.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Apr 2023 12:02:57 -0700 (PDT) Message-ID: Date: Tue, 18 Apr 2023 12:02:56 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] riscv: relax splitter restrictions for creating pseudos Content-Language: en-US To: Jeff Law , gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, Palmer Dabbelt , Philipp Tomsich , Christoph Mullner , gnu-toolchain@rivosinc.com References: <20230418143635.980594-1-vineetg@rivosinc.com> <680c7bbe-5d6e-07cd-8468-247afc65e1dd@gmail.com> From: Vineet Gupta In-Reply-To: <680c7bbe-5d6e-07cd-8468-247afc65e1dd@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,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 11:36, Jeff Law wrote: > > > 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. Oops sorry, yeah realized that right after pressing send. I did post a v2 with the 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. That would be awesome. Thx. > > Start with this form: > > https://sourceware.org/cgi-bin/pdw/ps_form.cgi > > Go ahead and list me as approving your request. Done. Thx again. -Vineet