sse.md (round<mode>2_sfix): New expander.
authorUros Bizjak <uros@gcc.gnu.org>
Mon, 14 Nov 2011 19:36:33 +0000 (20:36 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 14 Nov 2011 19:36:33 +0000 (20:36 +0100)
commiteab880cf621b82e4f38aed74b58d2bd76f89c46a
tree398a2f2896c360ca8b4a7aef191b1fe692beb2bf
parent2841f85e9c51a9ef0a81e23b57aedf76ad39621e
sse.md (round<mode>2_sfix): New expander.

* config/i386/sse.md (round<mode>2_sfix): New expander.
(round<mode>2_vec_pack_sfix): Ditto.
(<sse4_1>_round<ssemodesuffix>_sfix<avxsizesuffix>): Ditto.
(<sse4_1>_round<ssemodesuffix>_vec_pack_sfix<avxsizesuffix>): Ditto.
* config/i386/builtin-types.def (V4SI_FTYPE_V4SF_ROUND,
V8SI_FTYPE_V8SF_ROUND, V4SI_FTYPE_V2DF_V2DF_ROUND,
V8SI_FTYPE_V4DF_V4DF_ROUND): New builtin types.
* config/i386/i386.c (ix86_builtins): Add
IX86_BUILTIN_{FLOORPD,CEILPD,ROUNDPD_AZ}_VEC_PACK_SFIX{,256} and
IX86_BUILTIN_{FLOORPS,CEILPS,ROUNDPS_AZ}_SFIX{,256} defines.
(bdesc_args): Add __builtin_ia32_{floorpd,ceilpd}_vec_pack_sfix{,256},
__builtin_ia32_roundpd_az_vec_pack_sfix{,256},
__builtin_ia32_{floorps,ceilps}_sfix{,256}and
__builtin_ia32_roundps_az_sfix{,256} descriptions.
(ix86_expand_sse_round_vec_pack_sfix): New.
(ix86_expand_args_builtin): Handle V4SI_FTYPE_V4SF_ROUND,
V8SI_FTYPE_V8SF_ROUND, V4SI_FTYPE_V2DF_V2DF_ROUND and
V8SI_FTYPE_V4DF_V4DF_ROUND types.  Check last argument of
CODE_FOR_sse4_1_roundpd_vec_pack_sfix, CODE_FOR_sse4_1_roundps_sfix,
CODE_FOR_avx_roundpd_vec_pack_sfix256 and CODE_FOR_avx_roundps_sfix256.
(ix86_builtin_vectorized_function): Handle
BUILT_IN_{I,L,LL}FLOOR{,F}, BUILT_IN_{I,L,LL}CEIL{,F} and
BUILT_IN_{I,L,LL}ROUND{,F}

testsuite/ChangeLog:

* gcc.target/i386/sse4_1-floor-sfix-vec.c: New test.
* gcc.target/i386/sse4_1-floorf-sfix-vec.c: Ditto.
* gcc.target/i386/avx-floor-sfix-vec.c: Ditto.
* gcc.target/i386/avx-floorf-sfix-vec.c: Ditto.
* gcc.target/i386/sse4_1-ceil-sfix-vec.c: Ditto.
* gcc.target/i386/sse4_1-ceilf-sfix-vec.c: Ditto.
* gcc.target/i386/avx-ceil-sfix-vec.c: Ditto.
* gcc.target/i386/avx-ceilf-sfix-vec.c: Ditto.
* gcc.target/i386/sse4_1-round-sfix-vec.c: Ditto.
* gcc.target/i386/sse4_1-roundf-sfix-vec.c: Ditto.
* gcc.target/i386/avx-round-sfix-vec.c: Ditto.
* gcc.target/i386/avx-roundf-sfix-vec.c: Ditto.

From-SVN: r181361
17 files changed:
gcc/ChangeLog
gcc/config/i386/i386-builtin-types.def
gcc/config/i386/i386.c
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/avx-ceil-sfix-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-ceilf-sfix-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-floor-sfix-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-floorf-sfix-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-round-sfix-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-roundf-sfix-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-ceil-sfix-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-ceilf-sfix-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-floor-sfix-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-round-sfix-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-roundf-sfix-vec.c [new file with mode: 0644]