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 rtl-optimization/60116] [4.8/4.9 Regression] wrong code at -Os on x86_64-linux-gnu in 32-bit mode
Date: Mon, 10 Feb 2014 16:48:00 -0000	[thread overview]
Message-ID: <bug-60116-4-38NVFxfnhU@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-60116-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org,
                   |                            |law at gcc dot gnu.org

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, what happens is that we have:
(insn 39 38 41 5 (set (reg:QI 119)
        (const_int 1 [0x1])) pr60116.c:17 93 {*movqi_internal}
     (expr_list:REG_DEAD (reg:CCZ 17 flags)
        (nil)))

(insn 41 39 83 5 (set (reg:CCZ 17 flags)
        (compare:CCZ (reg:SI 101 [ D.1460 ])
            (const_int 0 [0]))) pr60116.c:18 3 {*cmpsi_ccno_1}
     (nil))

(insn 83 41 42 5 (set (reg:SI 122 [ D.1465 ])
        (zero_extend:SI (reg:QI 119))) 138 {*zero_extendqisi2}
     (expr_list:REG_DEAD (reg:QI 119)
        (nil)))

(the REG_DEAD on flags on the first insn supposedly comes from earlier
combining.
try_combine is then called on i3=insn83 and i2=insn39 and manages to combine
insn 83 into (set (reg:SI 122) (const_int 1 [0x1])).
The problem is when distribute_notes attempts to distribute the REG_DEAD
(reg:CCZ 17 flags) note from elim_i2=insn39 to i3=insn83.


  parent reply	other threads:[~2014-02-10 16:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-08  7:26 [Bug tree-optimization/60116] New: " su at cs dot ucdavis.edu
2014-02-08  9:28 ` [Bug target/60116] [4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
2014-02-09 18:04 ` ubizjak at gmail dot com
2014-02-09 20:19 ` jakub at gcc dot gnu.org
2014-02-09 21:13 ` glisse at gcc dot gnu.org
2014-02-09 21:17 ` mpolacek at gcc dot gnu.org
2014-02-09 21:26 ` ubizjak at gmail dot com
2014-02-09 21:38 ` glisse at gcc dot gnu.org
2014-02-09 21:51 ` glisse at gcc dot gnu.org
2014-02-10  9:21 ` ubizjak at gmail dot com
2014-02-10  9:44 ` [Bug rtl-optimization/60116] " rguenth at gcc dot gnu.org
2014-02-10 16:48 ` jakub at gcc dot gnu.org [this message]
2014-02-10 17:16 ` jakub at gcc dot gnu.org
2014-02-10 18:24 ` ebotcazou at gcc dot gnu.org
2014-02-12  8:50 ` ebotcazou at gcc dot gnu.org
2014-02-12  8:52 ` ebotcazou at gcc dot gnu.org
2014-02-12  8:53 ` ebotcazou at gcc dot gnu.org
2014-02-12 10:17 ` ebotcazou at gcc dot gnu.org
2014-02-12 10:17 ` ebotcazou 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-60116-4-38NVFxfnhU@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).