public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/53988] [SH] tst Rm,Rn not used for QI/HImode
Date: Mon, 29 Dec 2014 19:03:00 -0000	[thread overview]
Message-ID: <bug-53988-4-h5AEuOavU9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53988-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53988

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2014-12-29
         Resolution|FIXED                       |---
     Ever confirmed|0                           |1

--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> ---
The change in r192982 results in wrong code:

int test (short x, short* y, int z, int w)
{
  return x & y[0] ? z : w;
}

        mov.w   @r5,r1    // sign extended y[0], bits[31:16] = 1
        tst     r4,r1     // r4 bits [31:16] undefined
        bf      .L5
        mov     r7,r0
        rts
        nop
    .align 1
.L5:
        rts
        mov     r6,r0

The *tst<mode>_t_zero insns blindly accept subregs.  They have to check whether
both operands have been sign extended or at least one of them has been zero
extended (to mask out the unwanted high bits).


  parent reply	other threads:[~2014-12-29 19:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17  0:02 [Bug target/53988] New: " olegendo at gcc dot gnu.org
2012-09-03 10:02 ` [Bug target/53988] " olegendo at gcc dot gnu.org
2012-10-31 22:09 ` olegendo at gcc dot gnu.org
2012-11-05 21:11 ` olegendo at gcc dot gnu.org
2014-12-29 19:03 ` olegendo at gcc dot gnu.org [this message]
2015-01-14 23:47 ` olegendo at gcc dot gnu.org
2015-01-19 22:36 ` olegendo at gcc dot gnu.org
2015-03-10  8:10 ` olegendo at gcc dot gnu.org
2015-03-10  8:18 ` olegendo at gcc dot gnu.org
2015-03-10  8:19 ` olegendo 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-53988-4-h5AEuOavU9@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).