summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-14 23:44:39 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-14 23:44:39 +0000
commitf1f1d0f661fe7a85d5bba962ad8ab9d5ce340d8a (patch)
tree15dba891552029856cf0f998de87ad45a413d63b /gcc/alias.c
parent385e24599e40389ecc8cb7c58249d42e5bea543c (diff)
downloadgcc-f1f1d0f661fe7a85d5bba962ad8ab9d5ce340d8a.tar.gz
* alias.c (init_alias_analysis): Avoid self-referential value
when setting reg_known_value from REG_EQUAL notes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25211 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 876b3efbae4..eae57c763a1 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -1465,7 +1465,8 @@ init_alias_analysis ()
&& (((note = find_reg_note (insn, REG_EQUAL, 0)) != 0
&& REG_N_SETS (REGNO (SET_DEST (set))) == 1)
|| (note = find_reg_note (insn, REG_EQUIV, NULL_RTX)) != 0)
- && GET_CODE (XEXP (note, 0)) != EXPR_LIST)
+ && GET_CODE (XEXP (note, 0)) != EXPR_LIST
+ && ! reg_overlap_mentioned_p (SET_DEST (set), XEXP (note, 0)))
{
int regno = REGNO (SET_DEST (set));
reg_known_value[regno] = XEXP (note, 0);