public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sje at cup dot hp dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/44790] [4.6 Regression] Bootstrap fails after MEM-REF merge
Date: Tue, 06 Jul 2010 16:44:00 -0000	[thread overview]
Message-ID: <20100706164430.15564.qmail@sourceware.org> (raw)
In-Reply-To: <bug-44790-3107@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from sje at cup dot hp dot com  2010-07-06 16:44 -------
The neccessary UNSPEC seems to be there if you trace the instructions back
far enough.  I tried it on my test case and it worked.  I am now testing the
patch on ToT to see if I can bootstrap.  I also have to turn off partial
inlining to get bootstrap to work on ia64-hp-hpux11.23.  I tweaked the patch
for ToT there are a bunch of changes to expr.c including setting base so the
patch I am currently testing with r161861 looks like this:

Index: expr.c
===================================================================
--- expr.c      (revision 161861)
+++ expr.c      (working copy)
@@ -8777,13 +8777,11 @@ expand_expr_real_1 (tree exp, rtx target
          base = build2 (BIT_AND_EXPR, TREE_TYPE (base),
                         gimple_assign_rhs1 (def_stmt),
                         gimple_assign_rhs2 (def_stmt));
-       op0 = expand_expr (base, NULL_RTX, address_mode, EXPAND_NORMAL);
        if (!integer_zerop (TREE_OPERAND (exp, 1)))
-         {
-           rtx off;
-           off = immed_double_int_const (mem_ref_offset (exp), address_mode);
-           op0 = simplify_gen_binary (PLUS, address_mode, op0, off);
-         }
+         base = build2 (POINTER_PLUS_EXPR, TREE_TYPE (base),
+                        base, double_int_to_tree (sizetype,
+                                                  mem_ref_offset (exp)));
+       op0 = expand_expr (base, NULL_RTX, address_mode, EXPAND_SUM);
        op0 = memory_address_addr_space (mode, op0, as);
        temp = gen_rtx_MEM (mode, op0);
        set_mem_attributes (temp, exp, 0);


-- 


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


  parent reply	other threads:[~2010-07-06 16:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-02 18:53 [Bug middle-end/44790] New: " sje at cup dot hp dot com
2010-07-02 19:49 ` [Bug middle-end/44790] " sje at cup dot hp dot com
2010-07-03 11:17 ` rguenth at gcc dot gnu dot org
2010-07-06 14:26 ` [Bug middle-end/44790] [4.6 Regression] " rguenth at gcc dot gnu dot org
2010-07-06 16:44 ` sje at cup dot hp dot com [this message]
2010-07-06 22:56 ` sje at cup dot hp dot com
2010-07-07  8:35 ` rguenther at suse dot de
2010-07-07 12:44 ` rguenth at gcc dot gnu dot org
2010-07-07 13:04 ` rguenth at gcc dot gnu dot org
2010-07-28  7:45 ` ebotcazou 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=20100706164430.15564.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).