https://gcc.gnu.org/g:0602c017c28c6a41b7443e28b571181fcf18ec59

commit 0602c017c28c6a41b7443e28b571181fcf18ec59
Author: Andrew Stubbs <[email protected]>
Date:   Tue Nov 10 09:50:00 2026 +0000

    Revert "amdgcn: Add -msimt option and multilib"
    
    This reverts commit 1e5d4dcfa82412f805b4e0c31520b579081c5bbd.

Diff:
---
 gcc/config/gcn/gcn.cc                  | 34 ----------------------------------
 gcc/config/gcn/gcn.h                   |  2 --
 gcc/config/gcn/gcn.opt                 |  4 ----
 gcc/config/gcn/mkoffload.cc            | 13 -------------
 gcc/config/gcn/t-gcn-hsa               |  4 ++--
 libgcc/config/gcn/amdgcn_veclib.h      |  4 ----
 libgcc/config/gcn/lib2-vec_divmod-di.c |  4 ----
 libgcc/config/gcn/lib2-vec_divmod-hi.c |  4 ----
 libgcc/config/gcn/lib2-vec_divmod-qi.c |  4 ----
 libgcc/config/gcn/lib2-vec_divmod.c    |  4 ----
 10 files changed, 2 insertions(+), 75 deletions(-)

diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index 76696989e0ec..ac90e3006ec7 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -354,34 +354,6 @@ gcn_parse_amdgpu_hsa_kernel_attribute (struct 
gcn_kernel_args *args,
     {
       error ("too many arguments passed in sgpr registers");
     }
-
-  /* Ensure that the SIMD vs SIMT modes are in agreement.
-     Ideally, this would sit in gcn_option_override, but that runs before
-     LTO stream-in loads the values from the host compiler.   */
-  static bool gpu_mode_warned = false;
-  if (flag_openmp && !gpu_mode_warned)
-    switch (param_offload_gpu_mode)
-      {
-      case OFFLOAD_GPU_MODE_AUTO:
-      case OFFLOAD_GPU_MODE_SIMD:
-       if (flag_simt_mode)
-         {
-           gpu_mode_warned = 1;
-           error ("%<--param=offload-gpu-mode=auto|simd%> is incompatible "
-                  "with %<-msimt%>");
-         }
-       break;
-      case OFFLOAD_GPU_MODE_SIMT_DIRECTED:
-      case OFFLOAD_GPU_MODE_SIMT:
-       if (!flag_simt_mode)
-         {
-           gpu_mode_warned = 1;
-           error ("%<--param=offload-gpu-mode=simt-directed|simt%> is "
-                  "incompatible with %<-mno-simt%>");
-         }
-       break;
-      }
-
   return err;
 }
 
@@ -5369,9 +5341,6 @@ gcn_vectorize_vec_perm_const (machine_mode vmode, 
machine_mode op_mode,
 static bool
 gcn_vector_mode_supported_p (machine_mode mode)
 {
-  if (flag_simt_mode)
-    return false;
-
   return (mode == V64QImode || mode == V64HImode
          || mode == V64SImode || mode == V64DImode
          || mode == V64SFmode || mode == V64DFmode
@@ -5405,9 +5374,6 @@ gcn_vector_mode_supported_p (machine_mode mode)
 static machine_mode
 gcn_vectorize_preferred_simd_mode (scalar_mode mode)
 {
-  if (flag_simt_mode)
-    return word_mode;
-
   bool v32;
   if (gcn_preferred_vectorization_factor == 32)
     v32 = true;
diff --git a/gcc/config/gcn/gcn.h b/gcc/config/gcn/gcn.h
index a802fe1de48f..431158beb911 100644
--- a/gcc/config/gcn/gcn.h
+++ b/gcc/config/gcn/gcn.h
@@ -51,8 +51,6 @@ extern const struct gcn_device_def {
        builtin_define ("__RDNA3__");                                          \
       else                                                                     
\
        gcc_unreachable ();                                                    \
-      if (flag_simt_mode)                                                      
\
-        builtin_define ("__SIMT__");                                           
\
       char *name = (char *)xmalloc (strlen (gcn_devices[gcn_arch].name) + 5);  
\
       sprintf (name, "__%s__", gcn_devices[gcn_arch].name);                    
\
       char *p;                                                                 
\
diff --git a/gcc/config/gcn/gcn.opt b/gcc/config/gcn/gcn.opt
index b00adfbc2e1f..acc61e4847be 100644
--- a/gcc/config/gcn/gcn.opt
+++ b/gcc/config/gcn/gcn.opt
@@ -119,7 +119,3 @@ Target Var(fake_exceptions) Init(0) Undocumented
 ; 'sorry, unimplemented: exception handling not supported' is skipped, code
 ; generation proceeds, and instead, exception handling constructs 'abort' at
 ; run time.  (..., or don't, if they're in dead code.)
-
-msimt
-Target Var(flag_simt_mode) Init(0) Undocumented
-Switch from SIMD mode to SIMT mode.
diff --git a/gcc/config/gcn/mkoffload.cc b/gcc/config/gcn/mkoffload.cc
index 30e1b44635c1..62792a8709a9 100644
--- a/gcc/config/gcn/mkoffload.cc
+++ b/gcc/config/gcn/mkoffload.cc
@@ -1060,7 +1060,6 @@ main (int argc, char **argv)
   bool fopenacc = false;
   bool fPIC = false;
   bool fpic = false;
-  bool simt = false;
   for (int i = 1; i < argc; i++)
     {
 #define STR "-foffload-abi="
@@ -1132,13 +1131,6 @@ main (int argc, char **argv)
        }
     }
 
-  /* Add -msimt when in SIMT mode, but that option doesn't get passed directly
-     to mkoffload, so let's check the environment.  */
-  const char *collect_gcc_options = getenv ("COLLECT_GCC_OPTIONS");
-  if (collect_gcc_options
-      && strstr (collect_gcc_options, "--param=offload-gpu-mode=simt"))
-    simt = true;
-
   check_for_missing_lib (elf_arch, default_arch);
 
   if (!(fopenacc ^ fopenmp))
@@ -1220,8 +1212,6 @@ main (int argc, char **argv)
   /* The host code may contain exception handling constructs.
      Handle these as good as we can.  */
   obstack_ptr_grow (&cc_argv_obstack, "-mfake-exceptions");
-  if (simt)
-    obstack_ptr_grow (&cc_argv_obstack, "-msimt");
 
   for (int ix = 1; ix != argc; ix++)
     {
@@ -1354,9 +1344,6 @@ main (int argc, char **argv)
                 || startswith (argv[i], "-march"))
          obstack_ptr_grow (&ld_argv_obstack, argv[i]);
 
-      if (simt)
-       obstack_ptr_grow (&ld_argv_obstack, "-msimt");
-
       obstack_ptr_grow (&cc_argv_obstack, "-dumpdir");
       obstack_ptr_grow (&cc_argv_obstack, "");
       obstack_ptr_grow (&cc_argv_obstack, "-dumpbase");
diff --git a/gcc/config/gcn/t-gcn-hsa b/gcc/config/gcn/t-gcn-hsa
index e0ee5a081eac..eaa54794aa95 100644
--- a/gcc/config/gcn/t-gcn-hsa
+++ b/gcc/config/gcn/t-gcn-hsa
@@ -42,8 +42,8 @@ empty :=
 space := $(empty) $(empty)
 comma := ,
 multilib_list := $(subst $(comma),$(space),$(TM_MULTILIB_CONFIG)) 
-MULTILIB_OPTIONS = $(subst $(space),/,$(addprefix march=,$(multilib_list))) 
msimt
-MULTILIB_DIRNAMES = $(multilib_list) simt
+MULTILIB_OPTIONS = $(subst $(space),/,$(addprefix march=,$(multilib_list)))
+MULTILIB_DIRNAMES = $(multilib_list)
 
 gcn-tree.o: $(srcdir)/config/gcn/gcn-tree.cc
        $(COMPILE) $<
diff --git a/libgcc/config/gcn/amdgcn_veclib.h 
b/libgcc/config/gcn/amdgcn_veclib.h
index 3f9bec2d47dc..6d9e25b09ce6 100644
--- a/libgcc/config/gcn/amdgcn_veclib.h
+++ b/libgcc/config/gcn/amdgcn_veclib.h
@@ -23,8 +23,6 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef __SIMT__
-
 typedef union {
   v2sf t_v2sf;
   v4sf t_v4sf;
@@ -323,5 +321,3 @@ FUN##v##COUNT##SUFFIX (v##COUNT##TYPE __arg1, 
v##COUNT##TYPE __arg2) \
   DEF_VARIANT (FUN, SUFFIX, OTYPE, TYPE, 16) \
   DEF_VARIANT (FUN, SUFFIX, OTYPE, TYPE, 32) \
   DEF_VARIANT (FUN, SUFFIX, OTYPE, TYPE, 64)
-
-#endif
diff --git a/libgcc/config/gcn/lib2-vec_divmod-di.c 
b/libgcc/config/gcn/lib2-vec_divmod-di.c
index accb2a022227..67bc2bc79558 100644
--- a/libgcc/config/gcn/lib2-vec_divmod-di.c
+++ b/libgcc/config/gcn/lib2-vec_divmod-di.c
@@ -20,8 +20,6 @@ a copy of the GCC Runtime Library Exception along with this 
program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-#ifndef __SIMT__
-
 #include "lib2-gcn.h"
 
 /* 64-bit V64SI divide and modulo as used in gcn.
@@ -118,5 +116,3 @@ DEF_VARIANTS_B (__divmod, di4, uti, di)
 DEF_VARIANTS (__udiv, di3, udi)
 DEF_VARIANTS (__umod, di3, udi)
 DEF_VARIANTS_B (__udivmod, di4, uti, udi)
-
-#endif
diff --git a/libgcc/config/gcn/lib2-vec_divmod-hi.c 
b/libgcc/config/gcn/lib2-vec_divmod-hi.c
index b1ab7fc41cb3..0fe0822a3fd6 100644
--- a/libgcc/config/gcn/lib2-vec_divmod-hi.c
+++ b/libgcc/config/gcn/lib2-vec_divmod-hi.c
@@ -20,8 +20,6 @@ a copy of the GCC Runtime Library Exception along with this 
program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-#ifndef __SIMT__
-
 #include "lib2-gcn.h"
 
 /* 16-bit V64HI divide and modulo as used in gcn.
@@ -118,5 +116,3 @@ DEF_VARIANTS_B (__divmod, hi4, udi, hi)
 DEF_VARIANTS (__udiv, hi3, uhi)
 DEF_VARIANTS (__umod, hi3, uhi)
 DEF_VARIANTS_B (__udivmod, hi4, udi, uhi)
-
-#endif
diff --git a/libgcc/config/gcn/lib2-vec_divmod-qi.c 
b/libgcc/config/gcn/lib2-vec_divmod-qi.c
index 95edeaa8f6f3..cefbbd0b116d 100644
--- a/libgcc/config/gcn/lib2-vec_divmod-qi.c
+++ b/libgcc/config/gcn/lib2-vec_divmod-qi.c
@@ -20,8 +20,6 @@ a copy of the GCC Runtime Library Exception along with this 
program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-#ifndef __SIMT__
-
 #include "lib2-gcn.h"
 
 /* 8-bit V64QI divide and modulo as used in gcn.
@@ -118,5 +116,3 @@ DEF_VARIANTS_B (__divmod, qi4, udi, qi)
 DEF_VARIANTS (__udiv, qi3, uqi)
 DEF_VARIANTS (__umod, qi3, uqi)
 DEF_VARIANTS_B (__udivmod, qi4, udi, uqi)
-
-#endif
diff --git a/libgcc/config/gcn/lib2-vec_divmod.c 
b/libgcc/config/gcn/lib2-vec_divmod.c
index 7978d84467fa..28ccb1f5e18c 100644
--- a/libgcc/config/gcn/lib2-vec_divmod.c
+++ b/libgcc/config/gcn/lib2-vec_divmod.c
@@ -20,8 +20,6 @@ a copy of the GCC Runtime Library Exception along with this 
program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-#ifndef __SIMT__
-
 #include "lib2-gcn.h"
 
 /* 32-bit V64SI divide and modulo as used in gcn.
@@ -118,5 +116,3 @@ DEF_VARIANTS_B (__divmod, si4, udi, si)
 DEF_VARIANTS (__udiv, si3, usi)
 DEF_VARIANTS (__umod, si3, usi)
 DEF_VARIANTS_B (__udivmod, si4, udi, usi)
-
-#endif

Reply via email to