> OK.  Presumably once this is applied Richi is going to  look at the
> higher level issues in the vectorizer which inhibit creating the HI/QI
> vector popcounts?
>

Yes, this is the prerequisite to look at the vectorization issue. I'll
ask Hongtao to
help check-in this patch. Thanks for the approval.

Jeff Law <l...@redhat.com> 于2020年12月1日周二 上午12:17写道:

>
>
>
> On 11/11/20 6:54 PM, Hongyu Wang via Gcc-patches wrote:
> > Hi,
> >
> > According to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97770, x86
> > backend need popcount<mode>2 expander so __builtin_popcount could be
> > auto vectorized with AVX512BITALG/AVX512VPOPCNTDQ targets.
> >
> > For DImode the middle-end vectorizer could not generate expected code,
> > and for QI/HImode there is no corresponding IFN, xfails are added for
> > these tests.
> >
> > Bootstrap/regression test for x86 backend is OK.
> >
> > OK for master?
> >
> > gcc/ChangeLog
> >
> >     PR target/97770
> >     * gcc/config/i386/sse.md (popcount<mode>2): New expander
> >     for SI/DI vector modes.
> >     (popcount<mode>2): Likewise for QI/HI vector modes.
> >
> > gcc/testsuite/ChangeLog
> >
> >     PR target/97770
> >     * gcc.target/i386/avx512bitalg-pr97770-1.c: New test.
> >     * gcc.target/i386/avx512vpopcntdq-pr97770-1.c: Likewise.
> >     * gcc.target/i386/avx512vpopcntdq-pr97770-2.c: Likewise.
> >     * gcc.target/i386/avx512vpopcntdqvl-pr97770-1.c: Likewise.
> >
> >
> > 0001-Add-popcount-mode-expander-to-enable-popcount-auto-v.patch
> >
> OK.  Presumably once this is applied Richi is going to  look at the
> higher level issues in the vectorizer which inhibit creating the HI/QI
> vector popcounts?
>
> Jeff
>

Reply via email to