From patchwork Mon Jan 27 15:41:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joel X-Patchwork-Id: 182977 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp3915206ile; Mon, 27 Jan 2020 07:41:51 -0800 (PST) X-Google-Smtp-Source: APXvYqy4GevOKZE+Mfczvard0snsyiUyXUave0ZhbVlvUOCdPwmla1i2YdzmWdLLGIWh+d3TnNzo X-Received: by 2002:aca:ad11:: with SMTP id w17mr8028236oie.85.1580139711273; Mon, 27 Jan 2020 07:41:51 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id r14si3364874oic.12.2020.01.27.07.41.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jan 2020 07:41:51 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-518315-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=r07dzbm8; dkim=neutral (body hash did not verify) header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=FaUh5KOx; dkim=neutral (body hash did not verify) header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=FaUh5KOx; arc=fail (body hash mismatch); spf=pass (google.com: domain of gcc-patches-return-518315-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-518315-patch=linaro.org@gcc.gnu.org" DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:mime-version; q=dns; s=default; b=vcdFie5b4N7DCvig vRpby2dhPFMrGpDEUdRYHSkkqzd+HLBkIZx5nXZU4XYDm1BgB7k9IwnNT5TuAfzW ntPwW5Wz8gNIjqnw/31kmmrpYauxzlrKN06IjOfirQbGKHaVOk1VUfLiGaPkWfhq fwpyPkPJR6wFVFvi1+zxKyJhwfg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:mime-version; s=default; bh=AyoF+bpsuOQBow+bA+Okoz LcCXo=; b=r07dzbm8oP1Gzz8T3IM2zKVP1H/v8enLAtUu0U+O3z3FehoL9EogIz yA1Ra4d2DHtavuF4y0mpeAQgZJ13FaZCi3vu/q6kWvVmHQSysFj6MWTXKUaYZFSx 0JyjUcPyIJi4+S2T7aa/8mfCWt3POTV8j5hc9VfbTT/nh5EDHr+r0= Received: (qmail 9794 invoked by alias); 27 Jan 2020 15:41:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 9786 invoked by uid 89); 27 Jan 2020 15:41:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LOTSOFHASH, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 spammy=regional, upto, HX-Languages-Length:3803 X-HELO: EUR05-DB8-obe.outbound.protection.outlook.com Received: from mail-db8eur05on2067.outbound.protection.outlook.com (HELO EUR05-DB8-obe.outbound.protection.outlook.com) (40.107.20.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 Jan 2020 15:41:36 +0000 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=aA2DV11OOi3CrLIAYlOBJRvqP3UN72ZDQYwQntHTIUU=; b=FaUh5KOxk2/+MQOZz71YxuMhskj5UqBo6p4+gwuQFu8MNwu6INzQejGCyTMuSaZkq1f7Nx3pp3RRiXywvb7Lz80kfefLRybDxc+SF79sMVJeIpU1BCp5VzbOdnaJCDItsc1eDYhhrmkUU2XjqN8UJh/ja1b+bwsaJP6ko/1ayqU= Received: from VI1PR08CA0186.eurprd08.prod.outlook.com (2603:10a6:800:d2::16) by VI1PR0802MB2624.eurprd08.prod.outlook.com (2603:10a6:800:ae::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.20; Mon, 27 Jan 2020 15:41:33 +0000 Received: from VE1EUR03FT009.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::208) by VI1PR08CA0186.outlook.office365.com (2603:10a6:800:d2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.22 via Frontend Transport; Mon, 27 Jan 2020 15:41:33 +0000 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=bestguesspass 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 VE1EUR03FT009.mail.protection.outlook.com (10.152.18.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.18 via Frontend Transport; Mon, 27 Jan 2020 15:41:33 +0000 Received: ("Tessian outbound 1da651c29646:v40"); Mon, 27 Jan 2020 15:41:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 08b8a4808cc37f06 X-CR-MTA-TID: 64aa7808 Received: from 82c41f4932c0.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3CB310CB-A935-435A-9B63-8F3D0EC4C588.1; Mon, 27 Jan 2020 15:41:27 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 82c41f4932c0.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 27 Jan 2020 15:41:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cbHFLj+28hZYpAMfs73tI9v9zQy1hKlewVDJT2EjeIR1ucQgxwHWAPnAWgkdzr5J9YAupOly4hxm8OGxSNdSoykL8pf5PeP30Xy2OETNEc9+NQmp8JTIyx1i7JY4GkTyixKXY/PI3oEYRY4FyHBQWaGjSY8VcWKLV1FMG3zCQW1KT4FL5WTyYsSJ23VwojpdiIs1we6AoKDdXhfrDuyracL7saZ5xU7ru/TZ1s5mwXJcSuTGU857uu4uaP/5V86SVj+rN7TnKFJU7I0krZJeSBWQsMKvPuNwiKcLjDZNv7dsAt9602F1/Fjw2fAs9hz8dsCmwASeqeOht8LU10qrOg== 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=aA2DV11OOi3CrLIAYlOBJRvqP3UN72ZDQYwQntHTIUU=; b=Dddsn0cp1R5Ywvc7NJDCy1tgTA98ee6Fm89TJjJl6QTecLKeosFI3Uml/LafeA21lsHJ802Pe8ZOWcxsC7KDS1c0orbpvGqWl5tw6oDPMcgUX4kj5yuRQ9WUoW39RMpOyDiBZgGXPlxEF92hExjzu1m6S+NMLrvubg+9apAOKzDZey3n5H7CfQsZG4twGYLjI1zROlsCmhK5f5lMAlhWhEeXHfd+L/Ichfp9t73SH1B4k1vr4aDo3rBe2pzPtGljKbRg1X5APQrGL2PNeTDdCUSJoDrhmRIebqxSjzg3kMOwpdKh4eXezwAgJmTpRV2Xv9E8iG71Gi7OOpGC/6W3Rw== 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=aA2DV11OOi3CrLIAYlOBJRvqP3UN72ZDQYwQntHTIUU=; b=FaUh5KOxk2/+MQOZz71YxuMhskj5UqBo6p4+gwuQFu8MNwu6INzQejGCyTMuSaZkq1f7Nx3pp3RRiXywvb7Lz80kfefLRybDxc+SF79sMVJeIpU1BCp5VzbOdnaJCDItsc1eDYhhrmkUU2XjqN8UJh/ja1b+bwsaJP6ko/1ayqU= Received: from VI1PR08MB3328.eurprd08.prod.outlook.com (52.134.31.139) by VI1PR08MB3470.eurprd08.prod.outlook.com (20.177.59.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.24; Mon, 27 Jan 2020 15:41:26 +0000 Received: from VI1PR08MB3328.eurprd08.prod.outlook.com ([fe80::58ab:c7bb:8931:a509]) by VI1PR08MB3328.eurprd08.prod.outlook.com ([fe80::58ab:c7bb:8931:a509%7]) with mapi id 15.20.2665.026; Mon, 27 Jan 2020 15:41:26 +0000 Received: from [10.2.79.42] (217.140.106.51) by LO2P265CA0009.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:62::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.20 via Frontend Transport; Mon, 27 Jan 2020 15:41:25 +0000 From: Joel Hutton To: Vladimir Makarov , "gcc-patches@gcc.gnu.org" CC: nd , "ebotcazou@adacore.com" Subject: [Ping][GCC][IRA] Revert 11b8091fb to fix Bug 93221 Date: Mon, 27 Jan 2020 15:41:26 +0000 Message-ID: References: <586c7e2d-5305-7bd2-8d57-85693feffb16@arm.com> <03413895-e1a6-0e46-c64a-436234e03d4a@redhat.com> In-Reply-To: <03413895-e1a6-0e46-c64a-436234e03d4a@redhat.com> user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Joel.Hutton@arm.com; x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(39860400002)(366004)(376002)(346002)(199004)(189003)(4744005)(4326008)(36756003)(53546011)(26005)(186003)(16526019)(16576012)(81156014)(8676002)(54906003)(6486002)(81166006)(5660300002)(52116002)(31696002)(316002)(86362001)(8936002)(110136005)(71200400001)(478600001)(66446008)(66616009)(66556008)(66476007)(66946007)(64756008)(2906002)(956004)(2616005)(31686004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3470; H:VI1PR08MB3328.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: FtoyNukIA7Z74diHoRDPedca1H1KpKHQYMD37uXq30lix5ix+4+2zdNTOZLQaj1N8+neioWvvkZ0B4Hz9AaHOcMvbHA1UtAOU3kZ6GyEQr3bHFHRuVjCCglXrZuoSHNTq9XfiPG1HJ7l1xBfAPOxa2CfgnLd2NU77bsOWGKYx8W8DacRTk21BlB7MyzFqhsS0hIoZvGP2pHW7d8XeoCOIc+ywlGcfARDYhYy5tgp3hvG6DcM6ZRy7asSXwVmQSDT2Y55P6gWYKh9RejtFPTwmBsq2WP0g9mc1nZHBnNqS04FtJIBuyLEpxTE9sVyC/ltgXHo9e94m+Rk7I/WNgRSLxQ19NpLhQRphD81bgrT04jjR+Ks9ps1DjIYcr/Il9+zj0wgkrk1D5XeKESObtJdBpLczJi6Mie3Ohzydmc3RVfyv+SrpwLcV+bB/3mCSQIy x-ms-exchange-antispam-messagedata: 7AzepXDUX/apIPzjuxMCSGRgL8F1SMz/HMjhQ2qJP7M4IvdD7x6GnEBPaZz5CB9h2aBj904He0Tv3vdAPsxueCYw95FcwH7G0RZx3nnUWThLDieF9/Qq+WUijIoEUzC13fo2rrCKQWqmsyHtM1UYbg== x-ms-exchange-transport-forked: True MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Joel.Hutton@arm.com; Return-Path: Joel.Hutton@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 2a3acd12-ad15-4ea2-1ac8-08d7a33f5e8f X-IsSubscribed: yes Ping! Eric, do you have any objections to reverting? On 21/01/2020 19:16, Vladimir Makarov wrote: > I am in favour of reverting the patch now.  But may be Eric can provide > another version of the patch not causing the arm problem.  I am ready to > reconsider this too.  So I guess the decision is upto Eric. Eric did previously say "Feel free to eventually revert it.", but I hoped he would reply on this thread. --- Comment #7 from Eric Botcazou --- Probably missing live range splitting or somesuch, as envisioned by Vladimir in its approval message. Feel free to eventually revert it. Changelog: 2020-01-21 Joel Hutton PR target/93221 * ira.c (ira): Revert use of simplified LRA algorithm. gcc/testsuite/ChangeLog: 2020-01-21 Joel Hutton PR target/93221 * gcc.target/aarch64/pr93221.c: New test. >From 1a2980ef6eeb76dbf0556f806a85a4f49ad3ebdd Mon Sep 17 00:00:00 2001 From: Joel Hutton Date: Tue, 21 Jan 2020 09:37:48 +0000 Subject: [PATCH] [IRA] Fix bug 93221 by reverting 11b8091fb 11b8091fb introduced a simplified LRA algorithm for -O0 that turned off hard register splitting, this causes a problem for parameters passed in multiple registers on aarch64. This fixes bug 93221. --- gcc/ira.c | 38 +++++++++------------- gcc/testsuite/gcc.target/aarch64/pr93221.c | 10 ++++++ 2 files changed, 25 insertions(+), 23 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/pr93221.c diff --git a/gcc/ira.c b/gcc/ira.c index 46091adf8109263c72343dccfe4913857b5c74ae..c8b5f869da121506f0414901271eae9810689316 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -5205,35 +5205,27 @@ ira (FILE *f) /* Perform target specific PIC register initialization. */ targetm.init_pic_reg (); - if (optimize) - { - ira_conflicts_p = true; - - /* Determine the number of pseudos actually requiring coloring. */ - unsigned int num_used_regs = 0; - for (unsigned int i = FIRST_PSEUDO_REGISTER; i < DF_REG_SIZE (df); i++) - if (DF_REG_DEF_COUNT (i) || DF_REG_USE_COUNT (i)) - num_used_regs++; - - /* If there are too many pseudos and/or basic blocks (e.g. 10K - pseudos and 10K blocks or 100K pseudos and 1K blocks), we will - use simplified and faster algorithms in LRA. */ - lra_simple_p - = ira_use_lra_p - && num_used_regs >= (1U << 26) / last_basic_block_for_fn (cfun); - } - else - { - ira_conflicts_p = false; - lra_simple_p = ira_use_lra_p; - } + ira_conflicts_p = optimize > 0; + + /* Determine the number of pseudos actually requiring coloring. */ + unsigned int num_used_regs = 0; + for (unsigned int i = FIRST_PSEUDO_REGISTER; i < DF_REG_SIZE (df); i++) + if (DF_REG_DEF_COUNT (i) || DF_REG_USE_COUNT (i)) + num_used_regs++; + + /* If there are too many pseudos and/or basic blocks (e.g. 10K + pseudos and 10K blocks or 100K pseudos and 1K blocks), we will + use simplified and faster algorithms in LRA. */ + lra_simple_p + = ira_use_lra_p + && num_used_regs >= (1U << 26) / last_basic_block_for_fn (cfun); if (lra_simple_p) { /* It permits to skip live range splitting in LRA. */ flag_caller_saves = false; /* There is no sense to do regional allocation when we use - simplified LRA. */ + simplified LRA. */ flag_ira_region = IRA_REGION_ONE; ira_conflicts_p = false; } diff --git a/gcc/testsuite/gcc.target/aarch64/pr93221.c b/gcc/testsuite/gcc.target/aarch64/pr93221.c new file mode 100644 index 0000000000000000000000000000000000000000..4dc2c3d0149423dd3d666f7428277ffa9eb765c4 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/pr93221.c @@ -0,0 +1,10 @@ +/* PR target/93221 */ +/* { dg-do compile } */ +/* { dg-options "-O0 -mno-omit-leaf-frame-pointer" } */ + +struct S { __Int32x4_t b[2]; }; + +void +foo (struct S x) +{ +} -- 2.17.1