public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1342] rtl-optimization/106082 - preserve EH note for no non-local goto
@ 2022-06-29 12:00 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2022-06-29 12:00 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0282c4acf720e4cc073cf95594aa890444c5ca82

commit r13-1342-g0282c4acf720e4cc073cf95594aa890444c5ca82
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Jun 28 13:08:33 2022 +0200

    rtl-optimization/106082 - preserve EH note for no non-local goto
    
    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.
    
    2022-06-28  Richard Biener  <rguenther@suse.de>
    
            PR rtl-optimization/106082
            * combine.cc (distribute_notes): Preserve notes when
            they indicate a call doesn't perform a non-local goto.

Diff:
---
 gcc/combine.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/combine.cc b/gcc/combine.cc
index a8305273e44..a5fabf397f7 100644
--- a/gcc/combine.cc
+++ b/gcc/combine.cc
@@ -14218,8 +14218,10 @@ distribute_notes (rtx notes, rtx_insn *from_insn, rtx_insn *i3, rtx_insn *i2,
 	      gcc_assert (from_insn == i3);
 	    /* We are making sure there is a single effective REG_EH_REGION
 	       note and it's valid to put it on i3.  */
-	    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.  */
 	      ;
 	    else
 	      {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-29 12:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 12:00 [gcc r13-1342] rtl-optimization/106082 - preserve EH note for no non-local goto Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).