[llvm-bugs] [Bug 47538] New: implement -mskip-rax-setup

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 15 14:59:52 PDT 2020


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

            Bug ID: 47538
           Summary: implement -mskip-rax-setup
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: ndesaulniers at google.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com
            Blocks: 4068

Via
https://patchwork.ozlabs.org/project/gcc/patch/20141218131150.GA32638@intel.com/

The Linux kernel never passes floating point arguments around, vararg
functions or not. Hence no vector registers are ever used when calling a
vararg function.  But gcc still dutifully emits an "xor %eax,%eax" before
each and every call of a vararg function.  Since no callee use that for
anything, these instructions are redundant.

This patch adds the -mskip-rax-setup option to skip setting up RAX
register when SSE is disabled and there are no variable arguments passed
in vector registers.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=4068
[Bug 4068] [Meta] Compiling the Linux kernel with clang
-- 
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/20200915/e6ef59f2/attachment-0001.html>


More information about the llvm-bugs mailing list