OSDN Git Service

Add support for vpermil2p* in XOP.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Feb 2010 17:21:21 +0000 (17:21 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Feb 2010 17:21:21 +0000 (17:21 +0000)
commit46fd96857cab3f710e50875afdf734655baea483
tree7dafa8c2fb6442038a37f7b8db20c3dae60dfd77
parentdc6991f5f4d40d4f4089cc61f0285ceffa4586f5
Add support for vpermil2p* in XOP.

2010-02-13  Sebastian Pop  <sebastian.pop@amd.com>

* config/i386/i386-builtin-types.def
(V2DF_FTYPE_V2DF_V2DF_V2DI_INT): Declared.
(V4DF_FTYPE_V4DF_V4DF_V4DI_INT): Declared.
(V4SF_FTYPE_V4SF_V4SF_V4SI_INT): Declared.
(V8SF_FTYPE_V8SF_V8SF_V8SI_INT): Declared.
* config/i386/i386.c (enum ix86_builtins): Add IX86_BUILTIN_VPERMIL2PD,
IX86_BUILTIN_VPERMIL2PS, IX86_BUILTIN_VPERMIL2PD256, and
IX86_BUILTIN_VPERMIL2PS256.
(MULTI_ARG_4_DF2_DI_I): Defined.
(MULTI_ARG_4_DF2_DI_I1): Defined.
(MULTI_ARG_4_SF2_SI_I): Defined.
(MULTI_ARG_4_SF2_SI_I1): Defined.
(bdesc_multi_arg): Add __builtin_ia32_vpermil2pd,
__builtin_ia32_vpermil2ps, __builtin_ia32_vpermil2pd256, and
__builtin_ia32_vpermil2ps256.
(ix86_expand_multi_arg_builtin): Handle MULTI_ARG_4_DF2_DI_I,
MULTI_ARG_4_DF2_DI_I1, MULTI_ARG_4_SF2_SI_I, and
MULTI_ARG_4_SF2_SI_I1.  Handle builtins with 4 arguments.
(ix86_expand_args_builtin): Handle MULTI_ARG_4_DF2_DI_I,
MULTI_ARG_4_DF2_DI_I1, MULTI_ARG_4_SF2_SI_I, and
MULTI_ARG_4_SF2_SI_I1.  Handle CODE_FOR_xop_vpermil2v2df3,
CODE_FOR_xop_vpermil2v4sf3, CODE_FOR_xop_vpermil2v4df3, and
CODE_FOR_xop_vpermil2v8sf3.
* config/i386/i386.md (UNSPEC_VPERMIL2): Declared.
* config/i386/sse.md (xop_vpermil2<mode>3): New insn pattern.
* config/i386/xopintrin.h (_mm_permute2_pd): New.
(_mm256_permute2_pd): New.
(_mm_permute2_ps): New.
(_mm256_permute2_ps): New.

* gcc.target/i386/sse-14.c: Add tests for _mm_permute2_pd,
_mm256_permute2_pd, _mm_permute2_ps, and _mm256_permute2_ps.
* gcc.target/i386/xop-vpermil2pd-1.c: New.
* gcc.target/i386/xop-vpermil2pd-256-1.c: New.
* gcc.target/i386/xop-vpermil2ps-1.c: New.
* gcc.target/i386/xop-vpermil2ps-256-1.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156778 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/ChangeLog
gcc/config/i386/i386-builtin-types.def
gcc/config/i386/i386.c
gcc/config/i386/i386.md
gcc/config/i386/sse.md
gcc/config/i386/xopintrin.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/sse-14.c
gcc/testsuite/gcc.target/i386/xop-vpermil2pd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/xop-vpermil2pd-256-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/xop-vpermil2ps-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/xop-vpermil2ps-256-1.c [new file with mode: 0644]