From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from server.nextmovesoftware.com (server.nextmovesoftware.com [162.254.253.69]) by sourceware.org (Postfix) with ESMTPS id 5195D385414B for ; Fri, 12 May 2023 14:04:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5195D385414B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nextmovesoftware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nextmovesoftware.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nextmovesoftware.com; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:In-Reply-To:References:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RsWhlvzKl8rG4Bh8A/eFHe34SnIcC+NN3jwTbtVetoM=; b=RV6UWPoq3jiotCC9om1SA8KBZl oINX6aubO579yGYgsmTcWFh+mkap96/tkKlQoC8hNZGcE4AV4JZh0YAoqKCu41O0YAhUVHGdPOZb4 +qwT0HjMe9A2EU3+1SnsYVqFAb6AXc1lyqA+CRztU4/D2Ljew4S5Peln+H4EC2RgcPwNVBHFFHNLq C6uLWAHHSEyctDVOLMJ8TTXZdhqRyE73KiIeXDTNBSlaySOxlnPcpNeww446EJrUoJUX5f6vQJ+CB r9Kk+1QVEuEH6dynD6hDy4Koab8lDXKpoR9fIr/R/eJhxD06HyBaRDeZwMvOXOW3KLKxM0ARWG8hd XzC2oALQ==; Received: from [185.62.158.67] (port=57480 helo=Dell) by server.nextmovesoftware.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pxTNO-0006wl-06; Fri, 12 May 2023 10:04:06 -0400 From: "Roger Sayle" To: "'Hans-Peter Nilsson'" Cc: , , References: <009601d97c85$de708170$9b518450$@nextmovesoftware.com> <20230511150540.9606F20420@pchp3.se.axis.com> <20230512135349.A2F0F2040D@pchp3.se.axis.com> In-Reply-To: <20230512135349.A2F0F2040D@pchp3.se.axis.com> Subject: RE: [committed] Convert xstormy16 to LRA Date: Fri, 12 May 2023 15:04:03 +0100 Message-ID: <009601d984da$9d4322e0$d7c968a0$@nextmovesoftware.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQG28Urg0PW1413oa1Hy1htPI2COKwIHh3EcAaizTuyvfk8VcA== Content-Language: en-gb X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.nextmovesoftware.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nextmovesoftware.com X-Get-Message-Sender-Via: server.nextmovesoftware.com: authenticated_id: roger@nextmovesoftware.com X-Authenticated-Sender: server.nextmovesoftware.com: roger@nextmovesoftware.com X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,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: Hi H-P, This patch should now already be on trunk: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d8a6945c6ea22efa4d5e42fe1922d2 b27953c8cd Many thanks to Jeff for the review/approval. There have been no reported adverse effects so far. Please let me/us know if this has helped CRIS. Cheers, Roger -- -----Original Message----- From: Hans-Peter Nilsson Sent: 12 May 2023 14:54 To: Hans-Peter Nilsson Cc: roger@nextmovesoftware.com; jeffreyalaw@gmail.com; gcc-patches@gcc.gnu.org; segher@kernel.crashing.org Subject: Re: [committed] Convert xstormy16 to LRA > From: Hans-Peter Nilsson > Date: Thu, 11 May 2023 17:05:40 +0200 > Next, I'll turn around completely, and try defaulting to > -fsplit-wide-types-early, which sounds more promising. :) I don't like > throwing defaults around randomly, but trying out a promising idea > this way is easy. Absolutely nothing changed (not counting now running "subreg2" and generating a dump-file), compared to the default. Besides coremark and local micro-benchmarks I inspected running arith-rand-ll.c with -O2 and briefly stepped through the passes with gdb: the costs guiding the splits are fine, properly enabling the splits, but not all DImode registers are naturally "splittable"; looks like the ones used in non-decomposable operations remain. It seems all splittable opportunities are dealt with by the first pass ("subreg1"). I guess this pass has the most impact for targets that have few or no DImode operations at all. But why is the option called -fsplit-wide-types-early when what it does is enabling a "subreg2" pass, there being "subreg1" and "subreg3" enabled with -fsplit-wide-types? It should rather be called -fsplit-wide-types-second! :) Looking at its placement in passes.def makes me wonder what magic properties targets have that benefit from it. Anyway, Roger mentioned that the clobbers emitted by the lower-subreg passes were apparently damaging, so I'll try this out "for fun", on the assumption that they're actually unnecessary. I don't think actually removing them has been attempted? The patch below seems to substantially lower register pressure for arith-rand-ll for CRIS, but I've only inspected the assembly source (not even compared the result to the reload version). Quoting it for reference only, and if it "works" (passes regtest for cris-elf and x86-64-linux) I think I'll resubmit as a proper patch: --- lower-subreg.cc.orig 2023-04-29 02:53:39.000000000 +0200 +++ lower-subreg.cc 2023-05-12 15:35:25.574668930 +0200 @@ -1086,9 +1086,6 @@ resolve_simple_move (rtx set, rtx_insn * { unsigned int i; - if (REG_P (dest) && !HARD_REGISTER_NUM_P (REGNO (dest))) - emit_clobber (dest); - for (i = 0; i < words; ++i) { rtx t = simplify_gen_subreg_concatn (word_mode, dest, brgds, H-P