public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "guillaume at morinfr dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/47466] c++ __builtin_expect() regression
Date: Wed, 26 Jan 2011 19:13:00 -0000	[thread overview]
Message-ID: <bug-47466-4-aAoYaF3hdR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47466-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from Guillaume Morin <guillaume at morinfr dot org> 2011-01-26 18:26:34 UTC ---
A recent 4.6 snapshot shows the same issue

    .file    "foo.cpp"
    .text
    .p2align 4,,15
    .globl    test_expect(EnumStruct const&)
    .type    test_expect(EnumStruct const&), @function
test_expect(EnumStruct const&):
.LFB4:
    .cfi_startproc
    subq    $8, %rsp
    .cfi_def_cfa_offset 16
    movsbl    (%rdi), %edx
    xorl    %eax, %eax
    testl    %edx, %edx
    je    .L2
    cmpl    $1, %edx
    je    .L2
    call    unlikelyCall()
    movl    $1, %eax
.L2:
    addq    $8, %rsp
    .cfi_def_cfa_offset 8
    ret
    .cfi_endproc
.LFE4:
    .size    test_expect(EnumStruct const&), .-test_expect(EnumStruct const&)
    .p2align 4,,15
    .globl    test_expect2(EnumStruct const&)
    .type    test_expect2(EnumStruct const&), @function
test_expect2(EnumStruct const&):
.LFB5:
    .cfi_startproc
    subq    $8, %rsp
    .cfi_def_cfa_offset 16
    movsbl    (%rdi), %edx
    xorl    %eax, %eax
    testl    %edx, %edx
    jne    .L10
.L7:
    addq    $8, %rsp
    .cfi_remember_state
    .cfi_def_cfa_offset 8
    ret
.L10:
    .cfi_restore_state
    subl    $1, %edx
    je    .L7
    .p2align 4,,5
    call    unlikelyCall()
    movl    $1, %eax
    jmp    .L7
    .cfi_endproc
.LFE5:
    .size    test_expect2(EnumStruct const&), .-test_expect2(EnumStruct const&)
    .ident    "GCC: (Debian 20110116-1) 4.6.0 20110116 (experimental) [trunk
revision 168860]"
    .section    .note.GNU-stack,"",@progbits


  reply	other threads:[~2011-01-26 18:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26  4:33 [Bug middle-end/47466] New: " guillaume at morinfr dot org
2011-01-26 19:13 ` guillaume at morinfr dot org [this message]
2011-12-15 23:19 ` [Bug middle-end/47466] " pinskia 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-47466-4-aAoYaF3hdR@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).