From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97342 invoked by alias); 16 Oct 2017 20:38:55 -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 97333 invoked by uid 89); 16 Oct 2017 20:38:54 -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=2999, POINT, death 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; Mon, 16 Oct 2017 20:38:52 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B094C7EA84 for ; Mon, 16 Oct 2017 20:38:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B094C7EA84 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=vmakarov@redhat.com Received: from [10.10.124.63] (ovpn-124-63.rdu2.redhat.com [10.10.124.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D73B5D6B4 for ; Mon, 16 Oct 2017 20:38:50 +0000 (UTC) To: "gcc-patches@gcc.gnu.org" From: Vladimir Makarov Subject: patch to fix PR82353 Message-ID: <5794f39e-42ef-66da-e7f5-270ebc54cdf2@redhat.com> Date: Mon, 16 Oct 2017 20:39: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: multipart/mixed; boundary="------------B03D2C6037EC44A64856AEE5" X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg01018.txt.bz2 This is a multi-part message in MIME format. --------------B03D2C6037EC44A64856AEE5 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 197 This is another version of the patch to fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82353 The patch was successfully bootstrapped on x86-64 with Go and Ada. Committed as rev. 253796. --------------B03D2C6037EC44A64856AEE5 Content-Type: text/x-patch; name="pr82353-2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr82353-2.patch" Content-length: 2766 Index: ChangeLog =================================================================== --- ChangeLog (revision 253795) +++ ChangeLog (working copy) @@ -1,3 +1,12 @@ +2017-10-16 Vladimir Makarov + + PR sanitizer/82353 + * lra.c (collect_non_operand_hard_regs): Don't ignore operator + locations. + * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up. + (make_hard_regno_born, make_hard_regno_dead): Update + bb_killed_pseudos and bb_gen_pseudos for fixed regs. + 2017-10-16 Jeff Law * tree-ssa-dse.c (live_bytes_read): Fix thinko. Index: lra.c =================================================================== --- lra.c (revision 253685) +++ lra.c (working copy) @@ -820,7 +820,8 @@ collect_non_operand_hard_regs (rtx *x, l const char *fmt = GET_RTX_FORMAT (code); for (i = 0; i < data->insn_static_data->n_operands; i++) - if (x == data->operand_loc[i]) + if (! data->insn_static_data->operand[i].is_operator + && x == data->operand_loc[i]) /* It is an operand loc. Stop here. */ return list; for (i = 0; i < data->insn_static_data->n_dups; i++) Index: lra-lives.c =================================================================== --- lra-lives.c (revision 253685) +++ lra-lives.c (working copy) @@ -220,6 +220,9 @@ lra_intersected_live_ranges_p (lra_live_ return false; } +/* The corresponding bitmaps of BB currently being processed. */ +static bitmap bb_killed_pseudos, bb_gen_pseudos; + /* The function processing birth of hard register REGNO. It updates living hard regs, START_LIVING, and conflict hard regs for living pseudos. Conflict hard regs for the pic pseudo is not updated if @@ -243,6 +246,8 @@ make_hard_regno_born (int regno, bool ch || i != REGNO (pic_offset_table_rtx)) #endif SET_HARD_REG_BIT (lra_reg_info[i].conflict_hard_regs, regno); + if (fixed_regs[regno]) + bitmap_set_bit (bb_gen_pseudos, regno); } /* Process the death of hard register REGNO. This updates @@ -255,6 +260,11 @@ make_hard_regno_dead (int regno) return; sparseset_set_bit (start_dying, regno); CLEAR_HARD_REG_BIT (hard_regs_live, regno); + if (fixed_regs[regno]) + { + bitmap_clear_bit (bb_gen_pseudos, regno); + bitmap_set_bit (bb_killed_pseudos, regno); + } } /* Mark pseudo REGNO as living at program point POINT, update conflicting @@ -299,9 +309,6 @@ mark_pseudo_dead (int regno, int point) } } -/* The corresponding bitmaps of BB currently being processed. */ -static bitmap bb_killed_pseudos, bb_gen_pseudos; - /* Mark register REGNO (pseudo or hard register) in MODE as live at program point POINT. Update BB_GEN_PSEUDOS. Return TRUE if the liveness tracking sets were modified, or FALSE --------------B03D2C6037EC44A64856AEE5--