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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to