From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2075.outbound.protection.outlook.com [40.107.241.75]) by sourceware.org (Postfix) with ESMTPS id B1A7D3858429 for ; Wed, 10 Apr 2024 23:16:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B1A7D3858429 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B1A7D3858429 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.241.75 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712790998; cv=pass; b=qDMeRNa0dXT8BSlQBGcMxXP/kZsTwmwoIxly1+ABQ0ZjGtHnc6dAVfdKxF8tGmZfIN2BcSMgFMDqu1ng6wafVESRM954rJM2kcMQkRMHHbnP5X4Mg9H9c/d+mC7HAp/5PL7TdkQbOL3vYNKSeLFgFTeopKz2tgYvH6vMQd9kb/c= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712790998; c=relaxed/simple; bh=i69L3cQp2nmVEqpujjFxA/7OXLCP+oflwOsdZhyrLFk=; h=DKIM-Signature:From:To:Subject:MIME-Version:Message-ID:Date; b=ILY4ij9JcaPOu+tnp49/LQJeR0Fk3Onm/xkf1+vc3LAlgwYjt7QkI7R8z2a2Ozy5SE2IHC37AnRWbaspWBN7FULSlq1H/2JP9v7Dkv7BydAtTPO4q/RjIc6V/wpb+VN55jyWeTyNMURX/Oq1A01qAydAmyCvn1fkJS0VJ5NCExU= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F0Vk4vDo5MhwzH0f7bw00x6w2Ch+MzLSgZMZo4LZkU2FjbPwllf8/g/M8cA8LQGuP1z9YCA8ZDkfSIwMvPnGelt+kiF60XJfQ5DDU6YzU0S4HwF/oMv2fm6j/lydOjxHF2i4WxBpP9Sso+chGYhyKsx+uwMJvuaVvws6XwNzvU2U0RH5KZZkp8JLHrkBmwUJiu0B6av7efyIcbc4bS3aYkI7tI6zgstjFlE5PyWLzOvswuoXlnmfgnau19gfbrChuC+x5tZu4wrVBdGfx9tF7vYD6BjlTz43xlO0verV7DoIoZaFZTMOGzbbeISyWMs1pGREpT+vaVLmpXUSHJvWHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Dtc3Djiog12t0/n7+cDuNvsZD8RCY1STw+yhK6Kb1aQ=; b=R9UDKifjAyFYna9ugH6Def35gVz9a7F77cI1toPRevCPzCboXz0qriEdN8p97b0nV7qbANSsx9FAoCOmXCYhnTk7evVTJlb3j/9OvSzEi6Ym340utJ/5D1ZF3qyKrgOj9oV3mFLqWy9hrkZ7LptKsh/z4c/svcKYVoLHh6Q9dSlDxQoSDR+g8aF6p+actv4N4/zlhBTj1Oph+smsB4jPhZIDbL9uxmzjkcxcVw2GV7B4UVY//WER7qfoC41jiJebWCUt0xeqbReLIhOIe+VUAmP7+FrwjtapTgGmw09CYS0ZsBB3lX58sihRCfGNTP47X4QNIVB1UWJhvTCeaCOVSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Dtc3Djiog12t0/n7+cDuNvsZD8RCY1STw+yhK6Kb1aQ=; b=WB1uWWa4lrIK78tKS/LEYxm7cT2s6tFLiBFyGJq7dVn9ZDg8uO0q+TTIeiYx9hX6h0Q6G/RTP0HBiiKpGkhSiQdIGXfKyFueZitFm7hs5Oy64WdNKGOm2asGYd5EIlnU/mYkc6QfydPP3yD7Z+tmnHJvGFjH7eXh0aEILg9bnc4= Received: from DU2PR04CA0014.eurprd04.prod.outlook.com (2603:10a6:10:3b::19) by PAWPR02MB9173.eurprd02.prod.outlook.com (2603:10a6:102:33d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Wed, 10 Apr 2024 23:16:33 +0000 Received: from DB1PEPF000509FB.eurprd03.prod.outlook.com (2603:10a6:10:3b:cafe::b7) by DU2PR04CA0014.outlook.office365.com (2603:10a6:10:3b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.40 via Frontend Transport; Wed, 10 Apr 2024 23:16:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by DB1PEPF000509FB.mail.protection.outlook.com (10.167.242.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7452.22 via Frontend Transport; Wed, 10 Apr 2024 23:16:32 +0000 Received: from se-mail02w.axis.com (10.20.40.8) by se-mail02w.axis.com (10.20.40.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 11 Apr 2024 01:16:32 +0200 Received: from se-intmail01x.se.axis.com (10.0.5.60) by se-mail02w.axis.com (10.20.40.8) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Thu, 11 Apr 2024 01:16:32 +0200 Received: from pchp3.se.axis.com (pchp3.se.axis.com [10.88.21.53]) by se-intmail01x.se.axis.com (Postfix) with ESMTP id 2BFE9CC58; Thu, 11 Apr 2024 01:16:32 +0200 (CEST) Received: by pchp3.se.axis.com (Postfix, from userid 171) id 26E9820442; Thu, 11 Apr 2024 01:16:32 +0200 (CEST) From: Hans-Peter Nilsson To: Segher Boessenkool CC: In-Reply-To: <20240409201810.GM19790@gate.crashing.org> (message from Segher Boessenkool on Tue, 9 Apr 2024 15:18:10 -0500) Subject: [REVERTED] testsuite/gcc.target/cris/pr93372-2.c: Handle xpass from combine improvement MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT References: <20240405020601.C492220432@pchp3.se.axis.com> <20240409201810.GM19790@gate.crashing.org> Message-ID: <20240410231632.26E9820442@pchp3.se.axis.com> Date: Thu, 11 Apr 2024 01:16:32 +0200 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF000509FB:EE_|PAWPR02MB9173:EE_ X-MS-Office365-Filtering-Correlation-Id: c2ba3f52-0e6a-49e8-236b-08dc59b442c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bNQSelDLLGdqVMTAEnZ4Bo2qb9jFBqIy671nxZk+SySZYCacJRkDzVP1Q9jAnSCtd6bv+whR/59xIycC7UmQ+7lsmKm0pcE85V4/gZhr99KJtok9gXrOBKR+3GyfGMjUlDEmhgpEbURA+K9pOLDKT8bxIZwbKsE/x7/6skJdL8+EUgrji4A8V7iD4y899cfQShql/Ioga9DbQnYeeqkOWPhsTw3/Nc7A0iqOFHWs07WEJBYJz6Ndd9/B722QsGYfGO/fDLb7lXWgdOgNoCjKobxwhHnbKDiOF5piVgq4PhicGt/3jxe7t34b7HdGHHQnbazjcVnroif4nQKVQkbORu/1juZnwmJUsnZj2nj9wONkl1IaVepZYpHg1XLtJLZ9L30SONDEpzV+qZd9BPI+ogwq/uVrW7cOc3G3+hAaumt/1FzloofX1U+X9fOiuSSXsjLWEYho1eepP3OisH36FthESp/7K+zdaZjTuFf/ilZRxE+tXj8K6B7FYs0iz5PBIp58lrBDzET91g/a4N3N881csCaWAqUV5ZCAPr/wGmN9gbD0Yhk8dqwFQ7jxu8cTk+9HxvazXa6zpBjt929oUX0tQi4/lQSA6KoOerExA/0iTyKrF711ApQHqNKkVFHYqa3gHcNQ+W1i+r4NlqXPzijGKlr6PAEITmPXX5jEJGH1eqku3xYLZWKqit9zbMODeV7e1irMbuTPTpi9HnevTiBHxMR9u5un8jMZx7sjq3DXtBZEp6Mpwjz/rKPhLLOU X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(82310400014)(36860700004)(376005)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2024 23:16:32.8122 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c2ba3f52-0e6a-49e8-236b-08dc59b442c4 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF000509FB.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR02MB9173 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP 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: > Date: Tue, 9 Apr 2024 15:18:10 -0500 > From: Segher Boessenkool > All (target-specific) new testsuite failures are just like that: bad > testcases! With a touch of bad assumptions by port-specific code, no doubt. Maybe also rtx costs including my pet peeve, the default implementation of insn_costs (the one that doesn't look at the destination of setters and which when you try fixing it, pulls you down a rabbit-hole of cost-related regressions that even Bernd S. backed away from). > So no, no reversion. (...) > > That's the only test that's improved to the point of > > affecting test-patterns. E.g. pr93372-5.c (which references > > pr93372-2.c) is also improved, though it retains a redundant > > compare insn. (PR 93372 was about regressions from the cc0 > > representation; not further improvement like here, thus it's > > not tagged. Though, I did not double-check whether this > > actually *was* a regression from cc0.) > > Interesting that this improved tests for you. Huh. Do you have an > explanation how this happened? Just a hunch: less combine churn (more straightforward code) made cmpelim's job easier, same thing you wrote in order words: > I suspect that as uaual it is just a > side effect of random factors: combine is opportunistic, always does the > first change it thinks good, not considering what this then does for > other possible combinations; it is greedy. It would be nice to see > written out what happens in this example though :-) Yes it would, but I have other things on my plate. Besides, it's your patch, can't rob you of the fun. I committed the revert below, but hope to re-apply (re-revert) it in stage 1, when as per Richard B's message the combine improvement will reappear. brgds, H-P -- >8 -- From: Hans-Peter Nilsson Date: Wed, 10 Apr 2024 17:24:10 +0200 Subject: [PATCH] Revert "testsuite/gcc.target/cris/pr93372-2.c: Handle xpass from combine improvement" This reverts commit 4c8b3600c4856f7915281ae3ff4d97271c83a540. --- gcc/testsuite/gcc.target/cris/pr93372-2.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/gcc.target/cris/pr93372-2.c b/gcc/testsuite/gcc.target/cris/pr93372-2.c index 2ef6471a990b..912069c018d5 100644 --- a/gcc/testsuite/gcc.target/cris/pr93372-2.c +++ b/gcc/testsuite/gcc.target/cris/pr93372-2.c @@ -1,20 +1,19 @@ /* Check that eliminable compare-instructions are eliminated. */ /* { dg-do compile } */ /* { dg-options "-O2" } */ -/* { dg-final { scan-assembler-not "\tcmp|\ttest" } } */ -/* { dg-final { scan-assembler-not "\tnot" } } */ -/* { dg-final { scan-assembler-not "\tlsr" } } */ -/* We should get just one move, storing the result into *d. */ -/* { dg-final { scan-assembler-times "\tmove" 1 } } */ +/* { dg-final { scan-assembler-not "\tcmp|\ttest" { xfail *-*-* } } } */ +/* { dg-final { scan-assembler-not "\tnot" { xfail cc0 } } } */ +/* { dg-final { scan-assembler-not "\tlsr" { xfail cc0 } } } */ int f(int a, int b, int *d) { int c = a - b; - /* We used to get a cmp.d with the original operands here. */ + /* Whoops! We get a cmp.d with the original operands here. */ *d = (c == 0); - /* We used to get a suboptimal sequence, but now we get the optimal "sge" - (a.k.a "spl") re-using flags from the subtraction. */ + /* Whoops! While we don't get a test.d for the result here for cc0, + we get a sequence of insns: a move, a "not" and a shift of the + subtraction-result, where a simple "spl" would have done. */ return c >= 0; } -- 2.30.2 brgds, H-P