public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/67124] [6 Regression] wrong code at -O1, -O2 and -O3 on x86_64-linux-gnu
Date: Thu, 08 Oct 2015 11:04:00 -0000	[thread overview]
Message-ID: <bug-67124-4-UA00mzu3Sy@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-67124-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |rtl-optimization

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, indeed we fail to preserve the (subreg:DI (reg:TI xmm0)) in LRA

(insn 53 52 16 2 (set (reg:DI 21 xmm0 [orig:90 c ] [90])
        (mem/c:DI (plus:DI (reg/f:DI 7 sp)
                (const_int 8 [0x8])) [0 %sfp+-8 S8 A64])) t.c:16 85
{*movdi_internal}
     (nil))
...
(insn 17 16 49 2 (set (reg:V8HI 21 xmm0 [100])
        (vec_merge:V8HI (vec_duplicate:V8HI (reg:HI 0 ax [99]))
            (reg:V8HI 21 xmm0 [orig:90 c ] [90])
            (const_int 4 [0x4]))) t.c:16 3597 {sse2_pinsrw}
     (nil))

from

(insn 15 14 16 2 (parallel [
            (set (subreg:DI (reg/v:TI 90 [ c ]) 0)
                (ior:DI (reg:DI 97)
                    (reg:DI 95)))
            (clobber (reg:CC 17 flags))
        ]) t.c:16 398 {*iordi_1}
     (expr_list:REG_DEAD (reg:DI 97)
        (expr_list:REG_DEAD (reg:DI 95)
            (expr_list:REG_UNUSED (reg:CC 17 flags)
                (nil)))))
...
(insn 17 16 49 2 (set (reg:V8HI 100)
        (vec_merge:V8HI (vec_duplicate:V8HI (subreg:HI (reg:DI 99) 0))
            (subreg:V8HI (reg/v:TI 90 [ c ]) 0)
            (const_int 4 [0x4]))) t.c:16 3597 {sse2_pinsrw}

A plain DImode move to a DImode reg does not preserve the upper halves.  Not
sure if

(insn 53 52 16 2 (set (subreg:DI (reg:TI xmm0 0) [orig:90 c ] [90])
        (mem/c:DI (plus:DI (reg/f:DI 7 sp)
                (const_int 8 [0x8])) [0 %sfp+-8 S8 A64])) t.c:16 85
{*movdi_internal}
     (nil))

would be valid after "reload" though.

Maybe the bug is that we allocate a DImode register to a subreg of a TImode
destination at all.


  parent reply	other threads:[~2015-10-08 11:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05  9:07 [Bug rtl-optimization/67124] New: " su at cs dot ucdavis.edu
2015-08-05  9:15 ` [Bug rtl-optimization/67124] [6 Regression] " mpolacek at gcc dot gnu.org
2015-08-05 11:07 ` [Bug target/67124] " rguenth at gcc dot gnu.org
2015-08-05 13:10 ` mpolacek at gcc dot gnu.org
2015-08-06 21:53 ` [Bug rtl-optimization/67124] " ubizjak at gmail dot com
2015-10-08  8:46 ` [Bug target/67124] " ubizjak at gmail dot com
2015-10-08 11:04 ` rguenth at gcc dot gnu.org [this message]
2015-10-08 13:41 ` [Bug rtl-optimization/67124] " ubizjak at gmail dot com

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-67124-4-UA00mzu3Sy@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).