Message ID | 620c187a-e6a6-0bd9-fe17-ecee0d00d6ea@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 c18csp2383289vqm; Fri, 14 Jul 2023 02:41:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlFCQVG5Iklz9zXThDU1YbbufeIVpD8+hIrGjBCfxTeBBjDjQKlsYAHEmbL6lWnASBKnACh1 X-Received: by 2002:a17:906:113:b0:992:764b:90d5 with SMTP id 19-20020a170906011300b00992764b90d5mr3330012eje.71.1689327666271; Fri, 14 Jul 2023 02:41:06 -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 k12-20020a170906578c00b00993ac8be754si9844594ejq.106.2023.07.14.02.41.06 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 02:41:06 -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=cPT1TMvD; 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 33CB73858C54 for <ouuuleilei@gmail.com>; Fri, 14 Jul 2023 09:41:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33CB73858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689327665; bh=Fix4hWWVjHQ1Ixe8A+iFkgTDhqePtU8Mz/uq7kckyrg=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=cPT1TMvDdlbHoUFV37QimBJQmt5SVhtoOJzVq3Jv1S9XypqZh3ALQUb1Bcy+fQ/wo oxUQj8/zn62awkmTw1gaMviKfr/8+yFZd9mhmETLxKGQ7ousBcVLvUOUsykKZHa5O2 FTxfFBriedyvl1/vMaD0VTN+6vUerEw/Y1+lmE6E= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2055.outbound.protection.outlook.com [40.107.104.55]) by sourceware.org (Postfix) with ESMTPS id CD5333858CDB for <gcc-patches@gcc.gnu.org>; Fri, 14 Jul 2023 09:40:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD5333858CDB ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aU5INaa6UMGA2FyGeWO//1wzWB1Hx7KHU+Re0NNAmW49KgYDHL00RzwS/Gxl1WXKV76sA9vfK7vQRJOT18FfMcUwIHYd0+/YPMCs0WnMU6cX1uH7/vXVKqOP954osD91QmaXT5hSEOLSTkz+PfLRO19SemlRvmFIZEa4xAtOhb7rrXfUd2DcwBiw2mpO6HdBEMdCbT6+sY5szWxbkYvYRGcjfrmQBhww26EE/hkG08pvL32czwhqhADOHqE7r7ip4EWB9NjS+XCfQ27VaO9SrWzHWF5vn5VGEV2WUF9yuCSl17SPeGYmp9/4+itsweHb4Oucb4lxXRBmozPQFXQRiQ== 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=Fix4hWWVjHQ1Ixe8A+iFkgTDhqePtU8Mz/uq7kckyrg=; b=Qm9n7uQbKGryvgiXFrilawrc5QndQzzIBiHnYIXlRlpJfVKOHZkAOEjBw+FCxwj1vx7McflQ5LcUZ7ajMYeab25lS5tMu41532jcmENRLXs7Qk9QhVHoKLvWSm24Ru3QBPWhv9RTxkVqwKvZw3/1Gy+gyMeXuJHRI7kBcLyvOjvenmDUEegCF5UOcb5hzOWWfT5BbqumS8HRpYI2s+fKHmRCcDI/KDhs96EpH9sAP9WfbEnAnvChHWRBjqZrd9X0GUHufeGMKJawhsLeNUtcYZStx8FEcONX1R98APLgXNrOnkJBdETL6Qz4BH1Tbp/H/COgKAQbXNY1s7UdhTYhCQ== 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 DU0PR04MB9297.eurprd04.prod.outlook.com (2603:10a6:10:354::21) 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:40:13 +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:40:12 +0000 Message-ID: <620c187a-e6a6-0bd9-fe17-ecee0d00d6ea@suse.com> Date: Fri, 14 Jul 2023 11:40:11 +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> Subject: [PATCH] x86: slightly enhance "vec_dupv2df<mask_name>" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0260.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b5::17) To AS8PR04MB8788.eurprd04.prod.outlook.com (2603:10a6:20b:42f::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8788:EE_|DU0PR04MB9297:EE_ X-MS-Office365-Filtering-Correlation-Id: 19e8f0d3-8f2d-4daa-be31-08db844e5272 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R/e2W6zvtecGtYRjupprp4u7tRPM/bhXRv0mR9wAfzWWdQNxFrKN2F1MnsAMBKEaFqbKDV92UY8zd6+AQtcbMvwiF7Ppgst+LnPgtjeMhZvMBjpLQlYnfXFev2rBjYqI194naWovcvAzZrgVLA9TOdeWQmoTOUfr5T2/yt6BWhCPPy8yE1tMUwpajLmyg7ZOGV+yAs8rJp6BLuqmfhTitG2lQYErxopDaMGcKq2F1GIcGZlXzKG92NZyMcnnoNGsrwZEeUIiT81I9X3Q3UNEbNuZ4xHLGD15syfc7R7qs6Ct8mHmTEtYf0Sb1dAOTVuqpP9pO8zXCddWfQl7np0FnT2Kk+cFuniX0+CSWhDOL/YJfJEU/TiEnTisKumbylSLUeKdjbHUYCigCQ8FUU5DElWUbqpCt/PfevP+w/I4+5cH0xXUQFtQ9+BJ2Aa/8HlA+ZHQjElrkKjqn1EqkHZQI4ukvSCviJ1rjcFLvAXv0el4XUR0mvHnlsI21yX+xdpTnj2zzlbiu8lyLptBMqoB7tQmCkI0wEyMVgJEQ2iLLw7N7/JN39B6YHAS2Dxe9tCoEBSmlKT+N857g+VP1rSlmlXgJGLOAeDUjM9QBPnwPt7PbbkJNOKINHojXVPEc2oCnISMvWOtQ1X7lMQmb8awxw== 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)(366004)(396003)(346002)(376002)(136003)(39860400002)(451199021)(66946007)(4326008)(66556008)(66476007)(6916009)(41300700001)(2906002)(316002)(478600001)(5660300002)(8936002)(8676002)(31686004)(54906003)(6486002)(6512007)(26005)(186003)(36756003)(6506007)(38100700002)(31696002)(2616005)(86362001)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?+6JXBz/TdeIlvHeGyvEWi0p5bmx+?= =?utf-8?q?lC3gDgkH12qn4BRrqot9GFl47c7ts/GSu2PpjAu7nSzrwhKznc5+IJbO5W4nYEtQL?= =?utf-8?q?VtONU3YYbbOWSst7FULIC45Kih4ZNzxNHOe063S6KP6gACtLAzY1A0DRyYKU0yVUv?= =?utf-8?q?7CyqgO1gZ/35cqMWGA4wJAlI13qmWYdLl7daoyGr4JAG2xdK5vQJBHJ/JVVG8V4nM?= =?utf-8?q?cvU4GJ1HOBRNcXL/4F8ziXM0bYMuNc6sWbLAPVfwgtKCzlylWPoxJNiL0K4J2yf6t?= =?utf-8?q?LTmJfb7CEXTPn93uk6BIKfLvVSYKq7E/W7BTXYjQHmD8AT4DV9r5qPQRJdxdSlmQW?= =?utf-8?q?Gh7Iz3dk+T2azMAohZUPwZk+p6S29YaKJ08Fh93XFhe0JqWTTd5bPpfK+xH5bqpNd?= =?utf-8?q?HrV3b58uhFEmd6hE9BkLuJbaF0HJa6+ORnTSHPLy0FXJW4Tl6aqN3klbVpnFLJlgR?= =?utf-8?q?Ych4vCzhELM0NaeVhiV/Ju0UAFoRpnWH1OyrGVGjlty92JFOPQa5TU28tEUL1qSkq?= =?utf-8?q?mREGXtiMvRu+/g89PhnLxYUIOIIK5Xob5ULsqCI8TbifVpnk6C1u2v4X3ImMupQI/?= =?utf-8?q?lF1nauAHYqnDlYD2bhmO8ce3g4rpSWAyNFk3Tm8y3Fg4U7qgv5VJV9cnsdmRQnIhp?= =?utf-8?q?MD/IZFqIrn3azjZHsC6VRHIjDROc+HsilYnwFst2uOxpTFccTrHs7TnvLzDuW6kfi?= =?utf-8?q?njPXHo4YDN/cCD0wM8c1JKGNbOfA/s1HeSF7Q90Iel/Qs22Z3yCMTg4GIfpJda4LK?= =?utf-8?q?RzkLuzeNDImRN83+LJgf14rgVem+/2e9NsfqgUsXnj85qXeoW71H3/uPF8NEeM6sr?= =?utf-8?q?F3oKv5WPFkNM8F+JThjEqf0rkctZ0OUMepy2FaGRG8rZVqM+HsM8x73cQZSo7jZE6?= =?utf-8?q?o9/y9Xj+H72l3d/MTYAAmQeKrB2jquuMzg8yf4xefI4UpRt8/fJ7IbLCqNDIow3Mr?= =?utf-8?q?gGejlGTjWJDu3m5avbp+yqDyEPE8TVVsnW5ZN3LTwN8b6Fdkicc1zrHBRQ7Eg92Wt?= =?utf-8?q?PgTIyXxxos101OB4ImNo1xdOaTt1yqJVXB8drDlOOP2itp47elJf7yShwoibKXgYc?= =?utf-8?q?etVnJGxx+H1YgdcBya7XNkXM5vGrCzfOUnh9Jl9+CFIl4Y1glmZjN/PD/885+gbuZ?= =?utf-8?q?GZcc4OQtdPb16iPYMl73ovpYph3oryXrQdlT2grDHWKKuijKoFxbP2zYSFzL+rshN?= =?utf-8?q?KSpppbuF8deW4XoYFEuclj3bOeBuKftQ5cxWbLA5foRXEzrocgBeQFRi1ksJSRtvd?= =?utf-8?q?Q956yT0PKJR9Ub2PJmcvfCDLcbBXJQZ5kkAaoTKG5da+9ukRtP90I0G6EnM7eezOs?= =?utf-8?q?jBcx3n6zBlNpTQTigPX47HcUPeQNZ/KWSYuhxG3lHzmqv/nvfgLgVOh/2XH940WVj?= =?utf-8?q?duNV+5wVd7bRZir2gVKtua5u6L0xSCRjrVpoPwl6USAMJAaIpu+2PWZL4P/gMwk14?= =?utf-8?q?cPNRpYQbUiD1ZRmNZ/jJEEkVm/dlRDK7n7IDg0tRMu67AlrU3OxRtUGnc7fUGsMof?= =?utf-8?q?/yeiIYTwpMRW?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19e8f0d3-8f2d-4daa-be31-08db844e5272 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:40:12.9715 (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: JzVPGE66/pvQ/Zm5rFsLRNglovUtlyMcSCsio4zw3YIdIN3D00lPaZ1n0uVk1MuSAnRsnRivBg2utrRGmr9Dew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9297 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_NONE, 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: 1771388447368460198 X-GMAIL-MSGID: 1771388447368460198 |
Series |
x86: slightly enhance "vec_dupv2df<mask_name>"
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Jan Beulich
July 14, 2023, 9:40 a.m. UTC
Introduce a new alternative permitting all 32 registers to be used as source without AVX512VL, by broadcasting to the full 512 bits in that case. (The insn would also permit all registers to be used as destination, but V2DFmode doesn't.) gcc/ * config/i386/sse.md (vec_dupv2df<mask_name>): Add new AVX512F alternative. Move AVX512VL part of condition to new "enabled" attribute. --- Because of the V2DF restriction, in principle the new source constraint could also omit 'm'. Can't the latter two of the original alternatives be folded, by using Yvm instead of xm/vm?
Comments
On Fri, Jul 14, 2023 at 5:40 PM Jan Beulich via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > Introduce a new alternative permitting all 32 registers to be used as > source without AVX512VL, by broadcasting to the full 512 bits in that > case. (The insn would also permit all registers to be used as > destination, but V2DFmode doesn't.) The patch looks technically ok, but considering we don't have a real CPU with only AVX512F but no AVX512VL, these optimisations for AVX512F only don't make much sense, but rather increase the burden for maintenance. (For now, AVX512VL+AVX512CD+AVX512BW+AVX512DQ is a base set after skylake-avx512, users are more likely to use -march=$PROCESSOR for avx512.) For this(and those previous AVX512F only) optimised patch, I think it's helpful to help understand the pattern, so I'll approve of this patch. But I hope we don't spend too much time on such optimisations (unless there is an AVX512F only processor). > > gcc/ > > * config/i386/sse.md (vec_dupv2df<mask_name>): Add new AVX512F > alternative. Move AVX512VL part of condition to new "enabled" > attribute. > --- > Because of the V2DF restriction, in principle the new source constraint > could also omit 'm'. > > Can't the latter two of the original alternatives be folded, by using > Yvm instead of xm/vm? I think yes. > > --- a/gcc/config/i386/sse.md > +++ b/gcc/config/i386/sse.md > @@ -13761,18 +13761,27 @@ > (set_attr "mode" "DF,DF,V1DF,V1DF,V1DF,V2DF,V1DF,V1DF,V1DF")]) > > (define_insn "vec_dupv2df<mask_name>" > - [(set (match_operand:V2DF 0 "register_operand" "=x,x,v") > + [(set (match_operand:V2DF 0 "register_operand" "=x,x,v,v") > (vec_duplicate:V2DF > - (match_operand:DF 1 "nonimmediate_operand" " 0,xm,vm")))] > - "TARGET_SSE2 && <mask_avx512vl_condition>" > + (match_operand:DF 1 "nonimmediate_operand" "0,xm,vm,vm")))] > + "TARGET_SSE2" > "@ > unpcklpd\t%0, %0 > %vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1} > - vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}" > - [(set_attr "isa" "noavx,sse3,avx512vl") > - (set_attr "type" "sselog1") > - (set_attr "prefix" "orig,maybe_vex,evex") > - (set_attr "mode" "V2DF,DF,DF")]) > + vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1} > + vbroadcastsd\t{%1, }%g0<mask_operand2>{|, %1}" > + [(set_attr "isa" "noavx,sse3,avx512vl,*") > + (set_attr "type" "sselog1,ssemov,ssemov,ssemov") > + (set_attr "prefix" "orig,maybe_vex,evex,evex") > + (set_attr "mode" "V2DF,DF,DF,V8DF") > + (set (attr "enabled") > + (cond [(eq_attr "alternative" "3") > + (symbol_ref "TARGET_AVX512F && !TARGET_AVX512VL > + && !TARGET_PREFER_AVX256") > + (match_test "<mask_avx512vl_condition>") > + (const_string "*") > + ] > + (symbol_ref "false")))]) > > (define_insn "vec_concatv2df" > [(set (match_operand:V2DF 0 "register_operand" "=x,x,v,x,x, v,x,x")
On 17.07.2023 08:09, Hongtao Liu wrote: > On Fri, Jul 14, 2023 at 5:40 PM Jan Beulich via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: >> >> Introduce a new alternative permitting all 32 registers to be used as >> source without AVX512VL, by broadcasting to the full 512 bits in that >> case. (The insn would also permit all registers to be used as >> destination, but V2DFmode doesn't.) > The patch looks technically ok, but considering we don't have a real > CPU with only AVX512F but no AVX512VL, these optimisations for AVX512F > only don't make much sense, but rather increase the burden for > maintenance. Well, I can of course ignore this aspect going forward. It seemed relevant to me for two reasons: For one, I expect I'm not the only one to simply pass -mavx512f when caring about basic AVX512. And then isn't the Knights line of processors (Xeon Phi) lacking VL? (I'm getting the impression though that this line is discontinued now.) >> Can't the latter two of the original alternatives be folded, by using >> Yvm instead of xm/vm? > I think yes. I guess I'll make a follow-on patch for that then. Jan
On Mon, Jul 17, 2023 at 2:20 PM Jan Beulich <jbeulich@suse.com> wrote: > > On 17.07.2023 08:09, Hongtao Liu wrote: > > On Fri, Jul 14, 2023 at 5:40 PM Jan Beulich via Gcc-patches > > <gcc-patches@gcc.gnu.org> wrote: > >> > >> Introduce a new alternative permitting all 32 registers to be used as > >> source without AVX512VL, by broadcasting to the full 512 bits in that > >> case. (The insn would also permit all registers to be used as > >> destination, but V2DFmode doesn't.) > > The patch looks technically ok, but considering we don't have a real > > CPU with only AVX512F but no AVX512VL, these optimisations for AVX512F > > only don't make much sense, but rather increase the burden for > > maintenance. > > Well, I can of course ignore this aspect going forward. It seemed > relevant to me for two reasons: For one, I expect I'm not the only > one to simply pass -mavx512f when caring about basic AVX512. And You're not, AFAIK, some users used target("avx512f") for FMV. But I'd rather persuade them to use target ("arch=x86-64-v4") rather than optimizing for AVX512F only. > then isn't the Knights line of processors (Xeon Phi) lacking VL? > (I'm getting the impression though that this line is discontinued > now.) KNL is deprecated, and yes it doesn't support AVX512VL. > > >> Can't the latter two of the original alternatives be folded, by using > >> Yvm instead of xm/vm? > > I think yes. > > I guess I'll make a follow-on patch for that then. > > Jan
--- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -13761,18 +13761,27 @@ (set_attr "mode" "DF,DF,V1DF,V1DF,V1DF,V2DF,V1DF,V1DF,V1DF")]) (define_insn "vec_dupv2df<mask_name>" - [(set (match_operand:V2DF 0 "register_operand" "=x,x,v") + [(set (match_operand:V2DF 0 "register_operand" "=x,x,v,v") (vec_duplicate:V2DF - (match_operand:DF 1 "nonimmediate_operand" " 0,xm,vm")))] - "TARGET_SSE2 && <mask_avx512vl_condition>" + (match_operand:DF 1 "nonimmediate_operand" "0,xm,vm,vm")))] + "TARGET_SSE2" "@ unpcklpd\t%0, %0 %vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1} - vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}" - [(set_attr "isa" "noavx,sse3,avx512vl") - (set_attr "type" "sselog1") - (set_attr "prefix" "orig,maybe_vex,evex") - (set_attr "mode" "V2DF,DF,DF")]) + vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1} + vbroadcastsd\t{%1, }%g0<mask_operand2>{|, %1}" + [(set_attr "isa" "noavx,sse3,avx512vl,*") + (set_attr "type" "sselog1,ssemov,ssemov,ssemov") + (set_attr "prefix" "orig,maybe_vex,evex,evex") + (set_attr "mode" "V2DF,DF,DF,V8DF") + (set (attr "enabled") + (cond [(eq_attr "alternative" "3") + (symbol_ref "TARGET_AVX512F && !TARGET_AVX512VL + && !TARGET_PREFER_AVX256") + (match_test "<mask_avx512vl_condition>") + (const_string "*") + ] + (symbol_ref "false")))]) (define_insn "vec_concatv2df" [(set (match_operand:V2DF 0 "register_operand" "=x,x,v,x,x, v,x,x")