AVX-512F: Add vectorizer support builtins
authorIlya Verbin <ilya.verbin@intel.com>
Wed, 25 May 2016 15:08:14 +0000 (15:08 +0000)
committerIlya Verbin <iverbin@gcc.gnu.org>
Wed, 25 May 2016 15:08:14 +0000 (15:08 +0000)
commitbf9a1a07adb0594b8060bbe23e2cde3475885fdc
tree03e1ffc0c53a6ac07871518f7f5c27a48b4b624a
parenta23faf7a4f172a09bfb095081491dff1225cbf52
AVX-512F: Add vectorizer support builtins

gcc/
* config/i386/i386-builtin-types.def: Add V16SI_FTYPE_V16SF,
V8DF_FTYPE_V8DF_ROUND, V16SF_FTYPE_V16SF_ROUND, V16SI_FTYPE_V16SF_ROUND.
* config/i386/i386.c (enum ix86_builtins): Add
IX86_BUILTIN_CVTPS2DQ512_MASK, IX86_BUILTIN_FLOORPS512,
IX86_BUILTIN_FLOORPD512, IX86_BUILTIN_CEILPS512, IX86_BUILTIN_CEILPD512,
IX86_BUILTIN_TRUNCPS512, IX86_BUILTIN_TRUNCPD512,
IX86_BUILTIN_CVTPS2DQ512, IX86_BUILTIN_VEC_PACK_SFIX512,
IX86_BUILTIN_FLOORPS_SFIX512, IX86_BUILTIN_CEILPS_SFIX512,
IX86_BUILTIN_ROUNDPS_AZ_SFIX512.
(builtin_description bdesc_args): Add __builtin_ia32_floorps512,
__builtin_ia32_ceilps512, __builtin_ia32_truncps512,
__builtin_ia32_floorpd512, __builtin_ia32_ceilpd512,
__builtin_ia32_truncpd512, __builtin_ia32_cvtps2dq512,
__builtin_ia32_vec_pack_sfix512, __builtin_ia32_roundps_az_sfix512,
__builtin_ia32_floorps_sfix512, __builtin_ia32_ceilps_sfix512.
Change IX86_BUILTIN_CVTPS2DQ512 to IX86_BUILTIN_CVTPS2DQ512_MASK for
__builtin_ia32_cvtps2dq512_mask.
(ix86_expand_args_builtin): Handle V8DF_FTYPE_V8DF_ROUND,
V16SF_FTYPE_V16SF_ROUND, V16SI_FTYPE_V16SF_ROUND, V16SI_FTYPE_V16SF.
(ix86_builtin_vectorized_function): Handle builtins mentioned above.
* config/i386/sse.md
(<mask_codefor>avx512f_fix_notruncv16sfv16si<mask_name><round_name>):
Rename to ...
(avx512f_fix_notruncv16sfv16si<mask_name><round_name>): ... this.
(<mask_codefor>avx512f_cvtpd2dq512<mask_name><round_name>): Rename
to ...
(avx512f_cvtpd2dq512<mask_name><round_name>): ... this.
(avx512f_vec_pack_sfix_v8df): New define_expand.
(avx512f_roundpd512): Rename to ...
(avx512f_round<castmode>512): ... this.  Change iterator.
(avx512f_roundps512_sfix): New define_expand.
(round<mode>2_sfix): Change iterator.
gcc/testsuite/
* gcc.target/i386/avx512f-ceil-vec-1.c: New test.
* gcc.target/i386/avx512f-ceil-vec-2.c: New test.
* gcc.target/i386/avx512f-ceilf-sfix-vec-1.c: New test.
* gcc.target/i386/avx512f-ceilf-sfix-vec-2.c: New test.
* gcc.target/i386/avx512f-ceilf-vec-1.c: New test.
* gcc.target/i386/avx512f-ceilf-vec-2.c: New test.
* gcc.target/i386/avx512f-floor-vec-1.c: New test.
* gcc.target/i386/avx512f-floor-vec-2.c: New test.
* gcc.target/i386/avx512f-floorf-sfix-vec-1.c: New test.
* gcc.target/i386/avx512f-floorf-sfix-vec-2.c: New test.
* gcc.target/i386/avx512f-floorf-vec-1.c: New test.
* gcc.target/i386/avx512f-floorf-vec-2.c: New test.
* gcc.target/i386/avx512f-rint-sfix-vec-1.c: New test.
* gcc.target/i386/avx512f-rint-sfix-vec-2.c: New test.
* gcc.target/i386/avx512f-rintf-sfix-vec-1.c: New test.
* gcc.target/i386/avx512f-rintf-sfix-vec-2.c: New test.
* gcc.target/i386/avx512f-round-sfix-vec-1.c: New test.
* gcc.target/i386/avx512f-round-sfix-vec-2.c: New test.
* gcc.target/i386/avx512f-roundf-sfix-vec-1.c: New test.
* gcc.target/i386/avx512f-roundf-sfix-vec-2.c: New test.
* gcc.target/i386/avx512f-trunc-vec-1.c: New test.
* gcc.target/i386/avx512f-trunc-vec-2.c: New test.
* gcc.target/i386/avx512f-truncf-vec-1.c: New test.
* gcc.target/i386/avx512f-truncf-vec-2.c: New test.

From-SVN: r236709
29 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/avx512f-ceil-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-floor-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-2.c [new file with mode: 0644]