[llvm-branch-commits] [llvm] aa3d4d9 - [NFC] Disallow unused prefixes under MC/RISCV

Mircea Trofin via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 15 16:26:46 PST 2021


Author: Mircea Trofin
Date: 2021-01-15T16:21:30-08:00
New Revision: aa3d4d9939595295d19969c62077cc09e4823f58

URL: https://github.com/llvm/llvm-project/commit/aa3d4d9939595295d19969c62077cc09e4823f58
DIFF: https://github.com/llvm/llvm-project/commit/aa3d4d9939595295d19969c62077cc09e4823f58.diff

LOG: [NFC] Disallow unused prefixes under MC/RISCV

Differential Revision: https://reviews.llvm.org/D94836

Added: 
    

Modified: 
    llvm/test/MC/RISCV/lit.local.cfg
    llvm/test/MC/RISCV/rv32c-only-valid.s
    llvm/test/MC/RISCV/rv32zfh-valid.s
    llvm/test/MC/RISCV/rv64zfh-valid.s

Removed: 
    


################################################################################
diff  --git a/llvm/test/MC/RISCV/lit.local.cfg b/llvm/test/MC/RISCV/lit.local.cfg
index c63820126f8c..896e7941295e 100644
--- a/llvm/test/MC/RISCV/lit.local.cfg
+++ b/llvm/test/MC/RISCV/lit.local.cfg
@@ -1,2 +1,10 @@
+from lit.llvm.subst import ToolSubst
+
 if not 'RISCV' 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'))

diff  --git a/llvm/test/MC/RISCV/rv32c-only-valid.s b/llvm/test/MC/RISCV/rv32c-only-valid.s
index edd5a656eeae..0b10b3f0e90e 100644
--- a/llvm/test/MC/RISCV/rv32c-only-valid.s
+++ b/llvm/test/MC/RISCV/rv32c-only-valid.s
@@ -1,18 +1,18 @@
 # RUN: llvm-mc %s -triple=riscv32 -mattr=+c -riscv-no-aliases -show-encoding \
-# RUN:     | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
+# RUN:     | FileCheck --check-prefix=CHECK-ASM %s
 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c < %s \
 # RUN:     | llvm-objdump --mattr=+c -M no-aliases -d -r - \
-# RUN:     | FileCheck --check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
+# RUN:     | FileCheck --check-prefix=CHECK-OBJ %s
 #
 # RUN: not llvm-mc -triple riscv32 \
 # RUN:     -riscv-no-aliases -show-encoding < %s 2>&1 \
-# RUN:     | FileCheck -check-prefixes=CHECK-NO-EXT %s
+# RUN:     | FileCheck --check-prefix=CHECK-NO-EXT %s
 # RUN: not llvm-mc -triple riscv64 -mattr=+c \
 # RUN:     -riscv-no-aliases -show-encoding < %s 2>&1 \
-# RUN:     | FileCheck -check-prefixes=CHECK-NO-RV32 %s
+# RUN:     | FileCheck --check-prefix=CHECK-NO-RV32 %s
 # RUN: not llvm-mc -triple riscv64 \
 # RUN:     -riscv-no-aliases -show-encoding < %s 2>&1 \
-# RUN:     | FileCheck -check-prefixes=CHECK-NO-RV32-AND-EXT %s
+# RUN:     | FileCheck --check-prefix=CHECK-NO-RV32-AND-EXT %s
 
 # CHECK-OBJ: c.jal 0x7fe
 # CHECK-ASM: c.jal 2046

diff  --git a/llvm/test/MC/RISCV/rv32zfh-valid.s b/llvm/test/MC/RISCV/rv32zfh-valid.s
index a6853fb95ea0..f257ad0d91fe 100644
--- a/llvm/test/MC/RISCV/rv32zfh-valid.s
+++ b/llvm/test/MC/RISCV/rv32zfh-valid.s
@@ -4,10 +4,10 @@
 # RUN:     | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zfh < %s \
 # RUN:     | llvm-objdump --mattr=+experimental-zfh -M no-aliases -d -r - \
-# RUN:     | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
+# RUN:     | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zfh < %s \
 # RUN:     | llvm-objdump --mattr=+experimental-zfh -M no-aliases -d -r - \
-# RUN:     | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
+# RUN:     | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
 
 # CHECK-ASM-AND-OBJ: flh ft0, 12(a0)
 # CHECK-ASM: encoding: [0x07,0x10,0xc5,0x00]

diff  --git a/llvm/test/MC/RISCV/rv64zfh-valid.s b/llvm/test/MC/RISCV/rv64zfh-valid.s
index 0a667f668d4f..49aa4e7aaaef 100644
--- a/llvm/test/MC/RISCV/rv64zfh-valid.s
+++ b/llvm/test/MC/RISCV/rv64zfh-valid.s
@@ -2,7 +2,7 @@
 # RUN:     | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zfh < %s \
 # RUN:     | llvm-objdump --mattr=+experimental-zfh -M no-aliases -d -r - \
-# RUN:     | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
+# RUN:     | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
 #
 # RUN: not llvm-mc -triple riscv32 -mattr=+experimental-zfh < %s 2>&1 \
 # RUN:     | FileCheck -check-prefix=CHECK-RV32 %s


        


More information about the llvm-branch-commits mailing list