From patchwork Fri Jun 24 18:21:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 101852 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 DE53BB6F86 for ; Sat, 25 Jun 2011 04:22:05 +1000 (EST) Received: (qmail 9185 invoked by alias); 24 Jun 2011 18:22:03 -0000 Received: (qmail 9170 invoked by uid 22791); 24 Jun 2011 18:22:01 -0000 X-SWARE-Spam-Status: No, hits=-6.2 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; Fri, 24 Jun 2011 18:21:45 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5OILimu028835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 24 Jun 2011 14:21:44 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5OILiUJ003916 for ; Fri, 24 Jun 2011 14:21:44 -0400 Received: from Mair.local (vpn-11-104.rdu.redhat.com [10.11.11.104]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p5OILhRG010140 for ; Fri, 24 Jun 2011 14:21:44 -0400 Message-ID: <4E04D5B7.4080200@redhat.com> Date: Fri, 24 Jun 2011 14:21:43 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: GCC Patches Subject: [lra] patch to fix crafty compilation on ppc64 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 fixes compilation abort of SPEC2000 crafty on ppc64. The patch was successfully bootstrapped on x86-64, ppc64, and ia64. 2011-06-24 Vladimir Makarov * lra-constraints.c (curr_insn_transform): Process operator duplications. Index: lra-constraints.c =================================================================== --- lra-constraints.c (revision 175381) +++ lra-constraints.c (working copy) @@ -3051,8 +3051,22 @@ curr_insn_transform (void) if (before != NULL_RTX || after != NULL_RTX || max_regno_before != max_reg_num ()) change_p = true; if (change_p) - /* Something changes -- process the insn. */ - lra_update_insn_regno_info (curr_insn); + { + /* Process operator duplications. We do it here to guarantee + their processing after operands processing. Generally + speaking, we could do this probably in the previous loop + because a common practice is to enumerate the operators after + their operands. */ + for (i = 0; i < n_dups; i++) + { + int ndup = curr_static_id->dup_num[i]; + + if (curr_static_id->operand[ndup].is_operator) + *curr_id->dup_loc[i] = *curr_id->operand_loc[ndup]; + } + /* Something changes -- process the insn. */ + lra_update_insn_regno_info (curr_insn); + } lra_process_new_insns (curr_insn, before, after, "Inserting insn reload"); return change_p; }