diff options
author | Richard Henderson <rth@redhat.com> | 2005-08-02 21:32:00 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-08-02 21:32:00 -0700 |
commit | 65030b761eb52ccc011643c90ad10e71b18898dd (patch) | |
tree | 329c3ae87e628947fe21ab63b1119ed79d5a2479 /gcc/combine.c | |
parent | 776928b46c9ac74faa89bfe1b4358b84e9e3ad8e (diff) | |
download | gcc-65030b761eb52ccc011643c90ad10e71b18898dd.zip gcc-65030b761eb52ccc011643c90ad10e71b18898dd.tar.gz gcc-65030b761eb52ccc011643c90ad10e71b18898dd.tar.bz2 |
combine.c (combine_instructions): Don't use reg_equal/equiv results if the mode doesn't match.
* combine.c (combine_instructions): Don't use reg_equal/equiv
results if the mode doesn't match.
From-SVN: r102679
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index d8d3baf98..bbd6c09 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -860,16 +860,19 @@ combine_instructions (rtx f, unsigned int nregs) rtx temp = XEXP (links, 0); if ((set = single_set (temp)) != 0 && (note = find_reg_equal_equiv_note (temp)) != 0 - && GET_CODE (XEXP (note, 0)) != EXPR_LIST + && (note = XEXP (note, 0), GET_CODE (note)) != EXPR_LIST /* Avoid using a register that may already been marked dead by an earlier instruction. */ - && ! unmentioned_reg_p (XEXP (note, 0), SET_SRC (set))) + && ! unmentioned_reg_p (note, SET_SRC (set)) + && (GET_MODE (note) == VOIDmode + ? SCALAR_INT_MODE_P (GET_MODE (SET_DEST (set))) + : GET_MODE (SET_DEST (set)) == GET_MODE (note))) { /* Temporarily replace the set's source with the contents of the REG_EQUAL note. The insn will be deleted or recognized by try_combine. */ rtx orig = SET_SRC (set); - SET_SRC (set) = XEXP (note, 0); + SET_SRC (set) = note; next = try_combine (insn, temp, NULL_RTX, &new_direct_jump_p); if (next) |