From patchwork Thu Apr 23 22:10:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 464071 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 4EE3B14012C for ; Fri, 24 Apr 2015 08:11:04 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=wJObAfFj; dkim-adsp=none (unprotected policy); 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 :date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=MZyuZ D9Aw9TZm3JvtNXGcakjuncGxWuSy3mMNKSTIJmZis9FklAW88n/9CY88hKVzdxeg VDPaHOWmYx9AuC4wjjl+icWOVQdOz/q25nKzDT/E/BsD9/U0cbdwqrGZvbqrdFF+ PRL+94woNX0B19p8Uut511tQTx5VrInjqwGeoQ= 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 :date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=Q0d4W7CBhX2 AHOy1N40qxKFJiO4=; b=wJObAfFj3tVfMqe82EtaEW2TI8UxuDR/UY8PNRqEIrk tv9A9YNPajIN9Wrp8or6xPHGkl9c2FqkHs28ip9IMPsX/85JGDpmIPUvkNWT/aeu jcbQysYRq+RQBvSYTXD3yRZUE7nxSyALBfaxULwlO+ccBYAzSSXF3j6Vinn+tX6M = Received: (qmail 11647 invoked by alias); 23 Apr 2015 22:10:56 -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 11637 invoked by uid 89); 23 Apr 2015 22:10:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL, BAYES_00, MEDICAL_SUBJECT, SPF_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Apr 2015 22:10:55 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 4B608CD7E96BA; Thu, 23 Apr 2015 23:10:48 +0100 (IST) Received: from hhmail02.hh.imgtec.org (10.100.10.20) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 23 Apr 2015 23:10:52 +0100 Received: from BAMAIL02.ba.imgtec.org (10.20.40.28) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 23 Apr 2015 23:10:51 +0100 Received: from ubuntu-sellcey.mips.com (10.20.3.58) by bamail02.ba.imgtec.org (10.20.40.28) with Microsoft SMTP Server id 14.3.174.1; Thu, 23 Apr 2015 15:10:48 -0700 Received: by ubuntu-sellcey.mips.com (sSMTP sendmail emulation); Thu, 23 Apr 2015 15:10:48 -0700 From: "Steve Ellcey " Date: Thu, 23 Apr 2015 15:10:48 -0700 To: , , Subject: [Patch, MIPS] Minor cleanup in mips.md User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-ID: <3c620ba7-d8f8-4d4a-8f85-e170deaec8df@BAMAIL02.ba.imgtec.org> This is a minor cleanup patch for MIPS. A number of floating point madd type instructions set the accum_in attribute. But this attribute is only used for integer madd instructions, so this patch removes it from the floating point madd instructions where it is not needed or used. The 'accum_in' attribute is only checked from mips_linked_madd_p in mips.c. This in turn is used by the 24k, 4130, 5500, and 74k instruction schedulers and by mips_macc_chains_reorder. The instruction schedulers only use it for scheduling integer multiply and multiply-add instructions and mips_macc_chains_reorder is only looking at it for instructions where the may_clobber_hilo attribute is also true. may_clobber_hilo is only set for integer multiply and multiply-add instructions. Removing this from the floating point madd instructions should have no effect on GCC. I tested the change with mips-mti-linux-gnu to make sure everything built and ran the GCC testsuite with the 74k scheduler to verify that there were no regressions but this change would have no affect on any MIPS target. OK for checkin? Steve Ellcey sellcey@imgtec.com 2015-04-23 Steve Ellcey * config/mips/mips.md: (*madd4) Remove accum_in attribute. (*madd3): Ditto. (*msub4): Ditto. (*msub3): Ditto. (*nmadd4): Ditto. (*nmadd3): Ditto. (*nmadd4_fastmath): Ditto. (*nmadd3_fastmath): Ditto. (*nmsub4): Ditto. (*nmsub3): Ditto. (*nmsub4_fastmath): Ditto. (*nmsub3_fastmath): Ditto. diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 3672c0b..ed4c0ba 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -2478,7 +2478,6 @@ "ISA_HAS_FP_MADD4_MSUB4 && TARGET_FUSED_MADD" "madd.\t%0,%3,%1,%2" [(set_attr "type" "fmadd") - (set_attr "accum_in" "3") (set_attr "mode" "")]) (define_insn "fma4" @@ -2499,7 +2498,6 @@ "ISA_HAS_FP_MADD3_MSUB3 && TARGET_FUSED_MADD" "madd.\t%0,%1,%2" [(set_attr "type" "fmadd") - (set_attr "accum_in" "3") (set_attr "mode" "")]) (define_insn "*msub4" @@ -2510,7 +2508,6 @@ "ISA_HAS_FP_MADD4_MSUB4 && TARGET_FUSED_MADD" "msub.\t%0,%3,%1,%2" [(set_attr "type" "fmadd") - (set_attr "accum_in" "3") (set_attr "mode" "")]) (define_insn "*msub3" @@ -2521,7 +2518,6 @@ "ISA_HAS_FP_MADD3_MSUB3 && TARGET_FUSED_MADD" "msub.\t%0,%1,%2" [(set_attr "type" "fmadd") - (set_attr "accum_in" "3") (set_attr "mode" "")]) (define_insn "*nmadd4" @@ -2536,7 +2532,6 @@ && !HONOR_NANS (mode)" "nmadd.\t%0,%3,%1,%2" [(set_attr "type" "fmadd") - (set_attr "accum_in" "3") (set_attr "mode" "")]) (define_insn "*nmadd3" @@ -2551,7 +2546,6 @@ && !HONOR_NANS (mode)" "nmadd.\t%0,%1,%2" [(set_attr "type" "fmadd") - (set_attr "accum_in" "3") (set_attr "mode" "")]) (define_insn "*nmadd4_fastmath" @@ -2566,7 +2560,6 @@ && !HONOR_NANS (mode)" "nmadd.\t%0,%3,%1,%2" [(set_attr "type" "fmadd") - (set_attr "accum_in" "3") (set_attr "mode" "")]) (define_insn "*nmadd3_fastmath" @@ -2581,7 +2574,6 @@ && !HONOR_NANS (mode)" "nmadd.\t%0,%1,%2" [(set_attr "type" "fmadd") - (set_attr "accum_in" "3") (set_attr "mode" "")]) (define_insn "*nmsub4" @@ -2596,7 +2588,6 @@ && !HONOR_NANS (mode)" "nmsub.\t%0,%1,%2,%3" [(set_attr "type" "fmadd") - (set_attr "accum_in" "1") (set_attr "mode" "")]) (define_insn "*nmsub3" @@ -2611,7 +2602,6 @@ && !HONOR_NANS (mode)" "nmsub.\t%0,%1,%2" [(set_attr "type" "fmadd") - (set_attr "accum_in" "1") (set_attr "mode" "")]) (define_insn "*nmsub4_fastmath" @@ -2626,7 +2616,6 @@ && !HONOR_NANS (mode)" "nmsub.\t%0,%1,%2,%3" [(set_attr "type" "fmadd") - (set_attr "accum_in" "1") (set_attr "mode" "")]) (define_insn "*nmsub3_fastmath" @@ -2641,7 +2630,6 @@ && !HONOR_NANS (mode)" "nmsub.\t%0,%1,%2" [(set_attr "type" "fmadd") - (set_attr "accum_in" "1") (set_attr "mode" "")]) ;;