Message ID | c3e17c19-0cd4-9d07-bcfc-0312487f029a@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:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1703209vqx; Wed, 5 Jul 2023 01:01:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlGzYVuOJ2O0hBA6sP/vlxb9+rn9jgSPlurzC71WJO+jivPX0vr7jzNX+O5EyrxCh9zrMyP6 X-Received: by 2002:a17:907:86a3:b0:982:a022:a540 with SMTP id qa35-20020a17090786a300b00982a022a540mr1436907ejc.11.1688544104516; Wed, 05 Jul 2023 01:01:44 -0700 (PDT) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id m13-20020aa7c2cd000000b0051e1688dd92si3112998edp.566.2023.07.05.01.01.44 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 01:01:44 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=l3f3RMME; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 6E4223858288 for <ouuuleilei@gmail.com>; Wed, 5 Jul 2023 08:01:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E4223858288 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688544103; bh=BUStHmPcoVBHhVb4TDuGZiS1gxLEAJgMpi17hjsjqVM=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=l3f3RMMEPgXTcgAg+1vZRtO6TClGjh+oO/m70bl37lnWZYmnIBRV1OL1PpKOaeM5Y GNqkdqvNixuJDoX92Jf3Meu6ZUyY1lrRftm6/JnTYDJo6zouTQzXJ4KbzFaQspDd58 e1cqc0NOO/9iAtnes+IiMmFyCbFHg/llBo/FZ6ts= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2077.outbound.protection.outlook.com [40.107.15.77]) by sourceware.org (Postfix) with ESMTPS id CFD393857353 for <gcc-patches@gcc.gnu.org>; Wed, 5 Jul 2023 08:00:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CFD393857353 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oqrd7n9J7gSRs2CGU/HadGIuwCbux01l7Uwlk1o1FZA2v0gEgeMw1Lq1JRvEVostfQIRyAxOh5nu/AQXRH3HGbmj0stjj/GSoi1SxKX+f26bWc4tVxe5RUEHZ07CywCUSpLG03bakdofndHxbgQ+TBQJFIBUinNo3IrzrJ/+ynSG5uOo9J6f4xMH5z4T/KxNPdjVDNTcUXMa81mbUreGe6YIJjAZg2VlKjVFXlE1ryHoqDm0nBVy1JtNWl7JhVzUhGAfdxk6ImQCcj9pNq8DGvXjnMbZR4hpKd/akmHoodtSgKVD1FRnx5hsBELMoqI7T7QtpMKdmMpGbFguFmoBmA== 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=BUStHmPcoVBHhVb4TDuGZiS1gxLEAJgMpi17hjsjqVM=; b=dNDgZKK5hZKVcwaOhc3OrCLI3HZapzylWOkaUYU9AR61cgMz0vipTgcscfiAVkqxcR3VUXvBcaB8nKWNfMIzwecXMmycgtes5qhA1VhyWw4ts3RmQ5uUnwa93KVX8I7UBLr0jfAEEs2s0a14D8Z+GvB7R1sgkGXcZeAAYpbBxkVO+CNudwB1FoYN0WRodpGErpF7jegvIe9kbB7uCNicokIcoucxEU3MRBoeGu1HNxCRDlU7zL5+5CeUQO0YLKvslieX1lD8jsTx3utC7orGXMQ0wYsQXt0qYumSUpa6nwjVHhgprvYB+bxkff4vkUMgh/f2+AO4cUsOQdk6jVNccQ== 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 DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) by AM9PR04MB8713.eurprd04.prod.outlook.com (2603:10a6:20b:43c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 08:00:57 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::9bd3:48c9:ff58:9880]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::9bd3:48c9:ff58:9880%4]) with mapi id 15.20.6544.024; Wed, 5 Jul 2023 08:00:57 +0000 Message-ID: <c3e17c19-0cd4-9d07-bcfc-0312487f029a@suse.com> Date: Wed, 5 Jul 2023 10:00:55 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: [PATCH 2/2] x86: slightly correct / simplify *vec_extractv2ti 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> References: <2d4f6176-9005-c1da-d5dc-56c35c3ed673@suse.com> In-Reply-To: <2d4f6176-9005-c1da-d5dc-56c35c3ed673@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0092.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::13) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|AM9PR04MB8713:EE_ X-MS-Office365-Filtering-Correlation-Id: a427a5ab-7ba4-4f1a-2a7a-08db7d2df6ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LRjXyPL8P80eWXpasKmqhT1tvIMZ9csc4YOUu9wlwG2EHbiUNYnzhx/8b5IheoliGFtApT6R4YZyVWVT2BENZjNWlmTfY/mvD6FF/Vn3XWaNMGGmANx9ZfV/9a3dehG2gK0OiVHAdEFs3pukxdelLsD4lCk7DCBJRjakux+cKWJ+m2KSJrHz9GZbg7jNCsNxQelQL9FSm3MT5IOSvpnhR1oW/eBSrbpl9opBc5mETLMnKZ/dBV1NO4wlTl6gVi8i+XWpvUvFQSfRwMucNSW3pPE48gSYIdG18ylFTFK442NS+7URYtzW9QSFMmZil/izgy6X0g1fb/RvwIqYsFYN8mervzm5R2PQXAlmuEO5LrEbA65E7Fb6Slzu69PzUTaW6McmkwW+RqCS+QJYUGX3m4bqehhjumYWXDoyBKYLYn2ZRGsdS+Rc5/clfbWIZ+rz1n0muX+h++X5qVnBHc+2J1ulh+mY/OOZKQKFth1LxLm34WwZ77ojZadC+G/5dabOXMFFUARXLS3kf4ZyW4MESIFhKZ/VmECvmWowWwH92GaDehCYE8pf70/QJpueQGTqV43Wo1ql44CAejacwAuVJiQrrwUeL6QFiML1+QXSPWWFfflz1LqzPIjirLf+hZLMLoFsLdl3xORQYB9o7wV7DA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB8790.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(396003)(39860400002)(136003)(366004)(376002)(346002)(451199021)(6916009)(38100700002)(4326008)(66946007)(66556008)(66476007)(2616005)(186003)(86362001)(36756003)(31696002)(6486002)(6512007)(6506007)(26005)(478600001)(54906003)(4744005)(31686004)(8936002)(8676002)(5660300002)(2906002)(316002)(41300700001)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0MeDvZT+XTwwQjyM0FlaUNlX24TK?= =?utf-8?q?QCzaNfgJFYDu/Khbz5SyzrlYa7HRWFCVnB+S97p7BpL+uxA4G4dHqo27kmGkmQRWv?= =?utf-8?q?aM38443XiiLIsMZ+CRfqEbCfmPNz0eId/hsgSDcDHu1+GSp0wOuzSah54sMqn737w?= =?utf-8?q?wrv0FG5BrBHTYbXK02WOqfbiXN8UaH70GKp0A3TH7Smi+YcOXLy3dXcha8QaTHy6X?= =?utf-8?q?4dxIpqHG6yxDFXQTmPPlqhSBkOCtbHnU6DhOvQpmP+MEZsC3bCGCCBOQ9GTNGYRYX?= =?utf-8?q?rVBhoRb7H30RUvyBx3o4uncoIzULSdpbFeF5vhItR04I8yi2N28Mz0zxPTgv0RIwL?= =?utf-8?q?rvpIuVtXkomf1ErRKwi9PpyNRzQusB1KCyBgE4cn3vKjF6U0VywOXzlrmnQridcwl?= =?utf-8?q?Ef/GLNFs9CnxL/4vanMrotkT12xSQhHnym3sRJwFc/cXwo8ULMtCH2PvPEJyd3YoD?= =?utf-8?q?iTeAfd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JEEdBGJEnd70i2Xt0zlV+qJiolv/81iz1SaX50YgeF9S5Ku9LOZtM?= =?utf-8?q?PwJRs3tixUqtgGTlBw7tJgfCV5v53AFt7gJQULPc/Go0UI/2NAptFMskRnEV9icMS?= =?utf-8?q?JDjdiaKSjUwfTGMCXgESsrCRkOCTc6Z71hLfxNVtDq9eSXNoKWscyF+8nxt6R4WHt?= =?utf-8?q?74lhZVlxXP+p?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: a427a5ab-7ba4-4f1a-2a7a-08db7d2df6ec X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 08:00:57.3959 (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: HQmiiRuZxnZkRZgwWKQ0tcRswPiaPPHptr6DCIEM8v3ipjsnw7H2/Uud0uE4x0VLMpjyEhNNltMvXny5jxXZyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8713 X-Spam-Status: No, score=-3027.3 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770566822888681843?= X-GMAIL-MSGID: =?utf-8?q?1770566822888681843?= |
Series |
x86: vec_extract_* adjustments
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Jan Beulich
July 5, 2023, 8 a.m. UTC
V2TImode values cannot appear in the upper 16 YMM registers without AVX512VL being enabled. Therefore forcing 512-bit mode (also not reflected in the "mode" attribute) is pointless. gcc/ * config/i386/sse.md (*vec_extractv2ti): Drop g modifiers.
Comments
On Wed, Jul 5, 2023 at 4:01 PM Jan Beulich via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > V2TImode values cannot appear in the upper 16 YMM registers without > AVX512VL being enabled. Therefore forcing 512-bit mode (also not > reflected in the "mode" attribute) is pointless. Please set isa attribute for alternative 1 to avx512vl. > > gcc/ > > * config/i386/sse.md (*vec_extractv2ti): Drop g modifiers. > > --- a/gcc/config/i386/sse.md > +++ b/gcc/config/i386/sse.md > @@ -20115,7 +20115,7 @@ > "TARGET_AVX" > "@ > vextract%~128\t{%2, %1, %0|%0, %1, %2} > - vextracti32x4\t{%2, %g1, %0|%0, %g1, %2}" > + vextracti32x4\t{%2, %1, %0|%0, %1, %2}" > [(set_attr "type" "sselog") > (set_attr "prefix_extra" "1") > (set_attr "length_immediate" "1") >
On 05.07.2023 10:47, Hongtao Liu wrote: > On Wed, Jul 5, 2023 at 4:01 PM Jan Beulich via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: >> >> V2TImode values cannot appear in the upper 16 YMM registers without >> AVX512VL being enabled. Therefore forcing 512-bit mode (also not >> reflected in the "mode" attribute) is pointless. > Please set isa attribute for alternative 1 to avx512vl. Since that looks redundant to me (as per the description), would you mind explaining why that's necessary / wanted? It also feels orthogonal to the change I'm making, as there was no "isa" attribute so far (which would have wanted to be "avx512f" as per what you ask for, prior to the change I'm making). Again me asking back is primarily to properly describe the changes I'm making, of course along with me still needing to properly understand when what attribute needs specifying explicitly. Jan
On Wed, Jul 5, 2023 at 5:03 PM Jan Beulich <jbeulich@suse.com> wrote: > > On 05.07.2023 10:47, Hongtao Liu wrote: > > On Wed, Jul 5, 2023 at 4:01 PM Jan Beulich via Gcc-patches > > <gcc-patches@gcc.gnu.org> wrote: > >> > >> V2TImode values cannot appear in the upper 16 YMM registers without > >> AVX512VL being enabled. Therefore forcing 512-bit mode (also not > >> reflected in the "mode" attribute) is pointless. > > Please set isa attribute for alternative 1 to avx512vl. > > Since that looks redundant to me (as per the description), would you > mind explaining why that's necessary / wanted? It also feels orthogonal > to the change I'm making, as there was no "isa" attribute so far (which > would have wanted to be "avx512f" as per what you ask for, prior to the > change I'm making). Again me asking back is primarily to properly > describe the changes I'm making, of course along with me still needing > to properly understand when what attribute needs specifying explicitly. I checked ix86_hard_regno_ok, TImode/V2TImode will be allocated with evex sse register only under TARGET_AVX512VL. otherwise alternative 0 is matched. So yes, no need to set isa attribute here, patch LGTM. > > Jan -- BR, Hongtao
On Wed, Jul 5, 2023 at 6:22 PM Hongtao Liu <crazylht@gmail.com> wrote: > > On Wed, Jul 5, 2023 at 5:03 PM Jan Beulich <jbeulich@suse.com> wrote: > > > > On 05.07.2023 10:47, Hongtao Liu wrote: > > > On Wed, Jul 5, 2023 at 4:01 PM Jan Beulich via Gcc-patches > > > <gcc-patches@gcc.gnu.org> wrote: > > >> > > >> V2TImode values cannot appear in the upper 16 YMM registers without > > >> AVX512VL being enabled. Therefore forcing 512-bit mode (also not > > >> reflected in the "mode" attribute) is pointless. > > > Please set isa attribute for alternative 1 to avx512vl. > > > > Since that looks redundant to me (as per the description), would you > > mind explaining why that's necessary / wanted? It also feels orthogonal > > to the change I'm making, as there was no "isa" attribute so far (which > > would have wanted to be "avx512f" as per what you ask for, prior to the > > change I'm making). Again me asking back is primarily to properly > > describe the changes I'm making, of course along with me still needing > > to properly understand when what attribute needs specifying explicitly. It's decided by many factors: instruction isa requirement, possible register allocation for the alternative, also how recog_memoized(constrain_operands) decide which_alternative. For *vec_extractv2ti the alternative is implicitly guarded by ix86_hard_regno_ok and no need for explicit isa attribute. > I checked ix86_hard_regno_ok, TImode/V2TImode will be allocated > with evex sse register only under TARGET_AVX512VL. otherwise > alternative 0 is matched. > So yes, no need to set isa attribute here, patch LGTM. > > > > Jan > > > > > -- > BR, > Hongtao
--- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -20115,7 +20115,7 @@ "TARGET_AVX" "@ vextract%~128\t{%2, %1, %0|%0, %1, %2} - vextracti32x4\t{%2, %g1, %0|%0, %g1, %2}" + vextracti32x4\t{%2, %1, %0|%0, %1, %2}" [(set_attr "type" "sselog") (set_attr "prefix_extra" "1") (set_attr "length_immediate" "1")