[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:15:08 PDT 2021
simon_tatham updated this revision to Diff 339161.
simon_tatham added a comment.
Added a unit test on the LLVM side.
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.339161.patch
Type: text/x-patch
Size: 1469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210421/cd821b65/attachment.bin>
More information about the llvm-commits
mailing list