Message ID | 28de2fc1-79e6-6fef-400c-2991b25d13e1@suse.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp2384529vqm; Fri, 14 Jul 2023 02:45:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlFx4Kdc1audPMaQGQ5cAMldR3TegNSLR579iDjmbsjaK5rplaV95MkJLnE9Rv8tOubantbH X-Received: by 2002:a17:907:7e95:b0:98e:18ea:442c with SMTP id qb21-20020a1709077e9500b0098e18ea442cmr5021547ejc.45.1689327910730; Fri, 14 Jul 2023 02:45:10 -0700 (PDT) Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id v23-20020a1709061dd700b00988357b5f3fsi2321629ejh.758.2023.07.14.02.45.10 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 02:45:10 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=A+K94RlK; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 858993857350 for <ouuuleilei@gmail.com>; Fri, 14 Jul 2023 09:45:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 858993857350 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689327904; bh=VGLzyPXvNMBL3Jr+ZyBozhg0+7KwlWJ5v8BpmbTPvxE=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=A+K94RlKnozqWoy8X1TWfAhyw1PpdFg1KAW2pIyaLJhN5doPq31CO6XpZzir941FC 5t6i0sSJxAEFLkrotNHUKEYwL06iqY2/w4wQF4YdDRd3MgjkQ6iarNb1NwvgoJrbfL r2hMaOswoqqsiBdFioo+XVxhvrdDpt76RkFMlNMU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2089.outbound.protection.outlook.com [40.107.13.89]) by sourceware.org (Postfix) with ESMTPS id 9F2D53858CD1 for <gcc-patches@gcc.gnu.org>; Fri, 14 Jul 2023 09:44:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F2D53858CD1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KYDBncRL88i+0gKNCKj0qfBnHNt6k6hXuH0O+BlhlQxPBhJAjmp9tcpNxSXNYREOBRJZMeouoWGBKQscVIikNUsOGLUKHwmlzvoHsI9PqJmC0h4u2YADrfLv0qgxviYJ8F+M1npTYZD/UMjSSC1yg9Pqka3HUOZwJFs311sNT7r1gXX2aC3LIDM/p2FmJiBFhryyH3l/HrtQrdC0ui35iscnpwwNuJdUwYZ2TGcigtVHf3MO/+KJCA+ABZYajcH1StiINRKtS0XDtbar7kkU9S/OC53BeQ8jB1EzdxAtML3Px08o2rhcMRIAhxEmRBpIaDHx6pwPb4SsyuYBej4BtQ== 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=VGLzyPXvNMBL3Jr+ZyBozhg0+7KwlWJ5v8BpmbTPvxE=; b=edTtTPErn92cK46P140nQdC79QdeEiZDNf/zumBg1FCrVhxyTRkDkREmQOY/qNsIuByGOo5E2sng5Ph7dX/cUpNYzdnu/Pkcq4pcvsp2F4n1PYt/yg5N4tek2L2QkcAv9VVv/3MK9ugruiZYb4qYPF8VwsCqSo6c17bauwuzsQnCzzv8vh2A14IYNW2TIlwOv29rfiiMDwrpykB8SsqUyfdgGBppJCRijkkadmv61ySFHdbS2khCXHZFDZg8gNqmz5BNXwRrm3Kka1SGX8FSdVFTpnTR617g635PbxhMwWA18CVKf97CwHNmO6LeXuHnQp5DR/3WCGpRMRMQEJFyvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Received: from AS8PR04MB8788.eurprd04.prod.outlook.com (2603:10a6:20b:42f::21) by AS4PR04MB9386.eurprd04.prod.outlook.com (2603:10a6:20b:4e9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.27; Fri, 14 Jul 2023 09:44:18 +0000 Received: from AS8PR04MB8788.eurprd04.prod.outlook.com ([fe80::cbc0:69aa:c9a2:198e]) by AS8PR04MB8788.eurprd04.prod.outlook.com ([fe80::cbc0:69aa:c9a2:198e%7]) with mapi id 15.20.6565.016; Fri, 14 Jul 2023 09:44:18 +0000 Message-ID: <28de2fc1-79e6-6fef-400c-2991b25d13e1@suse.com> Date: Fri, 14 Jul 2023 11:44:16 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org> Cc: Hongtao Liu <hongtao.liu@intel.com>, Kirill Yukhin <kirill.yukhin@gmail.com>, Uros Bizjak <ubizjak@gmail.com>, Jan Hubicka <hubicka@ucw.cz> Subject: [PATCH] x86: replace "extendhfdf2" expander Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0259.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b5::18) To AS8PR04MB8788.eurprd04.prod.outlook.com (2603:10a6:20b:42f::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8788:EE_|AS4PR04MB9386:EE_ X-MS-Office365-Filtering-Correlation-Id: fd219144-f261-4117-d907-08db844ee4b1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g3V3C5AOAfTfE8opzWGCISFtkNEm+hgdLOiLGj71AzBx5HzMcDYsRKkIDF8Nfr7rKbGBZZBtDgof7Yb3HWvwmEor/KnlF/MBi1e1XvuwG+3jgpbUhv1L9Y26lgfioAh4O9OdyST9t/OKi1TetYwkjM1XcUr+QfdBZ44kpbSOdomCV2H48qnO9c7GOZP6Bnvz08DqV7xdVu2YshQaHcpv92uyuD+nR22wsX+X2/CxmIRxhPXVulLnc1UNx8nIvBTJsjhSnAWKj+VK8DzD0In1xaXWcocsJW5zsFr+ZsM204B07+PreQsW//GQawu7Sb8e2ZtB+cpkxHz81WA+h9lST7BojdAmPV9yyPzzTTdNbX1kHMr+w+4bLIFnQo7ell9t6nn6cMHRvU4Xql75DNz/fir3LZ7kB/HzByCkHAZi8kg39Gw80qjCwj9qddfl52WgAXG2AHIP6fZWtuTwsTDMlqXHvvuPgwHCV3LonA179XsaQiTJ1/x7KaVPST0ZyQjf+AW1lGI5t6U+QH8NpJ6j5APfEElADqVPZtM0JvAYQg1HIEmXFHNxd/QI4wIVDjfUCxLuNRMTEMqp+sddRBiXefrGVA5Vl71zW+41HRN2CErflcpFVGBSq07t4B5ksQu0SDkzEQxjr1L979WHNa2pzw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8788.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(346002)(39860400002)(366004)(136003)(396003)(376002)(451199021)(31686004)(2906002)(54906003)(478600001)(6486002)(4744005)(36756003)(8676002)(8936002)(316002)(66946007)(41300700001)(6916009)(66556008)(4326008)(66476007)(6512007)(83380400001)(38100700002)(31696002)(6506007)(5660300002)(86362001)(26005)(186003)(2616005)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?3atyBZkWNOSqrwI6h0BYF2JFU5Wy?= =?utf-8?q?5ruhwayHD78Ct3cY55ZofiEvreCIxOO1Sg1DY4O5PW4mG4iw2Uf/jiV2yA/s7UQ9l?= =?utf-8?q?Itbb0mauigMQZ2b1vWzQRFBH7pmyZehUgnfS9MQCYcgUiqiEuKYgNc+mXcaihcLhs?= =?utf-8?q?oOIyqgOzL5BJEmqwDMNM+Gj6ubofpcno/nnLicRGto0gn8O98u1Anp+ub5PCO07Aj?= =?utf-8?q?9EM3lyGEb/6tZ2S0s36VF//xyBreR92/CutfH6aLIeTdIL+g608tKnI2Umpap4h36?= =?utf-8?q?zniLDqXQo7cg7Ib5mhTgdc2fYI6iCuer6jIJw5NURuzqUmzlrhZQaX8hrkUuM1qJd?= =?utf-8?q?51JQPtYstU0Uk4aFeid5F1pvkxEgcb4XLoXamsimx4w45lcDxe3APFoYyvASzBhON?= =?utf-8?q?ahylPgjR/6YfyGL37fgq3sw+0OgnThXz4JWa1gB/8q8mDHmkh1qt02OAW2xDghZBp?= =?utf-8?q?npZ5MOF1PwGF+bgGz7rHHxv8PpwgV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bg3M1sDxuWblG6hfV/1Ujbms5ly2uR0G?= =?utf-8?q?U1mYwrGof5oKeo1yEUCg1p4vSzX893oridASWfX8zCIFIKiAJ4VTuOh1mjX0wxrRe?= =?utf-8?q?RKuxyvhQAm1lq+MlgQUjKt0fYRO4e3uq0Vtw5vkM2dcdv3BNSUYgzLzSpnU0LPu0V?= =?utf-8?q?Oj0f0ZvQTROh?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: fd219144-f261-4117-d907-08db844ee4b1 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8788.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2023 09:44:18.3127 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FjzyP5Xo/gd2J3Gq6rTxQIdUaqHdMbuz9OMW4pt5UevMMFr6oQtaTX1fdlxV1AU2ymgAuFX4Dm6CJTJS3FvlBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9386 X-Spam-Status: No, score=-3027.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Jan Beulich via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jan Beulich <jbeulich@suse.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771388703373719029 X-GMAIL-MSGID: 1771388703373719029 |
Series |
x86: replace "extendhfdf2" expander
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Jan Beulich
July 14, 2023, 9:44 a.m. UTC
The corresponding insn serves this purpose quite fine, and leads to slightly less (generated) code. All we need is the insn to not have a leading * in its name, while retaining that * for "extendhfsf2". Introduce a mode attribute in exchange to achieve that. gcc/ * config/i386/i386.md (extendhfdf2): Delete expander. (extendhf): New mode attribute. (*extendhf<mode>2): Use it. --- Of course the mode attribute could as well supply the full names.
Comments
On Fri, Jul 14, 2023 at 11:44 AM Jan Beulich <jbeulich@suse.com> wrote: > > The corresponding insn serves this purpose quite fine, and leads to > slightly less (generated) code. All we need is the insn to not have a > leading * in its name, while retaining that * for "extendhfsf2". > Introduce a mode attribute in exchange to achieve that. > > gcc/ > > * config/i386/i386.md (extendhfdf2): Delete expander. > (extendhf): New mode attribute. > (*extendhf<mode>2): Use it. No, please leave the expander, it is there due to extendhfsf2 that prevents effective macroization. FYI, there is no less generated code when the named pattern is used, the same code is generated from the named pattern as from the expander. Source code can be shrinked, but in this particular case, forced macroization complicates things more. Uros. > --- > Of course the mode attribute could as well supply the full names. > > --- a/gcc/config/i386/i386.md > +++ b/gcc/config/i386/i386.md > @@ -5221,13 +5221,9 @@ > } > }) > > -(define_expand "extendhfdf2" > - [(set (match_operand:DF 0 "register_operand") > - (float_extend:DF > - (match_operand:HF 1 "nonimmediate_operand")))] > - "TARGET_AVX512FP16") > +(define_mode_attr extendhf [(SF "*") (DF "")]) > > -(define_insn "*extendhf<mode>2" > +(define_insn "<extendhf>extendhf<mode>2" > [(set (match_operand:MODEF 0 "register_operand" "=v") > (float_extend:MODEF > (match_operand:HF 1 "nonimmediate_operand" "vm")))]
On 14.07.2023 12:10, Uros Bizjak wrote: > On Fri, Jul 14, 2023 at 11:44 AM Jan Beulich <jbeulich@suse.com> wrote: >> >> The corresponding insn serves this purpose quite fine, and leads to >> slightly less (generated) code. All we need is the insn to not have a >> leading * in its name, while retaining that * for "extendhfsf2". >> Introduce a mode attribute in exchange to achieve that. >> >> gcc/ >> >> * config/i386/i386.md (extendhfdf2): Delete expander. >> (extendhf): New mode attribute. >> (*extendhf<mode>2): Use it. > > No, please leave the expander, it is there due to extendhfsf2 that > prevents effective macroization. Well, okay then. > FYI, there is no less generated code when the named pattern is used, > the same code is generated from the named pattern as from the > expander. Source code can be shrinked, but in this particular case, > forced macroization complicates things more. Hmm, I'm pretty sure I checked and found some reduction. Jan
--- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -5221,13 +5221,9 @@ } }) -(define_expand "extendhfdf2" - [(set (match_operand:DF 0 "register_operand") - (float_extend:DF - (match_operand:HF 1 "nonimmediate_operand")))] - "TARGET_AVX512FP16") +(define_mode_attr extendhf [(SF "*") (DF "")]) -(define_insn "*extendhf<mode>2" +(define_insn "<extendhf>extendhf<mode>2" [(set (match_operand:MODEF 0 "register_operand" "=v") (float_extend:MODEF (match_operand:HF 1 "nonimmediate_operand" "vm")))]