From patchwork Tue Nov 3 14:31:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Lawrence X-Patchwork-Id: 539446 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0628C1402B3 for ; Wed, 4 Nov 2015 01:31:39 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=tiPz4NPB; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding; q=dns; s=default; b=yx4QUxs6v6M8B9eq /3DImYUJv8gJuPNOxmbJJhA1rB4ycsOVjEpJb6in0MpnVuTLhxhZzzV7/qrzN+B4 4KmdXF+H3ccvllDCc4ewo+yww7wv3Tir1LDnAJ95JSJsTrZdrIcWrRclkioJu5mz 5aXD7bE8BwAxHnStjzLBIpeH4P0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding; s=default; bh=9ElZbK5Zd89VMajKObTwwa CmZfU=; b=tiPz4NPB5o3xmu7KffcusKPtM+wqDI1e9S80N8QKs7GwHD+2P8Z5dm 07nOgd4blPooe7I6adJpb/trVnYokIvpe8ool1FdeksKiQiu+r3Z4DoVR/2WAwOo gthSZ05ONZd9BL73L3hkq8CLWLEhOEZ0SrR4RJEe8wPYc0EMYWSOw= Received: (qmail 51823 invoked by alias); 3 Nov 2015 14:31:31 -0000 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 Received: (qmail 51796 invoked by uid 89); 3 Nov 2015 14:31:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL, BAYES_00, MEDICAL_SUBJECT, SPF_PASS autolearn=no version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Nov 2015 14:31:30 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-38-kSUsgFalRiaBzqYN3PcAGg-1; Tue, 03 Nov 2015 14:31:22 +0000 Received: from arm.com ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 3 Nov 2015 14:31:22 +0000 From: Alan Lawrence To: gcc-patches@gcc.gnu.org Cc: clm@codesourcery.com, matthew.fortune@imgtec.com Subject: [PATCH/RFTesting][MIPS] Migrate reduction optabs in mips-ps-3d.md Date: Tue, 3 Nov 2015 14:31:09 +0000 Message-Id: <1446561069-27527-1-git-send-email-alan.lawrence@arm.com> X-MC-Unique: kSUsgFalRiaBzqYN3PcAGg-1 X-IsSubscribed: yes There are still a few uses of the old reduc_[us](plus|min|max)_ optabs remaining. This migrates the instances in mips-ps-3d.md. This seemed straightforward, as mips-ps-3d.md also provides a vec_extractv2sf. I tried to be conservative and handle all the possible cases for endianness, this may be overkill. Also I believe TARGET_MIPS3D implies TARGET_PAIRED_SINGLE_FLOAT. I've built stage-1 compilers for mips64el and mips64, and verified that these did at least (both) compile the affected code. However I haven't tested any further, I'm not sure what command-line options etc. to use for this. I wonder if one of the kind MIPS folk would be able to assist with testing? --Alan gcc/ChangeLog: * config/mips/mips-ps-3d.md (reduc_splus_v2sf): Remove. (reduc_plus_scal_v2sf): New. --- gcc/config/mips/mips-ps-3d.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/gcc/config/mips/mips-ps-3d.md b/gcc/config/mips/mips-ps-3d.md index 8bc7608..01e6753 100644 --- a/gcc/config/mips/mips-ps-3d.md +++ b/gcc/config/mips/mips-ps-3d.md @@ -371,13 +371,17 @@ [(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))] +(define_expand "reduc_plus_scal_v2sf" + [(match_operand:SF 0 "register_operand" "=f") + (match_operand:V2SF 1 "register_operand" "f")] "TARGET_HARD_FLOAT && TARGET_MIPS3D" - "") + { + rtx temp = gen_reg_rtx (V2SFmode); + emit_insn (gen_mips_addr_ps (temp, operands[1], operands[1])); + rtx lane = BYTES_BIG_ENDIAN ? const1_rtx : const0_rtx; + emit_insn (gen_vec_extractv2sf (operands[0], temp, lane)); + DONE; + }) ; cvt.pw.ps - Floating Point Convert Paired Single to Paired Word (define_insn "mips_cvt_pw_ps"