[PATCH] D100937: [ARM][Driver][Windows] Allow command-line upgrade to Armv8.

Simon Tatham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 03:20:25 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG77e170db8678: [ARM][Driver][Windows] Allow command-line upgrade to Armv8. (authored by simon_tatham).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100937/new/

https://reviews.llvm.org/D100937

Files:
  clang/test/Driver/woa-crypto.c
  llvm/lib/Support/Triple.cpp
  llvm/unittests/ADT/TripleTest.cpp


Index: llvm/unittests/ADT/TripleTest.cpp
===================================================================
--- llvm/unittests/ADT/TripleTest.cpp
+++ llvm/unittests/ADT/TripleTest.cpp
@@ -1511,6 +1511,7 @@
   {
     llvm::Triple Triple("arm--win32");
     EXPECT_EQ("cortex-a9", Triple.getARMCPUForArch());
+    EXPECT_EQ("generic", Triple.getARMCPUForArch("armv8-a"));
   }
   // Some alternative architectures
   {
Index: llvm/lib/Support/Triple.cpp
===================================================================
--- llvm/lib/Support/Triple.cpp
+++ llvm/lib/Support/Triple.cpp
@@ -1716,7 +1716,9 @@
     break;
   case llvm::Triple::Win32:
     // FIXME: this is invalid for WindowsCE
-    return "cortex-a9";
+    if (ARM::parseArchVersion(MArch) <= 7)
+      return "cortex-a9";
+    break;
   case llvm::Triple::IOS:
   case llvm::Triple::MacOSX:
   case llvm::Triple::TvOS:
Index: clang/test/Driver/woa-crypto.c
===================================================================
--- /dev/null
+++ clang/test/Driver/woa-crypto.c
@@ -0,0 +1,6 @@
+// RUN: %clang -target arm-windows-msvc                       -### -S %s -O0 -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-DEFAULT
+// RUN: %clang -target arm-windows-msvc -march=armv8-a+crypto -### -S %s -O0 -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-CRYPTO
+
+// CHECK-DEFAULT: "-target-cpu" "cortex-a9"
+// CHECK-CRYPTO: "-target-cpu" "generic"
+// CHECK-CRYPTO: "-target-feature" "+crypto"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100937.339164.patch
Type: text/x-patch
Size: 1469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210421/ca4b6a5e/attachment.bin>


More information about the llvm-commits mailing list