From 6915d7f00283de626f37d60b13bb62784ae5f1f7 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 13 Jul 2006 07:55:25 +0000 Subject: sh.c (sh_reorg): Ignore deleted insns whilst walking the LOG_LINKS chain. * config/sh/sh.c (sh_reorg): Ignore deleted insns whilst walking the LOG_LINKS chain. From-SVN: r115412 --- gcc/ChangeLog | 5 +++++ gcc/config/sh/sh.c | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e907dd..dd490fa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-07-13 Nick Clifton + + * config/sh/sh.c (sh_reorg): Ignore deleted insns whilst + walking the LOG_LINKS chain. + 2006-07-12 Geoffrey Keating * doc/invoke.texi (C++ Dialect Options): Explain difference diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 7e11e3f..97d8741 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -4466,12 +4466,17 @@ sh_reorg (void) for (link = LOG_LINKS (insn); link; link = XEXP (link, 1)) { + rtx linked_insn; + if (REG_NOTE_KIND (link) != 0) continue; - set = single_set (XEXP (link, 0)); - if (set && rtx_equal_p (reg, SET_DEST (set))) + linked_insn = XEXP (link, 0); + set = single_set (linked_insn); + if (set + && rtx_equal_p (reg, SET_DEST (set)) + && ! INSN_DELETED_P (linked_insn)) { - link = XEXP (link, 0); + link = linked_insn; break; } } -- cgit v1.1