From 7cf78561f6e669e4d482ad078e9258c6f5ce1aee Mon Sep 17 00:00:00 2001 From: Alexander Ivchenko Date: Fri, 27 Dec 2013 14:33:51 +0000 Subject: [PATCH] sse.md (avx512f_fmadd__maskz): Extend to support EVEX's RC. * config/i386/sse.md (avx512f_fmadd__maskz): Extend to support EVEX's RC. (avx512f_fmaddsub__maskz): Ditto. * config/i386/subst.md (round_expand_name): New. (round_expand_nimm_predicate): Ditto. (round_expand_operand): Ditto. (round_expand): Ditto. Co-Authored-By: Andrey Turetskiy Co-Authored-By: Anna Tikhonova Co-Authored-By: Ilya Tocar Co-Authored-By: Ilya Verbin Co-Authored-By: Kirill Yukhin Co-Authored-By: Maxim Kuznetsov Co-Authored-By: Michael Zolotukhin Co-Authored-By: Sergey Lega From-SVN: r206222 --- gcc/ChangeLog | 18 ++++++++++++++++++ gcc/config/i386/sse.md | 24 ++++++++++++------------ gcc/config/i386/subst.md | 18 ++++++++++++++++++ 3 files changed, 48 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 88e65b5..9cd2138 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -8,6 +8,24 @@ Kirill Yukhin Michael Zolotukhin + * config/i386/sse.md (avx512f_fmadd__maskz): Extend to support + EVEX's RC. + (avx512f_fmaddsub__maskz): Ditto. + * config/i386/subst.md (round_expand_name): New. + (round_expand_nimm_predicate): Ditto. + (round_expand_operand): Ditto. + (round_expand): Ditto. + +2013-12-27 Alexander Ivchenko + Maxim Kuznetsov + Sergey Lega + Anna Tikhonova + Ilya Tocar + Andrey Turetskiy + Ilya Verbin + Kirill Yukhin + Michael Zolotukhin + * config/i386/sse.md (3): Extend to support EVEX's SAE mode. (*3_finite): Ditto. diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 59eedf4..4e4d5c7 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -2741,17 +2741,17 @@ (match_operand:FMAMODE 3 "nonimmediate_operand")))] "") -(define_expand "avx512f_fmadd__maskz" +(define_expand "avx512f_fmadd__maskz" [(match_operand:VF_512 0 "register_operand") - (match_operand:VF_512 1 "nonimmediate_operand") - (match_operand:VF_512 2 "nonimmediate_operand") - (match_operand:VF_512 3 "nonimmediate_operand") + (match_operand:VF_512 1 "") + (match_operand:VF_512 2 "") + (match_operand:VF_512 3 "") (match_operand: 4 "register_operand")] "TARGET_AVX512F" { - emit_insn (gen_fma_fmadd__maskz_1 ( + emit_insn (gen_fma_fmadd__maskz_1 ( operands[0], operands[1], operands[2], operands[3], - CONST0_RTX (mode), operands[4])); + CONST0_RTX (mode), operands[4])); DONE; }) @@ -2983,17 +2983,17 @@ UNSPEC_FMADDSUB))] "TARGET_FMA || TARGET_FMA4 || TARGET_AVX512F") -(define_expand "avx512f_fmaddsub__maskz" +(define_expand "avx512f_fmaddsub__maskz" [(match_operand:VF_512 0 "register_operand") - (match_operand:VF_512 1 "nonimmediate_operand") - (match_operand:VF_512 2 "nonimmediate_operand") - (match_operand:VF_512 3 "nonimmediate_operand") + (match_operand:VF_512 1 "") + (match_operand:VF_512 2 "") + (match_operand:VF_512 3 "") (match_operand: 4 "register_operand")] "TARGET_AVX512F" { - emit_insn (gen_fma_fmaddsub__maskz_1 ( + emit_insn (gen_fma_fmaddsub__maskz_1 ( operands[0], operands[1], operands[2], operands[3], - CONST0_RTX (mode), operands[4])); + CONST0_RTX (mode), operands[4])); DONE; }) diff --git a/gcc/config/i386/subst.md b/gcc/config/i386/subst.md index d17b8b2..595dfb9 100644 --- a/gcc/config/i386/subst.md +++ b/gcc/config/i386/subst.md @@ -160,3 +160,21 @@ (set (match_dup 0) (match_dup 1)) (unspec [(match_operand:SI 2 "const_4_to_5_operand")] UNSPEC_EMBEDDED_ROUNDING)])]) + +(define_subst_attr "round_expand_name" "round_expand" "" "_round") +(define_subst_attr "round_expand_nimm_predicate" "round_expand" "nonimmediate_operand" "register_operand") +(define_subst_attr "round_expand_operand" "round_expand" "" ", operands[5]") + +(define_subst "round_expand" + [(match_operand:SUBST_V 0) + (match_operand:SUBST_V 1) + (match_operand:SUBST_V 2) + (match_operand:SUBST_V 3) + (match_operand:SUBST_S 4)] + "TARGET_AVX512F" + [(match_dup 0) + (match_dup 1) + (match_dup 2) + (match_dup 3) + (match_dup 4) + (unspec [(match_operand:SI 5 "const_0_to_4_operand")] UNSPEC_EMBEDDED_ROUNDING)]) -- 2.7.4