From 73774bc7c0e05ba6bc4f81997d6145ce2c427b21 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Tue, 4 Nov 1997 23:09:21 +0000 Subject: [PATCH] alias.c (find_base_value): When copying arguments, return the tenative value for a hard register. * alias.c (find_base_value): When copying arguments, return the tenative value for a hard register. From-SVN: r16319 --- gcc/ChangeLog | 5 +++++ gcc/alias.c | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 881ffd02b1e..f1ed0dd6948 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 4 16:07:15 1997 Jeffrey A Law (law@cygnus.com) + + * alias.c (find_base_value): When copying arguments, return the + tenative value for a hard register. + Tue Nov 4 13:40:35 1997 Doug Evans * c-lex.c (MULTIBYTE_CHARS): #undef if cross compiling. diff --git a/gcc/alias.c b/gcc/alias.c index 855abaeec20..0943444185a 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -95,16 +95,19 @@ find_base_value (src) return src; case REG: - /* If this REG is related to a known base value, return it. */ - if (reg_base_value[REGNO (src)]) - return reg_base_value[REGNO (src)]; - /* At the start of a function argument registers have known base values which may be lost later. Returning an ADDRESS expression here allows optimization based on argument values even when the argument registers are used for other purposes. */ if (REGNO (src) < FIRST_PSEUDO_REGISTER && copying_arguments) return new_reg_base_value[REGNO (src)]; + + /* If this REG is related to a known base value, return it. + This must happen after the arg register check above to avoid + circular set chains. */ + if (reg_base_value[REGNO (src)]) + return reg_base_value[REGNO (src)]; + return src; case MEM: -- 2.30.2