diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2006-09-12 23:48:40 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2006-09-12 21:48:40 +0000 |
commit | 7e721950cb72349fd66661edc2d87f4d4e9895a1 (patch) | |
tree | 80407237f314500d9bf114072032704bb1a93cba /gcc/combine.c | |
parent | ff682191312962bc020b67112b517a98552c70d3 (diff) | |
download | gcc-7e721950cb72349fd66661edc2d87f4d4e9895a1.zip gcc-7e721950cb72349fd66661edc2d87f4d4e9895a1.tar.gz gcc-7e721950cb72349fd66661edc2d87f4d4e9895a1.tar.bz2 |
re PR rtl-optimization/28243 (internal consistency failure when building fontforge with -O3 -fPIC -ftracer)
PR rtl-optimization/28243
* combine.c (distribute_notes) <REG_DEAD>: Do not consider SETs past
the insn to which the note was originally attached.
From-SVN: r116906
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 0f4ea02..e85e9d1 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -12165,12 +12165,14 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2, continue; } - /* If the register is being set at TEM, see if that is all - TEM is doing. If so, delete TEM. Otherwise, make this - into a REG_UNUSED note instead. Don't delete sets to - global register vars. */ - if ((REGNO (XEXP (note, 0)) >= FIRST_PSEUDO_REGISTER - || !global_regs[REGNO (XEXP (note, 0))]) + /* If TEM is a (reaching) definition of the use to which the + note was attached, see if that is all TEM is doing. If so, + delete TEM. Otherwise, make this into a REG_UNUSED note + instead. Don't delete sets to global register vars. */ + if ((!from_insn + || INSN_CUID (tem) < INSN_CUID (from_insn)) + && (REGNO (XEXP (note, 0)) >= FIRST_PSEUDO_REGISTER + || !global_regs[REGNO (XEXP (note, 0))]) && reg_set_p (XEXP (note, 0), PATTERN (tem))) { rtx set = single_set (tem); |