public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/25196] [4.0/4.1 Regression] i386: wrong arguments passed
Date: Tue, 20 Dec 2005 15:58:00 -0000	[thread overview]
Message-ID: <20051220155833.10603.qmail@sourceware.org> (raw)
In-Reply-To: <bug-25196-4672@http.gcc.gnu.org/bugzilla/>



------- Comment #8 from steven at gcc dot gnu dot org  2005-12-20 15:58 -------
Gross.  According to a comment in postreload.c:move2add_note_store(), we can
have pushes without REG_INC notes:
  /* Some targets do argument pushes without adding REG_INC notes.  */

So we need to go look for those {pre,post}{decrements,increments} ourselves. 
With this patch, we just do what postreload.c does.


Index: postreload-gcse.c
===================================================================
--- postreload-gcse.c   (revision 108853)
+++ postreload-gcse.c   (working copy)
@@ -676,6 +676,17 @@ record_last_set_info (rtx dest, rtx sett
           /* Ignore pushes, they clobber nothing.  */
           && ! push_operand (dest, GET_MODE (dest)))
     record_last_mem_set_info (last_set_insn);
+
+  /* ??? Some targets do argument pushes without adding REG_INC notes.
+     See e.g. PR25196, where a pushsi2 on i386 doesn't have REG_INC
+     notes.  */
+  if (MEM_P (dest))
+    {
+      dest = XEXP (dest, 0);
+      if (GET_CODE (dest) == PRE_INC || GET_CODE (dest) == POST_INC
+         || GET_CODE (dest) == PRE_DEC || GET_CODE (dest) == POST_DEC)
+       record_last_reg_set_info (last_set_insn, REGNO (XEXP (dest, 0)));
+    }
 }


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25196


  parent reply	other threads:[~2005-12-20 15:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-01  6:05 [Bug target/25196] New: " markus at oberhumer dot com
2005-12-01  6:06 ` [Bug target/25196] " markus at oberhumer dot com
2005-12-01  7:02 ` [Bug target/25196] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-12-19 18:50 ` mmitchel at gcc dot gnu dot org
2005-12-20  9:17 ` [Bug rtl-optimization/25196] " belyshev at depni dot sinp dot msu dot ru
2005-12-20 10:17 ` steven at gcc dot gnu dot org
2005-12-20 10:18 ` steven at gcc dot gnu dot org
2005-12-20 10:59 ` belyshev at depni dot sinp dot msu dot ru
2005-12-20 14:59 ` steven at gcc dot gnu dot org
2005-12-20 15:58 ` steven at gcc dot gnu dot org [this message]
2005-12-21 15:46 ` [Bug rtl-optimization/25196] [4.0 " steven at gcc dot gnu dot org
2006-01-27 18:03 ` markus at oberhumer dot com
2006-02-27 20:21 ` mmitchel at gcc dot gnu dot org
2006-02-27 21:13 ` steven at gcc dot gnu dot org
2006-02-27 21:34 ` steven at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051220155833.10603.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).