summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/TargetParser.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2017-05-03 20:33:58 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2017-05-03 20:33:58 +0000
commit9097967dd9698ac5e3139cc294f43ea58a831b18 (patch)
treee3bcfa8580fbc49c7960559efea85ad721cb9b99 /llvm/lib/Support/TargetParser.cpp
parenta1991bdde26953200c8d381d354fed7403ab0ea1 (diff)
downloadbcm5719-llvm-9097967dd9698ac5e3139cc294f43ea58a831b18.tar.gz
bcm5719-llvm-9097967dd9698ac5e3139cc294f43ea58a831b18.zip
[AArch64] Make the TargetParser add CPU exts provided by the arch.
Otherwise, each CPU has to manually specify the extensions it supports, even though they have to be a superset of the base arch extensions. And when there's redundant data there's stale data, so most of the CPUs lie about the features they support (almost none lists AEK_FP). Instead, do the saner thing: add the optional extensions on top of the base extensions provided by the architecture. The ARM TargetParser has the same behavior. Differential Revision: https://reviews.llvm.org/D32780 llvm-svn: 302078
Diffstat (limited to 'llvm/lib/Support/TargetParser.cpp')
-rw-r--r--llvm/lib/Support/TargetParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/TargetParser.cpp b/llvm/lib/Support/TargetParser.cpp
index bba7c6d0d60..4f6153de4f5 100644
--- a/llvm/lib/Support/TargetParser.cpp
+++ b/llvm/lib/Support/TargetParser.cpp
@@ -423,7 +423,7 @@ unsigned llvm::AArch64::getDefaultExtensions(StringRef CPU, unsigned ArchKind) {
return StringSwitch<unsigned>(CPU)
#define AARCH64_CPU_NAME(NAME, ID, DEFAULT_FPU, IS_DEFAULT, DEFAULT_EXT) \
- .Case(NAME, DEFAULT_EXT)
+ .Case(NAME, AArch64ARCHNames[(unsigned)ArchKind::ID].ArchBaseExtensions | DEFAULT_EXT)
#include "llvm/Support/AArch64TargetParser.def"
.Default(AArch64::AEK_INVALID);
}
OpenPOWER on IntegriCloud