diff options
author | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-31 12:13:49 +0000 |
---|---|---|
committer | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-31 12:13:49 +0000 |
commit | 0b7cc9c601629ff70a732cc3b5867e50f1d421aa (patch) | |
tree | 8140e3b1d8a8c8dae84e044a60dbb110e8e89f70 /gcc/config/i386/subst.md | |
parent | 68b0b56cb5c8fd4d4ea619c8b27fd0c8d4047919 (diff) | |
download | gcc-0b7cc9c601629ff70a732cc3b5867e50f1d421aa.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206265 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386/subst.md')
-rw-r--r-- | gcc/config/i386/subst.md | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/config/i386/subst.md b/gcc/config/i386/subst.md index 4a6d4778d9c..487b749255b 100644 --- a/gcc/config/i386/subst.md +++ b/gcc/config/i386/subst.md @@ -51,7 +51,7 @@ (define_subst_attr "mask_operand18" "mask" "" "%{%19%}%N18") (define_subst_attr "mask_operand19" "mask" "" "%{%20%}%N19") (define_subst_attr "mask_codefor" "mask" "*" "") -(define_subst_attr "mask_mode512bit_condition" "mask" "1" "(GET_MODE_SIZE (GET_MODE (operands[0])) == 64)") +(define_subst_attr "mask_mode512bit_condition" "mask" "1" "(GET_MODE_SIZE (<MODE>mode) == 64)") (define_subst_attr "store_mask_constraint" "mask" "vm" "v") (define_subst_attr "store_mask_predicate" "mask" "nonimmediate_operand" "register_operand") (define_subst_attr "mask_prefix" "mask" "vex" "evex") @@ -85,7 +85,7 @@ (define_subst_attr "sd_mask_op4" "sd" "" "%{%5%}%N4") (define_subst_attr "sd_mask_op5" "sd" "" "%{%6%}%N5") (define_subst_attr "sd_mask_codefor" "sd" "*" "") -(define_subst_attr "sd_mask_mode512bit_condition" "sd" "1" "(GET_MODE_SIZE (GET_MODE (operands[0])) == 64)") +(define_subst_attr "sd_mask_mode512bit_condition" "sd" "1" "(GET_MODE_SIZE (<MODE>mode) == 64)") (define_subst "sd" [(set (match_operand:SUBST_V 0) @@ -101,7 +101,6 @@ (define_subst_attr "round_name" "round" "" "_round") (define_subst_attr "round_mask_operand2" "mask" "%R2" "%R4") (define_subst_attr "round_mask_operand3" "mask" "%R3" "%R5") -(define_subst_attr "round_mask_scalar_operand3" "mask_scalar" "%R3" "%R5") (define_subst_attr "round_sd_mask_operand4" "sd" "%R4" "%R6") (define_subst_attr "round_op2" "round" "" "%R2") (define_subst_attr "round_op3" "round" "" "%R3") @@ -116,8 +115,9 @@ (define_subst_attr "round_constraint2" "round" "m" "v") (define_subst_attr "round_constraint3" "round" "rm" "r") (define_subst_attr "round_nimm_predicate" "round" "nonimmediate_operand" "register_operand") -(define_subst_attr "round_mode512bit_condition" "round" "1" "(GET_MODE (operands[0]) == V16SFmode || GET_MODE (operands[0]) == V8DFmode)") -(define_subst_attr "round_modev4sf_condition" "round" "1" "(GET_MODE (operands[0]) == V4SFmode)") +(define_subst_attr "round_prefix" "round" "vex" "evex") +(define_subst_attr "round_mode512bit_condition" "round" "1" "(<MODE>mode == V16SFmode || <MODE>mode == V8DFmode)") +(define_subst_attr "round_modev4sf_condition" "round" "1" "(<MODE>mode == V4SFmode)") (define_subst_attr "round_codefor" "round" "*" "") (define_subst_attr "round_opnum" "round" "5" "6") @@ -138,9 +138,11 @@ (define_subst_attr "round_saeonly_mask_scalar_merge_operand4" "mask_scalar_merge" "%R4" "%R5") (define_subst_attr "round_saeonly_sd_mask_operand5" "sd" "%R5" "%R7") (define_subst_attr "round_saeonly_op2" "round_saeonly" "" "%R2") +(define_subst_attr "round_saeonly_op3" "round_saeonly" "" "%R3") (define_subst_attr "round_saeonly_op4" "round_saeonly" "" "%R4") (define_subst_attr "round_saeonly_op5" "round_saeonly" "" "%R5") (define_subst_attr "round_saeonly_op6" "round_saeonly" "" "%R6") +(define_subst_attr "round_saeonly_prefix" "round_saeonly" "vex" "evex") (define_subst_attr "round_saeonly_mask_op2" "round_saeonly" "" "<round_saeonly_mask_operand2>") (define_subst_attr "round_saeonly_mask_op3" "round_saeonly" "" "<round_saeonly_mask_operand3>") (define_subst_attr "round_saeonly_mask_scalar_op3" "round_saeonly" "" "<round_saeonly_mask_scalar_operand3>") |