public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/51895] [4.7 Regression] ICE in simplify_subreg
Date: Thu, 19 Jan 2012 08:19:00 -0000	[thread overview]
Message-ID: <bug-51895-4-6pYnFzRFJ7@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51895-4@http.gcc.gnu.org/bugzilla/>

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-19 07:33:07 UTC ---
This starts with eipa_sra.  It changes a S argument (which has TImode
TYPE_MODE) into char [9] (with BLKmode)) and then on both caller and callee
side we have on one side a BLKmode type and on the other side a BLKmode MEM_REF
with pointer to TImode on the second MEM_REF operand.
I wonder why it does this, instead of just using type S, and if it really has
to for some reason, why it can't at least make sure it has the same TYPE_MODE.
Changing a TImode argument to a BLKmode argument doesn't look at least like a
good optimization.

Or the bug is in the MEM_REF expansion, which expands a BLKmode MEM_REF into a
TImode reg:
                bftype = TREE_TYPE (base);
                if (TYPE_MODE (TREE_TYPE (exp)) != BLKmode)
                  bftype = TREE_TYPE (exp);
                return expand_expr (build3 (BIT_FIELD_REF, bftype,
                                            base,
                                            TYPE_SIZE (TREE_TYPE (exp)),
                                            bit_offset),
                                    target, tmode, modifier);
base here is TImode (x PARM_DECL), but exp is BLKmode, so this returns a TImode
pseudo.  Shouldn't it store it into a BLKmode temporary and return that MEM
instead?


  parent reply	other threads:[~2012-01-19  7:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19  2:22 [Bug middle-end/51895] New: " jakub at gcc dot gnu.org
2012-01-19  4:17 ` [Bug middle-end/51895] " bergner at gcc dot gnu.org
2012-01-19  8:19 ` jakub at gcc dot gnu.org [this message]
2012-01-19 10:16 ` rguenth at gcc dot gnu.org
2012-01-19 10:47 ` jakub at gcc dot gnu.org
2012-01-19 12:47 ` jakub at gcc dot gnu.org
2012-01-19 13:12 ` rguenth at gcc dot gnu.org
2012-01-19 13:32 ` jakub at gcc dot gnu.org
2012-01-19 13:38 ` rguenth at gcc dot gnu.org
2012-01-19 14:07 ` jakub at gcc dot gnu.org
2012-01-19 16:28 ` ebotcazou at gcc dot gnu.org
2012-01-20  9:42 ` jakub at gcc dot gnu.org
2012-01-20  9:54 ` ebotcazou at gcc dot gnu.org
2012-01-20 14:36 ` rguenth at gcc dot gnu.org
2012-01-20 14:38 ` rguenth at gcc dot gnu.org
2012-01-20 15:30 ` rguenth at gcc dot gnu.org
2012-01-20 17:23 ` jakub at gcc dot gnu.org
2012-01-23 12:37 ` rguenth at gcc dot gnu.org
2012-01-26 14:58 ` jakub at gcc dot gnu.org
2012-01-26 15:03 ` jakub 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-51895-4-6pYnFzRFJ7@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).