https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121227
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-*-*
Keywords| |ice-on-valid-code
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
In particular the target prefers V32QImode without AVX512BW but
ix86_vector_mode_supported_p happily accepts V64QImode. The following
reproduces the issue, but the order of queries can trigger this without
a patch.
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index 4682db85ce4..940ab0b32d8 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -25495,7 +25495,7 @@ ix86_preferred_simd_mode (scalar_mode mode)
switch (mode)
{
case E_QImode:
- if (TARGET_AVX512BW && !TARGET_PREFER_AVX256)
+ if (/*TARGET_AVX512BW &&*/ !TARGET_PREFER_AVX256)
return V64QImode;
else if (TARGET_AVX && !TARGET_PREFER_AVX128)
return V32QImode;