[llvm-bugs] [Bug 48982] New: [MIPS] Failure to optimize out function prologue and epilogue

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jan 31 22:58:11 PST 2021


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

            Bug ID: 48982
           Summary: [MIPS] Failure to optimize out function prologue and
                    epilogue
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: MIPS
          Assignee: unassignedbugs at nondot.org
          Reporter: gabravier at gmail.com
                CC: llvm-bugs at lists.llvm.org

void f(){}

With -O3, GCC generates this:

f():
  jrc $31

LLVM generates this:

f():
  daddiu $sp, $sp, -16
  sd $ra, 8($sp) # 8-byte Folded Spill
  sd $fp, 0($sp) # 8-byte Folded Spill
  move $fp, $sp
  move $sp, $fp
  ld $fp, 0($sp) # 8-byte Folded Reload
  ld $ra, 8($sp) # 8-byte Folded Reload
  jr $ra
  daddiu $sp, $sp, 16

-- 
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/20210201/c95d44a3/attachment.html>


More information about the llvm-bugs mailing list