From: Richard Kenner Date: Fri, 12 Nov 1993 13:53:40 +0000 (-0500) Subject: (pattern_really_clobbers_lr): Setting a subreg of a mem is valid and safe. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0e84b55633a9e926ca9d572057943cc9c3a70761;p=gcc.git (pattern_really_clobbers_lr): Setting a subreg of a mem is valid and safe. From-SVN: r6074 --- diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index f8bc52bb27d..b0752076f1d 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -1552,7 +1552,11 @@ output_ascii_pseudo_op (stream, p, len) /* Try to determine whether a pattern really clobbers the link register. This information is useful when peepholing, so that lr need not be pushed - if we combine a call followed by a return */ + if we combine a call followed by a return. + NOTE: This code does not check for side-effect expressions in a SET_SRC: + such a check should not be needed because these only update an existing + value within a register; the register must still be set elsewhere within + the function. */ static int pattern_really_clobbers_lr (x) @@ -1570,6 +1574,8 @@ rtx x; case SUBREG: if (GET_CODE (XEXP (SET_DEST (x), 0)) == REG) return REGNO (XEXP (SET_DEST (x), 0)) == 14; + if (GET_CODE (XEXP (SET_DEST (x), 0)) == MEM) + return 0; abort (); default: return 0;