From 35c8a6cbf5ff0b525e2c01e5d746067bdda1dde7 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Wed, 13 Jan 2021 10:39:25 -0800 Subject: [PATCH] [NFC] Disallow unused prefixes under MC/AArch64 Differential Revision: https://reviews.llvm.org/D94616 --- llvm/test/MC/AArch64/armv8.7a-ls64.s | 4 ++-- llvm/test/MC/AArch64/armv8.7a-xs.s | 6 +++--- llvm/test/MC/AArch64/lit.local.cfg | 8 ++++++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/llvm/test/MC/AArch64/armv8.7a-ls64.s b/llvm/test/MC/AArch64/armv8.7a-ls64.s index c647ecc..d4684e3 100644 --- a/llvm/test/MC/AArch64/armv8.7a-ls64.s +++ b/llvm/test/MC/AArch64/armv8.7a-ls64.s @@ -1,7 +1,7 @@ // RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+ls64 < %s 2>%t | FileCheck %s -// RUN: FileCheck --check-prefix=CHECK-ERR --check-prefix=CHECK-LS64-ERR %s < %t +// RUN: FileCheck --check-prefix=CHECK-ERR %s < %t // RUN: not llvm-mc -triple aarch64-none-linux-gnu < %s 2> %t -// RUN: FileCheck --check-prefix=CHECK-ERR --check-prefix=CHECK-NO-LS64-ERR %s < %t +// RUN: FileCheck --check-prefixes=CHECK-ERR,CHECK-NO-LS64-ERR %s < %t ld64b x0, [x13] st64b x14, [x13] diff --git a/llvm/test/MC/AArch64/armv8.7a-xs.s b/llvm/test/MC/AArch64/armv8.7a-xs.s index 6193c1f..e3a1e12 100644 --- a/llvm/test/MC/AArch64/armv8.7a-xs.s +++ b/llvm/test/MC/AArch64/armv8.7a-xs.s @@ -1,9 +1,9 @@ // RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.4a,+xs < %s 2>%t | FileCheck %s -// RUN: FileCheck --check-prefix=CHECK-ERR --check-prefix=CHECK-XS-ERR %s < %t +// RUN: FileCheck --check-prefix=CHECK-ERR %s < %t // RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.7a < %s 2>%t | FileCheck %s -// RUN: FileCheck --check-prefix=CHECK-ERR --check-prefix=CHECK-XS-ERR %s < %t +// RUN: FileCheck --check-prefix=CHECK-ERR %s < %t // RUN: not llvm-mc -triple aarch64-none-linux-gnu -mattr=+v8.4a < %s 2> %t -// RUN: FileCheck --check-prefix=CHECK-ERR --check-prefix=CHECK-NO-XS-ERR %s < %t +// RUN: FileCheck --check-prefixes=CHECK-ERR,CHECK-NO-XS-ERR %s < %t dsb #16 dsb #20 diff --git a/llvm/test/MC/AArch64/lit.local.cfg b/llvm/test/MC/AArch64/lit.local.cfg index 5822b72..ab82913 100644 --- a/llvm/test/MC/AArch64/lit.local.cfg +++ b/llvm/test/MC/AArch64/lit.local.cfg @@ -1,2 +1,10 @@ +from lit.llvm.subst import ToolSubst + if 'AArch64' not in config.root.targets: config.unsupported = True + +fc = ToolSubst('FileCheck', unresolved='fatal') +# Insert this first. Then, we'll first update the blank FileCheck command; then, +# the default substitution of FileCheck will replace it to its full path. +config.substitutions.insert(0, (fc.regex, + 'FileCheck --allow-unused-prefixes=false')) -- 2.7.4