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).
llvm-svn: 174204
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 4647970..c225206 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/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;
}