Set implied features based upon the CPU's feature list.

llvm-svn: 37768
This commit is contained in:
Bill Wendling 2007-06-27 23:34:06 +00:00
parent 279e501be4
commit f413419a72
1 changed files with 7 additions and 0 deletions

View File

@ -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"