From patchwork Wed Jun 14 05:54:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 107704 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1021267vqr; Tue, 13 Jun 2023 22:55:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72uVsWtSb8J1hCZKHHv+VfkRbuLlh6VITWI7O58Cz7oM8XJ0hsjxbD1NEIk+ADFUzbPLCx X-Received: by 2002:a17:907:8a21:b0:97d:783e:df8b with SMTP id sc33-20020a1709078a2100b0097d783edf8bmr12109196ejc.73.1686722129388; Tue, 13 Jun 2023 22:55:29 -0700 (PDT) Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b26-20020a17090636da00b009823e3239c6si1682404ejc.70.2023.06.13.22.55.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 22:55:29 -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=uFtpjmfK; 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 20C61385840D for ; Wed, 14 Jun 2023 05:55:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20C61385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686722128; bh=J7dubu0rGxxD4USD4XGsASTPRYHXhWYgY3zE1YwsIa4=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=uFtpjmfK4eNKBr7AQiG+RmvaHwRHXuj/zocFP40nTfPNa2KxKBpWl7Jx9JFZJ7cMt 0mFbbR2Nbw8TVkEQG3UOAeh9whI+zanUGvUnf6wRHM02pg1UNsNlQIoAbVtDe0DIfa INI0Lji8Cge0eTQUDMaUML94l/i5MHLKgB/h/DR0= 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-he1eur01on2052.outbound.protection.outlook.com [40.107.13.52]) by sourceware.org (Postfix) with ESMTPS id 722E13858C5E for ; Wed, 14 Jun 2023 05:54:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 722E13858C5E ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VXrsWHnYbI2EWQwYWD4ZOhu2CyT0XTey6ahgbcGmO1GlJybS5+PSRBB8MVT0VT074G/SwV7R7qkCPF/heJ8ZaZEsY4d35KMvIIHaWL2QK4t1VjSIf9TcUHM7D5ZvcNF+YwF0h/clC2liJxqpE925K5tb9jgP7FEc5WFLsc3OiqTpa+hPfneWc0Kb4o76yw0NDCjis454OXWyD8us3XVV5X+PjWWcAWlXqwJLQz8rsHJeZdy+G5ZmVuTHYymz1FHp3qrW9BVHV7mxIY5T+fESdBUZi0MO+q/RN0Z9ANrjfSSbibnormKGwna72SKy+4nrovOr7fQPnm9+HxiDIBucFw== 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=J7dubu0rGxxD4USD4XGsASTPRYHXhWYgY3zE1YwsIa4=; b=hoOyU8Fe8v17VNjjJs3DH2bkEbr/gFQRpI7d2xitEsT5zkRv1shdBt5/RszyMTDUoE4ovFhImzCD7Jsf5BAv2P2tZXAi4LUY/Q6xMChRYe0CiUuPXaccy4krgpM56/TON3yJFTkXReDnZ1vhHBPBcM4MNTja/1QX5H6cAlLzbEPFMDJUeO+752oAJ/tOxTyUL3OCwUioKKM6QFR2FDKG2grrzbtKxql62277nYHIjozMPxF3eg4WejxCdgcPG7nnSVFHhjE6vKFAILKW1OMWonAnewXreGQbVkTpSIx85PUqTbPANujsQOKYPjIcwQtfd2QfQPY7WhUo7K79+SZ/RQ== 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 VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) by GVXPR04MB9902.eurprd04.prod.outlook.com (2603:10a6:150:116::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.44; Wed, 14 Jun 2023 05:54:38 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::e442:306f:7711:e24c]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::e442:306f:7711:e24c%5]) with mapi id 15.20.6455.039; Wed, 14 Jun 2023 05:54:37 +0000 Message-ID: <1901e956-dc34-cc03-0419-8d4338174384@suse.com> Date: Wed, 14 Jun 2023 07:54:35 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: "gcc-patches@gcc.gnu.org" Cc: Kirill Yukhin , Hongtao Liu Subject: [PATCH] x86/AVX512: use VMOVDDUP for broadcast to V2DF X-ClientProxiedBy: FR0P281CA0180.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b4::10) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|GVXPR04MB9902:EE_ X-MS-Office365-Filtering-Correlation-Id: 99176179-08b0-4567-17a5-08db6c9bd621 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zxXTz73L0bjBzpWcOzr+vgHT8zGlC5g0kdiZMrNu3oIchW1iahGAHN/pwQVNXuCfxJXK57B/xelW40Ve/jLuOvm1IPvpXjTrvTUqbgupZ+y0BqalN4zBxRGOJieOa9kN8klVXzhaPnXGHFsNqWq3v+pjWc9ScqiToaBnnJYzbqqOqb1WnZwAVqePKI1OyyU+BFL7bzHdD2ewHRW6pun0c9OJ5yd/wwRdZ2xhnLm4nvjB+Rpv+ISH6fqqPQAcVQ1yzHLt1oj4WZi9FzVvCFNBE1QI/1Vu3wgLbZKFwfS+ryOHSFf+nc8IL9bxDC/Tkx3wJoG6RZMlqJkvCsFR7Y6AwJ0H+lGrM3XINeOKG57jGcHc38Xf5VdXSZnkxlUUiTW+Et7LT2g3B+lwrEsoYk7Fi2vlSHqA0AVwuTvqeqP9XViZmtW0goNA2O1f1UoNy0g8jkgh+jfbuhRTFyijy0odNcxq8e1+cmHDOMcU/iRIl5EBu8cSLTzeK0hmlB/+1ON063qiOEeiKQW3Ix3ZuWF/e9vyxwz6vrmg+bW4r+ziBTEiw3g3KwYitB+O5r3yvF9MkYKtPmiR7Bylbf2frfVL+oNRbWHuxDLS5qrvExc3FQESl7h+oRXZy47ZasTFLGtJ5bg+yNhtrwAgoy03NvO5hg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6560.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(366004)(136003)(396003)(346002)(39860400002)(376002)(451199021)(4326008)(6916009)(66476007)(316002)(31686004)(41300700001)(186003)(4744005)(54906003)(2906002)(5660300002)(66556008)(478600001)(8676002)(8936002)(66946007)(6486002)(6506007)(6512007)(26005)(36756003)(86362001)(2616005)(38100700002)(31696002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?1R6aHOkPl+Ujec4T/J4R1CVnfxzV?= =?utf-8?q?2uf4u1aFqizAThWaITlM4lq49eW0uU220Id9pyX54cI0IHefJlYhJegsvgWWmA6yx?= =?utf-8?q?1qJ8HQfE6cB6eBIOCW8oZv2XHJzVMh44bIrODfK4VyonWKQYTd7NY13QGfiPkxhSQ?= =?utf-8?q?OoD2KVbWe9lt3H9M3+gYjBmB/ty7OXw8DIHqT274wHdIVN/FcO+Q7zf5HPILovYdw?= =?utf-8?q?PXMwkn3KYrtwPC/fRgeaoNd5TIyC5mqDFwmKYhfms/OO0fPfAJRDsWy8nJint+rZW?= =?utf-8?q?oi0IUXdJMXetVUAsikmoL0MMJ0QYP8h5sFnZ6KAA6ehZTqgjgUaBa8g1cojB7rDru?= =?utf-8?q?E9v9K7BqqeGbaPPvPdgjJyNPXq9Gu6BrxSMCVny/zNUfsRy6EjaH8k4cfRWZkBDWV?= =?utf-8?q?t8LxsJfMO/n/kGxA6x8smK/kjNePUYk8saAjkVBoBJ7xyo6EYZsHjTioAaMKAbFmb?= =?utf-8?q?DFPkLXFdLufhseLNXvFFg1wiSj093jTjHebmWYmuQkJzoeeuPsytok7Lr3/jIRWcI?= =?utf-8?q?rqHIc5swxjKzJkRsOTgORe6yxMWxbGqoEYgF228A90EopCS6Zv0DYemIhM6Gfxzk+?= =?utf-8?q?R6240tPn9c00Nt6LN+qrEShME5RAEziGVl8HVqYyEf410ihrFzdsGx1o5Acq55hvs?= =?utf-8?q?ykFdBH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orOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99176179-08b0-4567-17a5-08db6c9bd621 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2023 05:54:37.3497 (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: 5yN3yKgmJrIMP8IApEuwZc+NsIeY4EeEW3e6pG5mO5X7BuG067IZHBHJu/uWwqbGCEfbu5ImvaaZ4qD2jYB3FQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB9902 X-Spam-Status: No, score=-3027.7 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jan Beulich via Gcc-patches From: Jan Beulich Reply-To: Jan Beulich Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768656343519342620?= X-GMAIL-MSGID: =?utf-8?q?1768656343519342620?= Like is already the case for the AVX/AVX2 form, VMOVDDUP - acting on double precision floating values - is more appropriate to use here, and it can also result in shorter insn encodings when source is memory or %xmm0...%xmm7, and no masking is applied (in allowing a 2-byte VEX prefix then instead of a 3-byte one). gcc/ * config/i386/sse.md (_vec_dup): Use vmovddup. --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -25724,9 +25724,9 @@ "TARGET_AVX512F" { /* There is no DF broadcast (in AVX-512*) to 128b register. - Mimic it with integer variant. */ + Mimic it with vmovddup, just like vec_dupv2df does. */ if (mode == V2DFmode) - return "vpbroadcastq\t{%1, %0|%0, %q1}"; + return "vmovddup\t{%1, %0|%0, %q1}"; return "vbroadcast\t{%1, %0|%0, %1}"; }