From patchwork Fri Aug 9 09:26:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 1970876 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=SEDw7m8z; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=SEDw7m8z; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WgJWv513cz1ybS for ; Fri, 9 Aug 2024 19:29:15 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 85340385843B for ; Fri, 9 Aug 2024 09:29:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20600.outbound.protection.outlook.com [IPv6:2a01:111:f403:2613::600]) by sourceware.org (Postfix) with ESMTPS id 70288385C6C8 for ; Fri, 9 Aug 2024 09:28:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 70288385C6C8 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 70288385C6C8 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2613::600 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723195724; cv=pass; b=mP8AC/svnphTwjkPbYf1lq7Rf1j0Qva/Rp9nQSKREJGtBhWuXWwXaxJOLjlAoi5B7CvMAzGrY4WQWYfCzzCWCYVV8YQBItFg/zRB21y+Xd/dDvbQ/kY0A23x8FyFutsBtYGb89j26i8QfHLZeQEVHH/Y2PJf8DFkgzf3AxtVeg4= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723195724; c=relaxed/simple; bh=Nq9ob3DWHZFD/LSU9kihzgPOXlYd6AtNK5QJIUTa95o=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=vX4ZTITVBrQgEcYC2XQS3tDk7IVZKkoQYJHsPadaQGL9jbO7ifd97RtfwjwJXP1BoS+tyetxl4e+Uun3AfPljE8fR0JrzDHGk0bqvu52Cft6rAA6ftqF6YHYgHmPKLUjEsOR+4coJ1jAJ2Bnl1JO54tEqns2BQuwadS6GmZeNyY= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=eVuqQfGxP7fu1K0S42wrMiUNHkvdu/wKME600wktbtgykqCp2Izy/IgnldMf7OnEksbkDCra/l9WZC3ICtlOgWMlM7Go/0RZgnj3bVUk2OxxJQJzV8ZaREICAoGVQ2CSkuALnKh+e1gMGn+zM74ZZq7X2uJFs98YWfUf4CrQndAqRZaP/bIYa+fh3r7TEwIGjVEtnCuhqMMYqjr6vaJutdQ4DnDpgrlMGiGFVB0QsYSrPEcHiurScmGsdd8j8MdPByb0B6DwzvlJfBpEXeU+vbmZwPkvMjUj00Prww5GK5qetZ/sZRcJ5NOWM7VL0nc9ORXcgSHUR8Lj8wEroy38MA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=VXjl1i7+vImORXu9LUlxvl4SBc8qR1v2rI3BVlG71Kc=; b=f9jC1BKJK4qnv81Yln0m3Bz6m5lzLnI9qphItr8qeh3kVfRR6SkYZq172ZX9yOxB1lanFwlcuVE3vQ1SNQCumhk8iAS/F3cxcLKdwh3akR8zJfTGcMERKKhzKtTmHEV+RMtRH+sMam1s/Z9djYOmim3T3dy4vJlTOhtZUXTUdD74ozFQZb1chBvfFuBt8pJVfV6O20C+za0VXQFLfGPTQOZaYbx5v+chnxRfleCfjXe9hndHuQxfEcyJ60v5ln+qYfmSoAAQJgc3wUNdngg5HvgQE+mqKKlZXsumCZScbt5RskbwWMTiN9KNKkZsmdASpjBm/sTNcPbURHWRWEiy2g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VXjl1i7+vImORXu9LUlxvl4SBc8qR1v2rI3BVlG71Kc=; b=SEDw7m8zd0SGl+JuHFCbKqvCbAmzb2uY9Ww/DeGjPd/kwxX7NtX4EYtPd7kqKX7lBOOvuMMv3BeKYEwn7Ky1ondmwtDSEk6DDlwYQ4iwlbd9rOwK3yaBjh5XnaNY65i/xncTGA7S8Uyx6PL7HI63N79bJiqGhVlAS0Kr6oMZORM= Received: from AS9PR05CA0166.eurprd05.prod.outlook.com (2603:10a6:20b:496::12) by PAVPR08MB9603.eurprd08.prod.outlook.com (2603:10a6:102:31a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.8; Fri, 9 Aug 2024 09:28:37 +0000 Received: from AMS0EPF000001A3.eurprd05.prod.outlook.com (2603:10a6:20b:496:cafe::b5) by AS9PR05CA0166.outlook.office365.com (2603:10a6:20b:496::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.14 via Frontend Transport; Fri, 9 Aug 2024 09:28:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS0EPF000001A3.mail.protection.outlook.com (10.167.16.228) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7849.8 via Frontend Transport; Fri, 9 Aug 2024 09:28:37 +0000 Received: ("Tessian outbound e85d9e0fdb55:v365"); Fri, 09 Aug 2024 09:28:37 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9838b078a496cd36 X-CR-MTA-TID: 64aa7808 Received: from Lb42dc7cee478.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7C2F27A0-653F-43F1-9E46-0119FAF75E9E.1; Fri, 09 Aug 2024 09:26:22 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lb42dc7cee478.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 09 Aug 2024 09:26:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RfSk4HAclcr5roe+iCTRV62egT2CwzqaNi+awWwGT7jo+ls3q/deSrBI3QngR0mNytWFu2IgWk19xeN2pi1s5lkGiv+tFUEwyWqM6PtKoDXU53Mibx6ADb96sjyLmMwn8yGCw0MGJQXz4jNmTUk40dcz+Do7skDknQGHe2jzR96btIUU1JohMuEKbH6j57Jz0Px3vRkX6xZu/AolMEL59gJCi5foOGR73xOu2I9GOexNoRzN/en6of01B9Fc/eOMMh/De4Q3N1XecMO07uALSv6HIZDbJvjE1T3972vRzDFx7NGCl6yCQw3i05CZAipTTOZg+R0w5XCVOXWM/ax4ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=VXjl1i7+vImORXu9LUlxvl4SBc8qR1v2rI3BVlG71Kc=; b=H+sKmHNbLNIdOeINo/oUDxW+hreve0vd8u+rHtMi3NZNkMYn3UCAfIwQVW1PX/LAiQ8Gjvx80Zl2qXl1YnK3EEv+1tugmKero1nRxeW0duKy4dv3baz2OaWfJc5kQbNqu1ZNdS0CrD3JyQWVoWE+DteLkHyB+tVH0JQSiTvcF5uJJC7rC+EjPnNjZC0mKHtYyJ2Ld19YbDccS6RFADw172q6pkLIIgtGd5W3aX8rxODeIKxYRiXqqPByIFUbRQ/oaZFoWGIohFCdgdJUgvwLdh4slGRVKPGgqBb41pqJ0sqgbyccsCjcdXyHkjAVHmzGyORZtTJttAMjhr1Tale/zw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VXjl1i7+vImORXu9LUlxvl4SBc8qR1v2rI3BVlG71Kc=; b=SEDw7m8zd0SGl+JuHFCbKqvCbAmzb2uY9Ww/DeGjPd/kwxX7NtX4EYtPd7kqKX7lBOOvuMMv3BeKYEwn7Ky1ondmwtDSEk6DDlwYQ4iwlbd9rOwK3yaBjh5XnaNY65i/xncTGA7S8Uyx6PL7HI63N79bJiqGhVlAS0Kr6oMZORM= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) by PAXPR08MB6351.eurprd08.prod.outlook.com (2603:10a6:102:df::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.8; Fri, 9 Aug 2024 09:26:20 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac%4]) with mapi id 15.20.7875.007; Fri, 9 Aug 2024 09:26:20 +0000 Date: Fri, 9 Aug 2024 10:26:17 +0100 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: Jason Merrill , Nathan Sidwell Subject: [PATCH 1/5] cp: Ensure ANNOTATE_EXPRs remain outermost expressions in conditions [PR116140] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO2P265CA0032.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:61::20) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|PAXPR08MB6351:EE_|AMS0EPF000001A3:EE_|PAVPR08MB9603:EE_ X-MS-Office365-Filtering-Correlation-Id: d073cf78-575f-406d-4bd3-08dcb855a5ed x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info-Original: uQy5pbzbSAmKWmIirocDJDjmGmVFEe2wqUJV3iz2KKVJ049f1TFxGXSbgfkNCnXBR8bTOxEltW+vV6Cf6LODMZ74i+XxejBwWdDAUjkUjuDDejko0euNHoj2v+sjYCwjJn7jbb/LOYRNC5QvvpyhhratlA12okc2+y65Es7CHsFeTxN638Ju4y2x9D5jROfrD44Xtele+eZ2VFfVj5mocesXhaLAnRH7LucqQrovgmxRrtuk6wQ9rI0bgHx80JTUZ5R/lJ2rsN4LxXULPKaPSCYwtdBhox+h2lmFxs7/8zPhEWZWSVz1qMGdN8jRU/jKq1PoRbNBWdSc1OTaydnpzJKEdJmp/qnVQfJaUviBdY6jnaNnx1mAIyWtK0+2lr8YQT27SEsh3Emsm2IBl13/QVzXMOYorcYXK5bibeDrQgW49ONdcLcoTkxs4rsLXg6wP0GFqzC88CUyAXlBH6BlL2sOORx0aILiaTT7WnZ/FPUaQQ097tyetLjQGVRTv9MGmV4Xt89BNf1nPyi3P4rUwyGPR97zEwihnvsHjLZPF2Ts5e6PusU8Y5EWsc1W82GvjJjMKOAt/+LZzANNFEpKHhSAyGtD3BRpGkJBhJ3Y5H1Nwp+1eTOHCIuyCajoFW0PDSVnHUDml+pcXjwbPNjZonwFLDarsvSUYUO5UoPdm0kZZnAFQWfsV+WDlldCI3iIGKp5UlZiuetPwcxyGppPY7dFvxYF2oyzypaCel0LzWgedG923iidrl5uT5+CmPQBK6EjhLxNYzODfhmfdlztHp9CTsWNLEOhcyXiivJoVVn8k2o5w0drsLDqEiRHVHfyf+oPFF9PZSdNPQesHCuYHsfbxOj+l/hwiapWGYrG3crnkXD00OUdG9d6v4T1o5p2DbMkSvc0E9oJoWo1ZTgly/y66uEKhezchN//U0FFGEYN/HJxAAaTCJ6d5kyUSbJ/twCiSy2aS3e4KsXjvBXl3WSVqPyPbw1BIhzooztrIa61Cd1G/UrdkvBkiD517Ck1GZDxwCNzT2AqUhO96ABy9pQa+/CLrfnBs1HuxMWfwc1ASlUtGtiHC23vGIhjxZW9rasICuziF4RyaOqVbpfsYX6T2twq4imob9MZqWLMWz8XvayRAEfr19nbcE2cZyhJPuO7DPFji20cGq2zUZn3240FMzRwlUCGNMDcmWodCKCXT8ArA+YicdJ9Fr0JYF5YyaG7WFwgr807X8ClmmWhkfXjXpjfhQ60QEQ6zkwaLk3+y97mr8jyLG7hlBd0lBi/AeW35dP3nUs9emUJtJln5ZMJgc2Y7O4YQgcE2AwTh8jvuuWc+TCl3aMQxKwae4kloRTuCZxuIKubqchcSfzLNw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8958.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6351 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:102:33e::15]; domain=PAWPR08MB8958.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF000001A3.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 28508e66-4914-4555-c47a-08dcb8555432 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|35042699022|376014|82310400026; X-Microsoft-Antispam-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zp6wDZXaQTU18RcmpGDxIP1QDVsXwYl9MraBObFWVYbo8uwFWOAQP?= =?utf-8?q?Br7fPwRagnjmxrdOvoq2fZEm4aJ0s1qXD6Gs+Plpi4XhgduavKRUhNfuPtT/7Ka5I?= =?utf-8?q?cvR/EBo+ky2vO5fcKwFbavolItYWeZySJBCgN9StqA6rBSrnXoaLTePqyRRTmb8GO?= =?utf-8?q?8DbJ5zr6LciwO0K0NUZLjkLCDgVj+ukoxwb4f/2Y1dfpKQXVW6IIRD6gyGnrT2bAD?= =?utf-8?q?Zj+9GFRVu+i9tOqYKZM6xDLHxdNmoVRzZ9QA2+aYGD1qblWkCgMT0pLh77cMgVZOq?= =?utf-8?q?cUt108/9tjRGd/Y83ohkuWVusSmaPLY4PnqCB91x7BAAec3qX96WBH+Wi6VnpL7Sp?= =?utf-8?q?/aAVBxJ2N/3hAvZa2CXr9EEQWFNhbSmOdK8cWXc9RQnD7nOc5Qyvcj0JAKeFksTQP?= =?utf-8?q?93tEeLIyGcwzi8BgBBTGRPLBDdDDvNiCWJAV04cVk+Z5OTF3OLrqiIrWRTVrkBn90?= =?utf-8?q?NQKPE37S8SZYgA7JCzjevLgvE2hioD2ttJ/OGiNeRrbMB6UTPPS6NW1yPtlOnJnA/?= =?utf-8?q?gkfotxWqFuu?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(36860700013)(1800799024)(35042699022)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 09:28:37.4665 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d073cf78-575f-406d-4bd3-08dcb855a5ed X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF000001A3.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9603 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org For the testcase added with this patch, we would end up losing the: #pragma GCC unroll 4 and emitting "warning: ignoring loop annotation". That warning comes from tree-cfg.cc:replace_loop_annotate, and means that we failed to process the ANNOTATE_EXPR in tree-cfg.cc:replace_loop_annotate_in_block. That function walks backwards over the GIMPLE in an exiting BB for a loop, skipping over the final gcond, and looks for any ANNOTATE_EXPRS immediately preceding the gcond. The function documents the following pre-condition: /* [...] We assume that the annotations come immediately before the condition in BB, if any. */ now looking at the exiting BB of the loop, we have: : D.4524 = .ANNOTATE (iftmp.1, 1, 4); retval.0 = D.4524; if (retval.0 != 0) goto ; [INV] else goto ; [INV] and crucially there is an intervening assignment between the gcond and the preceding .ANNOTATE ifn call. To see where this comes from, we can look to the IR given by -fdump-tree-original: if (<::operator() (&pred, *first), unroll 4>>>) goto ; else goto ; here the problem is that we've wrapped a CLEANUP_POINT_EXPR around the ANNOTATE_EXPR, meaning the ANNOTATE_EXPR is no longer the outermost expression in the condition. The CLEANUP_POINT_EXPR gets added by the following call chain: finish_while_stmt_cond -> maybe_convert_cond -> condition_conversion -> fold_build_cleanup_point_expr this patch chooses to fix the issue in maybe_convert_cond by walking through any ANNOTATE_EXPRs and doing any condition conversion on the inner expression, leaving the ANNOTATE_EXPRs (if any) as the outermost expressions in the condition. With this patch, we don't get any such warning and the loop gets unrolled as expected at -O2. Bootstrapped/regtested on aarch64-linux-gnu, OK for trunk? gcc/cp/ChangeLog: PR libstdc++/116140 * semantics.cc (maybe_convert_cond): Ensure any ANNOTATE_EXPRs remain the outermost expression(s) of the condition. gcc/testsuite/ChangeLog: PR libstdc++/116140 * g++.dg/ext/pragma-unroll-lambda.C: New test. --- gcc/cp/semantics.cc | 26 ++++++++++++------- .../g++.dg/ext/pragma-unroll-lambda.C | 17 ++++++++++++ 2 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 gcc/testsuite/g++.dg/ext/pragma-unroll-lambda.C diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc index e58612660c9..8634a188458 100644 --- a/gcc/cp/semantics.cc +++ b/gcc/cp/semantics.cc @@ -966,25 +966,33 @@ maybe_convert_cond (tree cond) if (type_dependent_expression_p (cond)) return cond; + /* If the condition has any ANNOTATE_EXPRs, those must remain the outermost + expressions of the condition. Walk through these, performing the condition + conversion in place on the inner expression. */ + tree *condp = &cond; + while (TREE_CODE (*condp) == ANNOTATE_EXPR) + condp = &TREE_OPERAND (*condp, 0); + /* For structured binding used in condition, the conversion needs to be evaluated before the individual variables are initialized in the std::tuple_{size,elemenet} case. cp_finish_decomp saved the conversion result in a TARGET_EXPR, pick it up from there. */ - if (DECL_DECOMPOSITION_P (cond) - && DECL_DECOMP_IS_BASE (cond) - && DECL_DECOMP_BASE (cond) - && TREE_CODE (DECL_DECOMP_BASE (cond)) == TARGET_EXPR) - cond = TARGET_EXPR_SLOT (DECL_DECOMP_BASE (cond)); + if (DECL_DECOMPOSITION_P (*condp) + && DECL_DECOMP_IS_BASE (*condp) + && DECL_DECOMP_BASE (*condp) + && TREE_CODE (DECL_DECOMP_BASE (*condp)) == TARGET_EXPR) + *condp = TARGET_EXPR_SLOT (DECL_DECOMP_BASE (*condp)); if (warn_sequence_point && !processing_template_decl) - verify_sequence_points (cond); + verify_sequence_points (*condp); - maybe_warn_unparenthesized_assignment (cond, /*nested_p=*/false, + maybe_warn_unparenthesized_assignment (*condp, /*nested_p=*/false, tf_warning_or_error); /* Do the conversion. */ - cond = convert_from_reference (cond); - return condition_conversion (cond); + *condp = convert_from_reference (*condp); + *condp = condition_conversion (*condp); + return cond; } /* Finish an expression-statement, whose EXPRESSION is as indicated. */ diff --git a/gcc/testsuite/g++.dg/ext/pragma-unroll-lambda.C b/gcc/testsuite/g++.dg/ext/pragma-unroll-lambda.C new file mode 100644 index 00000000000..f410f6d8d25 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/pragma-unroll-lambda.C @@ -0,0 +1,17 @@ +// { dg-do compile { target c++11 } } + +template +inline Iter +my_find(Iter first, Iter last, Pred pred) +{ +#pragma GCC unroll 4 + while (first != last && !pred(*first)) + ++first; + return first; +} + +short *use_find(short *p) +{ + auto pred = [](short x) { return x == 42; }; + return my_find(p, p + 1024, pred); +} From patchwork Fri Aug 9 09:27:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 1970874 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=SngwPVrj; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=SngwPVrj; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WgJVb0VCKz1ybS for ; Fri, 9 Aug 2024 19:28:07 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE0613858420 for ; Fri, 9 Aug 2024 09:28:04 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20601.outbound.protection.outlook.com [IPv6:2a01:111:f403:2613::601]) by sourceware.org (Postfix) with ESMTPS id BB6293858414 for ; Fri, 9 Aug 2024 09:27:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB6293858414 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BB6293858414 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2613::601 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723195658; cv=pass; b=TKW3vjWeTo6Ka69/6BvTyws4CsVXLwiHLVTiYxEYpQPcHuZtfacmhYJ6z8Y6Q0Tdxmvj7wPCYz0tPWjO88LDYi5xOop6aspvxuIyglyEsY/OFmBh1jpbzFUAhgZmubAgSUTZrAxTAuctsPuDveqDLxBZ5qSs8TbL09fAW0rKrCM= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723195658; c=relaxed/simple; bh=B1sndBDoAeJplUolzApUIsr53bmSzLqUvBMRLddO0kk=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=lOzkGukTjabsCZ2yJWJaG0/vUHRWh8HcTkzDS+QptQcI2EScHZ5x+QQBERp9oDC2FJAQvSwoU4gKRS5PvvJXt4nwfNnD41hn2EcDcOHfLW2UGLIwA+OC6FmAPb7ZfTWPKXBpvcFT3dngh0ru8rTnUvxRZHIiu+h8F2svMMMky4c= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Cpn2QG87FmWwJSoQNoGCIXl7EsdMhdh2uYe25PtOzwY3twSedYocQoiAw+Q8RHPxiouvFL3rEbj+urzroZcDySE1xnUwwo2BX2ezuAHWdaKrlcVgMMLyi8/90CKXbIo8Onea/lB69Hu1spK/sXCvJ1h0ZJvyg4FYq58H2viMt/nHqaDRkq/6vNEA9DtBakZMhailadKgLee6Iyopd2a90DM+/M4RjBLyh7DKF0RUdfhV9WDqJbqzBSpqTfCp0ns7qAviWbUlZLlrX7i2IHpLG6N2I8eyVTI+0qSGTMPuf3TWjTl44cAJKloRox0yc45Q0EXaXw3rgG8iedCwbSVQKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=g6DwAtcourDA4XJPgJxPeuCNEJa2gfL9bs7nwoaZQiM=; b=KnrvBr73dQFcEnJqg8H1XRAGN/NCpMzdAu+wx5bTRiYgCPITwPX0pC+wfLOBaInFHY6eQoZhVQvSpi2QdcIlYkasUpsFAJurLjYb6cZ3KJly/lx644QAojpciCA3gerT9voSTRTzO2MFVjCnl/iBuChHw3imZA1j6A99586D4r6YXguxrNsxFTeLZ0F62O8y+8RYy4MIMjB/USdKofp9YsfKc+aSI5LBpDgohDkXiSlPNUioR7bHm1aqqepahGRd/wcJSvohmoxNV4egT5CcKYZH3cIg0MAY70baeLYYMwDe383GqbRj12AbqPolfShzO4COPgnEYVmsPRVvkkegxA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g6DwAtcourDA4XJPgJxPeuCNEJa2gfL9bs7nwoaZQiM=; b=SngwPVrjKOxl8742VLhtDeHqdZNBpAMb+EjYzMDP/aEtmZV4ArF+/603kL2lEyeREcSOC/7qV7a8yc5HW4G1UVEDJIeoQGNLNyQtWbg+fqq/rUv5LNYAnMqiZAM0M6cMRqdS84o3OvXbELy40LmHVbF5kQG0b+lnXUb96Hszp1U= Received: from AS9PR06CA0556.eurprd06.prod.outlook.com (2603:10a6:20b:485::19) by PAWPR08MB9993.eurprd08.prod.outlook.com (2603:10a6:102:359::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.13; Fri, 9 Aug 2024 09:27:28 +0000 Received: from AM4PEPF00025F99.EURPRD83.prod.outlook.com (2603:10a6:20b:485:cafe::ea) by AS9PR06CA0556.outlook.office365.com (2603:10a6:20b:485::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.13 via Frontend Transport; Fri, 9 Aug 2024 09:27:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM4PEPF00025F99.mail.protection.outlook.com (10.167.16.8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7875.2 via Frontend Transport; Fri, 9 Aug 2024 09:27:28 +0000 Received: ("Tessian outbound e51bb20c2cc2:v365"); Fri, 09 Aug 2024 09:27:27 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0871106349ae7021 X-CR-MTA-TID: 64aa7808 Received: from L2856e307569c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BE9E1A6A-A555-4684-97DF-C79D065CCBC3.1; Fri, 09 Aug 2024 09:27:20 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L2856e307569c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 09 Aug 2024 09:27:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Wv1OBlV82SMRlni2SjqjMGmnX2RrYhyTDJQJvZ2CGwrS6Cm9zXv51YeYnMm1NtIgqIkTdeqvf64q5mXrvfHi/XwxuxGbMZB+wMrqGdJKa4HJrw44nU7TSRVDRWUtPs8ppJ4j23NpfN5WJYig6jO65KH9Ey4x6rW75lwCXUuyftQLcGGrZO8Ph5Y6b5kC0+GYOgAZzpyj0+8NB0UqP0uR5JGg37xmhKrKp5zyOr7NRgB212CUNLwT9W3Hl1WOhVgybeV7jjGCaOT4as6FKAmqITi/IE7/ifLKufnr+vQMH8BcmRZ9gNMxBrAFuDOVkoW0Zh5GOvBCiQEbsqJ3IunmbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=g6DwAtcourDA4XJPgJxPeuCNEJa2gfL9bs7nwoaZQiM=; b=Fba29j3TpK6LKm/WitZ8o9EVjfCBW28w3hOoZFf7x9wjygKopGMFudVqxKtWzwTaz3hF4wUGyX8yDaaXe3sw21SK7NnWu5dxzE4AgZUVcbZv0rSu3Z1UD05y9UaTavpHptyQBgUxkD7o2QyhcVAj0woOCx5HY2hhqsLJK9ZcL0RF3kckIhW15n3YdLZ1bxTqzK2UE6HCmpeJkNyodkJqbG3mkohuwVhD/w8TqCuMgHzWG4Sr3EKGuBpd6ydmEVxKk+OVHyFNfyZXbskjE9GOcPzOxr5gZysyyP6XlF6HtRlDG9qkX+5C58hsgXFDAzya4JKs2NzjHTd7+3BKOnvbrA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g6DwAtcourDA4XJPgJxPeuCNEJa2gfL9bs7nwoaZQiM=; b=SngwPVrjKOxl8742VLhtDeHqdZNBpAMb+EjYzMDP/aEtmZV4ArF+/603kL2lEyeREcSOC/7qV7a8yc5HW4G1UVEDJIeoQGNLNyQtWbg+fqq/rUv5LNYAnMqiZAM0M6cMRqdS84o3OvXbELy40LmHVbF5kQG0b+lnXUb96Hszp1U= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) by PAXPR08MB6351.eurprd08.prod.outlook.com (2603:10a6:102:df::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.8; Fri, 9 Aug 2024 09:27:17 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac%4]) with mapi id 15.20.7875.007; Fri, 9 Aug 2024 09:27:17 +0000 Date: Fri, 9 Aug 2024 10:27:14 +0100 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: Rainer Orth , Mike Stump , Richard Biener Subject: [PATCH 2/5] testsuite: Add scan-ltrans-rtl for use in dg-final [PR116140] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P265CA0112.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c3::15) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|PAXPR08MB6351:EE_|AM4PEPF00025F99:EE_|PAWPR08MB9993:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b3be81a-accd-4775-1b94-08dcb8557c8a x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info-Original: qX+WJ3oqFvmESIO2UHSliWIaYIIRHaJC2aQBtNhPX5zeu7uCMflulI8yzMY3/ZRglXL4lZhWphzILguHMVllnGThGX0Msr4ANxagD4CM74T4q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Vb0zF2EBvZ8YDYW+JpsZSvw6WL0VvfGUw7kiz+BBCSAdoJtBCe4kyYXFiR3xBLrFDJ9RMNmGCZTbffG2lz/h9DgPLdjFu41dER+0DLH9/DSm/hZSYVvdtJ7PLu0gjCbL3Q3VVK3NapnVqCMtQAHl204EG50vJGJ371Kq2jhhuL9nHycAgLvGJLsg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8958.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6351 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:102:33e::15]; domain=PAWPR08MB8958.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00025F99.EURPRD83.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 57a00283-e7ed-4366-8d95-08dcb855766d X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|82310400026|376014|35042699022; X-Microsoft-Antispam-Message-Info: =?utf-8?q?yN5fXn8ptemH+sFR1u3gGkUo+ipsqv1?= =?utf-8?q?hhmUaZlFZz3++QPp8mkKDoR2daKRuaxeDbaOmVhdu2Nl4Im6YnRVPpny1T+fZd0tt?= =?utf-8?q?Q0HOjYL0wAkNFK9JdmvBsCCqSduB8KB6ME3e6p8rL++OiVSe0bvhm05IAn2YhK9T8?= =?utf-8?q?r9MWVnv0OM9M55L5NV/NKp7zLStJTumHijGv+d8xuPAl6/eNr58gybnnIsoH0tblU?= =?utf-8?q?O5cvpji2ASnlvaaJ0p/07wSFRES9P/Tz/dJCjDN6gbrPcI8Ht/hge8uo41chGeC2O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=?utf-8?q?hkjSZWqLTH457CrJLQZxxcrru7K8p/hx+mkWVel29A2+iPoEIPuzij3MDOhGwyVaH?= =?utf-8?q?bqim36XzH6386xrJ+tPh4bHyS2rNdVfhoiwQEx2fU7ChKKOjn813M3Y/p3KFaHU04?= =?utf-8?q?OlVUjjxaXNQ7Fx/bVnrJ1fVkO/v8FFx8oWpQN6ZO7VoPKXseb23yypCK+p9TMc6Dz?= =?utf-8?q?Ljb7I0Dc/bxI7BneIf8dQF7xiFNfcOpeSFzyc/5S2UBHHLe0jdL4S7+ExzPBkw16b?= =?utf-8?q?qNcP1mcBS4e?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(36860700013)(1800799024)(82310400026)(376014)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 09:27:28.0143 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4b3be81a-accd-4775-1b94-08dcb8557c8a X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00025F99.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB9993 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org This extends the scan-ltrans-tree* helpers to create RTL variants. This is needed to check the behaviour of an RTL pass under LTO. In particular it's used by a later patch in the series to check that RTL unrolling is applied under LTO. Tested as a series on aarch64-linux-gnu, OK for trunk? gcc/ChangeLog: PR libstdc++/116140 * doc/sourcebuild.texi: Document ltrans-rtl value of kind for scan--dump*. gcc/testsuite/ChangeLog: PR libstdc++/116140 * lib/scanltranstree.exp (scan-ltrans-rtl-dump): New. (scan-ltrans-rtl-dump-times): New. (scan-ltrans-rtl-dump-not): New. (scan-ltrans-rtl-dump-dem): New. (scan-ltrans-rtl-dump-dem-not): New. --- gcc/doc/sourcebuild.texi | 4 +- gcc/testsuite/lib/scanltranstree.exp | 123 +++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 2 deletions(-) diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index d5c48e67b71..827fe9ce66c 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -3615,8 +3615,8 @@ stands for zero or more unmatched lines; the whitespace after @subsubsection Scan optimization dump files These commands are available for @var{kind} of @code{tree}, @code{ltrans-tree}, -@code{offload-tree}, @code{rtl}, @code{offload-rtl}, @code{ipa}, -@code{offload-ipa}, and @code{wpa-ipa}. +@code{offload-tree}, @code{rtl}, @code{ltrans-rtl}, @code{offload-rtl}, +@code{ipa}, @code{offload-ipa}, and @code{wpa-ipa}. @table @code @item scan-@var{kind}-dump @var{regex} @var{suffix} [@{ target/xfail @var{selector} @}] diff --git a/gcc/testsuite/lib/scanltranstree.exp b/gcc/testsuite/lib/scanltranstree.exp index 79f05f0ffed..d7e27ad364a 100644 --- a/gcc/testsuite/lib/scanltranstree.exp +++ b/gcc/testsuite/lib/scanltranstree.exp @@ -146,3 +146,126 @@ proc scan-ltrans-tree-dump-dem-not { args } { ".ltrans0.ltrans" } } + +# Utility for scanning ltrans RTL dumps, invoked via dg-final. +# Call pass if pattern is present, otherwise fail. +# +# Argument 0 is the regexp to match +# Argument 1 is the name of the dumped rtl pass +# Argument 2 handles expected failures and the like +proc scan-ltrans-rtl-dump { args } { + if { [llength $args] < 2 } { + error "scan-ltrans-rtl-dump: too few arguments" + return + } + if { [llength $args] > 3 } { + error "scan-ltrans-rtl-dump: too many arguments" + return + } + if { [llength $args] >= 3 } { + scan-dump "ltrans-rtl" [lindex $args 0] \ + "\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 1]" ".ltrans0.ltrans" \ + [lindex $args 2] + } else { + scan-dump "ltrans-rtl" [lindex $args 0] \ + "\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 1]" ".ltrans0.ltrans" + } +} + +# Call pass if pattern is present given number of times, otherwise fail. +# Argument 0 is the regexp to match +# Argument 1 is number of times the regexp must be found +# Argument 2 is the name of the dumped rtl pass +# Argument 3 handles expected failures and the like +proc scan-ltrans-rtl-dump-times { args } { + if { [llength $args] < 3 } { + error "scan-ltrans-rtl-dump-times: too few arguments" + return + } + if { [llength $args] > 4 } { + error "scan-ltrans-rtl-dump-times: too many arguments" + return + } + if { [llength $args] >= 4 } { + scan-dump-times "ltrans-rtl" [lindex $args 0] [lindex $args 1] \ + "\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 2]" \ + ".ltrans0.ltrans" [lindex $args 3] + } else { + scan-dump-times "ltrans-rtl" [lindex $args 0] [lindex $args 1] \ + "\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 2]" ".ltrans0.ltrans" + } +} + +# Call pass if pattern is not present, otherwise fail. +# +# Argument 0 is the regexp to match +# Argument 1 is the name of the dumped rtl pass +# Argument 2 handles expected failures and the like +proc scan-ltrans-rtl-dump-not { args } { + if { [llength $args] < 2 } { + error "scan-ltrans-rtl-dump-not: too few arguments" + return + } + if { [llength $args] > 3 } { + error "scan-ltrans-rtl-dump-not: too many arguments" + return + } + if { [llength $args] >= 3 } { + scan-dump-not "ltrans-rtl" [lindex $args 0] \ + "\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 1]" ".ltrans0.ltrans" \ + [lindex $args 2] + } else { + scan-dump-not "ltrans-rtl" [lindex $args 0] \ + "\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 1]" ".ltrans0.ltrans" + } +} + +# Utility for scanning demangled compiler result, invoked via dg-final. +# Call pass if pattern is present, otherwise fail. +# +# Argument 0 is the regexp to match +# Argument 1 is the name of the dumped rtl pass +# Argument 2 handles expected failures and the like +proc scan-ltrans-rtl-dump-dem { args } { + if { [llength $args] < 2 } { + error "scan-ltrans-rtl-dump-dem: too few arguments" + return + } + if { [llength $args] > 3 } { + error "scan-ltrans-rtl-dump-dem: too many arguments" + return + } + if { [llength $args] >= 3 } { + scan-dump-dem "ltrans-rtl" [lindex $args 0] \ + "\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 1]" ".ltrans0.ltrans" \ + [lindex $args 2] + } else { + scan-dump-dem "ltrans-rtl" [lindex $args 0] \ + "\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 1]" ".ltrans0.ltrans" + } +} + +# Call pass if demangled pattern is not present, otherwise fail. +# +# Argument 0 is the regexp to match +# Argument 1 is the name of the dumped rtl pass +# Argument 2 handles expected failures and the like +proc scan-ltrans-rtl-dump-dem-not { args } { + if { [llength $args] < 2 } { + error "scan-ltrans-rtl-dump-dem-not: too few arguments" + return + } + if { [llength $args] > 3 } { + error "scan-ltrans-rtl-dump-dem-not: too many arguments" + return + } + if { [llength $args] >= 3 } { + scan-dump-dem-not "ltrans-rtl" [lindex $args 0] \ + "\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 1]" \ + ".ltrans0.ltrans" [lindex $args 2] + } else { + scan-dump-dem-not "ltrans-rtl" [lindex $args 0] \ + "\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 1]" \ + ".ltrans0.ltrans" + } +} From patchwork Fri Aug 9 09:27:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 1970875 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Fjj6WSDb; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Fjj6WSDb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WgJWb180Nz1ybS for ; Fri, 9 Aug 2024 19:28:59 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5DF8B385C6C6 for ; Fri, 9 Aug 2024 09:28:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on20622.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::622]) by sourceware.org (Postfix) with ESMTPS id 339FA385841D for ; Fri, 9 Aug 2024 09:28:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 339FA385841D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 339FA385841D Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2612::622 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723195690; cv=pass; b=cSOiJQXf7zZr8TdJI3j9BrBTywgwaJM5crxbDDyvtBhlkBiSLeNafaTZb+h2hs4kBM5AAqLs3uMUSSL7FL3QjfUMeiky57Oo8QOAp6rw1Jpy1sqnbqFH6UzTGrmfRD1dVjvNMZejndrd2vxbcOtAv75DwcyqXeZgjLgtsBPDrao= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723195690; c=relaxed/simple; bh=vTULl/rKwZHAWOsHOBFfNhiY58AgyXBNK7AKdzS9diM=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=Hn2ZbBNDnLqmmKtp02ZAJtUgU9kG24uHvrGXKAj38leaK5i6pmX71Usph2UqdSC2j6TULncetlxfNI1zPcSlX4tJXCf7YSMgBa5AJKdIV90KLZ5ClXUcBGgWNlqL8CY03y4sHYeFaVrd7SB1HOKoyU/lTvdJKGJ51IgFoHjsc9k= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=lBGVqsBeGZKynuIPj+qH7a58qNbFERNzY7zFIMDeeYJBVtWNsaAUStP8JtuPkxsehBSlquJiqKXpqQDvC6+EZH6f90Q682BhYlI1Eidf0MJ/798hqLw3z2+Kc7elQ1WliITSs1yX0tN7MkWojzA005PCiXHbJU2pl7OUXUiIlJMQQsGeaakYVbzQ9KG0x73BqZiMjZ7eLUqxmiOIpT3hBJeUUE64kICRgw+t96op+iztv8fZU+WHCmBjQdwdBcBogHYSEgu61DnvWB38TTAukpkvSrxvkb/JQnTNmcIHQnhbb3lZBxh+3rk7ogpnZZKAEra9RyN4WwcSKpKqfkhf6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=UixczVMp9Yss0ijk+y8vUhiXeoR/woCPt4CpNMTCuNo=; b=t/5DSu+UVpx+RZ2LGKYiHpLkNyKSApKvg7AJdwMxEhPqOfy5zx0azmW8BMQI5aT74jj/AlxCHiIW5LMN3QU9jsd9rAMZDOCTIeCGTzBVnqAJcuN1kpLOf4bQmJMAlQHrBmhmLXHruDUZXa+Rpt8mMXsLXS19IgILC5mtJ/cxI8yMzYSWu1dTnOtOEq5IHoC8IM0EncoUr1tc47p95OlohrR/DsOxZLAeBhkXkZslUACj8Phsi8/0bZYh264z3dU83S8TyFhuAAd/fdKD+pKFiOaUSFhpeHZAe399LXOschm2ZrEEXpzIIC2F6WGeMvqdrOWhrPtvN0W58KlB/fLnMA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UixczVMp9Yss0ijk+y8vUhiXeoR/woCPt4CpNMTCuNo=; b=Fjj6WSDbNRY5fnyqCWm9eB8Ff6upzkbr2EC55t6CaBVOq2i8FS3HBAvGCXXPQFOQ+VOgdRhZ5pry7PtewQsVS/eGjul/PR8KlAbs0J/j3qNQL+H4mCAY7n5OZBb0cCCx8YZsA06GkFIBMOU6XY/XO28a53B/+34uRslLgnLsZ1Q= Received: from AM7PR02CA0020.eurprd02.prod.outlook.com (2603:10a6:20b:100::30) by DU0PR08MB7438.eurprd08.prod.outlook.com (2603:10a6:10:355::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.8; Fri, 9 Aug 2024 09:28:03 +0000 Received: from AM3PEPF00009BA2.eurprd04.prod.outlook.com (2603:10a6:20b:100:cafe::b0) by AM7PR02CA0020.outlook.office365.com (2603:10a6:20b:100::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.14 via Frontend Transport; Fri, 9 Aug 2024 09:28:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM3PEPF00009BA2.mail.protection.outlook.com (10.167.16.27) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7849.8 via Frontend Transport; Fri, 9 Aug 2024 09:28:03 +0000 Received: ("Tessian outbound 0842327a015a:v365"); Fri, 09 Aug 2024 09:28:03 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0273411d555c883a X-CR-MTA-TID: 64aa7808 Received: from Ladd52ca1cb19.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D8283308-0CAC-41A6-BF34-2847B4F05C90.1; Fri, 09 Aug 2024 09:27:55 +0000 Received: from EUR02-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Ladd52ca1cb19.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 09 Aug 2024 09:27:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IsOg3Yd8aS8IRG6PUdXw3o9dfY8cA7xTMiA2+zeMXRbpjevVCZYQYMQ9wQ8FVn1xlPqBzPxyufsnVEekIoSYzNmfdNV45bt29tdoY/NN4JkF333WOsVGfLD46BdX5X97K8cb42F0lDo9gMexmFj6AVn7AmMS5omvkgI4CLe+/iQUSH/YHBvyhw9DLYEnypfVqAD2cWVfwRbdFkyjn4K9kqhYwgPil/tz5Mye7nO5+x6C8OF3Y1O2abNcsr8x3sn17tlTfcAedNTMNJuKK6ygiwl6kGm692xu/CfmZbXoCnl92L4EJpvdyyQ5VTamrNAvwAWb//rH9kZi/US0NEyF+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=UixczVMp9Yss0ijk+y8vUhiXeoR/woCPt4CpNMTCuNo=; b=Nz/Kh21eDElQrCjsC1x+NnDJ5peRG6T8AWeZK0FqjhR+Kst6ocOO2xWj456nFwuP+IQUmF269Tp4fO8b17Q8DDdL0PdosyD6F1dM/myBaxg3pWV/ZJs4PqDWjhcg85qmext7oDkWy3c25tBJTlkp663WErTl+pMeYakjMnVALW0FCCJ9umDs98D7LXQZRPdvCUA7Z2/+1aWMuuAtkSDaEuT7VAVMBAiGTarZpxJln3yqwbyLQ5PoI4q/kdDakn0zfdd5gfHylt+ES8/uNOu4rswJsYsSQzCy8fAR9ip9KBfU9YOJ4JtEjguxWOYKnjoSjgcRxg3zGgHQE2T4+GewEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UixczVMp9Yss0ijk+y8vUhiXeoR/woCPt4CpNMTCuNo=; b=Fjj6WSDbNRY5fnyqCWm9eB8Ff6upzkbr2EC55t6CaBVOq2i8FS3HBAvGCXXPQFOQ+VOgdRhZ5pry7PtewQsVS/eGjul/PR8KlAbs0J/j3qNQL+H4mCAY7n5OZBb0cCCx8YZsA06GkFIBMOU6XY/XO28a53B/+34uRslLgnLsZ1Q= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) by PAXPR08MB6463.eurprd08.prod.outlook.com (2603:10a6:102:157::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.9; Fri, 9 Aug 2024 09:27:54 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac%4]) with mapi id 15.20.7875.007; Fri, 9 Aug 2024 09:27:54 +0000 Date: Fri, 9 Aug 2024 10:27:50 +0100 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: Rainer Orth , Mike Stump , Richard Biener Subject: [PATCH 3/5] testsuite: Ensure ltrans dump files get cleaned up properly [PR116140] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P265CA0149.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c7::13) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|PAXPR08MB6463:EE_|AM3PEPF00009BA2:EE_|DU0PR08MB7438:EE_ X-MS-Office365-Filtering-Correlation-Id: 19ce3674-86ef-4ec0-d821-08dcb85591b5 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info-Original: tpZB0eXsObHz3HqP7m/Eo2kdH48Dwp8DRDCFsp+NEqZ4nhjbXm2tF6SBoZ6+jEhodoe0AFSE+wzFS88RQ1/0OW2a8lUlluDfUa8gQzdfJx8hfK6ssUPnBYZ09cO4Hk1Nv3rcAqkg3U0Az1SCW08768UVElDM4dgv1z7JW42b3r8D0iCVhA3dQJXi89AcvHmRl+0yEho+/in5gdVIcHtIjH7zyRQKn8NeE5NQf3kd/3ctIN36d4OZL70Op5iOr0g3Ooxi5TbyKcbibR9oHoE3qmkm6JCKsPqrp59suMZcH0YztaKzVcfEUrIRGPb36x8P+8gWHLIhiXOyIsf2/YdoUjXZ7L0BV9O5fHFHzJE6OEf2X50tMwQyexYF8MxiJi58FI/rnHvvy87MURmwEphFhodp/jzzQFGDw6+Yuz09kT0X6PkYh6C5dR9t8bcCFt4J33mrhXsJq51IrlF+SAW0WihKpkiQTa0hJly4lDTBc4s+/+qX6RqeZecFgeLXkG6E8WuFNxhu2DsbGWtuwoKJzLyOdnUBk/afTon5DEAArOONFJYIlq8dBOaYm1RJicPQ0KrQpMtGHrC0hWxeK1hc6A6OSOpFJOJejUMjQE3H0Lc7+fyRkbCBTZLvI5zTesSDpPHIp5XcPQ8SmRHDey1gEGHdusmTf7wGMcQvI/uPrKX+IrdQsxywRRXunItrU3dUKUb9robi8dYCUi3F8ftobtP/zlFl5EYs2wu15MXh/7A2NBGAzS49Wwe4PxVZCPAwwV29H3YbSn3XTcsAZwNonebJySRxeWBpYdv5PjEv7C+N1Gsq2dF64Oq3t3z/esL7cAH7WUymKZo39ClCW/YzOnP8Lsb2aABQG0hOwJkTYrwXx+UT8TcOQpplpsc4TeatLGV9rJ9fRotKzYUEyGFe2Hpdl3dkH9sBVGi7ve+2/ATAquXcg/Brhz7Rq1ihU0W0HX0A2UfwRFL3+UG8iKGpebHTJULM9G07VEajfjShRgmqvL3cBC9AVGCFmdSvQHJL8LlrAZj5B6lEPFvr9oSvm11acnHNyMaN3R6QH1TH9pXW2ezbu4evhwYKBp//tECfB24ehcKA5JiGCNHUAT7zmZmTRwaDRqz+jd5YYI4ha8KmBTzyuxksnUXmwiwbm5GPHYZ4KxZu1IEt/KQFOVTRMr/w6B5QW7y0XyGwcFDKjXg4dO/pSn7ZtuOZg2TXzz1RiQNHUhJdtzmvscPs0LIuQqoxZxzqHH432oJpq9HytfLIwpRCIccVqLZaiCToVX54tulRGchupPdCOf1MQmtQGFrTxC8xReYMxJekISIn1Ml35J+o8nNwQMD+zW6FroXGqNIWIhDufybELPGfPceWVQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8958.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6463 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:102:33e::15]; domain=PAWPR08MB8958.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF00009BA2.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 47de02c0-1dd1-48f2-713a-08dcb8558bda X-Microsoft-Antispam: BCL:0; ARA:13230040|35042699022|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?1C1uyJXznsX+CKH0Q2NikKMLXvJf5eA?= =?utf-8?q?p3AjtdAF/I0Dq9D6RWTLRF1QAvmRH3d0diZ2TQPnkI4tsQNY6KZQQB2J8GfM9NL7K?= =?utf-8?q?CPogPNKibp/aX2ECe0qTXzgmNdStTqF3ZIvkEcpFnrLse6JHYsQ31wrOoQHN87xa7?= =?utf-8?q?jrtAeG31fkmoWcJXTe9JEtu+wEKm4DjIOU7it+a3Gzj4+EHVOBwCxAz6Af/FcH2Xl?= =?utf-8?q?f3lhKs5Cqyjad586NUKtR+4657tmQPERJwlt+JVDe6zFzCJJJwj4U1A/uJpOqCqEm?= =?utf-8?q?cJ3tg+RDabUjmd2upoRDhJuGZXyyEKMNxXJL2VztPVgpGxemWZU2IfTj7BZhpg/JS?= =?utf-8?q?xECpoA4HsIhIF+IfAkjALDKHvElaCpXkzTqiC1IfgnR8EoXhIoG24Fitds96/hGpb?= =?utf-8?q?WLM5rGFnnnNkhJ05l0dnawTOxhLHBMpyi9DQcJR7ug/QbtnhUYCZfxZUZSCXkLQot?= =?utf-8?q?3SG+Vwg13JLGl8poGx0YjrPUUjo84JMuUmHrFA6bRrpS6xLl806SNrPu5scnRMkUO?= =?utf-8?q?Z9aoYkUPGjSx4o+ChYCGPDCKCNrSUVjta+IIxeTuKhAi7r+hsHqxPuoqcodZdPFyQ?= =?utf-8?q?TKTnzz2VbspoqQFAlszeZ7jMpAd8/A8ygu9XsqjzFYivDkmifea+4A81dUIw0vrY8?= =?utf-8?q?6POJqyeAau3EOnpfv0HjBeuTCxaLbLGFIIOpRFa20kxmHpHoISktUTMGPjlciXR/0?= =?utf-8?q?XgrcOE9znJ341J8/tdfDYyO3LMuel52UAUpM3bJGEj4k3/5IjglXgefQZGfnxh0X3?= =?utf-8?q?f/cS6qidQ9MgGRK/IaNI98dCcGxvHQT7ywfYRIMdVKL+S4b6B3pXPcDnGlwvEe34e?= =?utf-8?q?/RciLSjV5TuKoIw70VljPnSLOcLfxsll5sjFEVPThSwkEf2W9f6iz01RqVrjwvRo+?= =?utf-8?q?fmVippsbOR5PASXoOJuDhuFYHKR4G+mQb5uGOISxC0keXSCMlUimaaKqDvwYsCcX3?= =?utf-8?q?Dpj3bWwoKQ0ro1jYrN1GmM/eKUN/XkinIg0eC1Ejsrk//JSVSBcZ/qZsJBnU9qupg?= =?utf-8?q?lttIPrCpuw2QOpXmVJTFaiJDG4dIxF2kJzvfOruuQ2RXJ3C5DswcUfVw6zn12Vie7?= =?utf-8?q?u5HtxH99shnMhzF1GrJQmizd2VK37NiuWOFFEpasmPNNg8nRsF/UMB3VJNJstH9BO?= =?utf-8?q?2EdznDInfK7dplUgCeifx3ZdMYk9iOq2CvEh5hLElU+USoon67Txi2MSQnwGxLqg3?= =?utf-8?q?THP0CLN27TbKGyp5dAeq/topXjfg5l09COnBJ2W6EDk93gGFjDQ5gio7dFDD3pFKM?= =?utf-8?q?2rs19IGY0+fIHo9fDgCK6/MOhzvbCmw5kLLDxSf8ImNrIMogLd206RlKxdfQx9frK?= =?utf-8?q?/xYGAT8JTd4W5kHG2BhE/4b40YLOn/LXcpk//wf0tFapRT2Ed9exI8b9XJTtiOEGQ?= =?utf-8?q?oSrdLl3/i2k?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(35042699022)(36860700013)(1800799024)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 09:28:03.5643 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 19ce3674-86ef-4ec0-d821-08dcb85591b5 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM3PEPF00009BA2.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7438 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org I noticed while working on a test that uses LTO and requests a dump file, that we are failing to cleanup ltrans dump files in the testsuite. E.g. the test I was working on compiles with -flto -fdump-rtl-loop2_unroll, and we end up with the following file: ./gcc/testsuite/g++/pr116140.ltrans0.ltrans.287r.loop2_unroll being left behind by the testsuite. This is problematic not just from a "missing cleanup" POV, but also because it can cause the test to pass spuriously when the test is re-run wtih an unpatched compiler (without the bug fix). In the broken case, loop2_unroll isn't run at all, so we end up scanning the old dumpfile (from the previous test run) and making the dumpfile scan pass. Running with `-v -v` in RUNTESTFLAGS we can see the following cleanup attempt is made: remove-build-file `pr116140.{C,exe}.{ltrans[0-9]*.,}[0-9][0-9][0-9]{l,i,r,t}.*' looking again at the ltrans dump file above we can see this will fail for two reasons: - The actual dump file has no {C,exe} extension between the basename and ltrans0. - The actual dump file has an additional `.ltrans` component after `.ltrans0`. This patch therefore relaxes the pattern constructed for cleaning up such dumpfiles to also match dumpfiles with the above form. Running the testsuite before/after this patch shows the number of files in gcc/testsuite (in the build dir) with "ltrans" in the name goes from 1416 to 62 on aarch64. No regressions on aarch64-linux-gnu, OK for trunk? Thanks, Alex gcc/testsuite/ChangeLog: PR libstdc++/116140 * lib/gcc-dg.exp (schedule-cleanups): Relax ltrans dumpfile cleanup pattern to handle missing cases. --- gcc/testsuite/lib/gcc-dg.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 992062103c1..cdb677d7873 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -190,7 +190,7 @@ proc schedule-cleanups { opts } { # Handle ltrans files around -flto if [regexp -- {(^|\s+)-flto(\s+|$)} $opts] { verbose "Cleanup -flto seen" 4 - set ltrans "{ltrans\[0-9\]*.,}" + set ltrans "{ltrans\[0-9\]*{.ltrans,}.,}" } else { set ltrans "" } @@ -206,7 +206,7 @@ proc schedule-cleanups { opts } { if {$basename_ext != ""} { regsub -- {^.*\.} $basename_ext {} basename_ext } - lappend tfiles "$stem.{$basename_ext,exe}" + lappend tfiles "$stem{.$basename_ext,.exe,}" unset basename_ext } else { lappend tfiles $basename From patchwork Fri Aug 9 09:28:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 1970878 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=LpguJh26; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=LpguJh26; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WgJYL5tqyz1yfC for ; Fri, 9 Aug 2024 19:30:30 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EECD33858C35 for ; Fri, 9 Aug 2024 09:30:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on20604.outbound.protection.outlook.com [IPv6:2a01:111:f403:260c::604]) by sourceware.org (Postfix) with ESMTPS id 1FC283857000 for ; Fri, 9 Aug 2024 09:28:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1FC283857000 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1FC283857000 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260c::604 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723195737; cv=pass; b=gjEohTYj3czxviTSdhOoTBMsu0vVGHx9rtMxA+50nmOtpbSpL23hbI9RzpEU4bVbhj4OWV2NkzLRq5NCZDScuDnhWNTJDiguy53RKqw+Y334jFLaayy2QTbZZG9kK+AG1kn+mNkbz7222QTInR+XVbpq8hezJE3dRxNDYi/KNns= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723195737; c=relaxed/simple; bh=BlsJ57fjWW2/5ahyeXGkM1IUlvv1sN8ejTZecH86SjY=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=v1AXrIeebTku3Ruqz940aIfzPKyEWXgDCZpWqWj9OOU9hPmpgFeevFORn+USPFvS4NTCZAstqQg2YLvGLE6hc/4vObcBr/AoXwFuJYfdE1rTmyA4WBYKm1RH+7ATwGN15lEeckZWGI1iVxub5biyGpkEvYijkeJsSwsLCdBqrQw= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=HnGgAgmJa1h5b+3p2KwvLZ2ama3KPnocjjfZJ2tQyJprnnpXKMObeirXFZCYpSsssdApo6fiY+F1jqG9WcfdxIQf1BJSsADvbWQDNoKRtINbtHtNFP6ww/l3J7hGgJAPR4qIAhn03IUGcGa2zhctY8gpwecqlOUesiG3qH9nJF1H6OP2bHiniExyQS47WXAmLC0HZsMp7iUvFtUE1DFn1hjGcXLUtW1O+hp6GX8STZcwake89oPK3u2778qdvEbxr2ql2/Ii9Fxjjy5GxFDjEmyBb4HTRU0Foo6PxSojV/T8VwOULV5w0+UZfyystntHJL5eOnSQGKvn2EQWwN33QA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=W7hGhgc1Qh2n82i8F8/+NsfFB8OHn1z9Y+UzpxPsYOQ=; b=bggYrrxU8aExev5eIo49ygS4LTChIzWB0cEYDZMjWCpzsDcn10CrDmR9nfSKA1/kKD9TcJKnRwsMASVW0GfdeKETgKVqXfJzX5HlOgSQFZoUm0yoEL1AKma8yXJ8FsyE0FFSStwV3QsuZdE8sxevIjUNVU7OOIu/xgcMHrN67KsF7erXwxwLz6QGwo6BIJs+t0ksfoHc4qhecFAOvqSWo8J/Z5AUM7hCsmPXkxjz6RmLcb+KbkA6c5eaxhIV8q0rzDfG8EHkJwfsTlpsP6540ROYon2fAhfTeclPQ8DZbMDbt8MMOXVg1UNwhSIjM9xf/eZvGzsXPTva43e8VSc/OA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W7hGhgc1Qh2n82i8F8/+NsfFB8OHn1z9Y+UzpxPsYOQ=; b=LpguJh26+3LHp54WpXaXrkwSIBJ++oyCK0hnH9D1N56fYVUjgQvtsVglD7F5iE9qUgv94U17zMwMk0okdtA0RZb2wuyfSLMIIxT+InCGC8x4zMUV9vjSl1Wcq6mQqqICYOl76Os34Q249HDfMQ6+2rOyLi0hYdU8701WFW+7DHw= Received: from AS4P251CA0015.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d2::17) by DB9PR08MB9636.eurprd08.prod.outlook.com (2603:10a6:10:45c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.9; Fri, 9 Aug 2024 09:28:51 +0000 Received: from AM4PEPF00027A66.eurprd04.prod.outlook.com (2603:10a6:20b:5d2:cafe::5b) by AS4P251CA0015.outlook.office365.com (2603:10a6:20b:5d2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.15 via Frontend Transport; Fri, 9 Aug 2024 09:28:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM4PEPF00027A66.mail.protection.outlook.com (10.167.16.91) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7849.8 via Frontend Transport; Fri, 9 Aug 2024 09:28:51 +0000 Received: ("Tessian outbound f9126a275842:v365"); Fri, 09 Aug 2024 09:28:51 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 654d95fa14aa63dc X-CR-MTA-TID: 64aa7808 Received: from Lad2129404319.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1CD6EA01-633B-48DF-BC2A-22868B8CA43D.1; Fri, 09 Aug 2024 09:28:44 +0000 Received: from EUR02-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lad2129404319.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 09 Aug 2024 09:28:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c6DCiiRssD35z+GJvgIMQGkWuAIz8v1i/HYDERQKA4muUxNiaRNDiVQber4tMF6A0MwhgdUbif5UVLC1tGTzUtDwrWss0W7YZIJFD72TN+b93jv7zYABREPuYjmCIgNOuxNuu3yUztMzj1u2PKLB0MIFiWDajHaHMvKp1Iifc0v0lc4mEh/JUH8hnJN/KaGYBFIzFLBobZSIxuAnEFeteH705a+ARvqbh1S1tG/zwoSkRWRtqwR5R0rMyGn1uP8qOqxgvfllbqkJiZlKXCJnH5hpK9571lQ5BMgUTkS11RFiZW9Txi6xxjTIRmKKQ104WByoo1MhZHCMd6bfhmftZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=W7hGhgc1Qh2n82i8F8/+NsfFB8OHn1z9Y+UzpxPsYOQ=; b=ZXNS8DLwBbZAkLXFhXCbnG5l7UeAnSXsFfOHR5M/C9E1dtrVWT6P9Brs87I8pWyZFQz3qi+cOad1ZBeYYDYTa56exhP3bMDsTzhD7E0kYNxKillGbgCh7vbmhQM1yUq3tW+vL8CbRw4vXXMhmBBwt2/COL529zANrWty/auwfVdfSYo7egh5qqdmt/cwQxLRj9TiSOj3Jtg7VMr7k60X+OOEKb4PaSCaN5wvFHcwLpa5lPO+1SD3Z8aaGJHYFw4WyUOBDUXoc3mOf9J0Ib/eyi8gCOW4wj9Ko+tv3RAbxDSAy8ehY4/8QuhlQP4PImXMvQvNMwqPdW8mfjIo+bYN3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W7hGhgc1Qh2n82i8F8/+NsfFB8OHn1z9Y+UzpxPsYOQ=; b=LpguJh26+3LHp54WpXaXrkwSIBJ++oyCK0hnH9D1N56fYVUjgQvtsVglD7F5iE9qUgv94U17zMwMk0okdtA0RZb2wuyfSLMIIxT+InCGC8x4zMUV9vjSl1Wcq6mQqqICYOl76Os34Q249HDfMQ6+2rOyLi0hYdU8701WFW+7DHw= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) by PAXPR08MB6463.eurprd08.prod.outlook.com (2603:10a6:102:157::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.9; Fri, 9 Aug 2024 09:28:37 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac%4]) with mapi id 15.20.7875.007; Fri, 9 Aug 2024 09:28:37 +0000 Date: Fri, 9 Aug 2024 10:28:35 +0100 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: Richard Biener Subject: [PATCH 4/5] lto: Set has_unroll flag when streaming in for LTO [PR116140] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO2P265CA0509.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:13b::16) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|PAXPR08MB6463:EE_|AM4PEPF00027A66:EE_|DB9PR08MB9636:EE_ X-MS-Office365-Filtering-Correlation-Id: 986993ec-91c6-4ce1-8ffb-08dcb855ae80 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info-Original: HrYRcOOTimx4h50iXJglA8aMpxhZ8T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Lb2YhuTqEOAQsKD6annFxFQW5LGaXUNBkk1ZYlxQxXbspkYPfZMn4upWqtDCII4079AlkGalgjJSQHKURSe9rWNcn4WWWsCPWlI6xknzKZH6Ss7KM183vwd/Iyx/bJfRY2Q+ZGbgfNNK3xKZWkn1VsXeQOOepkUOi3FjAQl840dORnZwRfnwGluAA3Rvm6pGhwOtcE9loyo3VrDWwmoMGmgB+1SR/MSiZu+z6MiSus1UFpzcr/mhMm1Rf/N+7Bqw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8958.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6463 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:102:33e::15]; domain=PAWPR08MB8958.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00027A66.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6276ae27-4b4d-46b4-97b6-08dcb855a5e3 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|35042699022|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?q?HZCpfXCMt3458e6dcsv0qYqdS2ULl7B?= =?utf-8?q?cCCHezSdxxO/9V4kM6JcKlh8vRYLx55nC7D8ZuR780PW6jcoIVRHVjFOuuAaja3Yt?= =?utf-8?q?Mp9/dW3BOQUIQSFUEOhV0HE9+J77RhM5EFsEI0eiUjfVgm8q493pxJsAymN1vCAZG?= =?utf-8?q?GoNe4J02yK4OaDb/yidcfUP+/hdYqHc83LlUZBAtPwU5fbSencYirAii473v4QiqE?= =?utf-8?q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vCgBvErZjwyqjRj/FkAEs2ZFin90RY4JEvbLe54?= =?utf-8?q?sfNUKd3Er2QiXhdESW0dwMofNdPtZab2Nul7/4XnE/0fpyA04yhPjdK0u1TgTMara?= =?utf-8?q?bUxR2IuvETSqYUA41mlJt7gT9XJMhTNvQydsJg7FRbhIxVU6V548RCKLPD5ZH57Aq?= =?utf-8?q?UzfLlevNqryP7BmTe7XpDx+lP9dNuPjTsSDIZ5/SNhSPKpx5MqAxknIMhIEFak7yl?= =?utf-8?q?bXb/2tuFXLvwp2/IU2hSY9w0kjgLb4wBBe8v60E5r1xe6sm7Gp4a6ErLVMkeCpF0M?= =?utf-8?q?uVv4R5m5xaz?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(82310400026)(376014)(35042699022)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 09:28:51.8691 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 986993ec-91c6-4ce1-8ffb-08dcb855ae80 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00027A66.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9636 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org When #pragma GCC unroll is processed in tree-cfg.cc:replace_loop_annotate_in_block, we set both the loop->unroll field (which is currently streamed out and back in during LTO) but also the cfun->has_unroll flag. cfun->has_unroll, however, is not currently streamed during LTO, so this patch attempts to recover it by setting it on any function containing a loop with loop->unroll > 1. Prior to this patch, loops marked with #pragma GCC unroll that would be unrolled by RTL loop2_unroll in a non-LTO compilation didn't get unrolled under LTO. As per the comment in the PR, a more conservative fix might explicitly stream out cfun->has_unroll and stream it back in again, but this patch it simpler and I can't currently see a reason against inferring the value of the flag like this (comments welcome). gcc/ChangeLog: PR libstdc++/116140 * lto-streamer-in.cc (input_cfg): Set fn->has_unroll if fn contains a loop with requested unrolling. gcc/testsuite/ChangeLog: PR libstdc++/116140 * g++.dg/ext/pragma-unroll-lambda-lto.C: New test. --- gcc/lto-streamer-in.cc | 2 ++ .../g++.dg/ext/pragma-unroll-lambda-lto.C | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 gcc/testsuite/g++.dg/ext/pragma-unroll-lambda-lto.C diff --git a/gcc/lto-streamer-in.cc b/gcc/lto-streamer-in.cc index 2e592be8082..93877065d86 100644 --- a/gcc/lto-streamer-in.cc +++ b/gcc/lto-streamer-in.cc @@ -1136,6 +1136,8 @@ input_cfg (class lto_input_block *ib, class data_in *data_in, /* Read OMP SIMD related info. */ loop->safelen = streamer_read_hwi (ib); loop->unroll = streamer_read_hwi (ib); + if (loop->unroll > 1) + fn->has_unroll = true; loop->owned_clique = streamer_read_hwi (ib); loop->dont_vectorize = streamer_read_hwi (ib); loop->force_vectorize = streamer_read_hwi (ib); diff --git a/gcc/testsuite/g++.dg/ext/pragma-unroll-lambda-lto.C b/gcc/testsuite/g++.dg/ext/pragma-unroll-lambda-lto.C new file mode 100644 index 00000000000..144c4c32692 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/pragma-unroll-lambda-lto.C @@ -0,0 +1,32 @@ +// { dg-do link { target c++11 } } +// { dg-options "-O2 -flto -fdump-rtl-loop2_unroll" } + +#include + +template +inline Iter +my_find(Iter first, Iter last, Pred pred) +{ +#pragma GCC unroll 4 + while (first != last && !pred(*first)) + ++first; + return first; +} + +__attribute__((noipa)) +short *use_find(short *p) +{ + auto pred = [](short x) { return x == 42; }; + return my_find(p, p + 1024, pred); +} + +int main(void) +{ + short a[1024]; + for (int i = 0; i < 1024; i++) + a[i] = rand (); + + return use_find (a) - a; +} + +// { dg-final { scan-ltrans-rtl-dump-times "Unrolled loop 3 times" 1 "loop2_unroll" } } From patchwork Fri Aug 9 09:29:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 1970877 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=i7Wte/S0; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=i7Wte/S0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WgJYK6K4xz1ydk for ; Fri, 9 Aug 2024 19:30:29 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC12C3858429 for ; Fri, 9 Aug 2024 09:30:27 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on20600.outbound.protection.outlook.com [IPv6:2a01:111:f403:2607::600]) by sourceware.org (Postfix) with ESMTPS id 921D8385B532; Fri, 9 Aug 2024 09:29:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 921D8385B532 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 921D8385B532 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2607::600 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723195777; cv=pass; b=JFZQu5QmlA02p2+4C1HiMmMDz7kK8yp3ZL2m25nJURsAzUS//aZThBdyjQ4gh9qDKD9lslQyMA8pUa1ZPAjXJIJHwJQA9oT9v6mc92J1wfOBPw1T4uR79rv7N/b3TAa7FgjULgcDq+NDQScjTUcv8LVKRbIdDTj1OH04ow19Fjo= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723195777; c=relaxed/simple; bh=A2hcvuGa8q32huq0GemP9BUZUsjsQ/ZVxGF0ZDUVyn0=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=Q+cJEqqAu3gTg0M7zIJdUZDdmZ5AaBhaI1DLaEPvAdlp+RIYjOOLaRb3QR/YG/5ADK8kWBnmOtbARbxxrGiqxgNKAI+N6KgoT+zW2sfec/YmqeppQH20ijhCWRcBaHTFu0Die2NtoKQhJwtnEhQi7aNC3N5Xws+ayX6pQmahRwQ= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=QOgu5ER9TropRHdJZtyDkM/mVTlLkAkAxgKnBuEW7X3TbhEpURwh3GWTdk6fT0Chb6pKPuJHoKYRlwwquLJgw+MCxnxxAvvfjP1dMP8ON/YPvQQSyCWSxhOkyFnyP17ipZbH+97If7V75UGG2TPnYfUr5upRjqHgcKNkBnuuHyeLVX0F7e8DSq6Os4B598B9TOCgiKbvtoALJ9oovt+fW/4Ewoa0CtWWzJ0jxICUIUU84S2VBBrn78lpL4/np7hwScE4mVELORyfEVjF2ckPw3DbgsJw7H/kY8WNg9+Q7281WMrzICPvcC0+bjBGF4oXpHizLxlfCdVYe0ga+ijRdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=xOZGFNJx6GFYRUcPncGCDYhUA9LEDh4vQHgjQuRacTY=; b=IyKwEhIWiU/HUluxc3wHLJPHQ6CAzKgHLfBXQKjmMhU6Pzfe+7qz5nWfh0heVCkeLzSvH0F2jNrimQ/b5uKoLjVWqbk5cKs6uPviIAPmksTL+O2ZIu7z1UlOCP+PCYEO2kaXEb0dsoyLrvdTsMuAiHmhzgPgy95wjXA6+RNVHchlSMygernPsQ/pnYFIvSxy2ahBGbTDkDHuuV7PCDrRCCtzWcRU837irqNDFaKiKb3XhAoqCEhLOeZ+qSSuem6C4A0izvf3LzvZ+8oVRNUZ/rtVAg+7DBar7uJ/0C1DzW5fpvLv6oBK3MIhEPfHmJBEOMWJxs7V78jiw57gp7fsRA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xOZGFNJx6GFYRUcPncGCDYhUA9LEDh4vQHgjQuRacTY=; b=i7Wte/S0zW9pIL5e3XmnUb6ZJsuBhbIpsElGjhkCn9xud+PiAB3vCOQylDvMkXMDd+yhQNq+Mu3Hf/Ep/rmUV2aNf/n5TmJpuRlkKgvBXiI2VNWIANdJssF/WdK02nEtVw+5FUzkrrTYqIu+HhfHE+9o4hdxx7LoOJrsydi1CGk= Received: from AM8P251CA0007.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::12) by AS8PR08MB6325.eurprd08.prod.outlook.com (2603:10a6:20b:332::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.8; Fri, 9 Aug 2024 09:29:31 +0000 Received: from AMS0EPF000001A6.eurprd05.prod.outlook.com (2603:10a6:20b:21b:cafe::cd) by AM8P251CA0007.outlook.office365.com (2603:10a6:20b:21b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.14 via Frontend Transport; Fri, 9 Aug 2024 09:29:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS0EPF000001A6.mail.protection.outlook.com (10.167.16.233) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7849.8 via Frontend Transport; Fri, 9 Aug 2024 09:29:31 +0000 Received: ("Tessian outbound e85d9e0fdb55:v365"); Fri, 09 Aug 2024 09:29:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: cae7043f959d189d X-CR-MTA-TID: 64aa7808 Received: from Lcbd3550ffc6f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A240B45A-3D0C-4752-9208-0EF889EA091F.1; Fri, 09 Aug 2024 09:29:24 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lcbd3550ffc6f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 09 Aug 2024 09:29:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vqyBqwTo/sTahvTuwgDJ0SjhSoGEyqGHxcew1K7Sauc37PQZyfAg2qpmO8Yx23biXOC4gQrr7sw5zxfBz9gDqEV5cTUZTLla8sX6gs6uY/AaNzW9bzMqNkin0hGg/p7MFflVaTjLo3vlI67NqGBRtW8DCR2AtUORPof+bholu2LrQl8S5w712UtoGAp0GIs7DJyng/sx7zcuqKkjuTb4vavgIHmwk9/r/BrLtVKxgEd8gkMb47CYd5x4yelaqoGWH7h0r51jmZO2Zr7HZQrN9lYSieZ2y3cQUK1nj9ScuVM0YHHKdP6B8f+Mf8Moqd4PjZtBuHG35wlAPlYvR78jBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=xOZGFNJx6GFYRUcPncGCDYhUA9LEDh4vQHgjQuRacTY=; b=sckH0J+9ZXpeSLg3sJvzRY7DU9zDJVCXNikkU5UWH1IAr44CsTVgxysFahKjDKawPGf1NHieXTMjINsFwqHPZKCdOO5qQfqdjhsIRbRbmy1WTBPNYtETeG1+5Txwkm/cu0wiNl1vKAvb0WVQ8j222loGLuOG0urHpHs7Sson1Q0IQXffKZQAO6b8WGmTBSbBTUDsHrNUixizTEBYtXkmQ59rmJtba8dC6N9Xu9lcFON3aqoOJyqEnTfkSavoPkj7hoSQl9t247mrrsne/thxE6fB6eYuXfJ+KaKT01drUzgHipnONx2+qo9kiwln7SKqQmOuwc6muBbOib+LIK44fQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xOZGFNJx6GFYRUcPncGCDYhUA9LEDh4vQHgjQuRacTY=; b=i7Wte/S0zW9pIL5e3XmnUb6ZJsuBhbIpsElGjhkCn9xud+PiAB3vCOQylDvMkXMDd+yhQNq+Mu3Hf/Ep/rmUV2aNf/n5TmJpuRlkKgvBXiI2VNWIANdJssF/WdK02nEtVw+5FUzkrrTYqIu+HhfHE+9o4hdxx7LoOJrsydi1CGk= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) by AS2PR08MB9811.eurprd08.prod.outlook.com (2603:10a6:20b:604::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.8; Fri, 9 Aug 2024 09:29:21 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac%4]) with mapi id 15.20.7875.007; Fri, 9 Aug 2024 09:29:21 +0000 Date: Fri, 9 Aug 2024 10:29:19 +0100 From: Alex Coplan To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Cc: Jonathan Wakely Subject: [PATCH 5/5] libstdc++: Restore unrolling in std::find using pragma [PR116140] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO2P265CA0342.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:d::18) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|AS2PR08MB9811:EE_|AMS0EPF000001A6:EE_|AS8PR08MB6325:EE_ X-MS-Office365-Filtering-Correlation-Id: b6b41b61-c7c7-455d-9999-08dcb855c62a x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info-Original: h2oGP/qn5jJtDxT1vSf1DxJ0af8zlzPK/q8HZtVQektJGnYD9Q88AD616ljuKgtSHZz9rQoWI1GkWUIykvARDjSyKi80qEr/y7Ufli3soDk+xt78cLC4BKFiOk4qBibyw91g5xBdXvk6y4zLmkaMELX8cLECB/J15nP3bVWMYwidAJNCV7f6LqixyaU0VTjTKV4wjMT436l9j+JP0Kb19RSgGw8SJo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sDAZhXK+PreVxXRPbpjNqaDkc8u7A/5HV1do/D57nuNDUK7EtKM3MvkT/fvxhfC9crRYeUA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8958.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9811 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:102:33e::15]; domain=PAWPR08MB8958.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF000001A6.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 66f7ab69-bc3e-4c00-0e7b-08dcb855c034 X-Microsoft-Antispam: BCL:0; ARA:13230040|35042699022|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?JLc0PzlGTuDN5/EYhFA6fF3UD/w9mQy?= =?utf-8?q?6DQACdmhB6YMeg3yDHyJuvWtkNQ2FFdl2vuBjC3oEqGExyLY8FwYeafCHR4IScrLk?= =?utf-8?q?en6jAf3xisSRSjguNVh1Lnjy2N0p/tMqjMxg17vKH73kSseLzE9rBCHVOxTguW6aY?= =?utf-8?q?VdcbMJN1UnEVeNFGu4Yc1ujtzrC15gCyWTyNecOJ3qZsPcFSR8WOabTl61OKJ/+fJ?= =?utf-8?q?TZ0g3m5gzDmEaQu0JWuRTbzcUk4cu68MHGNgA+je85wjp8XnbfPZMi02MAc+NN11q?= =?utf-8?q?bJ22qkz+3m3REWjQMhvxCaUZB+szQr0STI71daWCZmPnBQ3LIcK3yuU0rp93tPUyn?= =?utf-8?q?If20jhddDAkUJ/7F5wsXWfq19XmUZ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z6spNVFDNMtbhnlgexfFbduaSJR3jpQKw8?= =?utf-8?q?C8Vj+w8ow1iYe7lj9Nwrk5yhWeRtvoql4zteCQf5U2YI8qQfUKQyRxQPjWpvTDV7v?= =?utf-8?q?/OTgyE+RQvUxg4ARjNkJCgpep8mhPgf11/qk2s/aCI17VqdZOs9V9THnSBqe9Me8W?= =?utf-8?q?NJY/P3fI/sc?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(35042699022)(36860700013)(1800799024)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 09:29:31.5398 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b6b41b61-c7c7-455d-9999-08dcb855c62a X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF000001A6.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6325 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Together with the preparatory compiler patches, this patch restores unrolling in std::__find_if, but this time relying on the compiler to do it by using: #pragma GCC unroll 4 which should restore the majority of the regression relative to the hand-unrolled version while still being vectorizable with WIP alignment peeling enhancements. On Neoverse V1 with LTO, this reduces the regression in xalancbmk (from SPEC CPU 2017) from 5.8% to 1.7% (restoring ~71% of the lost performance). Bootstrapped/regtested on aarch64-linux-gnu, OK for trunk? Thanks, Alex libstdc++-v3/ChangeLog: PR libstdc++/116140 * include/bits/stl_algobase.h (std::__find_if): Add #pragma to request GCC to unroll the loop. --- libstdc++-v3/include/bits/stl_algobase.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index 27f6c377ad6..f13662fc448 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -2104,6 +2104,7 @@ _GLIBCXX_END_NAMESPACE_ALGO inline _Iterator __find_if(_Iterator __first, _Iterator __last, _Predicate __pred) { +#pragma GCC unroll 4 while (__first != __last && !__pred(__first)) ++__first; return __first;