From patchwork Wed Dec 21 17:00:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 132689 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 7A0D0B7135 for ; Thu, 22 Dec 2011 04:02:08 +1100 (EST) Received: (qmail 29494 invoked by alias); 21 Dec 2011 17:01:14 -0000 Received: (qmail 29275 invoked by uid 22791); 21 Dec 2011 17:01:07 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qy0-f175.google.com (HELO mail-qy0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Dec 2011 17:00:49 +0000 Received: by qcqw6 with SMTP id w6so4507964qcq.20 for ; Wed, 21 Dec 2011 09:00:48 -0800 (PST) Received: by 10.224.98.8 with SMTP id o8mr9217058qan.79.1324486848788; Wed, 21 Dec 2011 09:00:48 -0800 (PST) Received: from anchor.twiddle.home.com ([173.160.232.49]) by mx.google.com with ESMTPS id q14sm11657094qap.4.2011.12.21.09.00.47 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Dec 2011 09:00:48 -0800 (PST) From: Richard Henderson To: rdsandiford@googlemail.com Cc: mingjie.xing@gmail.com, gcc-patches@gcc.gnu.org Subject: [PATCH 10/10] mips: Add reduction patterns for paired-single Date: Wed, 21 Dec 2011 09:00:22 -0800 Message-Id: <1324486822-18225-11-git-send-email-rth@redhat.com> In-Reply-To: <1324486822-18225-1-git-send-email-rth@redhat.com> References: <1324486822-18225-1-git-send-email-rth@redhat.com> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org --- 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; +})