On Thu, Jul 7, 2022 at 6:41 PM Roger Sayle <ro...@nextmovesoftware.com> wrote:
>
>
> This patch fixes the current two FAILs of pr65105-5.c on x86 when
> compiled with -m32.  These (temporary) breakages were fallout from my
> patches to improve/upgrade (scalar) double word comparisons.
> On mainline, the i386 backend currently represents a critical comparison
> using (compare (and (not reg1) reg2) (const_int 0)) which isn't/wasn't
> recognized by the STV pass' convertible_comparison_p.  This simple STV
> patch adds support for this pattern (*testdi_not_doubleword) and
> generates the vector pandn and ptest instructions expected in the
> existing (failing) test case.
>
> This patch has been tested on x86_64-pc-linux-gnu with make bootstrap
> and make -k check, where with --target_board=unix{-m32} there are two
> fewer failures, and without, there are no new failures.
> Ok for mainline?
>
>
> 2022-07-07  Roger Sayle  <ro...@nextmovesoftware.com>
>
> gcc/ChangeLog
>         * config/i386/i386-features.cc (convert_compare): Add support
>         for *testdi_not_doubleword pattern (i.e. "(compare (and (not ...")
>         by generating a pandn followed by ptest.
>         (convertible_comparison_p): Recognize both *cmpdi_doubleword and
>         recent *testdi_not_doubleword comparison patterns.

OK, I think this is the correct approach to ANDN handling.

Thanks,
Uros.

>
> Thanks in advance,
> Roger
> --
>

Reply via email to