summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-05 21:24:45 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-05 21:24:45 +0000
commitebd13eec90b5c1b3e63bb37a56fc7550343b2649 (patch)
treeed8e91baeb0cedb880fffc44406d29f431257697 /gcc/alias.c
parentafcc6a695b01f26eef719989da0f425985ed93b7 (diff)
downloadgcc-ebd13eec90b5c1b3e63bb37a56fc7550343b2649.tar.gz
* alias.c (find_base_value): Only return the known base value for
pseudo registers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16345 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 0943444185a..025da501a42 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -102,10 +102,14 @@ find_base_value (src)
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)])
+ /* If a pseudo has a known base value, return it. Do not do this
+ for hard regs since it can result in a circular dependency
+ chain for registers which have values at function entry.
+
+ The test above is not sufficient because the scheduler may move
+ a copy out of an arg reg past the NOTE_INSN_FUNCTION_BEGIN. */
+ if (REGNO (src) >= FIRST_PSEUDO_REGISTER
+ && reg_base_value[REGNO (src)])
return reg_base_value[REGNO (src)];
return src;