summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTilmann Scheller <tilmann.scheller@googlemail.com>2013-09-02 17:09:01 +0000
committerTilmann Scheller <tilmann.scheller@googlemail.com>2013-09-02 17:09:01 +0000
commit63872ce19fe1637515ac1e0345f43d38ba6c5880 (patch)
tree08d0877c16266d45b97753219a648aa211b5088b /llvm/lib
parente3648fbe1a78340dbcd8c17f9cd7dceeaffdf339 (diff)
downloadbcm5719-llvm-63872ce19fe1637515ac1e0345f43d38ba6c5880.tar.gz
bcm5719-llvm-63872ce19fe1637515ac1e0345f43d38ba6c5880.zip
ARM: Default to the Swift CPU when targeting armv7s/thumbv7s.
Test cases adjusted accordingly. This fixes rdar://14871821. llvm-svn: 189766
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMSubtarget.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp
index 3111f5e385e..e9254c3d90c 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.cpp
+++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp
@@ -133,8 +133,13 @@ void ARMSubtarget::resetSubtargetFeatures(const MachineFunction *MF) {
}
void ARMSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
- if (CPUString.empty())
- CPUString = "generic";
+ if (CPUString.empty()) {
+ if (isTargetIOS() && TargetTriple.getArchName().endswith("v7s"))
+ // Default to the Swift CPU when targeting armv7s/thumbv7s.
+ CPUString = "swift";
+ else
+ CPUString = "generic";
+ }
// Insert the architecture feature derived from the target triple into the
// feature string. This is important for setting features that are implied
OpenPOWER on IntegriCloud