From patchwork Tue Oct 23 20:06:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 193564 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 F18052C0100 for ; Wed, 24 Oct 2012 07:13:19 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1351628000; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=AKkUnQi sOMTHw4N8c54lsPQ/8Z4=; b=KHxdyteGQ+w1zVgoF0jHwI36eAqzHSszgcvmLMk 0iLO8z6xbJi5+0YLDcCiD54xwtNjLcseUBzQ6Wf87LlHxRczBC2D+lY9BuPhIP41 7zg+hTLCBmoAMI7wCfLvHL8mKk+XVBp4SKXxJR2kxWTic3SObtHqMwsSe0FYpCf7 7TP0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=OkuWVDgUj5+advW8Sr2dWgEusA4RWROSIVDOe3mTyqHeblcTv7fGuZWHdeiCHo I/gn3sBTMRipElRKMFJO2rSlfO2Rx5O3DJQFWhweE94jKy/OgYAW2BVm/HxynBhr I9g5g8HXFRaYms8jDrbfwn3LbUyx7E0lcSOC8X295BlrY=; Received: (qmail 12257 invoked by alias); 23 Oct 2012 20:13:14 -0000 Received: (qmail 12240 invoked by uid 22791); 23 Oct 2012 20:13:12 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, MAY_BE_FORGED, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS 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; Tue, 23 Oct 2012 20:13:06 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9NKD581000988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 23 Oct 2012 16:13:06 -0400 Received: from toll.usersys.redhat.com (unused [10.15.16.165] (may be forged)) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q9NKD4Mb008879 for ; Tue, 23 Oct 2012 16:13:05 -0400 Message-ID: <5086F8CA.3060801@redhat.com> Date: Tue, 23 Oct 2012 16:06:34 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0 MIME-Version: 1.0 To: gcc-patches Subject: [lra] patch to prevent ASHIFT exchange and dead early clobber operand 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 prevents mistaken ASHIFT exchange found by Richard Sandiford and removes check early_clobber matching operand. The patch was successfully bootstrap on x86-64. Committed as rev. 192742. 2012-10-23 Vladimir Makarov * lra-constraints.c (extract_loc_address_regs): Don't swap ASHIFT operands. (process_alt_operands): Remove code for checking DEAD note for early clobber. Index: lra-constraints.c =================================================================== --- lra-constraints.c (revision 192702) +++ lra-constraints.c (working copy) @@ -639,7 +639,7 @@ extract_loc_address_regs (bool top_p, en rtx *arg0_loc = &XEXP (x, 0); enum rtx_code code0 = GET_CODE (*arg0_loc); - if (code0 == CONST_INT) + if (code0 == CONST_INT && code == MULT) arg0_loc = &XEXP (x, 1); extract_loc_address_regs (false, mode, as, arg0_loc, true, outer_code, code, modify_p, ad); @@ -1781,17 +1781,7 @@ process_alt_operands (int only_alternati match_p = false; if (operands_match_p (*curr_id->operand_loc[nop], *curr_id->operand_loc[m], m_hregno)) - { - /* We should reject matching of an early - clobber operand if the matching operand is - not dying in the insn. */ - if (! curr_static_id->operand[m].early_clobber - || operand_reg[nop] == NULL_RTX - || (find_regno_note (curr_insn, REG_DEAD, - REGNO (operand_reg[nop])) - != NULL_RTX)) - match_p = true; - } + match_p = true; if (match_p) { /* If we are matching a non-offsettable