From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 9B1C23858D37 for ; Wed, 2 Mar 2022 09:44:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9B1C23858D37 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 8D0F11F39D; Wed, 2 Mar 2022 09:44:48 +0000 (UTC) Received: from murzim.suse.de (murzim.suse.de [10.160.4.192]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 8795EA3B87; Wed, 2 Mar 2022 09:44:48 +0000 (UTC) Date: Wed, 2 Mar 2022 10:44:48 +0100 (CET) From: Richard Biener To: Jakub Jelinek cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] cfgrtl: Fix up -g vs. -g0 code generation -flto differences in fixup_reorder_chain [PR104589] In-Reply-To: Message-ID: <79p9472-95s3-on73-846n-ss959r466395@fhfr.qr> References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2022 09:44:50 -0000 On Wed, 2 Mar 2022, Jakub Jelinek wrote: > Hi! > > This is similar to PR104237 and similarly to that, no testcase included > for the testsuite, as we don't have a framework to compile/link with > -g -flto and -g0 -flto and compare -fdump-final-insns= results from > the lto1 compilations. > > With -flto, whether two location_t compare equal or not and just > express the same location is a lottery. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, > ok for trunk? OK. Richard. > 2022-03-02 Jakub Jelinek > > PR rtl-optimization/104589 > * cfgrtl.cc (fixup_reorder_chain): Use loc_equal instead of direct > INSN_LOCATION comparison with goto_locus. > > --- gcc/cfgrtl.cc.jj 2022-02-04 14:36:54.068618386 +0100 > +++ gcc/cfgrtl.cc 2022-03-01 16:11:06.307419636 +0100 > @@ -4090,7 +4090,7 @@ fixup_reorder_chain (void) > && (!NONDEBUG_INSN_P (insn) || !INSN_HAS_LOCATION (insn))) > insn = PREV_INSN (insn); > if (insn != end > - && INSN_LOCATION (insn) == e->goto_locus) > + && loc_equal (INSN_LOCATION (insn), e->goto_locus)) > continue; > if (simplejump_p (BB_END (e->src)) > && !INSN_HAS_LOCATION (BB_END (e->src))) > @@ -4112,7 +4112,7 @@ fixup_reorder_chain (void) > while (insn != end && !NONDEBUG_INSN_P (insn)) > insn = NEXT_INSN (insn); > if (insn != end && INSN_HAS_LOCATION (insn) > - && INSN_LOCATION (insn) == e->goto_locus) > + && loc_equal (INSN_LOCATION (insn), e->goto_locus)) > continue; > } > nb = split_edge (e); > > Jakub > > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Ivo Totev; HRB 36809 (AG Nuernberg)