[Bug rtl-optimization/93996] [10 Regression] ICE in lookup_page_table_entry

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 2 11:10:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93996

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This seems to fix the issue (but I am not a scheduler expert and I am not 100%
sure about it):
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 1d3de7b6a76..9ca986eabdd 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -4239,6 +4239,8 @@ remove_notes (rtx_insn *head, rtx_insn *tail)
          if (insn != tail)
            {
              remove_insn (insn);
+             if (NOTE_P (next) && NOTE_KIND (next) == NOTE_INSN_BASIC_BLOCK)
+               next = NEXT_INSN (next);
              add_reg_note (next, REG_SAVE_NOTE,
                            GEN_INT (NOTE_INSN_EPILOGUE_BEG));
              break;


More information about the Gcc-bugs mailing list