From patchwork Mon Oct 21 12:30:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 1999921 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=JwyDtIm+; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=JwyDtIm+; 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 4XXF6N6NvFz1xtp for ; Mon, 21 Oct 2024 23:31:24 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1062E3858405 for ; Mon, 21 Oct 2024 12:31:23 +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-am6eur05on20609.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::609]) by sourceware.org (Postfix) with ESMTPS id BEA403858C48 for ; Mon, 21 Oct 2024 12:30:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BEA403858C48 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 BEA403858C48 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2612::609 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1729513860; cv=pass; b=JE6q6lOFKNbqmB5D7fW1mcxoxi1N7Bw6GXvz0LKKNLcA0HNEdqRsHWSpyAZTj3rgJt4vsoav2RYipWQGY3hfpOhM2Cc8wAo7v17uwaeWqn8jR+jAwP8eyi86z7A/yyf0sMGgn0B5GPr/348DcNFQ10yO/ixiXVd+/6mZNc+km5Y= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1729513860; c=relaxed/simple; bh=pDrqKMw4bwTaFX9PnWzs5awPHJ+Kz0iBA0agI17S+2E=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=cRrZ13knYz36zhaZZLKnReqQvypiQz8Gl8/H4V8bvndUr+VxDKCThVra6q5Ef4NM0TmS258MY9y5ciT7qmQ3DTCL9zIjoOkSxJhGc0Cjvb6+lugOGXyqbsFBDYuOvlOmOv8UgD6V0ORQsTFVtwusj4VZFVJWMZyrCrT6ZjRMzTQ= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=UDy2Sux0FIpP2ptaqiFjg3z4uqqm7KCDjlbd5mlBQ7Qw4oSKTNcHwMyEvJueaB9hDc1hnK+5Z3zINrEXvyWuxqriUGXCdTS6i6rDcaVm4v4/B8GsEtSwcGwxZb2tRKD8JfTk0/NqeULMZX1ufS24gAFdehugoB5+mRPapLwkkLvNg/gplca3YrB+ASsZh9xqwPDebQw9WZAlyA8b0BneUPys9K+R8/qz0FaqJvYxCmZEv42HjQcHKb4RW2pWlQ+tKYAOhjhRlaQaLw/4TSK7NUIQJM5/UxrnrE76D2/+fW+RvozwClGjk6o+/1asOsdWfXadNuWVpCbqC3zS/Olu2Q== 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=MvVS9ZXczy1cAL5jjlG2KpJfupR15BNmnWHB/reDkfI=; b=rcj8evckq3A0YdY04QeTeEthIEOTzdjDKKge4HjXwLZaPAkqa1Ezw6c8hUX6OPLXpKhi/m6tvA7KLKm82z72HlQhxy+NXVJa7yqd2W/uVsIFGJXKr4ZUozbFwazHyQsCdEGzA0LLs1ruaUm5XxLqb5vtQL0/QT2Vba6yRMPCT1Bba4qGXI7dPPX6gxoaYd1LWCfE+Rrq2zhHvRnMKtmo/YJ8RYJHXVmGGUSlclXaDRNi00WxP/L/nxof6DCp+IIqxJ2TH5OUGAIwWTeWbpOJRZhsr70PTLzJ2ZydBQRCgXUe7V2hjsul4dIZzbsSifVXsjrsDJLEdQW0bkFG2Y8Dlg== 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=MvVS9ZXczy1cAL5jjlG2KpJfupR15BNmnWHB/reDkfI=; b=JwyDtIm+oCdoNiVbZzfx4zbJySJkUSmIoTbKlq7BCpKIUOGEjRKSvMbfc0NA3R6PZ7hqtNiquTPxOzGW5qBQ6nJEmduB9tL3aNkXRXAPJJOsw8M4EPsgnHNjAcXBxsDjwae03c7ur8fEn+hnBETqrQRL9++I2R9saR7DSajuEZs= Received: from MW4PR03CA0049.namprd03.prod.outlook.com (2603:10b6:303:8e::24) by VI0PR08MB11061.eurprd08.prod.outlook.com (2603:10a6:800:257::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 12:30:45 +0000 Received: from DU2PEPF00028D02.eurprd03.prod.outlook.com (2603:10b6:303:8e:cafe::46) by MW4PR03CA0049.outlook.office365.com (2603:10b6:303:8e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28 via Frontend Transport; Mon, 21 Oct 2024 12:30:45 +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 DU2PEPF00028D02.mail.protection.outlook.com (10.167.242.186) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 12:30:43 +0000 Received: ("Tessian outbound 0658930cd478:v473"); Mon, 21 Oct 2024 12:30:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 09d0b3bf404aacac X-TessianGatewayMetadata: +DDT3/N+VidwULL6mM/D1ZUlDioczkDzvt2+yo5c7IZpqU2u4imrP10OTLubZ2Ie/33AwKlfteNAr5xYqXKFmR0C1nL7pJRvKeCi3RKMNMDYyidxVi3lwgiZG89dRH4c6dP6yWbr2illUq0GPNm+oA== X-CR-MTA-TID: 64aa7808 Received: from L9a6e4519f8aa.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E9F53F45-6AA3-432D-AB12-E77F46D4B662.1; Mon, 21 Oct 2024 12:30:36 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L9a6e4519f8aa.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 21 Oct 2024 12:30:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QVP3m3w51Lv3byV8VbBTlPasRNR/KgwAsT09vcVZDdrSh0m3DpY30Kg/4ePB5ahSOLbKY+uWv3Hrm3MuOjqH/JYb+Pd4Jy35X9lyHXCGf7twr9RETBumxUXhUetjSzGIBrWAvcN3/78B0oy4ubgky4Ehfml9wiHxM/SNkbVCKQyii0vUmc7+UR/4CLcUYAL6i37qlGs3TfJgbaqLTddMNu4JsXH2pUcc32FYr5S1vfrZTODush88oYUYlpBOFBeouj3o7Npc1W33VW0XxBRQe3MWtJZaahBLoLaqDAYhmjCDdjvBsNwNP5OmxNDakw2SyzcOXDqqYUbZtYAlLBfahg== 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=MvVS9ZXczy1cAL5jjlG2KpJfupR15BNmnWHB/reDkfI=; b=jwyKTeOzaGqvUIC8IIk6AzWateAnFISYAU5LMNQjA8vMB8Jh4YVzAzxSEocfy2UyhGKMV/NjMEyXUAcShv4exjjjmJ52Wa8df+/Gpi41yL54+c/FPVWQIJvSmmvDXkJX6wdM0hAJCUMHvfcGjrQv7JyRkS80W81Vv8paKuDIpSVwU6fmX3msTTa9wXV3zUoqgEfOoLTJPEKfgFYJQY+TtyT5CRttmoMdpHvTVP6N3U7/J7PGamMrwRbnO6iKdLjEbeYkWGAiYxEiJMP2NHCBCUESl6dFzOMnqIpamnrqny8+3XC7LlMYNVTkdN78gPy7F7Qgr0e0lrFb9fG/rJNCGA== 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=MvVS9ZXczy1cAL5jjlG2KpJfupR15BNmnWHB/reDkfI=; b=JwyDtIm+oCdoNiVbZzfx4zbJySJkUSmIoTbKlq7BCpKIUOGEjRKSvMbfc0NA3R6PZ7hqtNiquTPxOzGW5qBQ6nJEmduB9tL3aNkXRXAPJJOsw8M4EPsgnHNjAcXBxsDjwae03c7ur8fEn+hnBETqrQRL9++I2R9saR7DSajuEZs= 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 AS2PR08MB10009.eurprd08.prod.outlook.com (2603:10a6:20b:64b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 12:30:33 +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.8069.024; Mon, 21 Oct 2024 12:30:32 +0000 Date: Mon, 21 Oct 2024 13:30:30 +0100 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: Richard Sandiford , Richard Biener Subject: [committed v2] pair-fusion: Assume alias conflict if common address reg changes [PR116783] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P123CA0028.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:151::15) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|AS2PR08MB10009:EE_|DU2PEPF00028D02:EE_|VI0PR08MB11061:EE_ X-MS-Office365-Filtering-Correlation-Id: cc03b590-f932-45b1-24a8-08dcf1cc2e9d 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|366016|376014; X-Microsoft-Antispam-Message-Info-Original: U5qO8+FHM2RlLJIZvNmcetqdMWqL+7f454AcvfqraTbdzMePv7hmit9LBNAqaKokV7FqngdatxqYEYMit12VNJ0ZlsmdpbEB1Uvf4fxQFy7ol02QFk5EZ8Fw886qj2cYRi8xG4/GJ94JDHYTCBKG6uUExAFJpPGB/ShBNzgnRVqDijxZ/uEkYdXP03ZHtxEP7uPHWAxgsPo/hwjERXTkMUz1n5zKYr5fCuDpw0t2MXPsG1KeS4LmAOEX+PMESghaXbs6dTr03A8+qPI5JX5bYFSHF22kwEOwI5knqr0jBx5IJ6WGeZlZJ5Cerf+fNaFi7D0zvgsPB9RNYIcG5xYFMpZVD6RrKNIS0zJOuWW5jT1ehMakMYKlb9CUTEYBoDanfAzt/cqmIYaFJQRCPE59pfhfVpGZHukXsW2gWuWzBS2UNxY0kcj11Id0Tnr8VjEMd4g5YB2PPJVRfEjA0+pwiYKmcKVOdatYAp7JxWkLeaeke5LpzlSFnozpcq0i7Yo7IiCI0VgqQYHuzUzkGXPBRrTm1yJcRL7NncCi5FfxMWNJaR4qP6fKXbKoffqN3OzW8IBHjEnK2GwzZGX25MN74+CvcjHb92ypYCHGOsqY5zd2/e6Hz4a3vaepiOcz+RJtoHI3g/kC1rCfkpg2xLl/dPUIYyE3xkwg48tYFj7EZ647o2G6RwTp/Y3IA8nK2RpHCXc6lrWimoJbJuR3XBm6JW2apu9VA7Vj6VUx1K/L0rn7ureQayvQMxPwUpv0b2UK53lG8d34BwtvilCprsfhooLN441IfmW8ekHW8ZfPzGL9LU4Vb3X8gcVGwdalAU4tBBYSez0xjxSU7PCxNR7nOgSUcIEyJVORybOC2n4xvihTA3CxFBJHRoAlD/cUNM3kO/MW1mMqzLU6rIOC8AtIJTKa+KwkSBYGjyl2WzAZ5J13Z3xJsqx+ZZLpMNVwji5Rzb6dptXR6dgyVzm1kxKjES0GiJo0EQqmIneV5Z/LrWdKWlPzjwRNm/XXoeLFtWnPcEd83o4FQlx7nEtumLSYP/IfiG6ItSACtJeHo9ldJipURzSNPJpLxKVZZZ1a8W7pXl/ce4zXSjeFVU+EgP9igQq7Yn3zCJTDC9+XvWq2jFArWiPn7jkgcC7jytfmbF9DVToyjnlWZa353OyIAqiSUzBn4os5jM+9p+/dj/qKRzmb87tGvSV2hKOaC1etIke7ha4tW3yevy+yq3UcJScZ8TchKgrnFnX6UfMI32xenrjdF3U03M1xo8DhHjnkxYm+X3mzBSqU844i+EstK1/J6UB9fqR9u6QXP1UfdnVdydsKYOCrBc+f/nzGtz2CPoy1k+ypSDvcEMKgCPeok6/MFA== 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)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB10009 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: DU2PEPF00028D02.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: fec7366f-9ae7-47d7-62aa-08dcf1cc2805 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|1800799024|82310400026|35042699022; X-Microsoft-Antispam-Message-Info: =?utf-8?q?OmtMsQnpyqQWRyG0lPwzhEv22y7Ecma?= =?utf-8?q?888F4TafuTPp1Jw6StkVUuw6ggGm1FyaSJgM24A3ebsUf8Rcsh2teoeJkYKE6xp2C?= =?utf-8?q?jjx+oThLvyI3k+xtB4hmMX8yFxA0EtdNSSQfqCZYa3kEBagXNkLkYYoVjnV+RrRNW?= =?utf-8?q?mE9QO66jZgCNAXY3T46/SZh2XgZ6Pg2yKj+bzjhWN6JvEaWeafhzeIdJcQ1PXyAzr?= =?utf-8?q?/nVKT8nrLrRCx6u+rXvrbY3uJ+zSRHLdk9J3rAmeQIuWCULLODydRZmmo80xHpdCK?= =?utf-8?q?R6pLByVGOFfdKdmxtDbZWKf3yie1exxo9Khzl5Ro1ShAuMnuCUrynmqX/VOQQRmE4?= =?utf-8?q?MsT7JYZpaC4Mp0U2X5ZG1+mf7GFoARo1e2uPEFw+ItvyaB+bFan/X+sced6zkO9eo?= =?utf-8?q?FTx2Yn+HOmIjfnHFjjom1jMnM2ebK6XuXXic1SDnULl5JUZMb7GPPa2gbRpnZT381?= =?utf-8?q?5Q6ug1EpBhjz0S1Lh5PalBYlTypUFhNdjSj/DNMOFdeVTgPx/JYJE8hy5tzH+t5to?= =?utf-8?q?+rWF1Hfqtf2G8ltxuwTZfU3T4p/AxNzxprdGguZ7zqB3BpFbUipiK37adTtbm0EVw?= =?utf-8?q?39NFy/gZFJUQDSMJ1ql7t7y/baO1xmp77o05MtIYhJhn74/vQrTiEEYd8bkzyRilh?= =?utf-8?q?4xfz/h05cTBkT5wlomdxYMDZuB5ZXj1NAbST2uUHTLNIpU9IQEpNlqaTBTUAkL+5r?= =?utf-8?q?s0XB43xE+G2dgYtSu1coaZJZgsyBJAPKwOPcOtQmw2owHoQn1W8PssRjLHLJE6uwQ?= =?utf-8?q?jgnSAUu+dkpwIsKrVqWdPc7Qz2sdfRA5UcPYlJ10KjCi45VF7PwgJKJGSrZS0wO13?= =?utf-8?q?fSLgbmVuqgxYYoF9M/7TF1yGfuRjQlz6ge3IInu3wciHRZfFrIHVlllPkvGQUn5pl?= =?utf-8?q?k3XtauM96szIssBH6WuST3EmhQ2rp9W+mSo6or36cuMgwRktR0YNFlAcgmiCzKZYa?= =?utf-8?q?N5+Pz6nQ9fNp3HqYyWCWHhe4RSqzKVXjT+1TkpEy53/E236zd6bUH8M5LY5qY589I?= =?utf-8?q?AkLVyV6fyVLAQAsocIew8JmxdWT4gSEvwP5Zt91XH88a4OHukH+vV56Nc723/NoQY?= =?utf-8?q?55mVVGol4uJtFHAr3j89tXDjcLURk/BQGWLEs6Idtf6MveBhAXGas17h76MBUpQhR?= =?utf-8?q?EwV5xKj6+ezLU176SNtd1NkedIUZxR+S7VglIFFHXmbPBmvUR0M2k/q8SvKi6IUiW?= =?utf-8?q?cr84aZ1rjzMZxbcB0DJuq4SZ5oIYGP0i4bqDfqWoLTQ97sUIcjJiULfF6+7sCbXzr?= =?utf-8?q?+Xh5Vc9DbAdNMLO0xVSdL2q2kuonCeZJjdBV+0BE+j3SSKUErjZk89EF5IrTmD3hk?= =?utf-8?q?fOYj7BziIxynrn1tx2BbGG7Eq8SX+okqEvjOtoEAEj7M3yJfTFLveho=3D?= 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)(376014)(1800799024)(82310400026)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 12:30:43.7284 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc03b590-f932-45b1-24a8-08dcf1cc2e9d 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: DU2PEPF00028D02.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR08MB11061 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_SHORT, 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 is a v2 of: https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663600.html w.r.t. v1 this just implements Richard's suggestion of using safe_push as discussed here: https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665097.html Pushed to trunk after bootstrap + regtest (all languages) on aarch64-linux-gnu. I'll work on a backport to 14 if there's no fallout after a week or so. Thanks, Alex -- >8 -- As the PR shows, pair-fusion was tricking memory_modified_in_insn_p into returning false when a common base register (in this case, x1) was modified between the mem and the store insn. This lead to wrong code as the accesses really did alias. To avoid this sort of problem, this patch avoids invoking RTL alias analysis altogether (and assume an alias conflict) if the two insns to be compared share a common address register R, and the insns see different definitions of R (i.e. it was modified in between). gcc/ChangeLog: PR rtl-optimization/116783 * pair-fusion.cc (def_walker::cand_addr_uses): New. (def_walker::def_walker): Add parameter for candidate address uses. (def_walker::alias_conflict_p): Declare. (def_walker::addr_reg_conflict_p): New. (def_walker::conflict_p): New. (store_walker::store_walker): Add parameter for candidate address uses and pass to base ctor. (store_walker::conflict_p): Rename to ... (store_walker::alias_conflict_p): ... this. (load_walker::load_walker): Add parameter for candidate address uses and pass to base ctor. (load_walker::conflict_p): Rename to ... (load_walker::alias_conflict_p): ... this. (pair_fusion_bb_info::try_fuse_pair): Collect address register uses for candidate insns and pass down to alias walkers. gcc/testsuite/ChangeLog: PR rtl-optimization/116783 * g++.dg/torture/pr116783.C: New test. diff --git a/gcc/pair-fusion.cc b/gcc/pair-fusion.cc index 653055fdcf6..ccbb5511e9d 100644 --- a/gcc/pair-fusion.cc +++ b/gcc/pair-fusion.cc @@ -2089,11 +2089,80 @@ protected: def_iter_t def_iter; insn_info *limit; - def_walker (def_info *def, insn_info *limit) : - def_iter (def), limit (limit) {} + + // Array of register uses from the candidate insn which occur in MEMs. + use_array cand_addr_uses; + + def_walker (def_info *def, insn_info *limit, use_array addr_uses) : + def_iter (def), limit (limit), cand_addr_uses (addr_uses) {} virtual bool iter_valid () const { return *def_iter; } + // Implemented in {load,store}_walker. + virtual bool alias_conflict_p (int &budget) const = 0; + + // Return true if the current (walking) INSN () uses a register R inside a + // MEM, where R is also used inside a MEM by the (static) candidate insn, and + // those uses see different definitions of that register. In this case we + // can't rely on RTL alias analysis, and for now we conservatively assume that + // there is an alias conflict. See PR116783. + bool addr_reg_conflict_p () const + { + use_array curr_insn_uses = insn ()->uses (); + auto cand_use_iter = cand_addr_uses.begin (); + auto insn_use_iter = curr_insn_uses.begin (); + while (cand_use_iter != cand_addr_uses.end () + && insn_use_iter != curr_insn_uses.end ()) + { + auto insn_use = *insn_use_iter; + auto cand_use = *cand_use_iter; + if (insn_use->regno () > cand_use->regno ()) + cand_use_iter++; + else if (insn_use->regno () < cand_use->regno ()) + insn_use_iter++; + else + { + // As it stands I believe the alias code (memory_modified_in_insn_p) + // doesn't look at insn notes such as REG_EQU{IV,AL}, so it should + // be safe to skip over uses that only occur in notes. + if (insn_use->includes_address_uses () + && !insn_use->only_occurs_in_notes () + && insn_use->def () != cand_use->def ()) + { + if (dump_file) + { + fprintf (dump_file, + "assuming aliasing of cand i%d and i%d:\n" + "-> insns see different defs of common addr reg r%u\n" + "-> ", + cand_use->insn ()->uid (), insn_use->insn ()->uid (), + insn_use->regno ()); + + // Note that while the following sequence could be made more + // concise by eliding pp_string calls into the pp_printf + // calls, doing so triggers -Wformat-diag. + pretty_printer pp; + pp_string (&pp, "["); + pp_access (&pp, cand_use, 0); + pp_string (&pp, "] in "); + pp_printf (&pp, "i%d", cand_use->insn ()->uid ()); + pp_string (&pp, " vs ["); + pp_access (&pp, insn_use, 0); + pp_string (&pp, "] in "); + pp_printf (&pp, "i%d", insn_use->insn ()->uid ()); + fprintf (dump_file, "%s\n", pp_formatted_text (&pp)); + } + return true; + } + + cand_use_iter++; + insn_use_iter++; + } + } + + return false; + } + public: insn_info *insn () const override { return (*def_iter)->insn (); } void advance () override { def_iter++; } @@ -2107,6 +2176,14 @@ public: else return *(insn ()) < *limit; } + + bool conflict_p (int &budget) const override final + { + if (addr_reg_conflict_p ()) + return true; + + return alias_conflict_p (budget); + } }; // alias_walker that iterates over stores. @@ -2117,12 +2194,14 @@ class store_walker : public def_walker InsnPredicate tombstone_p; public: - store_walker (def_info *mem_def, rtx mem, insn_info *limit_insn, + store_walker (def_info *mem_def, rtx mem, + use_array addr_uses, + insn_info *limit_insn, InsnPredicate tombstone_fn) : - def_walker (mem_def, limit_insn), + def_walker (mem_def, limit_insn, addr_uses), cand_mem (mem), tombstone_p (tombstone_fn) {} - bool conflict_p (int &budget) const override final + bool alias_conflict_p (int &budget) const override final { if (tombstone_p (this->insn ())) return false; @@ -2159,13 +2238,14 @@ public: return (*use_iter)->insn (); } - bool conflict_p (int &budget) const override final + bool alias_conflict_p (int &budget) const override final { return load_modified_by_store_p (insn (), cand_store, budget); } - load_walker (def_info *def, insn_info *store, insn_info *limit_insn) - : Base (def, limit_insn), + load_walker (def_info *def, insn_info *store, use_array addr_uses, + insn_info *limit_insn) + : Base (def, limit_insn, addr_uses), use_iter (Base::start_use_chain (this->def_iter)), cand_store (store) {} }; @@ -2544,11 +2624,32 @@ pair_fusion_bb_info::try_fuse_pair (bool load_p, unsigned access_size, && bitmap_bit_p (&m_tombstone_bitmap, insn->uid ()); }; + auto_vec addr_use_vec[2]; + use_array addr_uses[2]; + + // Collect the lists of register uses that occur in the candidate MEMs. + for (int i = 0; i < 2; i++) + { + // N.B. it's safe for us to ignore uses that only occur in notes + // here (e.g. in a REG_EQUIV expression) since we only pass the + // MEM down to the alias machinery, so it can't see any insn-level + // notes. + for (auto use : insns[i]->uses ()) + if (use->is_reg () + && use->includes_address_uses () + && !use->only_occurs_in_notes ()) + addr_use_vec[i].safe_push (use); + + addr_uses[i] = use_array (addr_use_vec[i]); + } + store_walker - forward_store_walker (mem_defs[0], cand_mems[0], insns[1], tombstone_p); + forward_store_walker (mem_defs[0], cand_mems[0], addr_uses[0], insns[1], + tombstone_p); store_walker - backward_store_walker (mem_defs[1], cand_mems[1], insns[0], tombstone_p); + backward_store_walker (mem_defs[1], cand_mems[1], addr_uses[1], insns[0], + tombstone_p); alias_walker *walkers[4] = {}; if (mem_defs[0]) @@ -2562,8 +2663,10 @@ pair_fusion_bb_info::try_fuse_pair (bool load_p, unsigned access_size, { // We want to find any loads hanging off the first store. mem_defs[0] = memory_access (insns[0]->defs ()); - load_walker forward_load_walker (mem_defs[0], insns[0], insns[1]); - load_walker backward_load_walker (mem_defs[1], insns[1], insns[0]); + load_walker forward_load_walker (mem_defs[0], insns[0], + addr_uses[0], insns[1]); + load_walker backward_load_walker (mem_defs[1], insns[1], + addr_uses[1], insns[0]); walkers[2] = &forward_load_walker; walkers[3] = &backward_load_walker; m_pass->do_alias_analysis (alias_hazards, walkers, load_p); diff --git a/gcc/testsuite/g++.dg/torture/pr116783.C b/gcc/testsuite/g++.dg/torture/pr116783.C new file mode 100644 index 00000000000..6d59159459d --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr116783.C @@ -0,0 +1,98 @@ +// { dg-do run } +// { dg-additional-options "-fstack-protector-strong -fno-late-combine-instructions" } +// { dg-require-effective-target fstack_protector } +// { dg-require-effective-target c++11 } + +struct Private { + char data[24]{}; + long moved_from : 4; + Private() : moved_from (0) {} +}; + +struct QVariant { + __attribute__((noipa)) + ~QVariant() { + if (!d.moved_from && d.data[0] != 42) + __builtin_abort (); + } + __attribute__((noipa)) + QVariant() { + d.data[0] = 42; + } + __attribute__((noipa)) + QVariant(QVariant &other) : d(other.d) {} + QVariant(QVariant &&other) : d(other.d) { + other.d = Private(); + other.d.moved_from = true; + } + QVariant &operator=(QVariant); + Private d; +}; + +QVariant id (QVariant v) { return v; } +QVariant &QVariant::operator=(QVariant other) +{ + id(other); + return *this; +} + +template struct QList { + T d; + struct const_iterator { + T *ptr; + T &operator*() { return *ptr; } + __attribute__((noipa)) + bool operator!=(const_iterator other) { return ptr != other.ptr; } + void operator++() { ptr++; } + }; + __attribute__((noipa)) + T at() { return d; } + const_iterator begin() { return const_iterator { &d }; } + const_iterator end() { return const_iterator { &d }; } +}; +struct QArrayDataPointer { + int d; + int *ptr; + long size; +}; + +QArrayDataPointer null_qadp; + +struct QString { + __attribute__((noipa)) + QList split() const { + return QList {null_qadp}; + } + __attribute__((noipa)) + friend bool operator==(QString, QString) { return true; } + + __attribute__((noipa)) + QString(QArrayDataPointer dp) : d(dp) {} + QArrayDataPointer d; +}; + +__attribute__((noipa)) +QString as_qstr (QVariant *v) +{ + return QString (null_qadp); +} + +int *getNode(const QString &tagContent) { + auto expr = tagContent.split(); + auto blockName = expr.at(); + auto loadedBlocksVariant = QVariant (); + QList blockVariantList; + for (auto &item : blockVariantList) { + auto blockNodeName = as_qstr (&item); + blockNodeName == blockName; + QString q(null_qadp); + } + loadedBlocksVariant = QVariant(); + return nullptr; +} + +int main(void) +{ + QString foo(null_qadp); + getNode(foo); +}