[PATCH] D43418: [X86] Add 'sahf' to getHostCPUFeatures so -march=native will pick it up correctly.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 17 08:55:16 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL325439: [X86] Add 'sahf' to getHostCPUFeatures so -march=native will pick it up… (authored by ctopper, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D43418?vs=134750&id=134804#toc
Repository:
rL LLVM
https://reviews.llvm.org/D43418
Files:
llvm/trunk/lib/Support/Host.cpp
Index: llvm/trunk/lib/Support/Host.cpp
===================================================================
--- llvm/trunk/lib/Support/Host.cpp
+++ llvm/trunk/lib/Support/Host.cpp
@@ -1206,6 +1206,7 @@
bool HasExtLeaf1 = MaxExtLevel >= 0x80000001 &&
!getX86CpuIDAndInfo(0x80000001, &EAX, &EBX, &ECX, &EDX);
+ Features["sahf"] = HasExtLeaf1 && ((ECX >> 0) & 1);
Features["lzcnt"] = HasExtLeaf1 && ((ECX >> 5) & 1);
Features["sse4a"] = HasExtLeaf1 && ((ECX >> 6) & 1);
Features["prfchw"] = HasExtLeaf1 && ((ECX >> 8) & 1);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43418.134804.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180217/bc2b0bea/attachment.bin>
More information about the llvm-commits
mailing list