[Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512

2024-04-08 Thread liuhongt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

Hongtao Liu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Hongtao Liu  ---
.

[Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512

2024-01-11 Thread haochen.jiang at intel dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

--- Comment #6 from Haochen Jiang  ---
Fixed on trunk.

[Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512

2024-01-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

--- Comment #5 from GCC Commits  ---
The master branch has been updated by Haochen Jiang :

https://gcc.gnu.org/g:4ab847b354ee9e13e6052f78f49f575eae3abf3f

commit r14-7168-g4ab847b354ee9e13e6052f78f49f575eae3abf3f
Author: Haochen Jiang 
Date:   Wed Jan 10 10:20:37 2024 +0800

i386: Add AVX10.1 related macros

gcc/ChangeLog:

PR target/113288
* config/i386/i386-c.cc (ix86_target_macros_internal):
Add __AVX10_1__, __AVX10_1_256__ and __AVX10_1_512__.

[Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512

2024-01-09 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

--- Comment #4 from Tobias Burnus  ---
The(In reply to Haochen Jiang from comment #3)
> Adding them are quite straightforward.

I guess so. Note: this PR is about the #define in gcc/config/i386, only.

> But I am not quite sure how the whole
> libgomp patch works.

OpenMP has selectors which permits to choose different functions or OpenMap
directives. Several can be evaluated at compile time , some only at runtime.

example (syntax probably not completely right):
 ... match(implementation={arch(x86_64),isa(sse4)})

Here, it can be evaluated at compile time which is done via the function 

TARGET_OMP_DEVICE_KIND_ARCH_ISA

For some, runtime checks are more useful and I am also not sure whether
something like cpuid would make more sense here (in general and especially for
the run-time selector).

But that's a separate issue to this PR.

> Is the patch attempt to check whether it is a perfect match for each ISA
> detected from a hardware? If that is the case, we need them to be added.
> BTW, under this scenario, no need to add an if clause for macro __EVEX512__
> and __EVEX256__ in that patch since those two are not true ISAs.

Something like that. It is also more for completeness and consistency.

For OpenMP we just state:
https://gcc.gnu.org/onlinedocs/libgomp/OpenMP-Context-Selectors.html

which is rather generic for i386/x86_64. We cpuld do less, but the target hook
made it easy to support all of them... I don't think anyone will use
avx10.1-256 as isa context selector with OpenMP.

[Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512

2024-01-08 Thread haochen.jiang at intel dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

--- Comment #3 from Haochen Jiang  ---
Adding them are quite straightforward. But I am not quite sure how the whole
libgomp patch works.

Is the patch attempt to check whether it is a perfect match for each ISA
detected from a hardware? If that is the case, we need them to be added. BTW,
under this scenario, no need to add an if clause for macro __EVEX512__ and
__EVEX256__ in that patch since those two are not true ISAs.

[Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512

2024-01-08 Thread liuhongt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

Hongtao Liu  changed:

   What|Removed |Added

 CC||liuhongt at gcc dot gnu.org

--- Comment #2 from Hongtao Liu  ---
I think we can add #define for -mavx10.1-256 and -mavx10.1-512.

[Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512

2024-01-08 Thread haochen.jiang at intel dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

--- Comment #1 from Haochen Jiang  ---
(In reply to Tobias Burnus from comment #0)
> As noted in
> https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642025.html
> 
> There is not #define for -mavx10.1-256 and -mavx10.1-512
> 
> By contrast, there is one for, e.g.,
> 
> __AVX10_512BIT__ and "avx10-max-512bit"
> __AVX10_1__ and "avx10.1"

I think both of these two are also not on current trunk, they are the previous
design but get obsoleted at the end. Let me see if we need something like that.

> __AMX_FP16__ and -mamx-fp16
> etc.