diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-10-29 12:45:32 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-10-29 12:45:32 +0000 |
commit | 7da2602f122232ef9675ceb80e35199b40ef55a1 (patch) | |
tree | f53e80e093c506b4ad1edabd58b81e78710f541c /gcc/stupid.c | |
parent | b177c11bd3f326f03f0315b4bf91c39dd386471d (diff) | |
download | gcc-7da2602f122232ef9675ceb80e35199b40ef55a1.tar.gz |
(stupid_mark_refs): Handle SUBREG of pseudo-reg in a SET_DEST same as
we handle a pseudo-reg in a SET_DEST.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10541 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stupid.c')
-rw-r--r-- | gcc/stupid.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/stupid.c b/gcc/stupid.c index fb50b92a5ae..ed1afcf7dbe 100644 --- a/gcc/stupid.c +++ b/gcc/stupid.c @@ -1,5 +1,5 @@ /* Dummy data flow analysis for GNU compiler in nonoptimizing mode. - Copyright (C) 1987, 1991, 1994 Free Software Foundation, Inc. + Copyright (C) 1987, 1991, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. @@ -423,10 +423,19 @@ stupid_mark_refs (x, insn) if (code == SET || code == CLOBBER) { - if (SET_DEST (x) != 0 && GET_CODE (SET_DEST (x)) == REG) + if (SET_DEST (x) != 0 + && (GET_CODE (SET_DEST (x)) == REG + || (GET_CODE (SET_DEST (x)) == SUBREG + && GET_CODE (SUBREG_REG (SET_DEST (x))) == REG + && (REGNO (SUBREG_REG (SET_DEST (x))) + >= FIRST_PSEUDO_REGISTER)))) { /* Register is being assigned. */ - regno = REGNO (SET_DEST (x)); + /* If setting a SUBREG, we treat the entire reg as being set. */ + if (GET_CODE (SET_DEST (x)) == SUBREG) + regno = REGNO (SUBREG_REG (SET_DEST (x))); + else + regno = REGNO (SET_DEST (x)); /* For hard regs, update the where-live info. */ if (regno < FIRST_PSEUDO_REGISTER) |