[llvm-bugs] [Bug 49726] New: Utilize stack adjusting push better

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 25 13:23:48 PDT 2021


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

            Bug ID: 49726
           Summary: Utilize stack adjusting push better
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: nok.raven at gmail.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, pengfei.wang at intel.com,
                    spatel+llvm at rotateright.com

void bar(long long int);
long long int foo(long long int x) {
    bar(x);
    return x;
}

produces:

foo(long long):
    push  rbx
    mov   rbx, rdi
    call  bar(long long)
    mov   rax, rbx
    pop   rbx
    ret

could not it be:

foo(long long):
    push  rdi
    call  bar(long long)
    pop   rax
    ret

-- 
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/20210325/5d4545c8/attachment.html>


More information about the llvm-bugs mailing list