aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-02-01 18:44:19 +0000
committerHal Finkel <hfinkel@anl.gov>2013-02-01 18:44:19 +0000
commit3c6aaeb26202b41173dd9ea982833fe975147d80 (patch)
tree36a740d952c0edbb487b9969f619360ae9f0ab68 /lib/Basic/Targets.cpp
parent75dbc717c21a662b7836ed34cc4e7da7b8fa33c0 (diff)
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
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r--lib/Basic/Targets.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 4647970295..c225206208 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -946,12 +946,14 @@ void PPCTargetInfo::getDefaultFeatures(llvm::StringMap<bool> &Features) const {
.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;
}