From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by sourceware.org (Postfix) with ESMTPS id CD31E385AC22 for ; Mon, 17 Oct 2022 22:24:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CD31E385AC22 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-x829.google.com with SMTP id a24so8657432qto.10 for ; Mon, 17 Oct 2022 15:24:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=N+gV+6PDkIYUJWIV7azoBiKphKrQW6Lizg4k2PYjIpA=; b=VWFW1WTd+1+MNlQ8mSBR0cbJaZJvBesd3WIcxjG/HDH/L2iyxdNLPwCAPs3VqfAVWp QRHwQGpLi9d1Wk1bhMHipeKZsfBV/nvcgnX0xQHJG7x637DNEecq/ugSoYWWqFTsd55S 6rsjxlpW9uhnB5Iv3auWiVK7l3o0i/wewlDl7KQ1rdo0dHIUlDxS7YJl81MwJnNHXBe3 FOhvXKd670Wjefy4cZG4Jqo7PIDwVJhmD5EMhHqiW3cMen7eOcaOXUx+KV/+H5JvFYPk 9qh4yMcE5a+pfGspgR7cF+k662tOqT3OuO7vf+P0ngmQ6G2P2cW5ZFsrzNjfadmA0M7S NXqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=N+gV+6PDkIYUJWIV7azoBiKphKrQW6Lizg4k2PYjIpA=; b=tkPJDnBF6ZbB4KgxrS9QzFMJpPrp8k/Lge46VvsPdtOx+qDuihLuNLGR/KpB80Z0N8 TB07aMSCGRMWTQ9PpK6qI5Ixddikv6jKYIZ9n5PQRwbg4ft3fOuHNu9Si9N/LPMHxhjn VNnhUr4L01IaxWj3bxTMfohb6f1P5/0puRlYi95DJvrqJTwqT9sV532tYnN93EAr2JAF pIBqOTOihkJdG52Lubma/g5jPVXWW80D/Z8T/hwaOvfNX25xugS4ixHQ/35wNL0+VdRw yIwMlYDmuonWJH16iJmxXt6rQYa39Iw2Xvp+PeUlJYJeQJT2w60EseLm8KBEVl3A5ErU RvMA== X-Gm-Message-State: ACrzQf3eoNAsyqw6V6/ZQGLeFmK6V/LOS9gT9+SZBXIXPaN0pLf+bomc +6XN34KfV28DRyionD0qZBoKi9EuFH1vyXhSH6Q= X-Google-Smtp-Source: AMsMyM79TfsDQ7OyPx+RwgUpM8ztLfbNS4FlNigtwYlQzc+GM2+Tkaqzv0jhePqpJEp2fH/qSZU6qc/Xdm+D+sszLjQ= X-Received: by 2002:ac8:6794:0:b0:39c:d44e:3682 with SMTP id b20-20020ac86794000000b0039cd44e3682mr10591400qtp.437.1666045448199; Mon, 17 Oct 2022 15:24:08 -0700 (PDT) MIME-Version: 1.0 References: <20221014091248.4920-1-haochen.jiang@intel.com> <20221014091248.4920-2-haochen.jiang@intel.com> <863655db-f202-477f-c638-00773c25886c@suse.com> In-Reply-To: From: "H.J. Lu" Date: Mon, 17 Oct 2022 15:23:32 -0700 Message-ID: Subject: Re: [PATCH 01/10] Support Intel AVX-IFMA To: Jan Beulich Cc: Haochen Jiang , wwwhhhyyy , binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3018.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Sat, Oct 15, 2022 at 11:39 PM Jan Beulich wrote: > > On 14.10.2022 20:10, H.J. Lu wrote: > > On Fri, Oct 14, 2022 at 2:52 AM Jan Beulich wrote: > >> > >> On 14.10.2022 11:12, Haochen Jiang wrote: > >>> From: wwwhhhyyy > >>> > >>> x86: Support Intel AVX-IFMA > >>> > >>> Intel AVX IFMA instructions are marked with CpuVEX_PREFIX, which is > >>> cleared by default. Without {vex} pseudo prefix, Intel IFMA instructions > >>> are encoded with EVEX prefix. {vex} pseudo prefix will turn on VEX > >>> encoding for Intel IFMA instructions. > >> > >> I firmly object to the proliferation of this mis-feature. As expressed > >> before for AVX-VNNI, as long as the user has disabled AVX512 (or > >> respective sub-features thereof), there should be no need to use {vex} in > >> the source code. There's also no reason at all to make the disassembler > >> print {vex} prefixes - we don't do so for any other insns (apart from > >> AVX-VNNI) where an ambiguity exists between their VEX and EVEX encodings > >> (when none of the EVEX-specific features is used). > > > > The {vex} prefix is used with AVX-IFMA instructions so that IFMA instructions > > without a prefix, which are generated by compilers or handwritten, will be > > always encoded with EVEX. > > So again: Why is this necessary when a programmer disabled AVX512? I fully > agree we need to pick the EVEX encoding by default if available, but I see > no reason whatsoever to insist on a {vex} prefix when the EVEX variant is > unavailable anyway. As you said back at the time for AVX-VNNI - this was a > design decision taken at Intel. Which is fine for a draft implementation. > But decisions for an open source project should be taken in the open, and > opinions of others should not simply be put off. > We can discuss how to initialize i.vec_encoding. But it is orthogonal to this patch. -- H.J.