From e6770d3c8c6307d5f453e2990b0d9984589b4c53 Mon Sep 17 00:00:00 2001 From: "J\"orn Rennecke" Date: Thu, 2 Dec 1999 19:09:23 +0000 Subject: [PATCH] combine.c (try_combine): Before fixing up LOG_LINKS for the i3_subst_into_i2 case... * combine.c (try_combine): Before fixing up LOG_LINKS for the i3_subst_into_i2 case, check that GET_CODE (PATTERN (i2)) == PARALLEL. From-SVN: r30762 --- gcc/ChangeLog | 5 +++++ gcc/combine.c | 29 ++++++++++++++++------------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f16bf43704c..c7e9bb5065c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Dec 2 18:59:48 1999 J"orn Rennecke + + * combine.c (try_combine): Before fixing up LOG_LINKS for the + i3_subst_into_i2 case, check that GET_CODE (PATTERN (i2)) == PARALLEL. + 1999-12-02 Gavin Romig-Koch * invoke.texi: Document the mips option -mno-crt0 diff --git a/gcc/combine.c b/gcc/combine.c index bc24ce9ae5e..f55bb669976 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -2448,19 +2448,22 @@ try_combine (i3, i2, i1) if (i3_subst_into_i2) { - for (i = 0; i < XVECLEN (PATTERN (i2), 0); i++) - if (GET_CODE (SET_DEST (XVECEXP (PATTERN (i2), 0, i))) == REG - && SET_DEST (XVECEXP (PATTERN (i2), 0, i)) != i2dest - && ! find_reg_note (i2, REG_UNUSED, - SET_DEST (XVECEXP (PATTERN (i2), 0, i)))) - for (temp = NEXT_INSN (i2); - temp && (this_basic_block == n_basic_blocks - 1 - || BLOCK_HEAD (this_basic_block) != temp); - temp = NEXT_INSN (temp)) - if (temp != i3 && GET_RTX_CLASS (GET_CODE (temp)) == 'i') - for (link = LOG_LINKS (temp); link; link = XEXP (link, 1)) - if (XEXP (link, 0) == i2) - XEXP (link, 0) = i3; + if (GET_CODE (PATTERN (i2)) == PARALLEL) + { + for (i = 0; i < XVECLEN (PATTERN (i2), 0); i++) + if (GET_CODE (SET_DEST (XVECEXP (PATTERN (i2), 0, i))) == REG + && SET_DEST (XVECEXP (PATTERN (i2), 0, i)) != i2dest + && ! find_reg_note (i2, REG_UNUSED, + SET_DEST (XVECEXP (PATTERN (i2), 0, i)))) + for (temp = NEXT_INSN (i2); + temp && (this_basic_block == n_basic_blocks - 1 + || BLOCK_HEAD (this_basic_block) != temp); + temp = NEXT_INSN (temp)) + if (temp != i3 && GET_RTX_CLASS (GET_CODE (temp)) == 'i') + for (link = LOG_LINKS (temp); link; link = XEXP (link, 1)) + if (XEXP (link, 0) == i2) + XEXP (link, 0) = i3; + } if (i3notes) {