This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH i386 AVX512] [52.1/n] Add vec2mask and mask2vec insn patterns.
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: Richard Henderson <rth at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 25 Sep 2014 20:02:11 +0200
- Subject: Re: [PATCH i386 AVX512] [52.1/n] Add vec2mask and mask2vec insn patterns.
- Authentication-results: sourceware.org; auth=none
- References: <20140924085420 dot GB18703 at msticlxl57 dot ims dot intel dot com> <CAFULd4bXxzoGMn7LVD=0ru3DR4Xim6kNCjKhBv5EebZsnQ5=wA at mail dot gmail dot com> <20140925093735 dot GA60820 at msticlxl57 dot ims dot intel dot com>
On Thu, Sep 25, 2014 at 11:42 AM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> Hello,
> As suggested, this is splitted out part of [52/n] patch,
> which introduces new vec2mask and mask2vec insn patterns.
>
> As suggested, I've got rid off use of UNSPEC_CVTINT2MASK
> unspec. Unfortunatelly, only partially.
> I suppose, that vec2mask generic RTX will be too complex:
> get most significant bit of each vec elt & compare it
> with zero setting destination mask register accordingly.
> If this approach is preferrable: I ready to do that.
No, we won't benefit anything from overly-complex patterns. Combine is
not _that_ smart.
> Testing in progress.
> Is it ok for trunk if pass?
>
> gcc/
> * config/i386/predicates.md (define_predicate "constm1_operand"): New.
> * config/i386/sse.md
> (define_c_enum "unspec"): Add UNSPEC_CVTINT2MASK.
> (define_insn "<avx512>_cvt<ssemodesuffix>2mask<VI12_AVX512VL:mode>"): New.
> (define_insn "<avx512>_cvt<ssemodesuffix>2mask<VI48_AVX512VL:mode>"): Ditto.
> (define_expand "<avx512>_cvtmask2<ssemodesuffix><VI12_AVX512VL:mode>"): Ditto.
> (define_insn "*<avx512>_cvtmask2<ssemodesuffix><VI12_AVX512VL:mode>"): Ditto.
> (define_expand "<avx512>_cvtmask2<ssemodesuffix><VI48_AVX512VL:mode>"): Ditto.
> (define_insn "*<avx512>_cvtmask2<ssemodesuffix><VI48_AVX512VL:mode>"): Ditto.
Looks reasonable.
Updated patch is OK for mainline.
Thanks,
Uros.