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.html

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__");
+    }
+  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

Reply via email to