From b2b7ec86c288f64e01b8917cb10fd150e2427f09 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 16 Dec 2004 11:19:04 -0800 Subject: [PATCH] simplify-rtx.c (simplify_replace_rtx): Do not blindly replace hard registers. * simplify-rtx.c (simplify_replace_rtx): Do not blindly replace hard registers. [[Split portion of a mixed commit.]] Co-Authored-By: Aldy Hernandez From-SVN: r92278.2 --- gcc/ChangeLog | 6 ++++++ gcc/simplify-rtx.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5afd17404e..24d534b4d0d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-12-16 Richard Henderson + Aldy Hernandez + + * simplify-rtx.c (simplify_replace_rtx): Do not blindly replace + hard registers. + 2004-12-16 H.J. Lu PR other/18508 diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 3685bbf8d2c..5feeb650dc9 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -337,7 +337,7 @@ simplify_replace_rtx (rtx x, rtx old_rtx, rtx new_rtx) } else if (code == REG) { - if (REG_P (old_rtx) && REGNO (x) == REGNO (old_rtx)) + if (rtx_equal_p (x, old_rtx)) return new_rtx; } break;