[PATCH i386 AVX512] [47/n] Add insert insn patterns.

Uros Bizjak ubizjak@gmail.com
Tue Sep 23 12:27:00 GMT 2014


On Tue, Sep 23, 2014 at 1:17 PM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> Hello,
> Patch in the bottom extends insert insn patterns.
> It also removes some exapnds.
>
> Bootstrapped.
> AVX-512* tests on top of patch-set all pass
> under simulator.
>
> Is it ok for trunk?
>
> gcc/
>         * config/i386/i386.c
>         (CODE_FOR_avx2_extracti128): Rename to ...
>         (CODE_FOR_avx_vextractf128v4di): this.
>         (CODE_FOR_avx2_inserti128): Rename to ...
>         (CODE_FOR_avx_vinsertf128v4di): this.
>         (ix86_expand_args_builtin): Handle CODE_FOR_avx_vinsertf128v4di,
>         CODE_FOR_avx_vextractf128v4di.
>         (ix86_expand_args_builtin): Handle CODE_FOR_avx512dq_vinsertf32x8_mask,
>         CODE_FOR_avx512dq_vinserti32x8_mask, CODE_FOR_avx512vl_vinsertv4df,
>         CODE_FOR_avx512vl_vinsertv4di, CODE_FOR_avx512vl_vinsertv8sf,
>         CODE_FOR_avx512vl_vinsertv8si.
>         * config/i386/sse.md
>         (define_expand
>         "<extract_type>_vinsert<shuffletype><extract_suf>_mask"): Use
>         AVX512_VEC.

Use AVX512_VEC mode iterator.

>         (define_insn
>         "<mask_codefor><extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>"):
>         Ditto.
>         (define_expand
>         "<extract_type_2>_vinsert<shuffletype><extract_suf_2>_mask"): Use
>         AVX512_VEC_2.

Use AVX512_VEC_2 mode iterator.

>         (define_insn "vec_set_lo_<mode><mask_name>"): New.
>         (define_insn "vec_set_hi_<mode><mask_name>"): Ditto.
>         (define_expand "avx512vl_vinsert<mode>"): Ditto.
>         (define_insn "avx2_vec_set_lo_v4di"): Delete.
>         (define_insn "avx2_vec_set_hi_v4di"): Ditto.
>         (define_insn "vec_set_lo_<mode><mask_name>"): Add masking.
>         (define_insn "vec_set_hi_<mode><mask_name>"): Ditto.
>         (define_insn "vec_set_lo_<mode><mask_name>"): Ditto.
>         (define_insn "vec_set_hi_<mode><mask_name>"): Ditto.
>         (define_expand "avx2_extracti128"): Delete.
>         (define_expand "avx2_inserti128"): Ditto.

OK. Nice to see some unneeded expanders go away!

Uros.



More information about the Gcc-patches mailing list