diff options
author | Bill Wendling <isanbard@gmail.com> | 2007-06-27 23:34:06 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2007-06-27 23:34:06 +0000 |
commit | f413419a72c34213a860507df979bb009625622d (patch) | |
tree | 2f64e36138f60e9f16957a87c7ddb9edb88cd04f /llvm/lib | |
parent | 279e501be490aeccfa27edddabdf629c2790072c (diff) | |
download | bcm5719-llvm-f413419a72c34213a860507df979bb009625622d.tar.gz bcm5719-llvm-f413419a72c34213a860507df979bb009625622d.zip |
Set implied features based upon the CPU's feature list.
llvm-svn: 37768
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/SubtargetFeature.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/SubtargetFeature.cpp b/llvm/lib/Target/SubtargetFeature.cpp index 598f02982b0..d783f8b7789 100644 --- a/llvm/lib/Target/SubtargetFeature.cpp +++ b/llvm/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" |