From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 6631A3858D20 for ; Fri, 1 Sep 2023 11:41:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6631A3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693568517; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gQIQr7MLB4Jk+JptefeRQK8a5xK1ferZLtJQAhVJbuQ=; b=bJxR3BNIe5KiacxmH9LCawX2PqAWMIYv0syCO++aWIEJgFmIQS/Be3bO93c7nmBclLGDu5 fy1vYOFxKaFjKtRz5mLFEUNS9CDWVNxgQ5YAefiA9KBQNuEDN9T0rizdoikJECMqDDr9Jo rSc+IpD/kqHquILnTk+X2kQ3p9OsoTk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-265-afTwMKq7OyqeqgJAQL2gTQ-1; Fri, 01 Sep 2023 07:41:55 -0400 X-MC-Unique: afTwMKq7OyqeqgJAQL2gTQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 67C6480B709; Fri, 1 Sep 2023 11:41:55 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 12B551402C0A; Fri, 1 Sep 2023 11:41:54 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 381BfrrA1069486 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 1 Sep 2023 13:41:53 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 381BfrlP1068691; Fri, 1 Sep 2023 13:41:53 +0200 Date: Fri, 1 Sep 2023 13:41:52 +0200 From: Jakub Jelinek To: Hongyu Wang Cc: Hongyu Wang , gcc-patches@gcc.gnu.org, hongtao.liu@intel.com, hubicka@ucw.cz Subject: Re: [PATCH 08/13] [APX EGPR] Handle GPR16 only vector move insns Message-ID: Reply-To: Jakub Jelinek References: <20230831082024.314097-1-hongyu.wang@intel.com> <20230831082024.314097-9-hongyu.wang@intel.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Sep 01, 2023 at 07:34:16PM +0800, Hongyu Wang wrote: > > On Fri, Sep 01, 2023 at 05:07:53PM +0800, Hongyu Wang wrote: > > > Jakub Jelinek via Gcc-patches 于2023年8月31日周四 17:44写道: > > > > > > > > On Thu, Aug 31, 2023 at 04:20:19PM +0800, Hongyu Wang via Gcc-patches wrote: > > > > > For vector move insns like vmovdqa/vmovdqu, their evex counterparts > > > > > requrire explicit suffix 64/32/16/8. The usage of these instruction > > > > > are prohibited under AVX10_1 or AVX512F, so for AVX2+APX_F we select > > > > > vmovaps/vmovups for vector load/store insns that contains EGPR. > > > > > > > > Why not make it dependent on AVX512VL? > > > > I.e. if egpr_p && TARGET_AVX512VL, still use vmovdqu16 or vmovdqa16 > > > > and the like, and only if !evex_reg_p && egpr_p && !TARGET_AVX512VL > > > > fall back to what you're doing? > > > > > > I'm not sure if it is necessary, as on hardware there is no difference between > > > vmovdqu16/vmovups. If vmovups already has the capability to represent > > > EGPR why do we need to distinguish them under VL? > > > > On the Intel HW you're currently planning. > > Will that be the case for AMD as well? > > Some insns are documented to move float or double vectors while others > > integer vectors (of different element sizes). > > Or is vmovups with GPR32 at least encoded smaller than vmovdqu{16,32,64}? > > With GPR32 they have same encoding size. If we need to strictly follow > the meaning of mnemonics, > I will adjust as you suggested. Thanks. I think it is useful, even if just for those who try to read the assembler/disassembler. Of course, if there are cases where only one of those has to be used (say -mavx -mno-avx2 and 256-bit integer vector moves), there is no way around that and one just uses what is available. Jakub