]> granicus.if.org Git - clang/commitdiff
[AArch64][v8.5A] Test optional Armv8.5-A random number extension
authorOliver Stannard <oliver.stannard@arm.com>
Thu, 27 Sep 2018 14:20:59 +0000 (14:20 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Thu, 27 Sep 2018 14:20:59 +0000 (14:20 +0000)
The implementation of this is in TargetParser, so we only need to add a
test for it in clang.

Patch by Pablo Barrio!

Differential revision: https://reviews.llvm.org/D52492

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343220 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/aarch64-rand.c [new file with mode: 0644]

diff --git a/test/Driver/aarch64-rand.c b/test/Driver/aarch64-rand.c
new file mode 100644 (file)
index 0000000..e6f566e
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a+rng %s 2>&1 | FileCheck %s
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a+rng %s 2>&1 | FileCheck %s
+// CHECK: "-target-feature" "+rand"
+
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a+norng %s 2>&1 | FileCheck %s --check-prefix=NORAND
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a+norng %s 2>&1 | FileCheck %s --check-prefix=NORAND
+// NORAND: "-target-feature" "-rand"
+
+// RUN: %clang -### -target aarch64-none-none-eabi                 %s 2>&1 | FileCheck %s --check-prefix=ABSENTRAND
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a %s 2>&1 | FileCheck %s --check-prefix=ABSENTRAND
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a %s 2>&1 | FileCheck %s --check-prefix=ABSENTRAND
+// ABSENTRAND-NOT: "-target-feature" "+rand"
+// ABSENTRAND-NOT: "-target-feature" "-rand"