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.

Reply via email to