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

--- Comment #32 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #31)
> 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.

With this the series plus the adjusted patterns bootstraps and regtests,
for the new x86 specific tests I see the following, I didn't yet look
close as to what happens.  I will now see if there's any cleanup
necessary on the vectorizer side and will post a likely final variant
of the leading series on Friday with the goal to push early next week
in case of no or positive feedback.

+FAIL: gcc.target/i386/pr101639_reduc_mask_di.c scan-assembler-times sete 1
+FAIL: gcc.target/i386/pr101639_reduc_mask_hi.c scan-assembler-times sete 1
+FAIL: gcc.target/i386/pr101639_reduc_mask_qi.c scan-assembler-times sete 1
+FAIL: gcc.target/i386/pr101639_reduc_mask_si.c scan-assembler-times sete 1
+FAIL: gcc.target/i386/pr101639_reduc_mask_vdi.c scan-assembler-times popcnt 1
+FAIL: gcc.target/i386/pr101639_reduc_mask_vdi.c scan-assembler-times vmovmskpd 
1
+FAIL: gcc.target/i386/pr101639_reduc_mask_vsi.c scan-assembler-times popcnt 1
+FAIL: gcc.target/i386/pr101639_reduc_mask_vsi.c scan-assembler-times vmovmskps 
1

Reply via email to