[LLVMbugs] [Bug 15504] New: Extra code generated in the presence of a large switch

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 13 06:10:24 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15504

            Bug ID: 15504
           Summary: Extra code generated in the presence of a large switch
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: eugeni.stepanov at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10175
  --> http://llvm.org/bugs/attachment.cgi?id=10175&action=edit
reproducer

# clang test.c  -S -O3 -o -

...
foo:                                    # @foo
        .cfi_startproc
# BB#0:                                 # %entry
        xorb    %al, %al
        testb   %al, %al
        je      .LBB0_1
# BB#4:                                 # %sw.epilog
        ret
.LBB0_1:                                # %entry
        movzbl  (%rdi), %eax
        jmpq    *.LJTI0_0(,%rax,8)
.LBB0_2:                                # %sw.bb
        jmp     bar                     # TAILCALL
.LBB0_3:                                # %sw.bb1
        jmp     baz                     # TAILCALL
...

The part starting at "xorb %al, %al" does not seem to do anything useful.
"ret" at BB#4 is never taken.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130313/1d35ed2d/attachment.html>


More information about the llvm-bugs mailing list