From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95196 invoked by alias); 29 Sep 2017 17:16:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 95182 invoked by uid 89); 29 Sep 2017 17:16:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=D*ru 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 ESMTP; Fri, 29 Sep 2017 17:16:30 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5987D13AA4 for ; Fri, 29 Sep 2017 17:16:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5987D13AA4 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=vmakarov@redhat.com Received: from [10.10.124.217] (ovpn-124-217.rdu2.redhat.com [10.10.124.217]) by smtp.corp.redhat.com (Postfix) with ESMTP id A91B660600 for ; Fri, 29 Sep 2017 17:16:28 +0000 (UTC) To: "gcc-patches@gcc.gnu.org" From: Vladimir Makarov Subject: patch to fix PR82338 Message-ID: Date: Fri, 29 Sep 2017 17:16:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg01977.txt.bz2 The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82338 The patch was bootstrapped and tested on x86-64. Committed as rev. 253259. Index: ChangeLog =================================================================== --- ChangeLog (revision 253298) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2017-09-29 Vladimir Makarov + + PR rtl-optimization/82338 + * lra-constraints.c (inherit_in_ebb): Check usage_insns check. + 2017-09-29 Alexander Monakov * genmodes.c (calc_wider_mode): Suppress qsort macro. Index: lra-constraints.c =================================================================== --- lra-constraints.c (revision 253298) +++ lra-constraints.c (working copy) @@ -6219,6 +6219,7 @@ inherit_in_ebb (rtx_insn *head, rtx_insn && ((cheap = XEXP (cheap, 0)), true) && (regno = REGNO (cheap)) >= FIRST_PSEUDO_REGISTER && (hard_regno = reg_renumber[regno]) >= 0 + && usage_insns[regno].check == curr_usage_insns_check /* If there are pending saves/restores, the optimization is not worth. */ && usage_insns[regno].calls_num == calls_num - 1