On Wed, Jan 06, 2021 at 11:34:32AM +0800, Hongtao Liu via Gcc-patches wrote:
> > >>
> > >> Note there's a data dependency between them.  insn 7 feeds insn 9.  When
> > >> there's a data dependency, combiner patterns are usually the better
> > >> choice than peepholes.  I think you'd be looking to match something
> > >> likethis (from the . combine dump):
> > >>
> 
> Using combiner patterns, details is discussed in PR98348
> 
> Boottrapped and regtested on x86_64-linux-gnu{-m32,} for both GCC10 and trunk.
> gcc/ChangeLog:
> 
>         PR target/96891
>         PR target/98348
>         * config/i386/sse.md (VI_128_256): New mode iterator.
>         (*avx_cmp<mode>3_1, *avx_cmp<mode>3_2, *avx_cmp<mode>3_3,
>          *avx_cmp<mode>3_4, *avx2_eq<mode>3, *avx2_pcmp<mode>3_1,
>          *avx2_pcmp<mode>3_2, *avx2_gt<mode>3): New
>         define_insn_and_split to lower avx512 vector comparison to avx
>         version when dest is vector.
>         (*<avx512>_cmp<mode>3,*<avx512>_cmp<mode>3,*<avx512>_ucmp<mode>3):
>         define_insn_and_split for negating the comparison result.
>         * config/i386/predicates.md (float_vector_all_ones_operand):
>         New predicate.
>         * config/i386/i386-expand.c (ix86_expand_sse_movcc): Use
>         general NOT operator without UNSPEC_MASKOP.
> 
> gcc/testsuite/ChangeLog:
> 
>         PR target/96891
>         PR target/98348
>         * gcc.target/i386/avx512bw-pr96891-1.c: New test.
>         * gcc.target/i386/avx512f-pr96891-1.c: New test.
>         * gcc.target/i386/avx512f-pr96891-2.c: New test.
>         * gcc.target/i386/avx512f-pr96891-3.c: New test.
>         * g++.target/i386/avx512f-pr96891-1.C: New test.
>         * gcc.target/i386/bitwise_mask_op-3.c: Adjust testcase.

Ok for trunk.  I'd prefer not to backport it to GCC 10.

        Jakub

Reply via email to