From patchwork Thu Mar 31 19:13:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 89118 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]) by ozlabs.org (Postfix) with SMTP id CEDA9B6F2B for ; Fri, 1 Apr 2011 06:13:25 +1100 (EST) Received: (qmail 30167 invoked by alias); 31 Mar 2011 19:13:19 -0000 Received: (qmail 30153 invoked by uid 22791); 31 Mar 2011 19:13:18 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 Mar 2011 19:13:14 +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 p2VJDDdd004453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 31 Mar 2011 15:13:13 -0400 Received: from toll.yyz.redhat.com (toll.yyz.redhat.com [10.15.16.165]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2VJDD91004638 for ; Thu, 31 Mar 2011 15:13:13 -0400 Message-ID: <4D94D249.6020908@redhat.com> Date: Thu, 31 Mar 2011 15:13:13 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 MIME-Version: 1.0 To: gcc-patches Subject: patch to solve PR48381 X-IsSubscribed: yes 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 The following patch solves the PR48381. The reason for the problem is described on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48381 Ok to commit? It was successfully bootstrapped on x86-64. 2011-03-31 Vladimir Makarov PR rtl-optimization/48381 * ira-color.c (assign_hard_reg): Use hard reg set intersection instead of ira_class_hard_reg_index for calculating conflicting hard registers. Index: ira-color.c =================================================================== --- ira-color.c (revision 171769) +++ ira-color.c (working copy) @@ -1620,7 +1620,9 @@ assign_hard_reg (ira_allocno_t a, bool r { hard_regno = ALLOCNO_HARD_REGNO (conflict_a); if (hard_regno >= 0 - && ira_class_hard_reg_index[aclass][hard_regno] >= 0) + && (ira_hard_reg_set_intersection_p + (hard_regno, ALLOCNO_MODE (conflict_a), + reg_class_contents[aclass]))) { int n_objects = ALLOCNO_NUM_OBJECTS (conflict_a); int conflict_nregs;