From 9ba66cd7e08ae06ea044b263889c032bb1981799 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 21 Jul 1998 05:03:40 +0000 Subject: [PATCH] jump.c (jump_optimize): When simplifying noop moves and PUSH_ROUNDING... * jump.c (jump_optimize): When simplifying noop moves and PUSH_ROUNDING, fix thinko so we use same criterion for identifying the PUSHes to rewrite in second loop as we did in the first. From-SVN: r21318 --- gcc/ChangeLog | 6 ++++++ gcc/jump.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e92f02e50329..62f98f6d592c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Tue Jul 21 03:59:08 1998 David S. Miller + + * jump.c (jump_optimize): When simplifying noop moves and + PUSH_ROUNDING, fix thinko so we use same criterion for identifying + the PUSHes to rewrite in second loop as we did in the first. + Tue Jul 21 00:31:01 1998 Jeffrey A Law (law@cygnus.com) * configure.in: Fix minor problems with gas feature detection code. diff --git a/gcc/jump.c b/gcc/jump.c index fce3dc027718..dfc4ae64c3e1 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -402,9 +402,14 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) if (GET_CODE (p) != INSN) break; pbody = PATTERN (p); - if (GET_CODE (pbody) == SET) + if (GET_CODE (pbody) != SET) break; dest = SET_DEST (pbody); + /* Allow a no-op move between the adjust and the push. */ + if (GET_CODE (dest) == REG + && GET_CODE (SET_SRC (pbody)) == REG + && REGNO (dest) == REGNO (SET_SRC (pbody))) + continue; if (! (GET_CODE (dest) == MEM && GET_CODE (XEXP (dest, 0)) == POST_INC && XEXP (XEXP (dest, 0), 0) == stack_pointer_rtx)) -- 2.47.2