diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 70d81997853..e3a8837158e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Wed Jul 8 21:43:14 1998 Jeffrey A Law (law@cygnus.com) + + * cse.c (count_reg_usage): Count registers used in addresses of + CLOBBERs. + Wed Jul 8 15:08:29 1998 Jim Wilson * Makefile.in (STAGESTUFF): Readd line lost during June 9 FSF merge. diff --git a/gcc/cse.c b/gcc/cse.c index e34908f1680..19e809a52dc 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -8784,7 +8784,13 @@ count_reg_usage (x, counts, dest, incr) case CONST_DOUBLE: case SYMBOL_REF: case LABEL_REF: - case CLOBBER: + return; + + case CLOBBER: + /* If we are clobbering a MEM, mark any registers inside the address + as being used. */ + if (GET_CODE (XEXP (x, 0)) == MEM) + count_reg_usage (XEXP (XEXP (x, 0), 0), counts, NULL_RTX, incr); return; case SET: