From patchwork Thu Jan 30 21:26:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 315465 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 599602C00A1 for ; Fri, 31 Jan 2014 08:27:10 +1100 (EST) 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; q= dns; s=default; b=jo7fILhTX99wBG4Bdn8B06azK6OhBNU0ozQcxm2oF/WnJE kRQsgku4zieCVv0lWAppv9HuXsi0z9saOD1M/Y8yC/KuNSvQuX4uiZC6Dz4m1oHq L+prichgG00wr2lxQX98iERe5SMUes063cmbEw5xK6hPFNf1yo8P9gq1JDY40= 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; s= default; bh=AP+GzORyqCWldhbs1DdKrxxfmrI=; b=dh62QBEBt/ErYA6ql38V FvFwt4F9RjlbImE8eJvhLC4AulzSpAtN+JBYxpWv9N2ZFIX26yZebpcvEYaklvbl ZM7n0ihdnIrVeZx9vlMFk2CNEFezDZzmfwm4HJFIueIMmVMoSsx4TowDqvQ7sKRX UfDO/HWqrCOc6qz/p0RIlA4= Received: (qmail 6235 invoked by alias); 30 Jan 2014 21:27: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 6224 invoked by uid 89); 30 Jan 2014 21:27:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_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 ESMTP; Thu, 30 Jan 2014 21:27:02 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0ULR0oS030271 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 30 Jan 2014 16:27:00 -0500 Received: from topor.usersys.redhat.com ([10.15.16.142]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0ULQx2j004681 for ; Thu, 30 Jan 2014 16:26:59 -0500 Message-ID: <52EAC3A3.6030500@redhat.com> Date: Thu, 30 Jan 2014 16:26:59 -0500 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: gcc-patches Subject: patch to fix PR59959 X-IsSubscribed: yes The following patch fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59959 The patch was successfully bootstrapped and tested on x86/x86-64 and ppc64. Committed as rev. 207323. 2014-01-30 Vladimir Makarov PR rtl-optimization/59959 * lra-constrains.c (simplify_operand_subreg): Assign NO_REGS to any reload of register whose subreg is invalid. Index: lra-constraints.c =================================================================== --- lra-constraints.c (revision 207322) +++ lra-constraints.c (working copy) @@ -1293,11 +1293,8 @@ simplify_operand_subreg (int nop, enum m { enum reg_class rclass; - if (REG_P (reg) - && curr_insn_set != NULL_RTX - && (REG_P (SET_SRC (curr_insn_set)) - || GET_CODE (SET_SRC (curr_insn_set)) == SUBREG)) - /* There is big probability that we will get the same class + if (REG_P (reg)) + /* There is a big probability that we will get the same class for the new pseudo and we will get the same insn which means infinite looping. So spill the new pseudo. */ rclass = NO_REGS;