Add -mqpx and -mno-qpx feature flags to toggle use of the PPC QPX vector instruction set
I've renamed the altivec test to ppc-features (because now there is more than one feature to test).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174204 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 4647970..c225206 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -946,12 +946,14 @@
.Case("pwr7", true)
.Case("ppc64", true)
.Default(false);
+
+ Features["qpx"] = (CPU == "a2q");
}
bool PPCTargetInfo::setFeatureEnabled(llvm::StringMap<bool> &Features,
StringRef Name,
bool Enabled) const {
- if (Name == "altivec") {
+ if (Name == "altivec" || Name == "qpx") {
Features[Name] = Enabled;
return true;
}