public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jgreenhalgh at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/65235] Simplifying vec_select of vec_concat miscompiles when first element of vec_concat is const_int
Date: Mon, 02 Mar 2015 11:06:00 -0000	[thread overview]
Message-ID: <bug-65235-4-eP2f4WuoRg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65235-4@http.gcc.gnu.org/bugzilla/>

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

James Greenhalgh <jgreenhalgh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|aarch64                     |aarch64*-*-*
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-02
                 CC|                            |jgreenhalgh at gcc dot gnu.org
               Host|                            |*-*-*
     Ever confirmed|0                           |1

--- Comment #7 from James Greenhalgh <jgreenhalgh at gcc dot gnu.org> ---
The tescase from comment 5 fails for me at -O3 on an aarch64-none-elf cross
compiler (r221086), this also fails for native aarch64-none-linux-gnu.

As with Kyrill, I see:

(insn 16 15 17 2 (set (reg:V2DI 80 [ D.2809 ])
        (vec_concat:V2DI (reg:DI 95 [ D.2812 ])
            (reg:DI 77 [ D.2806 ]))) reduced.c:19 1386
{aarch64_combine_internaldi}
     (expr_list:REG_DEAD (reg:DI 95 [ D.2812 ])
        (expr_list:REG_DEAD (reg:DI 77 [ D.2806 ])
            (expr_list:REG_EQUAL (vec_concat:V2DI (reg:DI 95 [ D.2812 ])
                    (const_int 4503599627370498 [0x10000000000002]))
                (nil)))))

(insn 17 16 18 2 (set (reg:DI 96 [ D.2806 ])
        (vec_select:DI (reg:V2DI 80 [ D.2809 ])
            (parallel [
                    (const_int 0 [0])
                ]))) reduced.c:14 1372 {aarch64_get_lanev2di}
     (expr_list:REG_DEAD (reg:V2DI 80 [ D.2809 ])
        (nil)))
----
Combine:

Trying 16 -> 17:
Successfully matched this instruction:
(set (reg:DI 96 [ D.2806 ])
    (reg:DI 77 [ D.2806 ]))
---

Which is bogus, the correct rewrite would be to:

(set (reg:DI 96 [ D.2806 ])
    (reg:DI 95 [ D.2812 ]))


  parent reply	other threads:[~2015-03-02 11:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 13:09 [Bug rtl-optimization/65235] New: [4.8, 4.9, 5 Regression] " ktkachov at gcc dot gnu.org
2015-02-27 13:20 ` [Bug rtl-optimization/65235] [4.8/4.9/5 " rguenth at gcc dot gnu.org
2015-02-27 13:21 ` rguenth at gcc dot gnu.org
2015-02-27 16:20 ` ktkachov at gcc dot gnu.org
2015-02-27 16:30 ` ktkachov at gcc dot gnu.org
2015-02-27 16:53 ` ktkachov at gcc dot gnu.org
2015-02-27 16:56 ` ktkachov at gcc dot gnu.org
2015-03-02 11:06 ` jgreenhalgh at gcc dot gnu.org [this message]
2015-03-12 13:41 ` [Bug rtl-optimization/65235] " ktkachov at gcc dot gnu.org
2015-03-12 13:43 ` ktkachov at gcc dot gnu.org
2015-03-19 10:29 ` ktkachov at gcc dot gnu.org
2015-06-23  9:01 ` rguenth 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-65235-4-eP2f4WuoRg@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).