From patchwork Mon Sep 23 06:15:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1988399 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=LQ/oOcpM; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=LQ/oOcpM; 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 4XBt6L5jczz1xsM for ; Mon, 23 Sep 2024 16:16:09 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 27588385842C for ; Mon, 23 Sep 2024 06:16:07 +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-am6eur05on20620.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::620]) by sourceware.org (Postfix) with ESMTPS id CA3003858401 for ; Mon, 23 Sep 2024 06:15:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA3003858401 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 CA3003858401 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2612::620 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1727072141; cv=pass; b=BHiPWPs6SVFVPUwZ2Nrxsl8fYa3tzMm3C8SMDGy9bQXyWOf/Wems3SYb7L3OpSwVdwdwG4Gwm+lCNhLIhRP7y1+0IfyE7bvvPe/SlbcyIMz/e8Vfb2xglDP0BtXmBSwrTp3oSB1PFV5PXN0b9c0bQBH11PMHGU4kIPmdbZ0QEB8= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1727072141; c=relaxed/simple; bh=vSgmrmg3dPKzSwTQdSvma+lEFYLA2dR6aB/gK6ARzDc=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=Mu+Xv6nrQn0UshiPapZe/T1G7Ml4xLZMaeShdM33ZzMIqH3LihPUGNx7gAcMozNAQRo72h6RYu7OwXbtcvWJ8klnckIIUqjm8rmO+EN7JflbtojS+mL8yIjQ6fLpMkWKsm2EkiUpRlgX5UImR804OZzKXC0Saz/nXJYnJEMoJmM= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Lugk6MmJuu+cnK2DPIUX0MnE7OOj0X5pnmhj7Q6ie+7BsNVph07agNEYUbIqHly0Tu2HEm4Ej8N0sXgXw0AYsuG3+nJXcU+m+E5Tjcoawimh8YoEzJnWp8IWM4N05gsV69fsEC+OR0RBEjDX9ZOprMmcqRj/QrHE1pnDBR9v0IRTct+iVp46VEVEcWC75A+FmMfIvECkUrCTG3Ut0XlKlNtWKk6X45NquVlpbLlaJioj/5zmEu80S3Mw7ya6VzJrm72UPuAxIH4gUN8R7ae78vj/qF2oiLLervBGJF+K91TU5HqiFH6dROrNUZ+wMwo40ombiCNEwmKUMmjOz8BDqw== 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=/A8Lwo2MLKOFDfNrLaEOrt778rBIH/rclJpVMJ+8eA8=; b=gXg73rkCqIONUK66layL1z91eu1++xVg8YnpXc8WJhlrTepvX1xXpw9bSSB28tbR0lzNvxT5TRFS6duSq7JnzCdbrfWG5Sd08J73PTIobybXrpL4Nd5Ql1EjrPD7xzLr0yvc+/FrpNmTpddsuhc/I2GeuVxoaFXXm8YXpZDgo0fMXPHxSRI6kVBGv0EcmHT8sxCHXx81nRlIF7Gw8qfovCt0zvoNW6oFF7wbypxsXlm7CKcy3Cc7ZqKodcJKOadRjCbEu5BGcotM5RslgxDqwAejO1SXS2SfEh8eWNsCmMghrqCj7ath5aM5Uvk+D7a9NMLcq0551g90xyD9/+cC8Q== 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=/A8Lwo2MLKOFDfNrLaEOrt778rBIH/rclJpVMJ+8eA8=; b=LQ/oOcpM8hViVJdOORr27gGU35fcinn8FzwieL2TbMFILxXKvjYKspwZ9EzRG9AVG0q2mZTSkqs5whHZcY0VdBVOPSrK5qLuJFV0/ppWpiFEMNOIv+SkmLKJ6f1a3YxkWYy14TALu0WGyx9rINTP+be3YdOq4N1X4elgobNl1k8= Received: from DB7PR05CA0062.eurprd05.prod.outlook.com (2603:10a6:10:2e::39) by PAXPR08MB7646.eurprd08.prod.outlook.com (2603:10a6:102:241::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.13; Mon, 23 Sep 2024 06:15:30 +0000 Received: from DB1PEPF000509E3.eurprd03.prod.outlook.com (2603:10a6:10:2e:cafe::5d) by DB7PR05CA0062.outlook.office365.com (2603:10a6:10:2e::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25 via Frontend Transport; Mon, 23 Sep 2024 06:15:30 +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 DB1PEPF000509E3.mail.protection.outlook.com (10.167.242.53) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Mon, 23 Sep 2024 06:15:28 +0000 Received: ("Tessian outbound f9d5b330f2e0:v465"); Mon, 23 Sep 2024 06:15:28 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3cfc6ec433836fb0 X-TessianGatewayMetadata: 6EeyIyWWo33sNx5IWd1qTazr+oJZHawOO+q9PLbYKE5lo54+o8zPX0kgiMMhACx/xj2TULZWHdBXesJmnXGRTEDF7IzY9wgxwxdyRTXpBC0GLL/uldidVvqo64oV+FhIb1+C2cVnrH9TOY5N2FIpHw== X-CR-MTA-TID: 64aa7808 Received: from Ld60d56c5de22.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A8D2FE2F-0CA8-4A1E-8F3C-A9B7B0218DF2.1; Mon, 23 Sep 2024 06:15:21 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Ld60d56c5de22.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 23 Sep 2024 06:15:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZbVtj2kPcpti/yA1mMLQaGaqY1pfstYfN9ccgadPjveYEcJIe9+IJQmciHCq94G0M57m9Fstgg2ODkWI+eKM2XbatKa0/gy6eM8g4Himkm2skfkBZTPwwRSOUbFFZH1gaKWsy3zJfGXyoMImClWLko/2zN72Pzo8E/oFeefRZTN0aJ2PX/qmRlYsBG+hPURYN990m8yWYGw4lV2rBuJu7uQBqOxhq4P2mfjcN83f8KDJwTkQZKHHrSZePOXs0lIk+sMGqER7yW3Yr9APMzVUgEeGDnqTDdqv6ddaJo9bfulTNdKSYyh/Ee1zNuDP4L/22vleixzLfdpon5iAVoHF4Q== 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=/A8Lwo2MLKOFDfNrLaEOrt778rBIH/rclJpVMJ+8eA8=; b=gWAMVRETE312sX6yZ9pyry2We17xbTnjFSfylybCmnre4dtIiukZ4Oghq5gwbUvyxI16PZPJ7ncQOJoYjev9QB/5ah3PDpzBsh5IUiZEK8Y0tkDslD5cOfA8lEbShKSBXO6xgfohEBCHmCWxzyD40b1yx8WphM3++c5xSM/z+FHfYGiw060+aJOWyT2DpA5IKM7tSrjpH90YJ7Dn4VADjDHnKvUSsgdsxLTjDYm/WXFaswfrANVUdW0ckmaXVsBFsaxYTgdYrJQjfBRgiR7bMpZoEYigXWfhO15qkL9/XE5eDudWHsRXoG5JRaYBweWqPo31jKbwohkH1dZDw3P9SA== 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=/A8Lwo2MLKOFDfNrLaEOrt778rBIH/rclJpVMJ+8eA8=; b=LQ/oOcpM8hViVJdOORr27gGU35fcinn8FzwieL2TbMFILxXKvjYKspwZ9EzRG9AVG0q2mZTSkqs5whHZcY0VdBVOPSrK5qLuJFV0/ppWpiFEMNOIv+SkmLKJ6f1a3YxkWYy14TALu0WGyx9rINTP+be3YdOq4N1X4elgobNl1k8= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by DU0PR08MB9677.eurprd08.prod.outlook.com (2603:10a6:10:447::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.13; Mon, 23 Sep 2024 06:15:12 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::89dc:c731:362b:7c69]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::89dc:c731:362b:7c69%7]) with mapi id 15.20.8005.010; Mon, 23 Sep 2024 06:15:12 +0000 Date: Mon, 23 Sep 2024 07:15:09 +0100 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, rguenther@suse.de, jlaw@ventanamicro.com Subject: [PATCH]middle-end: Insert invariant instructions before the gsi [PR116812[ Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P265CA0164.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:312::13) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|DU0PR08MB9677:EE_|DB1PEPF000509E3:EE_|PAXPR08MB7646:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ebe47f5-18dc-432f-e7c3-08dcdb971ef9 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: 1JL+dq5vzDysTwNKb7b5FxceJ1rX4VDUGNcEYv4WmFF/N8kwVp+8oe4v7l0px1a0iMpZrLrx2Zm7iZs8GZRbdkB8lKkO5kWz2/r/JXqgiLUv0PbMC38RnjZpPn1TdXiHyogEsC+ZSM9fOTYKxpqnkjwQVAUvqI0OBu45i0uH7NsDEZtNG/DaH1P7Jm2lJ0eg/DsToTNvyqUMeSRCScwdxVvfxudpkqCx5ZLfRxJpZDmWLg2niMkjFRIaxehh7DRRL/dJZmib+C+3b91w/d8XOcZbDYxUPtSakL0rdEMf6rzI7VmxXj8+V/jJktGn84fJ+rVTX6DTAx5QRG/l67Jec6lm/oPHxtqYc7NgPJ4cWw+u9O45ee19HzqQ6XfzPgxZseI98AJeapGNk99wwyKGO0bWfQCNufn53qbwYQT/EeV5KtiVdmy7waYLQjSaLq8JLE06nJgS+9dq1TFn7e5xqQJWPf7gZ7P6n7MXiL1bFTj9uP1aFnKBHbwBxJCgl0yOfu9Xb+21Bi+wMVSA5/Hyh53NCDCVLUp5HAF1n2ewoelunM6hmkCy7pVGX6BAlsQRA6iLPx2TbIEK0fKDQuMWl75ShWb/Ykfb7qugWrYd5XNEnA5hZi1DncS0SjulVSA6/p6BVI0UGv7ZbFdOyi1j3dXKYATS9+9nFdG3w2kFcs0HvE36nYaiF/uiKlif3ttoAAEG7ihmXjfTSBvDwThKJvEfvi6ILVH6qiZH7WyLnpNH73RXRNzFAT0p0buLa3AepS3kR248pvKdLnb9At4lK1jeqXNwBawt3zVs1Q/A8ZXep3BxLFkia/ymBaZpKgTQbWZQllDe5KpxUEZQvxZvtPx3ICa5u3V/k5Rbl56ZD9HRBLmKndl7wHMWCWwn9IS0jHQ9TXDuJP5DU6BGc/+4FkgyRQrujhwSjN/6OapserdbDdVyNXnOK/wTd1HyVDUE+qGKm+l/dI5Cgghfcy4F45O7uCVBdfcCF+5qsEPR2smodPbl+HNUX5BYHHjLFMeQoE0tJ8CllJll+3jx5aM6w2YLkBROSJTzc7qAi9XKQTSyOAsuxGqfk0njxBDyYUz5hW45s9Cz3Yfjc/3l8a7u8J5EzSEKcmEh8CN1oRA/GHLysQhbP71o54i8PkWBGqmolQAOVKzeMkJVVdK3FnqKfPBQoPErXF5yxacXkLJtJ7cqufIfUWB7CPoSsXP8vlJzoye6VuxY5xATrCxLPiuUMArpnDtLFBSggbbVRC+pxek= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9677 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:803:13e::17]; domain=VI1PR08MB5325.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509E3.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 70c65ce6-bf45-40e0-57f9-08dcdb97150e X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|82310400026|36860700013|35042699022; X-Microsoft-Antispam-Message-Info: =?utf-8?q?6IfrKU2sneLI5LrcAVN6UDovp6SKqyy?= =?utf-8?q?4OOsmQgHNMe0tvIDoQNphNyR+OIKXuWG61kUivrA4+Uw+Gc3b1gU0B8aiTe9bc1aL?= =?utf-8?q?HWTc3aN+9NGwqUHT76i+ug5iT72Cn42JslXP3E52ulprs7iywHbKkarqhDLQTez8h?= =?utf-8?q?wCkIyZxnxmvKZTuS0J/9Zh5XipHJh1QWdwHl/26lXwRTj8sCrfojkA5x9YIyq6skl?= =?utf-8?q?qqdYL+T1PfE6YySfV5pPJP+92JEedTxzrmhJrIkV0SIxpsGZVUnOjWbdZ0v38MZZt?= =?utf-8?q?paIbRI+Vwq3dun5XtK7c7Un4in9U75XdA3A8CjQF12AbuQ4MkOT4YyF9rWYzjiW0+?= =?utf-8?q?y2+o86vxe4UMsv/nszkzDHJAH6bOOBxpVPIbEh+n/H2lqLdJoicFcXiJMZQlG5MdK?= =?utf-8?q?gTrdStr1Ptq+GO5Vq4x8C3B0Qdae+cKoqMf4Z2pUKyvJjO/9y+nK6wWbKbrio/uSf?= =?utf-8?q?jM+5eXVm5Ba29RwfjE9fcE5tDbhhKHAkunbwO92Kueb+SpNN+Dwdoo2Tb/Njn34CH?= =?utf-8?q?iRMIOj2qtLXfNTJ6kzz1R/1kCj2S35Mc0lJgRsevlbu2VsCrHLc/xx6bjDFySJ/Xm?= =?utf-8?q?PFEKO7EbkZR0jtdd/qWqsbw5PBV0IHSyPA7YCRVV78RNIxVNXjW1wjQ/dwV8NFZdR?= =?utf-8?q?JzmR1IT6ozXFnHdVThuC3Wi8GkTojFgUx+06vSHOeGZah8xugi1sQGwWLJNeFeOTW?= =?utf-8?q?FXWVAJ2rgMTYiP+be7P3ZoC8SxFtaT1jrpWQbi3RL531JCtBTlCybrTCg7g4ISgM1?= =?utf-8?q?sWwWDTYiqj/IuzJzqN/ey41sqEjZmk9G4zrbm9ZdWHLnF+nksrbv0RTlxvUYI/R7g?= =?utf-8?q?uHorZc3/iFdSsXWjhoI88Lcuh+r9KthEmqCGv7o2Czc20ng/JNTQTZOADZQgOrFgO?= =?utf-8?q?/Vs7q8Tm8eUaAdQGHUMZCc1Z90KyjcTJl0A66iQbPfbQgEsOBeb4/9Tdv1yCIPDRB?= =?utf-8?q?AzZf7H8bT+rUmlnNgwo9+n755Ep8XajptfVILlLYyklz9SU67g7pyATfjB/CNRLVr?= =?utf-8?q?mN2ZD385s4asNzQlgoJNm5Xl6XXLR4A6LgG2hf53bFDptu4Z6VR4hTksdXZqo9oYj?= =?utf-8?q?Z2CXL9lz3jlTNx1YLafiA6v74yhz/kiKOHckXr+P3n1O6wZI5jB8WCgODyvswSq6P?= =?utf-8?q?poZvWdRO4/4+/Y7wDXl7NdUpCVo35udngBJ2ePp+nDlTuqN7h8vsR2+XqRU/1K3Mf?= =?utf-8?q?P6idKYaYy6E1KkjqPLX0fLjNvQcgTTPIMvY1Lw+Od8uLWlH7hRNvvzSm4iZmgqL0L?= =?utf-8?q?ys0fx/LtoPJ0Ec8VBcFlh3wKKaynCVd/1AfB+cFi0ZeJQ6HUQhUcQ7mSqk8qknYGT?= =?utf-8?q?kHHpZNGhzHDWMOR/Rr8esyDrTHLurFRq+g=3D=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)(376014)(1800799024)(82310400026)(36860700013)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2024 06:15:28.6006 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ebe47f5-18dc-432f-e7c3-08dcdb971ef9 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: DB1PEPF000509E3.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7646 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_LOTSOFHASH, 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 Hi All, The new invariant statements should be inserted before the current statement and not after. This goes fine 99% of the time but when the current statement is a gcond the control flow gets corrupted. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR tree-optimization/116812 * tree-vect-slp.cc (vect_slp_region): Fix insertion. gcc/testsuite/ChangeLog: PR tree-optimization/116812 * gcc.dg/vect/pr116812.c: New test. --- -- diff --git a/gcc/testsuite/gcc.dg/vect/pr116812.c b/gcc/testsuite/gcc.dg/vect/pr116812.c new file mode 100644 index 0000000000000000000000000000000000000000..3e83c13d94bdb475828971efb5b6f2e5101eaebe --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr116812.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-O2 -fno-tree-dce -fno-tree-dse" } */ + +int a, b, c, d, e, f[2], g, h; +int k(int j) { return 2 >> a ? 2 >> a : a; } +int main() { + int i; + for (; g; g = k(d = 0)) + ; + if (a) + b && h; + for (e = 0; e < 2; e++) + c = d & 1 ? d : 0; + for (i = 0; i < 2; i++) + f[i] = 0; + return 0; +} diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 600987dd6e5d506aa5fbb02350f9dab77793d382..d08d2f84a00ed307e03fc1c027681d428e12fdd0 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -9170,8 +9170,8 @@ vect_slp_region (vec bbs, vec datarefs, gimple_stmt_iterator gsi; gsi = gsi_after_labels (bb_vinfo->bbs[0]); - gsi_insert_seq_after (&gsi, bb_vinfo->inv_pattern_def_seq, - GSI_CONTINUE_LINKING); + gsi_insert_seq_before (&gsi, bb_vinfo->inv_pattern_def_seq, + GSI_CONTINUE_LINKING); } } else