public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@bitrange.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: Invalid reload inheritance with paradoxical subregs
Date: Mon, 06 Apr 2009 16:28:00 -0000	[thread overview]
Message-ID: <20090406115753.T4064@dair.pair.com> (raw)
In-Reply-To: <5787cf470904020351ve8a375bq455a31c185443f82@mail.gmail.com>

On Thu, 2 Apr 2009, Uros Bizjak wrote:
> Combine simplifies lshiftrt/shift/and combined instruction under the
> assumption, that for ZERO_EXTEND LOAD_EXTEND_OP targets it can prove
> that certain bits are zero, so AND operation can be omitted. The
> resulting instruction is valid only for memory operand:
...
> (gdb) p debug_rtx (insn)
> (insn 121 120 125 2 t.c:22 (set (reg:SI 6 r6 [orig:48 y$k.115 ] [48])
>         (lshiftrt:SI (subreg:SI (reg:HI 7 r7) 0)
>             (const_int 5 [0x5]))) 62 {lshrsi3} (nil))
>
> This substitution is wrong. Paradoxical subreg  of a memory operand is
> for our target known to zero extend to SImode value, however -
> paradoxical subreg of a register operand has undefined bits outside
> the reg. So, combine and reload doesn't agree on the bits outside the
> register.

Looks like the issue I attributed to IRA for
mmix-knuth-mmixware:
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38603>
(no, not a great deal of analysis there, I'm afraid).

And again, I'd be perfectly fine with removing this weird
LOAD_EXTEND_OP-specific "feature".  I'm of half a mind to remove
the #define from the MMIX port.

brgds, H-P

  parent reply	other threads:[~2009-04-06 16:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-01 13:35 Joern Rennecke
2009-04-02 10:52 ` Uros Bizjak
2009-04-02 14:58   ` Joern Rennecke
2009-04-06 16:28   ` Hans-Peter Nilsson [this message]
2009-04-06 18:28     ` Uros Bizjak
2009-04-06 19:06       ` Hans-Peter Nilsson
  -- strict thread matches above, loose matches on Subject: below --
2009-04-01 13:15 Uros Bizjak

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=20090406115753.T4064@dair.pair.com \
    --to=hp@bitrange.com \
    --cc=gcc@gcc.gnu.org \
    --cc=ubizjak@gmail.com \
    /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).