From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2080.outbound.protection.outlook.com [40.107.21.80]) by sourceware.org (Postfix) with ESMTPS id CC97E3857818; Wed, 9 Dec 2020 16:39:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CC97E3857818 Received: from AM5PR0602CA0009.eurprd06.prod.outlook.com (2603:10a6:203:a3::19) by HE1PR0802MB2347.eurprd08.prod.outlook.com (2603:10a6:3:c8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.20; Wed, 9 Dec 2020 16:38:58 +0000 Received: from VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:a3:cafe::71) by AM5PR0602CA0009.outlook.office365.com (2603:10a6:203:a3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Wed, 9 Dec 2020 16:38:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.org; 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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT055.mail.protection.outlook.com (10.152.19.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Wed, 9 Dec 2020 16:38:57 +0000 Received: ("Tessian outbound 76bd5a04122f:v71"); Wed, 09 Dec 2020 16:38:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2272f50cd3f835b7 X-CR-MTA-TID: 64aa7808 Received: from f37a5bb84566.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BD92C3C6-0B7C-4A99-BFBF-B023B96DD60F.1; Wed, 09 Dec 2020 16:38:41 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f37a5bb84566.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 09 Dec 2020 16:38:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nxxHSoQfGBBneq0rUwznAtB2ZoZ2gxTZIJ3fjhDMxKpI2aYy4BAAp0Tb+B0tczY+ff+ElLTCe4QKN790+sbHcetx4XKb9tT61Ocvoihj1A0Ebn1jYKueAjv6SiCVdGshW/aCFXfjofTZDJBYBdDK1hm8slJ2sTa/9nKacTqELOVaZNOBD+t3Gx2G6+vFzfO5Otgk7qnYZ3eX1C/GYQbcaNRVOtGZFEgvtNo9tjAsay68L0y000++X7JLkjlxJUHbufWnW9vkIn/EBmAVXaj1IoJKrppteT/V5KAFR6wyCtYygd/2gWj6dDJnrmoqX8Zjov9RPzlQloMLmWbWB5l7Rw== 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-SenderADCheck; bh=VpBylqe0q77da6Fq0Coi1xfjgl+NVAL2llcPYrwtB9I=; b=G/5A9+Tye0jqmLRQj0xt4fJKa+Xti9XOOm3CS8Kf+9Orh5ny/aNoqKdxl/T3nCjN4Fh2XfCGhpsiQMFqd7NeogTZTUvgRHy+d5xdLXbShyNrHZHamquGx7vTSydPIWIqo2zTS+iykY26LtlFpqYhdfPtrGTS7BXJgWGMWz0/J54W4LqNLZt2p7bob3C6qLrvV0n8xV7O1iQKB3lH1OpFFlFxLdlmwj7WzCpECEt3dVqA3Bo+NVWjlbFzUzA92wU/US6E29sHaSoq9cE4xCNqm1o+CwQ95GSxyG69lmF9nbhcu+/7glS6WZE/Wo/CY/E5VJ7a72ZgJO4uL7hE3QeshA== 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 Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB4900.eurprd08.prod.outlook.com (2603:10a6:20b:cc::10) by AM6PR08MB4900.eurprd08.prod.outlook.com (2603:10a6:20b:cc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.19; Wed, 9 Dec 2020 16:38:40 +0000 Received: from AM6PR08MB4900.eurprd08.prod.outlook.com ([fe80::5805:be9:d66d:7b65]) by AM6PR08MB4900.eurprd08.prod.outlook.com ([fe80::5805:be9:d66d:7b65%7]) with mapi id 15.20.3632.019; Wed, 9 Dec 2020 16:38:39 +0000 From: Andrea Corallo To: "rsandifo at gcc dot gnu.org via Gcc-bugs" Cc: "rsandifo at gcc dot gnu.org" Subject: Re: [Bug rtl-optimization/97092] [10/11 Regression] aarch64, SVE: ICE in ira-color.c since r10-4752-g2d56600c References: Date: Wed, 09 Dec 2020 17:38:38 +0100 In-Reply-To: (rsandifo at gcc dot gnu org via Gcc-bugs's message of "Wed, 09 Dec 2020 14:23:01 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [217.140.106.37] X-ClientProxiedBy: LO2P265CA0051.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::15) To AM6PR08MB4900.eurprd08.prod.outlook.com (2603:10a6:20b:cc::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from e124257 (217.140.106.37) by LO2P265CA0051.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Wed, 9 Dec 2020 16:38:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3c674798-85db-4885-1ee8-08d89c60ecb9 X-MS-TrafficTypeDiagnostic: AM6PR08MB4900:|HE1PR0802MB2347: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 0mz1ea/ElBpQ3gxgxDYUdDhCADE2h5ZLmuGUPwvJJMXS7z1irNBncNIR/HKIzQ2Ufo6bkk9/dFvdS4k7SzkfSkuP9DmbgiNzrB7EtCwdORhvQ+RpUkDtSEWGFSU1SfoJ38VLkOtZCBxP4WlvjRgAvTxCX+a52eQqIaHv/7yqMl/uh0v1cFKpuDddWEMieGPzwp0ejuU4aMAY0uIfrrBe4tU664s3uK6Ds3KxsWqPl02AGDbmH6bAC7l3L1M+70ot/3r0yGUKODItua1fxqp8ZeKJ1tzArxb9egDP7mt4BmCUBR6eh7PRTbyeKznqDOj4j9NkGXgmArx270LIaWIThSIHR4/NC5eR9DsskUONV93DMsCTZV4IJkp1MaOGeIFz+5THJchzjLg+PcGaqH4/Vw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR08MB4900.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(39860400002)(346002)(376002)(136003)(26005)(6486002)(66476007)(2906002)(52116002)(966005)(83380400001)(8676002)(66556008)(478600001)(8936002)(6916009)(5660300002)(66946007)(186003)(16526019)(316002)(6496006)(4326008)(44832011)(36756003)(450100002)(86362001)(956004)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?N21XUXB0US9sRkx0V1dpYjRzNXdsTHpmY2dOUEphL2pmeUF5Nm0zODBXYXU1?= =?utf-8?B?eG9iU3YyN1BnOXZWR0pWVFF2KzE0dnMzSnRIQnpKZjhiQWtRRTRLSEd2STFL?= =?utf-8?B?UUVPMHNQRkxRMzBjdGV2MnZRZTJScEU2RExVV215UFB2WFBTMk9WcE1FaXlM?= =?utf-8?B?RDVGR2xFZEd1WFZHUWhlZDZNVzdJQng5cjRiWllXVXZFcnU1WWk0NTZxRW1R?= =?utf-8?B?U3dtYUxCTUVDRkZyY3lzQ2hIZW5scStnRDB3cTZmSi9hay9NTGZZRDg1cXM2?= =?utf-8?B?Y29ybVp1c1RqUFhPSS9MODRJTCtqclB0a3lBTjJya0toN3RiWFhZWGp2eFpR?= =?utf-8?B?M0U4WG56aU9JTXorTHFpVUVJMlQ3R0VWYmdxV2JkSHVzNEZLRm9XTFJYZGVt?= =?utf-8?B?R0w4ZHlKYXR2K3RHV21iNWRRMFI0RWtUYTdzNHNodjJPa2NwK3F4RVp5Tm5L?= =?utf-8?B?Mm4xeWlnVFcyT2VRYVVEL3BZYkh0L0xjSUo5TVBseW5oQXA4M1luZ2NkVTVn?= =?utf-8?B?WmlDVU5Sc0NiR1k0RWRvd2FZTVQ0RHZXMm5mMUJnbHF5cVhXWVA3b212TjN0?= =?utf-8?B?VlpjUFVwTXJqSnEzWHBYUzVNcXVnT3BUSzZ0UVRUakNHRk1QWmhrOHpGenl0?= =?utf-8?B?S2xFV1BxMXZUTFZpdEg3dGpEa21ybkxuaWt6Y3d4LzFaTUpSaHdoUkp2aXpt?= =?utf-8?B?bFAwM1lGK0tESDg0eHpUR3hDMGR4OXlNWVkrZ0xqR0pEMituM0hzQzhsZW93?= =?utf-8?B?akZsWlR0OERqOUNuZm1Cb0h0bGJCSkVxK29DUzlYN2RyN2ZwN0ZDQWIrWlEx?= =?utf-8?B?c0I2Q25xWEd6aUFsTGZQVHZKMU5TMTJPQXhCUCtLNTJoNHk2K2RvUmk3RUht?= =?utf-8?B?MlphTUU3YVd5bkhxa2dIYUZWVmJUclZidWdxLzRaYW5uUHVYRTNRdlhzcGpo?= =?utf-8?B?angxVFlQV3BoYmQ3ZFFFbXJ6L3NEbjdWeUZyQVJpR3BqTEVIeUlQa01xZXVu?= =?utf-8?B?dTg2QStXaWxHYkxmd004RGhxWENRWjNrb0RRQW9vUTRCb3Y4N1BHdHBNdkVU?= =?utf-8?B?RFVuZkRVVUMvNGtBZG5tZm1XSXE2a1N4NFZ5dTgzcDBLS0hJZWdKVWEvOUlQ?= =?utf-8?B?dnRqUDlEZDFlbXNKOXRBUjdmSTRKalQ0NzljemQyckI5T1JxeGNtTEtqWEcr?= =?utf-8?B?Tk4rUUdITEwvWkRWUkx4Rm1QUFBvTWhsS21McjMyNGxVclhNSXg3MWozcis0?= =?utf-8?B?ZHB2eEpVdjVrVzZ5ODFWcDZIMTNKcmUyL3d1ZDhhUlY0ZUppVUxEdWJ4WVha?= =?utf-8?Q?u3EB56rwIAVJZDfRbXMUxJRrXkFOv5AM8F?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4900 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 9cfbcc78-957f-4890-100a-08d89c60e245 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OBuvVx70bmF2BiryYkNzkymqWReDwGqZLoWyTi2BI1MP2vKEDR5yOnVm6fjsnnOZyu5sH5hTmGDVKoB4E5Z/O6oNbDjfjAlT5ZRbrmljDGAorfbmBw1WhSL65GjpGQ4Jh3ng/6j6iw64Tyg4ujqJX5xREB3ef8MIFgh2kLVehltzvlbU3MmJViSoZSljgpPLJplzpvy+SL9MDFIkxdd+yJUb/5cS9BnVZrY8fPImc2hmAsJtYfNmkaloD0sDTNk6H4CxzrKLU2ga3PWfUqx37P5LDEjpNYUf/Xyr2Yz+/+PE6HaUmMaIQxltbfm6/TubXL7y4wmeXnbfyMHFbXT3omBjL7rJkC+/s5bwUjd9VuqMgTMwkB2/h3sNElGXZaBu3F0g0f/V3oXmuBIcA7PFZkNN28sLDoAKYrZgG3WhX8L1gXqzKjOv5/MARVgiLQkIQClLctubwYy7aIzNnb3SplxR987t2TvDKUcIcO0GqCc= 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:(4636009)(376002)(396003)(136003)(346002)(39860400002)(46966005)(8936002)(81166007)(956004)(316002)(26005)(83380400001)(86362001)(2906002)(356005)(36756003)(6496006)(5660300002)(8676002)(2616005)(70586007)(16526019)(4326008)(6486002)(82310400003)(6916009)(44832011)(186003)(336012)(70206006)(450100002)(47076004)(478600001)(966005)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2020 16:38:57.3534 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3c674798-85db-4885-1ee8-08d89c60ecb9 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: VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2347 X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, KAM_SHORT, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 16:39:03 -0000 "rsandifo at gcc dot gnu.org via Gcc-bugs" writes: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97092 > > --- Comment #4 from rsandifo at gcc dot gnu.org --- > (In reply to Andrea Corallo from comment #3) >> Created attachment 49710 [details] >> PR97092.patch >>=20 >> What is going on is that in 'update_costs_from_allocno' we try to >> identify the smallest mode using narrower_subreg_mode to then update the >> costs. >>=20 >> The two modes involved here are E_DImode and E_VNx2QImode, cause these >> are not ordered we ICE in 'paradoxical_subreg_p'. >>=20 >> Now I don't know if the strategy we want is: >>=20 >> - In 'update_costs_from_allocno' when modes are not ordered instead of >> calling 'narrower_subreg_mode' just keep the current one. >>=20 >> - Always select the cheapest mode in terms of cost. >>=20 >> The attached I'm testing implements the second. Hi Richard, thanks for commenting. > I think instead we should consider recomputing =E2=80=9Cmode=E2=80=9D in = each > iteration of the loop, rather than carry over the result of > previous iterations. I.e. use: > > mode =3D narrower_subreg_mode (ALLOCNO_MODE (cp->first), > ALLOCNO_MODE (cp->second)); Are we garanteed to have ALLOCNO_MODE (cp->first) and ALLOCNO_MODE (cp->second) always satisfying 'ordered_p'? In case not I think we can't use 'narrower_subreg_mode'. I thought we select the smallest because is the cheapest, so not to use 'narrower_subreg_mode' I compared directly the costs. > instead of: > > mode =3D narrower_subreg_mode (mode, ALLOCNO_MODE (cp->second)); > > Before g:e2323a2b77c91d1ba8194b01e6deaa2e00f15990 =E2=80=9Cmode=E2=80=9D > was a loop invariant, so it made sense to set it outside > the loop. I think the intention of that patch was to use > the smaller of the two modes involved in the copy, and carrying > the result over to future copies might have been unintentional. > > The difficulty with carrying the mode over to later copies > is that the costs then become dependent on the order of > the copies, whereas I'm not sure the order of the copies > is significant. I see Thanks! Andrea