From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113047 invoked by alias); 29 Mar 2017 20:44:35 -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 113030 invoked by uid 89); 29 Mar 2017 20:44:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=his 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, 29 Mar 2017 20:44:33 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 07F2461BA5; Wed, 29 Mar 2017 20:44:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 07F2461BA5 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 07F2461BA5 Received: from tucnak.zalov.cz (ovpn-116-72.ams2.redhat.com [10.36.116.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8C7DC5C545; Wed, 29 Mar 2017 20:44:32 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v2TKiTPe004656; Wed, 29 Mar 2017 22:44:29 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v2TKiPIC001339; Wed, 29 Mar 2017 22:44:25 +0200 Date: Wed, 29 Mar 2017 20:48:00 -0000 From: Jakub Jelinek To: Jeff Law Cc: Segher Boessenkool , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] combine: Fix PR80233 Message-ID: <20170329204425.GH17461@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg01496.txt.bz2 On Wed, Mar 29, 2017 at 02:35:32PM -0600, Jeff Law wrote: > On 03/29/2017 12:23 PM, Segher Boessenkool wrote: > > If combine has added an unconditional trap there will be a new basic > > block as well. It will then end up considering the NOTE_INSN_BASIC_BLOCK > > as the last_combined_insn, but then it tries to take the DF_INSN_LUID > > of that and that dereferences a NULL pointer (since such a note is not > > an INSN_P). > > > > This fixes it by not taking non-insns as last_combined_insn. > > > > Bootstrapped and tested on powerpc64-linux {-m32,-m64}. > > > > > > Segher > > > > > > 2017-03-29 Segher Boessenkool > > > > PR rtl-optimization/80233 > > * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns > > as last_combined_insn. Do not test for BARRIER_P separately. > > > > gcc/testsuite/ > > PR rtl-optimization/80233 > > * gcc.c-torture/compile/pr80233.c: New testcase. > No strong opinions on this vs Jakub's patch. I guess yours may walk more > objects on the chain, but in doing so is more likely to find a useful > LAST_COMBINED_INSN. Jakub's stops earlier, but is less likely to have > stopped on something useful. > > Your call Segher. I like Segher's latest patch. But it is his call anyway ;) Jakub