From 3c6aaeb26202b41173dd9ea982833fe975147d80 Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Fri, 1 Feb 2013 18:44:19 +0000 Subject: 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 --- lib/Basic/Targets.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Basic/Targets.cpp') 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 &Features) const { .Case("pwr7", true) .Case("ppc64", true) .Default(false); + + Features["qpx"] = (CPU == "a2q"); } bool PPCTargetInfo::setFeatureEnabled(llvm::StringMap &Features, StringRef Name, bool Enabled) const { - if (Name == "altivec") { + if (Name == "altivec" || Name == "qpx") { Features[Name] = Enabled; return true; } -- cgit v1.2.3-18-g5258