From: Hongtao Liu <crazylht@gmail.com>
To: "Jiang, Haochen" <haochen.jiang@intel.com>
Cc: Richard Biener <richard.guenther@gmail.com>,
"Liu, Hongtao" <hongtao.liu@intel.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"ubizjak@gmail.com" <ubizjak@gmail.com>,
"burnus@net-b.de" <burnus@net-b.de>,
"sandra@codesourcery.com" <sandra@codesourcery.com>
Subject: Re: [PATCH] i386: Add AVX10.1 related macros
Date: Fri, 12 Jan 2024 11:28:45 +0800 [thread overview]
Message-ID: <CAMZc-bwzTjyMtEFtSVZ1GNPomaVPf93+dwZW71VsC_HmeEQ+2w@mail.gmail.com> (raw)
In-Reply-To: <SA1PR11MB5946A0839E1A784A5E491492EC6F2@SA1PR11MB5946.namprd11.prod.outlook.com>
On Fri, Jan 12, 2024 at 10:55 AM Jiang, Haochen <haochen.jiang@intel.com> wrote:
>
> > -----Original Message-----
> > From: Richard Biener <richard.guenther@gmail.com>
> > Sent: Thursday, January 11, 2024 4:19 PM
> > To: Liu, Hongtao <hongtao.liu@intel.com>
> > Cc: Jiang, Haochen <haochen.jiang@intel.com>; gcc-patches@gcc.gnu.org;
> > ubizjak@gmail.com; burnus@net-b.de; sandra@codesourcery.com
> > Subject: Re: [PATCH] i386: Add AVX10.1 related macros
> >
> > On Thu, Jan 11, 2024 at 2:16 AM Liu, Hongtao <hongtao.liu@intel.com>
> > wrote:
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Richard Biener <richard.guenther@gmail.com>
> > > > Sent: Wednesday, January 10, 2024 5:44 PM
> > > > To: Liu, Hongtao <hongtao.liu@intel.com>
> > > > Cc: Jiang, Haochen <haochen.jiang@intel.com>;
> > > > gcc-patches@gcc.gnu.org; ubizjak@gmail.com; burnus@net-b.de;
> > > > sandra@codesourcery.com
> > > > Subject: Re: [PATCH] i386: Add AVX10.1 related macros
> > > >
> > > > On Wed, Jan 10, 2024 at 9:01 AM Liu, Hongtao <hongtao.liu@intel.com>
> > > > wrote:
> > > > >
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Jiang, Haochen <haochen.jiang@intel.com>
> > > > > > Sent: Wednesday, January 10, 2024 3:35 PM
> > > > > > To: gcc-patches@gcc.gnu.org
> > > > > > Cc: Liu, Hongtao <hongtao.liu@intel.com>; ubizjak@gmail.com;
> > > > > > burnus@net- b.de; sandra@codesourcery.com
> > > > > > Subject: [PATCH] i386: Add AVX10.1 related macros
> > > > > >
> > > > > > Hi all,
> > > > > >
> > > > > > This patch aims to add AVX10.1 related macros for libgomp's request.
> > > > > > The request comes following:
> > > > > >
> > > > > > https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642025.ht
> > > > > > ml
> > > > > >
> > > > > > Ok for trunk?
> > > > > >
> > > > > > Thx,
> > > > > > Haochen
> > > > > >
> > > > > > gcc/ChangeLog:
> > > > > >
> > > > > > PR target/113288
> > > > > > * config/i386/i386-c.cc (ix86_target_macros_internal):
> > > > > > Add __AVX10_1__, __AVX10_1_256__ and __AVX10_1_512__.
> > > > > > ---
> > > > > > gcc/config/i386/i386-c.cc | 7 +++++++
> > > > > > 1 file changed, 7 insertions(+)
> > > > > >
> > > > > > diff --git a/gcc/config/i386/i386-c.cc
> > > > > > b/gcc/config/i386/i386-c.cc index c3ae984670b..366b560158a
> > > > > > 100644
> > > > > > --- a/gcc/config/i386/i386-c.cc
> > > > > > +++ b/gcc/config/i386/i386-c.cc
> > > > > > @@ -735,6 +735,13 @@ ix86_target_macros_internal
> > (HOST_WIDE_INT
> > > > > > isa_flag,
> > > > > > def_or_undef (parse_in, "__EVEX512__");
> > > > > > if (isa_flag2 & OPTION_MASK_ISA2_USER_MSR)
> > > > > > def_or_undef (parse_in, "__USER_MSR__");
> > > > > > + if (isa_flag2 & OPTION_MASK_ISA2_AVX10_1_256)
> > > > > > + {
> > > > > > + def_or_undef (parse_in, "__AVX10_1_256__");
> > > > > > + def_or_undef (parse_in, "__AVX10_1__");
> > > > > I think this is not needed, others LGTM.
> > > >
> > > > So __AVX10_1_256__ and __AVX10_1_512__ are redundant with
> > > > __AVX10_1__ and __EVEX512__, right?
> > > No, I mean __AVX10_1__ is redundant of __AVX10_1_256__ since -
> > mavx10.1 is just alias of -mavx10.1-256.
> > > We want explicit __AVX10_1_256__ and __AVX10_1_512__ and don't want
> > mix __EVEX512__ with AVX10(They are related in their internal
> > implementation, but we don't want the user to control the vector length of
> > avx10 with -mno-evex512, -mno-evex512 is supposed for the existing
> > AVX512).
>
> Let's keep both of them if we prefer __AVX10_1_256__ since I just found
> that LLVM got macro __AVX10_1__.
>
> https://github.com/llvm/llvm-project/pull/67278/files#diff-7435d50346a810555df89deb1f879b767ee985ace43fb3990de17fb23a47f004
>
> in file clang/lib/Basic/Targets/X86.cpp L774-777.
Ok.
>
> Thx,
> Haochen
>
> >
> > Ah, that makes sense.
> >
> > > > > > + }
> > > > > > + if (isa_flag2 & OPTION_MASK_ISA2_AVX10_1_512)
> > > > > > + def_or_undef (parse_in, "__AVX10_1_512__");
> > > > > > if (TARGET_IAMCU)
> > > > > > {
> > > > > > def_or_undef (parse_in, "__iamcu");
> > > > > > --
> > > > > > 2.31.1
> > > > >
--
BR,
Hongtao
prev parent reply other threads:[~2024-01-12 3:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 7:34 Haochen Jiang
2024-01-10 7:58 ` Liu, Hongtao
2024-01-10 9:43 ` Richard Biener
2024-01-11 1:16 ` Liu, Hongtao
2024-01-11 8:18 ` Richard Biener
2024-01-12 2:54 ` Jiang, Haochen
2024-01-12 3:28 ` Hongtao Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMZc-bwzTjyMtEFtSVZ1GNPomaVPf93+dwZW71VsC_HmeEQ+2w@mail.gmail.com \
--to=crazylht@gmail.com \
--cc=burnus@net-b.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=haochen.jiang@intel.com \
--cc=hongtao.liu@intel.com \
--cc=richard.guenther@gmail.com \
--cc=sandra@codesourcery.com \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).