[llvm-bugs] [Bug 36037] New: Make clang accept the -msahf command-line option to activate the +sahf feature for the backend

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 22 08:41:12 PST 2018


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

            Bug ID: 36037
           Summary: Make clang accept the -msahf command-line option to
                    activate the +sahf feature for the backend
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jonlooney at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19719
  --> https://bugs.llvm.org/attachment.cgi?id=19719&action=edit
Patch to add support for the -msahf option.

The +sahf feature is important because it makes LLVM produce correct and more
efficient x86-64 code (see Bug 36028, for example).

Therefore, it would be helpful if a user could activate this feature on the
command-line and have clang pipe the feature through to the backend.

GCC uses -msahf for this feature, and the backend already recognizes the +sahf
feature. All that is needed is to teach clang to pass this on to the backend.

The attached patch seems to do that.

The mapping of feature support onto CPUs may not be complete; rather, it was
chosen to match LLVM's idea of which CPUs support this feature (see
lib/Target/X86/X86.td).

-- 
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/20180122/11033b90/attachment.html>


More information about the llvm-bugs mailing list