From patchwork Mon Jun 22 18:48:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 487326 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 65A84140082 for ; Tue, 23 Jun 2015 04:48:43 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=gyd787ui; 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 :message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; q=dns; s=default; b=brOexxdF4eWg9Zae DLCSyAsbz8m8cqn9pPWHE85V9xi6KSCTLkKRKD9pkygoAqqqi/ggwJbkk57Vpro7 UL+W0iP0B7hfCgR2ck6T84qNiytoAbGxcWAtIEd5ly9N/SwLwTRaljBpTpLGzCvw Q0eH0A9K+kpTTwmOCkrARhO6fKc= 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:date:from:mime-version:to:subject:content-type :content-transfer-encoding; s=default; bh=qUDPkbOrbw0k7wP7DIOtsQ wLPj4=; b=gyd787uiz4AWCOVZ2egUurSzecMUd+zWnEYuVAE2iXH/6C7Ka/Dnxk XMY8YftEMeefP5H5eD6aVQTHcs+aCtn3Po5p6Kub+m4AWlYVFYQu33/C5/G3Nmc2 4rEvtbag6juzXYqmstn4F8AtGWeOcVeLHFVCbIxiKSMsd4vobtHvg= Received: (qmail 98636 invoked by alias); 22 Jun 2015 18:48:35 -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 97831 invoked by uid 89); 22 Jun 2015 18:48:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 22 Jun 2015 18:48:33 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id BAA07DBA for ; Mon, 22 Jun 2015 18:48:32 +0000 (UTC) Received: from [10.3.113.43] (ovpn-113-43.phx2.redhat.com [10.3.113.43]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5MImWua009694 for ; Mon, 22 Jun 2015 14:48:32 -0400 Message-ID: <5588587F.4060705@redhat.com> Date: Mon, 22 Jun 2015 14:48:31 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: patch to fix PR63740 on trunk X-IsSubscribed: yes I've committed patch for PR63740 to the trunk as rev. 224753. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63740 The patch was bootstrapped on x86-64. 2015-06-22 Vladimir Makarov PR bootstrap/63740 * lra-lives.c (process_bb_lives): Check insn copying the same reload pseudo and don't create a copy for it. Index: lra-lives.c =================================================================== --- lra-lives.c (revision 224739) +++ lra-lives.c (working copy) @@ -565,7 +565,15 @@ process_bb_lives (basic_block bb, int &c dst_regno = REGNO (SET_DEST (set)); if (dst_regno >= lra_constraint_new_regno_start && src_regno >= lra_constraint_new_regno_start) - lra_create_copy (dst_regno, src_regno, freq); + { + /* It might be still an original (non-reload) insn with + one unused output and a constraint requiring to use + the same reg for input/output operands. In this case + dst_regno and src_regno have the same value, we don't + need a misleading copy for this case. */ + if (dst_regno != src_regno) + lra_create_copy (dst_regno, src_regno, freq); + } else if (dst_regno >= lra_constraint_new_regno_start) { if ((hard_regno = src_regno) >= FIRST_PSEUDO_REGISTER)