diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-08 20:59:34 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-08 20:59:34 +0000 |
commit | 66b5cc9dc315e861676735aa178c91870495aa5c (patch) | |
tree | 995729b3efee569d81acd377402557bd54c09abe /gcc/regmove.c | |
parent | 391f2d8b3c483269ddbfb77a0c5b0bd68842a6b6 (diff) | |
download | gcc-66b5cc9dc315e861676735aa178c91870495aa5c.tar.gz |
* regmove.c (combine_stack_adjustments_for_blocks): Recognize pushes
formed using PRE_MODIFY too.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37326 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r-- | gcc/regmove.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c index ebd0ca444bf..008b22cae3e 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -2340,10 +2340,17 @@ combine_stack_adjustments_for_block (bb) turn it into a direct store. Obviously we can't do this if there were any intervening uses of the stack pointer. */ if (memlist == NULL - && (last_sp_adjust - == (HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (dest))) && GET_CODE (dest) == MEM - && GET_CODE (XEXP (dest, 0)) == PRE_DEC + && ((GET_CODE (XEXP (dest, 0)) == PRE_DEC + && (last_sp_adjust + == (HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (dest)))) + || (GET_CODE (XEXP (dest, 0)) == PRE_MODIFY + && GET_CODE (XEXP (XEXP (dest, 0), 1)) == PLUS + && XEXP (XEXP (XEXP (dest, 0), 1), 0) == stack_pointer_rtx + && (GET_CODE (XEXP (XEXP (XEXP (dest, 0), 1), 1)) + == CONST_INT) + && (INTVAL (XEXP (XEXP (XEXP (dest, 0), 1), 1)) + == -last_sp_adjust))) && XEXP (XEXP (dest, 0), 0) == stack_pointer_rtx && ! reg_mentioned_p (stack_pointer_rtx, src) && memory_address_p (GET_MODE (dest), stack_pointer_rtx) |