avx512fintrin.h (_mm_add_round_sd): New.
authorAlexander Ivchenko <alexander.ivchenko@intel.com>
Tue, 31 Dec 2013 12:13:49 +0000 (12:13 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Tue, 31 Dec 2013 12:13:49 +0000 (12:13 +0000)
commit075691af6b69963626c2e242661f4d39131d6b25
tree8140e3b1d8a8c8dae84e044a60dbb110e8e89f70
parentcf3e5a89aecd15ead7177517b7f3b6e3c4c66645
avx512fintrin.h (_mm_add_round_sd): New.

gcc/
* config/i386/avx512fintrin.h (_mm_add_round_sd): New.
(_mm_add_round_sd): Ditto.
(_mm_add_round_ss): Ditto.
(_mm_sub_round_sd): Ditto.
(_mm_sub_round_ss): Ditto.
(_mm_rcp14_sd): Ditto.
(_mm_rcp14_ss): Ditto.
(_mm_sqrt_round_sd): Ditto.
(_mm_sqrt_round_ss): Ditto.
(_mm_mul_round_sd): Ditto.
(_mm_mul_round_ss): Ditto.
(_mm_div_round_sd): Ditto.
(_mm_div_round_ss): Ditto.
(_mm_scalef_round_sd): Ditto.
(_mm_scalef_round_ss): Ditto.
(_mm_scalef_round_sd): Ditto.
(_mm_scalef_round_ss): Ditto.
(_mm_cvt_roundsd_ss): Ditto.
(_mm_cvt_roundsd_sd): Ditto.
(_mm_getexp_round_ss): Ditto.
(_mm_getexp_round_sd): Ditto.
(_mm_getmant_round_sd): Ditto.
(_mm_getmant_round_ss): Ditto.
(_mm_roundscale_round_ss): Ditto.
(_mm_roundscale_round_sd): Ditto.
(_mm_max_round_sd): Ditto.
(_mm_max_round_ss): Ditto.
(_mm_min_round_sd): Ditto.
(_mm_min_round_ss): Ditto.
(_mm_fmadd_round_sd): Ditto.
(_mm_fmadd_round_ss): Ditto.
(_mm_fmsub_round_sd): Ditto.
(_mm_fmsub_round_ss): Ditto.
(_mm_fnmadd_round_sd): Ditto.
(_mm_fnmadd_round_ss): Ditto.
(_mm_fnmsub_round_sd): Ditto.
(_mm_fnmsub_round_ss): Ditto.
(_mm_scalef_sd): Ditto.
(_mm_scalef_ss): Ditto.
(_mm_getexp_ss): Ditto.
(_mm_getexp_sd): Ditto.
(_mm_getmant_sd): Ditto.
(_mm_getmant_ss): Ditto.
(_mm_roundscale_ss): Ditto.
(_mm_roundscale_sd): Ditto.
* config/i386/i386-builtin-types.def: New types to support
new built-ins: <V2DF, V2DF, V2DF, INT, INT>, <V4SF, V4SF, V4SF, INT, INT>,
<(V4SF, V4SF, V2DF, INT>, <V2DF, V2DF, V4SF, INT>,
<V4SF, V4SF, V4SF, V4SF, IN>.
* config/i386/i386.c (enum ix86_builtins): Add IX86_BUILTIN_ADDSD_ROUND,
IX86_BUILTIN_ADDSS_ROUND, IX86_BUILTIN_CVTSD2SS_ROUND,
IX86_BUILTIN_CVTSS2SD_ROUND, IX86_BUILTIN_DIVSD_ROUND,
IX86_BUILTIN_GETEXPSD128, IX86_BUILTIN_DIVSS_ROUND,
IX86_BUILTIN_GETEXPSS128, IX86_BUILTIN_GETMANTSD128,
IX86_BUILTIN_GETMANTSS128, IX86_BUILTIN_MAXSD_ROUND,
IX86_BUILTIN_MAXSS_ROUND, IX86_BUILTIN_MINSD_ROUND,
IX86_BUILTIN_MINSS_ROUND, IX86_BUILTIN_MULSD_ROUND,
IX86_BUILTIN_MULSS_ROUND, IX86_BUILTIN_RCP14SD,
IX86_BUILTIN_RCP14SS, IX86_BUILTIN_RNDSCALESD,
IX86_BUILTIN_RNDSCALESS, IX86_BUILTIN_RSQRT14SD,
IX86_BUILTIN_RSQRT14SS, IX86_BUILTIN_SCALEFSD,
IX86_BUILTIN_SCALEFSS, IX86_BUILTIN_SQRTSD_ROUND,
IX86_BUILTIN_SQRTSS_ROUND, IX86_BUILTIN_SUBSD_ROUND,
IX86_BUILTIN_SUBSS_ROUND, IX86_BUILTIN_VFMADDSD3_ROUND,
IX86_BUILTIN_VFMADDSS3_ROUND, IX86_BUILTIN_VFMSUBSD3_MASK3,
IX86_BUILTIN_VFMSUBSS3_MASK3.
(builtin_description bdesc_args[]): Add
__builtin_ia32_rcp14sd, __builtin_ia32_rcp14ss,
__builtin_ia32_rsqrt14pd512_mask, __builtin_ia32_rsqrt14ps512_mask,
__builtin_ia32_rsqrt14sd, __builtin_ia32_rsqrt14ss,
__builtin_ia32_addsd_round, __builtin_ia32_addss_round,
__builtin_ia32_cvtsd2ss_round, __builtin_ia32_cvtss2sd_round,
__builtin_ia32_divsd_round, __builtin_ia32_divss_round,
__builtin_ia32_getexpsd128_round, __builtin_ia32_getexpss128_round,
__builtin_ia32_getmantsd_round, __builtin_ia32_getmantss_round,
__builtin_ia32_maxsd_round, __builtin_ia32_maxss_round,
__builtin_ia32_minsd_round, __builtin_ia32_minss_round,
__builtin_ia32_mulsd_round, __builtin_ia32_mulss_round,
__builtin_ia32_rndscalesd_round, __builtin_ia32_rndscaless_round,
__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round,
__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round,
__builtin_ia32_subsd_round, __builtin_ia32_subss_round,
__builtin_ia32_vfmaddsd3_round, __builtin_ia32_vfmaddss3_round.
(ix86_expand_round_builtin): Expand new FTYPEs.
* config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3): Support
EVEX's embedded rouding.
(<sse>_vm<multdiv_mnemonic><mode>3): Ditto.
(<sse>_vmsqrt<mode>2): Ditto.
(<sse>_vm<code><mode>3): Ditto.
(sse2_cvtsd2ss): Ditto.
(sse2_cvtss2sd): Ditto.
(*avx512f_vmscalef<mode>): Ditto.
(avx512f_sgetexp<mode>): Ditto.
(*avx512f_rndscale<mode>): Ditto.
(avx512f_getmant<mode>): Ditto.
(*srcp14<mode>): Make visible.
(*rsqrt14<mode>): Ditto.
* config/i386/subst.md (mask_mode512bit_condition): Fix
mode calculation.
(sd_mask_mode512bit_condition): Ditto.
(round_mode512bit_condition): Ditto.
(round_modev4sf_condition): Ditto.
(round_mask_scalar_operand3): Remove.
(round_prefix): New.
(round_saeonly_op3): Ditto.
(round_saeonly_prefix): Ditto.

testsuite/
* gcc.target/i386/avx-1.c: Update for AVX-512 scalar insns.
* gcc.target/i386/avx512f-vaddsd-1.c: New.
* gcc.target/i386/avx512f-vaddss-1.c: Ditto.
* gcc.target/i386/avx512f-vcvtsd2ss-1.c: Ditto.
* gcc.target/i386/avx512f-vcvtss2sd-1.c: Ditto.
* gcc.target/i386/avx512f-vdivsd-1.c: Ditto.
* gcc.target/i386/avx512f-vdivss-1.c: Ditto.
* gcc.target/i386/avx512f-vextractf32x4-2.c: Ditto.
* gcc.target/i386/avx512f-vextracti32x4-2.c: Ditto.
* gcc.target/i386/avx512f-vfmaddXXXsd-1.c: Ditto.
* gcc.target/i386/avx512f-vfmaddXXXss-1.c: Ditto.
* gcc.target/i386/avx512f-vfmsubXXXsd-1.c: Ditto.
* gcc.target/i386/avx512f-vfmsubXXXss-1.c: Ditto.
* gcc.target/i386/avx512f-vfnmaddXXXsd-1.c: Ditto.
* gcc.target/i386/avx512f-vfnmaddXXXss-1.c: Ditto.
* gcc.target/i386/avx512f-vfnmsubXXXsd-1.c: Ditto.
* gcc.target/i386/avx512f-vfnmsubXXXss-1.c: Ditto.
* gcc.target/i386/avx512f-vgetexpsd-1.c: Ditto.
* gcc.target/i386/avx512f-vgetexpsd-2.c: Ditto.
* gcc.target/i386/avx512f-vgetexpss-1.c: Ditto.
* gcc.target/i386/avx512f-vgetexpss-2.c: Ditto.
* gcc.target/i386/avx512f-vgetmantsd-1.c: Ditto.
* gcc.target/i386/avx512f-vgetmantsd-2.c: Ditto.
* gcc.target/i386/avx512f-vgetmantss-1.c: Ditto.
* gcc.target/i386/avx512f-vgetmantss-2.c: Ditto.
* gcc.target/i386/avx512f-vmaxsd-1.c: Ditto.
* gcc.target/i386/avx512f-vmaxss-1.c: Ditto.
* gcc.target/i386/avx512f-vminsd-1.c: Ditto.
* gcc.target/i386/avx512f-vminss-1.c: Ditto.
* gcc.target/i386/avx512f-vmulsd-1.c: Ditto.
* gcc.target/i386/avx512f-vmulss-1.c: Ditto.
* gcc.target/i386/avx512f-vrcp14sd-1.c: Ditto.
* gcc.target/i386/avx512f-vrcp14sd-2.c: Ditto.
* gcc.target/i386/avx512f-vrcp14ss-1.c: Ditto.
* gcc.target/i386/avx512f-vrcp14ss-2.c: Ditto.
* gcc.target/i386/avx512f-vrndscalesd-1.c: Ditto.
* gcc.target/i386/avx512f-vrndscalesd-2.c: Ditto.
* gcc.target/i386/avx512f-vrndscaless-1.c: Ditto.
* gcc.target/i386/avx512f-vrndscaless-2.c: Ditto.
* gcc.target/i386/avx512f-vrsqrt14sd-1.c: Ditto.
* gcc.target/i386/avx512f-vrsqrt14sd-2.c: Ditto.
* gcc.target/i386/avx512f-vrsqrt14ss-1.c: Ditto.
* gcc.target/i386/avx512f-vrsqrt14ss-2.c: Ditto.
* gcc.target/i386/avx512f-vscalefsd-1.c: Ditto.
* gcc.target/i386/avx512f-vscalefsd-2.c: Ditto.
* gcc.target/i386/avx512f-vscalefss-1.c: Ditto.
* gcc.target/i386/avx512f-vscalefss-2.c: Ditto.
* gcc.target/i386/avx512f-vsqrtsd-1.c: Ditto.
* gcc.target/i386/avx512f-vsqrtss-1.c: Ditto.
* gcc.target/i386/avx512f-vsubsd-1.c: Ditto.
* gcc.target/i386/avx512f-vsubss-1.c: Ditto.
* gcc.target/i386/sse-14.c: Update for AVX-512 scalar insns.
* gcc.target/i386/sse-23.c: Ditto.
* gcc.target/i386/testimm-10.c: Ditto.

Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>
Co-Authored-By: Sergey Lega <sergey.s.lega@intel.com>
From-SVN: r206265
62 files changed:
gcc/ChangeLog
gcc/config/i386/avx512fintrin.h
gcc/config/i386/i386-builtin-types.def
gcc/config/i386/i386.c
gcc/config/i386/sse.md
gcc/config/i386/subst.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/avx-1.c
gcc/testsuite/gcc.target/i386/avx512f-vaddsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vaddss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2ss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vcvtss2sd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vdivsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vdivss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vextractf32x4-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vextracti32x4-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vgetexpsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vgetexpsd-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vgetexpss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vgetexpss-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vgetmantsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vgetmantsd-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vgetmantss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vgetmantss-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vmaxss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vminsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vminss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vmulsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vmulss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrcp14sd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrcp14sd-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrcp14ss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrcp14ss-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14sd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14sd-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ss-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vscalefss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vscalefss-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vsubsd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vsubss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse-14.c
gcc/testsuite/gcc.target/i386/sse-23.c
gcc/testsuite/gcc.target/i386/testimm-10.c
gcc/testsuite/gcc.target/i386/testround-1.c