https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101639
--- Comment #31 from Richard Biener <rguenth at gcc dot gnu.org> ---
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 2a56a12ed96..49f56dfaf41 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -4026,8 +4026,11 @@
(match_operand:SI 2 "const_int_operand")]
"TARGET_AVX512F"
{
- ix86_expand_setcc (operands[0], EQ,
- operands[1], CONSTM1_RTX (<MODE>mode));
+ ix86_expand_setcc (operands[0], EQ, operands[1],
+ <MODE>mode == QImode && UINTVAL (operands[2]) < 8
+ ? gen_int_mode ((1u << UINTVAL (operands[2])) - 1,
+ <MODE>mode)
+ : CONSTM1_RTX (<MODE>mode));
DONE;
})
fixes the AND execute fails for me. It's odd that gen_int_mode produces
non-'-1' for HImode 0xffff and that fails to recog. Thus the special
casing, the equality check works for the small QImode cases it seems.