This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 10/10] mips: Add reduction patterns for paired-single
- From: Richard Henderson <rth at redhat dot com>
- To: rdsandiford at googlemail dot com
- Cc: mingjie dot xing at gmail dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 21 Dec 2011 09:00:22 -0800
- Subject: [PATCH 10/10] mips: Add reduction patterns for paired-single
- References: <1324486822-18225-1-git-send-email-rth@redhat.com>
---
gcc/config/mips/mips-ps-3d.md | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/gcc/config/mips/mips-ps-3d.md b/gcc/config/mips/mips-ps-3d.md
index 7c3fe85..cc8a4c0 100644
--- a/gcc/config/mips/mips-ps-3d.md
+++ b/gcc/config/mips/mips-ps-3d.md
@@ -371,6 +371,14 @@
[(set_attr "type" "fadd")
(set_attr "mode" "SF")])
+(define_insn "reduc_splus_v2sf"
+ [(set (match_operand:V2SF 0 "register_operand" "=f")
+ (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")
+ (match_dup 1)]
+ UNSPEC_ADDR_PS))]
+ "TARGET_HARD_FLOAT && TARGET_PAIRED_SINGLE_FLOAT"
+ "")
+
; cvt.pw.ps - Floating Point Convert Paired Single to Paired Word
(define_insn "mips_cvt_pw_ps"
[(set (match_operand:V2SF 0 "register_operand" "=f")
@@ -736,3 +744,21 @@
LE, operands[2], operands[1]);
DONE;
})
+
+(define_expand "reduc_smin_v2sf"
+ [(match_operand:V2SF 0 "register_operand")
+ (match_operand:V2SF 1 "register_operand")]
+ "TARGET_HARD_FLOAT && TARGET_PAIRED_SINGLE_FLOAT"
+{
+ mips_expand_vec_reduc (operands[0], operands[1], gen_sminv2sf3);
+ DONE;
+})
+
+(define_expand "reduc_smax_v2sf"
+ [(match_operand:V2SF 0 "register_operand")
+ (match_operand:V2SF 1 "register_operand")]
+ "TARGET_HARD_FLOAT && TARGET_PAIRED_SINGLE_FLOAT"
+{
+ mips_expand_vec_reduc (operands[0], operands[1], gen_smaxv2sf3);
+ DONE;
+})
--
1.7.7.4