From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 4F1963857B83 for ; Tue, 28 Jun 2022 17:01:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4F1963857B83 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 25SH087t019662; Tue, 28 Jun 2022 12:00:08 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 25SH08in019660; Tue, 28 Jun 2022 12:00:08 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 28 Jun 2022 12:00:08 -0500 From: Segher Boessenkool To: Richard Biener Cc: gcc-patches@gcc.gnu.org, jeffreyalaw@gmail.com Subject: Re: [PATCH] rtl-optimization/106082 - preserve EH note for no non-local goto Message-ID: <20220628170008.GE25951@gate.crashing.org> References: <202206281111.25SBBvhG030417@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202206281111.25SBBvhG030417@gate.crashing.org> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Tue, 28 Jun 2022 17:01:11 -0000 On Tue, Jun 28, 2022 at 11:11:55AM +0000, Richard Biener wrote: > The following makes sure we preserve EH notes on call insns that > indicate the call doesn't perform a non-local goto when distributing > notes after combining insns. > - if (!insn_could_throw_p (from_insn)) > - /* Throw away stra notes on insns that can never throw. */ > + if (!insn_could_throw_p (from_insn) > + && (lp_nr != INT_MIN || !can_nonlocal_goto (from_insn))) > + /* Throw away stray notes on insns that can never throw or > + make a nonlocal goto. */ > ; Where is the meaning of INT_MIN here documented? ... Ah, in except.cc . Can you write this as if (!insn_could_throw_p (from_insn) && !(lp_nr == INT_MIN && can_nonlocal_goto (from_insn))) please? It is easier to understand that way. With or without that, okay for trunk. Thanks! Segher