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

            Bug ID: 35065
           Summary: Missing tail calls for large structs
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedb...@nondot.org
          Reporter: jmuizel...@mozilla.com
                CC: llvm-bugs@lists.llvm.org

The following code:

struct Foo {
   int o[16];
};

__attribute__((noinline))
Foo moo()
{
        return {0};
}

Foo goo()
{
        return moo();
}

compiles to:

moo(): # @moo()
  xorps xmm0, xmm0
  movups xmmword ptr [rdi + 48], xmm0
  movups xmmword ptr [rdi + 32], xmm0
  movups xmmword ptr [rdi + 16], xmm0
  movups xmmword ptr [rdi], xmm0
  mov rax, rdi
  ret
goo(): # @goo()
  push rbx
  mov rbx, rdi
  call moo()
  mov rax, rbx
  pop rbx
  ret

goo could just be:

goo():
  jmp moo

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to