From 988ed78513a850a6c7eb2b99af93d68668d4a0c7 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 12 Apr 2017 10:08:18 -0600 Subject: [PATCH] genattrtab.c (write_eligible_delay): Verify DELAY_INSN still has a delay slot in the generated code. * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still has a delay slot in the generated code. From-SVN: r246879 --- gcc/ChangeLog | 3 +++ gcc/genattrtab.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc0becfe49f..89af9cc1671 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2017-04-12 Jeff Law + * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still + has a delay slot in the generated code. + * config/cris/cris.md (cris_preferred_reload_class): Return GENNONACR_REGS rather than GENERAL_REGS. diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index cd4e6689db4..3629b5fa486 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -4416,6 +4416,9 @@ write_eligible_delay (FILE *outf, const char *kind) fprintf (outf, "{\n"); fprintf (outf, " rtx_insn *insn ATTRIBUTE_UNUSED;\n"); fprintf (outf, "\n"); + fprintf (outf, " if (num_delay_slots (delay_insn) == 0)\n"); + fprintf (outf, " return 0;"); + fprintf (outf, "\n"); fprintf (outf, " gcc_assert (slot < %d);\n", max_slots); fprintf (outf, "\n"); /* Allow dbr_schedule to pass labels, etc. This can happen if try_split -- 2.30.2