From patchwork Fri Jan 19 09:04:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 1888339 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=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=i3Ww2k84; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=i3Ww2k84; 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 4TGYcg51dhz1yPv for ; Fri, 19 Jan 2024 20:05:55 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A9EE43858C2A for ; Fri, 19 Jan 2024 09:05:53 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2078.outbound.protection.outlook.com [40.107.8.78]) by sourceware.org (Postfix) with ESMTPS id A80AB3858418 for ; Fri, 19 Jan 2024 09:05:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A80AB3858418 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 A80AB3858418 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.8.78 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1705655126; cv=pass; b=SC3K/XvKWC+KFkcpw+dVNMDoWINwPcTfr72NjV9HPgh3gVkBRMrG53SFNztailrChC1RW15B29sWuhnIm+22hxxE04ORePdudJpR+s5a5KXOYb9cKTF4+WzaDYIjaIOGR6F1zUau0n8bzvNAQksJ13DmDlKZllffFEHANvalV3A= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1705655126; c=relaxed/simple; bh=dO4THXsKHQqbDDr9LHPYh01zDIzK9/CTRa1Srs0JEF8=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=MaRAiBg+sWIUuQy/qujmukneJNYZ44MN7/G2+8cx0F+Hty8YLaIc/AFVhkJvduCEfcyfHe4ElWcNksXMJYQEwogAGsmtd8S7cOp8UYn+rjh0YRqCR9tMW10zwspMEgECz38njCfNHS01G4SOQ5MpI66aZi91ggZk1BlbDNIp+nk= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=bLqGmghb64lC39NxsXuLYgPSPLrovfh4/ukDQU9e90JetZ8+Zd0Vn3va5GP1SnlyFLRxWYpI8kxuZr6MXNh4XDLlfst+WEY9jVk+FfvwURrCkbXqLjGKroLPQs09mkFhGPMEo3mHJRR4katEOUvoqtFjO7JpH3yrTf9a5vSSkOpOQCRMmVMf/chJI3MB2XJ1xpOTE0MNX+S1oS1SMeXIRntHGejT9sXm6WXKgkX/AQ5qPTIMvPvTau6PnRWhS3CdhIut60ONwXoXWF7Pbne8KBVIhTIQAXsnBJ8UoR9bDQAu8GAmoA7Eg4NtW0YKBv+4uuzXk9uYhMUXsYxgqbBK8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cTMZ+voPlpnVvgSYqTBFzMkceAK8oxgn4qAUGCxk3sc=; b=eMqCgfutdLOzams4lc/KIORETOSnJNizthQr5KQ/OL8xoQ3C64KUov+98cbxX3/f/1hNyuVvUNhxH0GSa6AjQihczs9C6G5cnzZSGiWfpxQy5R9ybmM+7dEb0EMWvdD8LyY3HTBdoDwFq2IEXUl3f/gBzFEby2m1abULSAw4EY5/6CKqytw5Nzc/3VCGXmRHSt/5mgetaxD5RHMeMhUOX4AQOn7fHduzWGNvQ1UMoBr/gTEKXS7tTxq3QNpbxLwUliJeLVyDmMbWNA5KKOjv4HF66VnxXGG9i6k90OtFPcKe94FS7Q6sIhgV8I8kAyBD76Q8QFGzWy8upj+S8AyN9g== 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=armh.onmicrosoft.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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cTMZ+voPlpnVvgSYqTBFzMkceAK8oxgn4qAUGCxk3sc=; b=i3Ww2k844QpJvyxRSYOYlWtqdCDedG2j8suUxBTmP3bxf04DBg4Vxi0wcG2gsZSksrD29y/BnBFwSEbpbgboohh36IBaob7O2XQ0u92+Ndy8F9IGiNqqnMLXRL6jVopuAqDaU5csTSK+uXDYtsEY/tbk4nRy8HGSfh71QdZe/hE= Received: from AM6PR0202CA0064.eurprd02.prod.outlook.com (2603:10a6:20b:3a::41) by AS4PR08MB7431.eurprd08.prod.outlook.com (2603:10a6:20b:4e3::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24; Fri, 19 Jan 2024 09:05:14 +0000 Received: from AMS0EPF000001B1.eurprd05.prod.outlook.com (2603:10a6:20b:3a:cafe::d4) by AM6PR0202CA0064.outlook.office365.com (2603:10a6:20b:3a::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24 via Frontend Transport; Fri, 19 Jan 2024 09:05:14 +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=armh.onmicrosoft.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 AMS0EPF000001B1.mail.protection.outlook.com (10.167.16.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.16 via Frontend Transport; Fri, 19 Jan 2024 09:05:14 +0000 Received: ("Tessian outbound 1076c872ecc6:v228"); Fri, 19 Jan 2024 09:05:14 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b3ed674d0c3b2b15 X-CR-MTA-TID: 64aa7808 Received: from e6d172d0573c.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1604A68A-9E46-4AD5-8222-6DBA3340CBB6.1; Fri, 19 Jan 2024 09:05:03 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e6d172d0573c.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 19 Jan 2024 09:05:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dx4OIMi5Qhhgn1n1b6zioMvdJyQ+edQqd1rsoCJ1aZp59CVBfrIHJbNL/YAKx8ekkFeiruHAOkt/4BgwlMpdaIyMS8e0o6wTo8PLJY2nmwpDa0HcZit5233YbMCZCppFLNSBv+hv8blJiAsROb8Ye/vnK69oEE43KiP+kwkD+yss02nWdGbS/e/vDKxDwtD6mPBGcSrr7TolE0pF0lt0Xwsp3YbcgVsh1Vm2kXt440TbxSEey5wfMniNV5eVuvPuPvdkoti1PGs7OK+joJbl+b2pWFkpbJ0E4uqPsO4Wqlv7r+vCjmR2ZSCl6RXyKq0800mAcnreFsNqW7GMpm5QSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cTMZ+voPlpnVvgSYqTBFzMkceAK8oxgn4qAUGCxk3sc=; b=CSNjk5kB72+kYpG0fOblXUcD/RmszGcwslgIz5FH2a6AD9x8nzyKwafBEXJwRdn6ftgPAMPY13R+3uUaq2uZUjyLsivGP/xM7MYgIVjoLUmX+VRZkZ2TOjFfdr2lKDUEgFcYfkZvybBxyoN5SW11KmUf4ByBffGfaac0Vq74w0QSs0jZSjfF3qjpmlt86q2F/h4BjCv23W9T6xIU3dqpZO4FP/xp/BQ6JUeNTZwHlCi6MwqhvgO7KnJfNP67YoGk1ggYeVV9H2N1ckv8kpGzYs1Zj0/T2BkTdDj1lQykbhil54lkkLMpg5dqh03WbF6BgoXCL2wLaVbu+wm4YwZiFA== 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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cTMZ+voPlpnVvgSYqTBFzMkceAK8oxgn4qAUGCxk3sc=; b=i3Ww2k844QpJvyxRSYOYlWtqdCDedG2j8suUxBTmP3bxf04DBg4Vxi0wcG2gsZSksrD29y/BnBFwSEbpbgboohh36IBaob7O2XQ0u92+Ndy8F9IGiNqqnMLXRL6jVopuAqDaU5csTSK+uXDYtsEY/tbk4nRy8HGSfh71QdZe/hE= 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 AS8PR08MB6392.eurprd08.prod.outlook.com (2603:10a6:20b:31a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24; Fri, 19 Jan 2024 09:05:01 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::48ca:fbcb:84bf:ed17]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::48ca:fbcb:84bf:ed17%4]) with mapi id 15.20.7202.024; Fri, 19 Jan 2024 09:05:01 +0000 Date: Fri, 19 Jan 2024 09:04:58 +0000 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: Richard Sandiford , Kyrylo Tkachov , Richard Earnshaw Subject: [PATCH 2/3] aarch64: Re-parent trailing nondebug base reg uses [PR113089] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P302CA0043.GBRP302.PROD.OUTLOOK.COM (2603:10a6:600:317::16) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|AS8PR08MB6392:EE_|AMS0EPF000001B1:EE_|AS4PR08MB7431:EE_ X-MS-Office365-Filtering-Correlation-Id: 02ae4661-cf1a-4b8f-de51-08dc18cdbff5 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 2ffmkvytL/QNde8iHvDlMBwyvx7S6IWxleUQCw5L4I5Md1B2OBvIACnqneF+lj7/vWaIVnI7QCkcf4PMUTeKUlgMtk8vsTJLMp4vB8Gn3Mf9MymLgZEi9MhIBBuU/sgBC+7YONZTJJWyJPYRtKnWBrTmvvfNGe1jK0FXjWLKJRHL2AoYLr3uH4YpVZsEr8IuxGSqtPmKt/gRReyC/MdgYSlmKYl3QzzWFl6hCQ6VCN2GVPYhblk0oL6eJXtAOFZ06e6ZLEP9ThzMc+NO5Vwk6/8ufaYet/OWiiRGyVUOb2UX+OIeJu5VP0pFLx9KXfl5QPzekmsN1r8TcZBPGYE4E7kQuYR4rQuSOo0/uXfwFDtFyPRh68++BmjNT15GTvl4qt8Dd3DY4kLlN3Qg1wc6XW5G5RF6/b81/1SiVXLrZrvBcMuZ72NJiSybg/MCyNXrAaLwVAf+c7aVxVr2Axp0eFTeuhYbbq8nm5oVwYLfFqTRuXrGxv0rZiDXrqanyXwlXPJn/ZS9tUVBook5oqQ8dIrQHJQrW+0+Ibo094vH0DnlTDZTLvizz5JpNnQae4MAIB6TXMAFC78QF3ofHHnYFOIHpiKMSt+B/pY/PxgxJrP3BucrYAZPVAuS2OACuL3pif503s4y/ZaDrImDuqgJpg== 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:(13230031)(136003)(39860400002)(376002)(396003)(366004)(346002)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(26005)(83380400001)(6512007)(44144004)(86362001)(36756003)(2616005)(6506007)(8936002)(8676002)(4326008)(44832011)(235185007)(5660300002)(33964004)(66476007)(66946007)(66556008)(54906003)(316002)(6666004)(38100700002)(6916009)(41300700001)(478600001)(2906002)(6486002)(67856001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6392 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-Transport-CrossTenantHeadersStripped: AMS0EPF000001B1.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 1791d25e-10cd-4258-49f1-08dc18cdb807 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G5wwKBkFGl99ZUxHTwPqrXbibkFQMOBOv6MjbX4xopzEBdmPuf49soNgT7boyHiXnJ7DECG2uLMJ5wTzGKqo0x5Yswd2iooEn7PCD72OHnXQvI2VMxsHZWA5iswVMHCMJrZwUj1Rt5oy4DazFAGIQY2rGTBuOxIzPMlIkWr2hy7leZYv39+4UJzEwyGkHmf8zu7VMH3zsIrOq9Th1LY4n1Ec1j8XBwr2VfNsR+/gLM2l3eVJNCHW7DVGwaqQLETmK4DuSAqdMHU8BHh4pg80qxb4sEhULhK5HJs7QBnzgG4hXJDb8uzxvGyxa7BsLEV7FY79LbD8/EIhyh04jTVUEAg2yOMJwumbEs2P4KVkl6QF90Qr+1TnkDRiB2+ksu1wa2EjsCyltGQlPYLiPmU3TL0moN5vksHR80Uhf1ZootnUR0ou3HV5ZlmKvCXAbOmaUHcokqZW6RjVGcE/nQWLoFAwgHUb04bH7ErWcLdEeg0BhJ7+lha+lSVR7mQJg/bkF6izYI/ctAsTjPS0coMTK1LhWFHDzluPuJhMtJx76Th/7FD20vX1h1VFzhvans8yitLXK3Gy1+10LZLdxJSZVkilmsvqnWDVI0Hy9Eyg48VYbo0BVslSd5+aFBW1txWZ8R43O9db4VRLhmTrkl6H9ijOjwQLwancQEP/tVgW5zG8baQ136ACZ7Ev2z0wiR2xqsjqi56E6HUP3ttw+KX2j9HCE6A6bHdllo7bjUpBXIqiTQOM3LYoMW8NEM3uC4shXtMs2Ge24xhwTLcZPx0Ujn6mqaO38ekOypOAQSYkZXY= 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:(13230031)(4636009)(376002)(136003)(396003)(39860400002)(346002)(230922051799003)(82310400011)(1800799012)(186009)(451199024)(64100799003)(40470700004)(36840700001)(46966006)(26005)(6666004)(36860700001)(33964004)(6506007)(83380400001)(6512007)(478600001)(44144004)(2616005)(336012)(47076005)(5660300002)(235185007)(2906002)(44832011)(41300700001)(4326008)(70206006)(6916009)(6486002)(8936002)(70586007)(316002)(54906003)(8676002)(86362001)(81166007)(356005)(82740400003)(36756003)(40480700001)(40460700003)(67856001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:05:14.7066 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 02ae4661-cf1a-4b8f-de51-08dc18cdbff5 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: AMS0EPF000001B1.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB7431 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, 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 While working on PR113089, I realised we where missing code to re-parent trailing nondebug uses of the base register in the case of cancelling writeback in the load/store pair pass. This patch fixes that. Bootstrapped/regtested as a series on aarch64-linux-gnu (with/without the pass enabled), OK for trunk? Thanks, Alex gcc/ChangeLog: PR target/113089 * config/aarch64/aarch64-ldp-fusion.cc (ldp_bb_info::fuse_pair): Update trailing nondebug uses of the base register in the case of cancelling writeback. --- gcc/config/aarch64/aarch64-ldp-fusion.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gcc/config/aarch64/aarch64-ldp-fusion.cc b/gcc/config/aarch64/aarch64-ldp-fusion.cc index 70b75c668ce..4d7fd72c6b1 100644 --- a/gcc/config/aarch64/aarch64-ldp-fusion.cc +++ b/gcc/config/aarch64/aarch64-ldp-fusion.cc @@ -1693,6 +1693,30 @@ ldp_bb_info::fuse_pair (bool load_p, if (trailing_add) changes.safe_push (make_delete (trailing_add)); + else if ((writeback & 2) && !writeback_effect) + { + // The second insn initially had writeback but now the pair does not, + // need to update any nondebug uses of the base register def in the + // second insn. We'll take care of debug uses later. + auto def = find_access (insns[1]->defs (), base_regno); + gcc_assert (def); + auto set = dyn_cast (def); + if (set && set->has_nondebug_uses ()) + { + auto orig_use = find_access (insns[0]->uses (), base_regno); + for (auto use : set->nondebug_insn_uses ()) + { + auto change = make_change (use->insn ()); + change->new_uses = check_remove_regno_access (attempt, + change->new_uses, + base_regno); + change->new_uses = insert_access (attempt, + orig_use, + change->new_uses); + changes.safe_push (change); + } + } + } auto is_changing = insn_is_changing (changes); for (unsigned i = 0; i < changes.length (); i++)