From patchwork Thu Oct 16 13:19:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 400296 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 511811400BE for ; Fri, 17 Oct 2014 00:20:12 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:date:content-type:mime-version; q= dns; s=default; b=IEU8GEO6vptAvtAjiRQuJK5cIdVTHuJ3fCxmzasfmedY67 cEGr4d+v0DGRrphPkAk3hBFQ3bsf7gi8EyuY9YX1J9MZr0oMj1GKMj8H7SYVPHKo hsQmfg0AQqCOIkE62Y9KBK3mHxZKOKcE60OJ38Aj83H1sznDngCN9bOKPTRWE= 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 :message-id:subject:from:to:date:content-type:mime-version; s= default; bh=OXl8nFuz8ixLI70mpr58INqbyVE=; b=kRGror9qAmt/p6D4vd4D 9a9+bxgzKe+o07/hvhzIqtFfNOmnq9IGLIDdsdcWdAboVMX50yXXwvvQTreQ6Bxv gqN2gLF5VJ92eIZBBzR6jwKOwvv8ZYaprbQ5QmGtL8JhkSz+ikeH6FVZYD5ffW6T a5hqDyekbz7eAcwA+qM4LXo= Received: (qmail 28398 invoked by alias); 16 Oct 2014 13:20:04 -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 28386 invoked by uid 89); 16 Oct 2014 13:20:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailout03.t-online.de Received: from mailout03.t-online.de (HELO mailout03.t-online.de) (194.25.134.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 16 Oct 2014 13:20:02 +0000 Received: from fwd33.aul.t-online.de (fwd33.aul.t-online.de [172.20.27.144]) by mailout03.t-online.de (Postfix) with SMTP id 0982420C600 for ; Thu, 16 Oct 2014 15:19:59 +0200 (CEST) Received: from [192.168.0.103] (SUvHtrZegh1JspSrkecs86woU93KUhugBPgXyn9MA+sllAmNnef+DQ+eh9c0gRpwbH@[84.183.238.31]) by fwd33.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1XekyE-1upsQK0; Thu, 16 Oct 2014 15:19:58 +0200 Message-ID: <1413465578.31394.126.camel@yam-132-YW-E178-FTW> Subject: [SH][committed] Remove function fldi_ok From: Oleg Endo To: gcc-patches Date: Thu, 16 Oct 2014 15:19:38 +0200 Mime-Version: 1.0 X-IsSubscribed: yes Hi, The fldi_ok function in sh.c has been returning 'true' for while. Thus it can as well be removed. Tested with 'make all-gcc', committed as r216320. Cheers, Oleg gcc/ChangeLog: * config/sh/sh-protos.h (fldi_ok): Remove. * config/sh/sh.c (fldi_ok): Likewise. (sh_secondary_reload): Don't use fldi_ok. * config/sh/constraints.md (G constraint, H constraint): Don't use fldi_ok. Index: gcc/config/sh/sh-protos.h =================================================================== --- gcc/config/sh/sh-protos.h (revision 216316) +++ gcc/config/sh/sh-protos.h (working copy) @@ -191,7 +191,6 @@ extern void sh_expand_epilogue (bool); extern void sh_set_return_address (rtx, rtx); extern int initial_elimination_offset (int, int); -extern bool fldi_ok (void); extern bool sh_hard_regno_rename_ok (unsigned int, unsigned int); extern bool sh_cfun_interrupt_handler_p (void); extern bool sh_cfun_resbank_handler_p (void); Index: gcc/config/sh/constraints.md =================================================================== --- gcc/config/sh/constraints.md (revision 216316) +++ gcc/config/sh/constraints.md (working copy) @@ -210,12 +210,12 @@ (define_constraint "G" "Double constant 0." (and (match_code "const_double") - (match_test "fp_zero_operand (op) && fldi_ok ()"))) + (match_test "fp_zero_operand (op)"))) (define_constraint "H" "Double constant 1." (and (match_code "const_double") - (match_test "fp_one_operand (op) && fldi_ok ()"))) + (match_test "fp_one_operand (op)"))) ;; Extra constraints (define_constraint "Q" Index: gcc/config/sh/sh.c =================================================================== --- gcc/config/sh/sh.c (revision 216316) +++ gcc/config/sh/sh.c (working copy) @@ -9875,19 +9875,6 @@ return REAL_VALUES_EQUAL (r, dconst1); } -/* In general mode switching is used. If we are - compiling without -mfmovd, movsf_ie isn't taken into account for - mode switching. We could check in machine_dependent_reorg for - cases where we know we are in single precision mode, but there is - interface to find that out during reload, so we must avoid - choosing an fldi alternative during reload and thus failing to - allocate a scratch register for the constant loading. */ -bool -fldi_ok (void) -{ - return true; -} - /* Return the TLS type for TLS symbols. */ enum tls_model tls_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) @@ -13106,8 +13093,7 @@ if (REGCLASS_HAS_FP_REG (rclass) && ! TARGET_SHMEDIA && immediate_operand ((x), mode) - && ! ((fp_zero_operand (x) || fp_one_operand (x)) - && mode == SFmode && fldi_ok ())) + && ! ((fp_zero_operand (x) || fp_one_operand (x)) && mode == SFmode)) switch (mode) { case SFmode: