[PATCH] D52492: [AArch64][v8.5A] Test optional Armv8.5-A random number extension

Oliver Stannard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 25 07:19:22 PDT 2018


olista01 created this revision.
Herald added a reviewer: javed.absar.
Herald added subscribers: cfe-commits, chrib, kristof.beyls.

The implementation of this is in TargetParser, so we only need to add a
test for it in clang.

Patch by Pablo Barrio!


Repository:
  rC Clang

https://reviews.llvm.org/D52492

Files:
  test/Driver/aarch64-rand.c


Index: test/Driver/aarch64-rand.c
===================================================================
--- /dev/null
+++ test/Driver/aarch64-rand.c
@@ -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"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52492.166909.patch
Type: text/x-patch
Size: 1114 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180925/20477bae/attachment-0001.bin>


More information about the cfe-commits mailing list