Hello,
This patch adds scatter support for vectorizer (for AVX512F
instructions). Please have a look. Is it ok for stage 1?

2015-03-05  Andrey Turetskiy  <andrey.turets...@intel.com>

        * config/i386/i386-builtin-types.def
        (VOID_PFLOAT_HI_V8DI_V16SF_INT): New.
        (VOID_PDOUBLE_QI_V16SI_V8DF_INT): Ditto.
        (VOID_PINT_HI_V8DI_V16SI_INT): Ditto.
        (VOID_PLONGLONG_QI_V16SI_V8DI_INT): Ditto.
        * config/i386/i386.c
        (ix86_builtins): Add IX86_BUILTIN_SCATTERALTSIV8DF,
        IX86_BUILTIN_SCATTERALTDIV16SF, IX86_BUILTIN_SCATTERALTSIV8DI,
        IX86_BUILTIN_SCATTERALTDIV16SI.
        (ix86_init_mmx_sse_builtins): Define __builtin_ia32_scatteraltsiv8df,
        __builtin_ia32_scatteraltdiv8sf, __builtin_ia32_scatteraltsiv8di,
        __builtin_ia32_scatteraltdiv8si.
        (ix86_expand_builtin): Handle IX86_BUILTIN_SCATTERALTSIV8DF,
        IX86_BUILTIN_SCATTERALTDIV16SF, IX86_BUILTIN_SCATTERALTSIV8DI,
        IX86_BUILTIN_SCATTERALTDIV16SI.
        (ix86_vectorize_builtin_scatter): New.
        (ix86_initialize_bounds):
        (TARGET_VECTORIZE_BUILTIN_SCATTER): Ditto.
        * doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_SCATTER): Ditto.
        * doc/tm.texi: Regenerate.
        * target.def: Add scatter builtin.
        * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Add new
        checkings for STMT_VINFO_SCATTER_P.
        (vect_check_gather): Rename to ...
        (vect_check_gather_scatter): this and enhance number of arguments.
        (vect_analyze_data_ref_access): Update comment and returnable values.
        (vect_analyze_data_refs): Add maybe_scatter and new checking for it
        accordingly.
        * tree-vectorizer.h (STMT_VINFO_SCATTER_P(S)): Define.
        (vect_check_gather): Rename to ...
        (vect_check_gather_scatter): this.
        * tree-vect-stmts.c: Ditto.
        (vectorizable_store): Add checkings for STMT_VINFO_SCATTER_P.

2015-03-05  Andrey Turetskiy  <andrey.turets...@intel.com>

testsuite/

        * gcc.target/i386/avx512f-scatter-1.c: New.
        * gcc.target/i386/avx512f-scatter-2.c: Ditto.
        * gcc.target/i386/avx512f-scatter-3.c: Ditto.
        * gcc.target/i386/avx512f-scatter-4.c: Ditto.
        * gcc.target/i386/avx512f-scatter-5.c: Ditto.

Thanks,
Petr

Attachment: scatter_patch
Description: Binary data

Reply via email to