[llvm] r189766 - ARM: Default to the Swift CPU when targeting armv7s/thumbv7s.

Tilmann Scheller tilmann.scheller at googlemail.com
Mon Sep 2 10:09:02 PDT 2013


Author: tilmann
Date: Mon Sep  2 12:09:01 2013
New Revision: 189766

URL: http://llvm.org/viewvc/llvm-project?rev=189766&view=rev
Log:
ARM: Default to the Swift CPU when targeting armv7s/thumbv7s.

Test cases adjusted accordingly.

This fixes rdar://14871821.


Modified:
    llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
    llvm/trunk/test/CodeGen/ARM/dagcombine-concatvector.ll

Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp?rev=189766&r1=189765&r2=189766&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp Mon Sep  2 12:09:01 2013
@@ -133,8 +133,13 @@ void ARMSubtarget::resetSubtargetFeature
 }
 
 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

Modified: llvm/trunk/test/CodeGen/ARM/dagcombine-concatvector.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/dagcombine-concatvector.ll?rev=189766&r1=189765&r2=189766&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/dagcombine-concatvector.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/dagcombine-concatvector.ll Mon Sep  2 12:09:01 2013
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=thumbv7s-apple-ios3.0.0 | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv7s-apple-ios3.0.0 -mcpu=generic | FileCheck %s
 
 ; PR15525
 ; CHECK-LABEL: test1:





More information about the llvm-commits mailing list