// Features below here are not in libgcc/compiler-rt.
X86_FEATURE (3DNOW, "3dnow")
X86_FEATURE (3DNOWA, "3dnowa")
+X86_FEATURE (64BIT, "64bit")
X86_FEATURE (ADX, "adx")
X86_FEATURE (AMX_BF16, "amx-bf16")
X86_FEATURE (AMX_INT8, "amx-int8")
X86_FEATURE (CLZERO, "clzero")
X86_FEATURE (CMPXCHG16B, "cx16")
X86_FEATURE (CMPXCHG8B, "cx8")
+// FIXME: Merge with 64BIT? Currently separate to be used to tell if CPU is
+// valid for 64-bit mode, but has empty string so it doesn't get added to
+// target attributes in IR.
X86_FEATURE (EM64T, "")
X86_FEATURE (ENQCMD, "enqcmd")
X86_FEATURE (F16C, "f16c")
X86_FEATURE (XSAVEOPT, "xsaveopt")
X86_FEATURE (XSAVES, "xsaves")
// These features aren't really CPU features, but the frontend can set them.
+X86_FEATURE (RETPOLINE_EXTERNAL_THUNK, "retpoline-external-thunk")
X86_FEATURE (RETPOLINE_INDIRECT_BRANCHES, "retpoline-indirect-branches")
X86_FEATURE (RETPOLINE_INDIRECT_CALLS, "retpoline-indirect-calls")
X86_FEATURE (LVI_CFI, "lvi-cfi")
}
// Features with no dependencies.
+static constexpr FeatureBitset ImpliedFeatures64BIT = {};
static constexpr FeatureBitset ImpliedFeaturesADX = {};
static constexpr FeatureBitset ImpliedFeaturesBMI = {};
static constexpr FeatureBitset ImpliedFeaturesBMI2 = {};
// Not really CPU features, but need to be in the table because clang uses
// target features to communicate them to the backend.
+static constexpr FeatureBitset ImpliedFeaturesRETPOLINE_EXTERNAL_THUNK = {};
static constexpr FeatureBitset ImpliedFeaturesRETPOLINE_INDIRECT_BRANCHES = {};
static constexpr FeatureBitset ImpliedFeaturesRETPOLINE_INDIRECT_CALLS = {};
static constexpr FeatureBitset ImpliedFeaturesLVI_CFI = {};
auto I = llvm::find_if(
FeatureInfos, [&](const FeatureInfo &FI) { return FI.Name == Feature; });
if (I == std::end(FeatureInfos)) {
+ // FIXME: This shouldn't happen, but may not have all features in the table
+ // yet.
return;
}