aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/SubtargetFeature.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/SubtargetFeature.cpp')
-rw-r--r--lib/Target/SubtargetFeature.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/SubtargetFeature.cpp b/lib/Target/SubtargetFeature.cpp
index 598f02982b..d783f8b778 100644
--- a/lib/Target/SubtargetFeature.cpp
+++ b/lib/Target/SubtargetFeature.cpp
@@ -268,6 +268,13 @@ uint32_t SubtargetFeatures::getBits(const SubtargetFeatureKV *CPUTable,
if (CPUEntry) {
// Set base feature bits
Bits = CPUEntry->Value;
+
+ // Set the feature implied by this CPU feature, if any.
+ for (size_t i = 0; i < FeatureTableSize; ++i) {
+ const SubtargetFeatureKV &FE = FeatureTable[i];
+ if (CPUEntry->Value & FE.Value)
+ SetImpliedBits(Bits, &FE, FeatureTable, FeatureTableSize);
+ }
} else {
cerr << "'" << Features[0]
<< "' is not a recognized processor for this target"