Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Bug 15961 - Testcase we don't devirtualize #15963

Open Quuxplusone opened 11 years ago

Quuxplusone commented 11 years ago
Bugzilla Link PR15963
Status NEW
Importance P normal
Reported by Rafael Ávila de Espíndola (rafael@espindo.la)
Reported on 2013-05-10 10:52:47 -0700
Last modified on 2013-05-10 18:34:02 -0700
Version unspecified
Hardware PC Linux
CC clattner@nondot.org, dgregor@apple.com, llvm-bugs@lists.llvm.org, nlewycky@google.com
Fixed by commit(s)
Attachments inline-devirt-4.C (1020 bytes, text/x-c++src)
Blocks
Blocked by
See also
Created attachment 10493
testcase

This is extracted (and simplified a bit) from 8886 so that we have one case per
bug.

With gcc 4.8 the main function compiles down to just

main:
        subq    $24, %rsp
        movl    $97, %esi
        movl    $.LC0, %edi
        xorl    %eax, %eax
        movb    $98, 9(%rsp)
        call    printf
        movsbl  9(%rsp), %esi
        movl    $.LC0, %edi
        xorl    %eax, %eax
        call    printf
        xorl    %eax, %eax
        addq    $24, %rsp
        ret
Quuxplusone commented 11 years ago

Attached inline-devirt-4.C (1020 bytes, text/x-c++src): testcase