[llvm-bugs] [Bug 26302] New: [x86] Tail call with conditional jumps

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 25 15:47:16 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26302

            Bug ID: 26302
           Summary: [x86] Tail call with conditional jumps
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: hans at chromium.org
                CC: llvm-bugs at lists.llvm.org
            Blocks: 26299
    Classification: Unclassified

For the following IR:

  declare void @foo()
  declare void @bar()
  define void @f(i1 %x) {
  entry:
    br i1 %x, label %bb1, label %bb2
  bb1:
    tail call void @foo()
    ret void
  bb2:
    tail call void @bar()
    ret void
  }

We generate:
    testb    $1, 4(%esp)
    je    .LBB0_2
    jmp    foo
  .LBB0_2:
    jmp    bar

But MSVC would generate:
    testb    $1, 4(%esp)
    je    bar
    jmp    foo

which is shorter.

-- 
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/20160125/2d1e813b/attachment.html>


More information about the llvm-bugs mailing list