From patchwork Wed Nov 30 12:02:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 700992 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 3tTJw643P9z9t2N for ; Wed, 30 Nov 2016 23:03:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="SccCbO4c"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=MshhlT5wCha67F2yXxSEtbCghpY/T 94mbrLxvhCRtoe5OnI/jArmrnROJAnG/ZHgB6g6Kj2Uj+u0Ko1dKcx9IjOzHoxQW 3RtAZBlwx9jNFS7nTZxOWOW5RxZ76CQnV3ZUcVNziZ1RKm4lqx2wXYqAf9iBpfj8 bJ8JOXc9JFC5FI= 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:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=1Uq4CJoaVfdVjxCLStx81zVr8Rk=; b=Scc CbO4cxvaLAWyNyhL0j4GWGsiTqA/7oO1wBMWEZKHs6bFIYKU5VJl7bI3jx7U/Ia0 9YgdwAmt0j/OLc7YioVarVLuqNt/RmAfP8RHvL5ic1hAgU8SA8Pp4m8PHkmR5+ZT bAy7cqUNDiZrkON2FQ4zdEHEB6s2iIMSbr2/I5JY= Received: (qmail 2190 invoked by alias); 30 Nov 2016 12:03:08 -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 2138 invoked by uid 89); 30 Nov 2016 12:03:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=20161130 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; Wed, 30 Nov 2016 12:03:01 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 785AE3B712 for ; Wed, 30 Nov 2016 12:02:59 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-204-100.brq.redhat.com [10.40.204.100]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAUC2vbT025528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 30 Nov 2016 07:02:59 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id uAUC2tx8008962; Wed, 30 Nov 2016 13:02:56 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id uAUC2sed008961; Wed, 30 Nov 2016 13:02:54 +0100 Date: Wed, 30 Nov 2016 13:02:54 +0100 From: Jakub Jelinek To: Vladimir Makarov Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix ira.c RTL sharing bug Message-ID: <20161130120254.GP3541@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes Hi! I've discovered today that RTL sharing verification has been disabled for the last 3.5 years. My --enable-checking=yes,rtl,extra bootstraps on x86_64-linux and i686-linux revealed only two bugs. Here is a fix for one of them, x can be shared with another insn that has it in REG_EQUIV already, so we need to unshare it. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-11-30 Jakub Jelinek * ira.c (ira_update_equiv_info_by_shuffle_insn): Use copy_rtx for REG_EQUIV argument. Jakub --- gcc/ira.c.jj 2016-11-18 18:11:24.000000000 +0100 +++ gcc/ira.c 2016-11-30 10:53:48.061704159 +0100 @@ -2647,7 +2647,7 @@ ira_update_equiv_info_by_shuffle_insn (i } if (find_reg_note (insn, REG_EQUIV, x) == NULL_RTX) { - note = set_unique_reg_note (insn, REG_EQUIV, x); + note = set_unique_reg_note (insn, REG_EQUIV, copy_rtx (x)); gcc_assert (note != NULL_RTX); if (internal_flag_ira_verbose > 3 && ira_dump_file != NULL) {