From d2f1ab1b1001d0ddf9ab227e1666ec9477e47eb9 Mon Sep 17 00:00:00 2001 From: Gabor Buella Date: Fri, 25 May 2018 06:32:05 +0000 Subject: [x86] invpcid LLVM intrinsic Re-add the feature flag for invpcid, which was removed in r294561. Add an intrinsic, which always uses a 32 bit integer as first argument, while the instruction actually uses a 64 bit register in 64 bit mode for the INVPCID_TYPE argument. Reviewers: craig.topper Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D47141 llvm-svn: 333255 --- llvm/lib/Support/Host.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Support/Host.cpp') diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 775db63d7de..2c718dd3f5a 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -1231,6 +1231,7 @@ bool sys::getHostCPUFeatures(StringMap &Features) { // AVX2 is only supported if we have the OS save support from AVX. Features["avx2"] = HasLeaf7 && ((EBX >> 5) & 1) && HasAVXSave; Features["bmi2"] = HasLeaf7 && ((EBX >> 8) & 1); + Features["invpcid"] = HasLeaf7 && ((EBX >> 10) & 1); Features["rtm"] = HasLeaf7 && ((EBX >> 11) & 1); // AVX512 is only supported if the OS supports the context save for it. Features["avx512f"] = HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save; -- cgit v1.2.3