From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id ECE4B3858D39 for ; Wed, 13 Dec 2023 06:21:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ECE4B3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ECE4B3858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702448471; cv=none; b=nCOh3ZdJp1ksU7cyHndsZFVYQmz0K8th6wpKJ/OwZboVJ83mhXpMd9ahEW9SOTlXGIL8h9VYiMoO4zo5vXrhsr9/kjonjZPUrri+h3EHW9fjzHsR3lLAUe21TZRnckYdYb/J8ftBEz6I3HLo/VszJEmrQbH2s+ACFAhmLjBj/wA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702448471; c=relaxed/simple; bh=lCycXGJEPo1KcG7WYHUYKTLzLpqjyCsWgn6v/zMZnZU=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=xjBhoR2HiUhwrHxcEUp3wXbRR+pTwV1VpDsKQXmyly/d7ApCYow2RMAtzFpwS/+OEFkg0GuF5fnTr3c1jb92LjtGAS7VUUXsJBmxc7qN8dMuAhA1Kg2Q6IS67yZmjqSvemqZ0ZQ6MavrC4IcB58AHUYRAu+3UORwnGUoV8TvOfE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1702448466; bh=lCycXGJEPo1KcG7WYHUYKTLzLpqjyCsWgn6v/zMZnZU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=QcyoSP96vsEe9zLp47pYcPUo7iDR4Tzbl4cVzGJJC974gTvqmaWnGvbAYbLYW7jK4 mvxDAEKuyR/1w1TURaNGuJsigro/vxuBiEAICa5Em1F9/ekeoJ7j/2KHxyzaA+wgQw Sz2gdWL1OuhZJDiWEAuFBXR8A4ErlR01a8Vr+ueY= Received: from [127.0.0.1] (unknown [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id F0BA466D3B; Wed, 13 Dec 2023 01:21:04 -0500 (EST) Message-ID: <0b465db7584f95e0c5d0a9eb4d95a286391643c4.camel@xry111.site> Subject: Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT. From: Xi Ruoyao To: Jiahao Xu , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, chenglulu@loongson.cn, xuchenghua@loongson.cn Date: Wed, 13 Dec 2023 14:21:02 +0800 In-Reply-To: <2af90567-058c-d4f9-3805-da646cd51c1f@loongson.cn> References: <20231212111412.29351-1-xujiahao@loongson.cn> <9161b4d8a1dac816df4359dd4ba378fba2ddb575.camel@xry111.site> <0f3923a4e5d6c1c02cc1ae4b3cf4d8079aa3ae87.camel@xry111.site> <4646f6a313c83cde74e682d4cba4419120947fd1.camel@xry111.site> <2af90567-058c-d4f9-3805-da646cd51c1f@loongson.cn> Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,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 Wed, 2023-12-13 at 14:17 +0800, Jiahao Xu wrote: > This test was extracted from the hot functions of 526.blender_r. Setting= =20 > LOGICAL_OP_NON_SHORT_CIRCUIT to 0 resulted in a 26% decrease in dynamic= =20 > instruction count and a 13.4% performance improvement. After applying=20 > the patch mentioned above, the assembly code looks much better with=20 > LOGICAL_OP_NON_SHORT_CIRCUIT=3D1, bringing an 11% improvement to 526.=20 > Based on this, setting LOGICAL_OP_NON_SHORT_CIRCUIT to 0 further=20 > improved the performance of 526 by 3%. The definition of=20 > LOGICAL_OP_NON_SHORT_CIRCUIT determines how gimple is generated, while > the optimizations you made determine how rtl is generated. They are not= =20 > conflicting and combining them would yield better results.=C2=A0 Currentl= y, I=20 > have only tested it on 526, and I will continue testing its impact on=20 > the entire SPEC 2017 suite. The problem with LOGICAL_OP_NON_SHORT_CIRCUIT =3D 0 is it may regress fixed-point only code. In practice the usage of -ffast-math is very rare ("real" Linux packages invoking floating-point operations often just malfunction with it) and it seems not good to regress common cases with uncommon cases. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University