From aabb6c7408f8d51575e9cdaac5e9296d82d27b52 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 25 Apr 2000 00:40:36 +0000 Subject: [PATCH] Do not try to combine a sequence of insns when the second insn has been replaced by a note. From-SVN: r33398 --- gcc/ChangeLog | 6 ++++++ gcc/combine.c | 21 +++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4bb17080c2..52404788b87 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2000-04-24 Nick Clifton + + * combine.c (combine_instructions): Do not try to combine a + sequence of insns when the second insn has been replaced by a + note. + Mon Apr 24 17:34:18 2000 Mumit Khan * gcc.c (load_specs): New static function. diff --git a/gcc/combine.c b/gcc/combine.c index 9396959a67b..366ada79ce3 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -646,12 +646,21 @@ combine_instructions (f, nregs) /* Try each sequence of three linked insns ending with this one. */ for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) - for (nextlinks = LOG_LINKS (XEXP (links, 0)); nextlinks; - nextlinks = XEXP (nextlinks, 1)) - if ((next = try_combine (insn, XEXP (links, 0), - XEXP (nextlinks, 0), - &new_direct_jump_p)) != 0) - goto retry; + { + rtx link = XEXP (links, 0); + + /* If the linked insn has been replaced by a note, then there + is no point in persuing this chain any further. */ + if (GET_CODE (link) == NOTE) + break; + + for (nextlinks = LOG_LINKS (link); + nextlinks; + nextlinks = XEXP (nextlinks, 1)) + if ((next = try_combine (insn, XEXP (links, 0), + XEXP (nextlinks, 0))) != 0) + goto retry; + } #ifdef HAVE_cc0 /* Try to combine a jump insn that uses CC0 -- 2.30.2