An invalid use of MSA_SUPPORTED_MODE_P is causing ICE on mips64el with -mmsa.
The detailed analysis is posted on bugzilla:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98491

The attached patch fixes this issue by handling the special case of
MSA_SUPPORTED_MODE_P explicitly.

Please keep me in CC since I'm not a subscriber.

And, I don't have GIT write access.
-- 
Xi Ruoyao <xry...@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 58e474e063d..8f80dcfada8 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -2381,7 +2381,7 @@ mips_symbol_insns (enum mips_symbol_type type, machine_mode mode)
 {
   /* MSA LD.* and ST.* cannot support loading symbols via an immediate
      operand.  */
-  if (MSA_SUPPORTED_MODE_P (mode))
+  if (mode != MAX_MACHINE_MODE && MSA_SUPPORTED_MODE_P (mode))
     return 0;
 
   return mips_symbol_insns_1 (type, mode) * (TARGET_MIPS16 ? 2 : 1);

Reply via email to