public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikpelinux at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/58779] [4.7/4.8/4.9 Regression] wrong code at -O1 on x86_64-linux-gnu
Date: Sun, 20 Oct 2013 21:08:00 -0000	[thread overview]
Message-ID: <bug-58779-4-4qONlsDVwt@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58779-4@http.gcc.gnu.org/bugzilla/>

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

Mikael Pettersson <mikpelinux at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu.org,
                   |                            |mikpelinux at gmail dot com

--- Comment #2 from Mikael Pettersson <mikpelinux at gmail dot com> ---
Started with r180109.  CC:ing author.

The code generation difference for this test case at r180109 is:

--- pr58779-r180108.s   2013-10-20 22:44:38.935370903 +0200
+++ pr58779-r180109.s   2013-10-20 22:40:11.576301229 +0200
@@ -8,11 +8,10 @@
        subq    $8, %rsp
        .cfi_def_cfa_offset 16
        movl    a(%rip), %eax
-       leal    -1(%rax), %edx
-       cmpl    %edx, %eax
-       jb      .L2
+       addl    $-1, %eax
+       jb      .L3
        call    abort
-.L2:
+.L3:
        movl    $0, %eax
        addq    $8, %rsp
        .cfi_def_cfa_offset 8

But these two code fragments set the flags differently: according to gdb the
older one sets CF AF IF at the point of the jb, while the newer one sets PF SF
IF.  Since jb checks CF, the newer code fails.


  parent reply	other threads:[~2013-10-20 21:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18  6:44 [Bug rtl-optimization/58779] New: " su at cs dot ucdavis.edu
2013-10-18  6:53 ` [Bug rtl-optimization/58779] [4.7/4.8/4.9 Regression] " pinskia at gcc dot gnu.org
2013-10-18  8:16 ` rguenth at gcc dot gnu.org
2013-10-20 21:08 ` mikpelinux at gmail dot com [this message]
2013-10-21  6:52 ` [Bug target/58779] " pinskia at gcc dot gnu.org
2013-10-22  6:10 ` ubizjak at gmail dot com
2013-10-22  7:08 ` ubizjak at gmail dot com
2013-10-22 18:36 ` uros at gcc dot gnu.org
2013-10-22 18:38 ` ubizjak at gmail dot com
2013-10-26  6:02 ` uros at gcc dot gnu.org
2013-10-26  6:09 ` uros 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-58779-4-4qONlsDVwt@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).