public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/50251] [4.7 Regression] Revision 178353 caused many test failures
Date: Fri, 02 Sep 2011 22:48:00 -0000	[thread overview]
Message-ID: <bug-50251-4-T2kQTBnqtB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50251-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #16 from vries at gcc dot gnu.org 2011-09-02 22:47:42 UTC ---
Started testing patch from comment 9, augmented with comments:
...
Index: explow.c
===================================================================
--- explow.c (revision 178145)
+++ explow.c (working copy)
@@ -1062,6 +1062,20 @@ emit_stack_restore (enum save_level save
   /* The default is that we use a move insn.  */
   rtx (*fcn) (rtx, rtx) = gen_move_insn;

+  /* If stack_realign_drap, the x86 backend emits a prologue that aligns both
+     STACK_POINTER and HARD_FRAME_POINTER.
+     If stack_realign_fp, the x86 backend emits a prologue that aligns only
+     STACK_POINTER. This renders the HARD_FRAME_POINTER unusable for accessing
+     aligned variables, which is reflected in ix86_can_eliminate.
+     We normally still have the realigned STACK_POINTER that we can use.
+     But if there is a stack restore still present at reload, it can trigger 
+     mark_not_eliminable for the STACK_POINTER, leaving no way to eliminate
+     FRAME_POINTER into a hard reg.
+     To prevent this situation, we force need_drap if we emit a stack
+     restore.  */
+  if (SUPPORTS_STACK_ALIGNMENT)
+    crtl->need_drap = true;
+
   /* See if this machine has anything special to do for this kind of save.  */
   switch (save_level)
     {
...


  parent reply	other threads:[~2011-09-02 22:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-31 12:55 [Bug middle-end/50251] New: " hjl.tools at gmail dot com
2011-08-31 13:20 ` [Bug middle-end/50251] " rguenth at gcc dot gnu.org
2011-08-31 15:28 ` vries at gcc dot gnu.org
2011-09-01 12:43 ` vries at gcc dot gnu.org
2011-09-01 13:07 ` vries at gcc dot gnu.org
2011-09-01 13:26 ` vries at gcc dot gnu.org
2011-09-01 16:30 ` vries at gcc dot gnu.org
2011-09-01 18:04 ` hjl.tools at gmail dot com
2011-09-01 19:27 ` vries at gcc dot gnu.org
2011-09-01 19:33 ` hjl.tools at gmail dot com
2011-09-02  9:05 ` vries at gcc dot gnu.org
2011-09-02  9:25 ` vries at gcc dot gnu.org
2011-09-02  9:38 ` vries at gcc dot gnu.org
2011-09-02  9:42 ` rguenth at gcc dot gnu.org
2011-09-02  9:43 ` rguenth at gcc dot gnu.org
2011-09-02 10:30 ` vries at gcc dot gnu.org
2011-09-02 11:03 ` rguenth at gcc dot gnu.org
2011-09-02 22:48 ` vries at gcc dot gnu.org [this message]
2011-09-03  9:48 ` ebotcazou at gcc dot gnu.org
2011-09-03 12:40 ` vries at gcc dot gnu.org
2011-09-14 14:49 ` vries at gcc dot gnu.org
2011-09-14 14:54 ` vries at gcc dot gnu.org
2011-09-14 14:59 ` vries at gcc dot gnu.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=bug-50251-4-T2kQTBnqtB@http.gcc.gnu.org/bugzilla/ \
    --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).