diff --git a/llvm/test/MC/RISCV/lit.local.cfg b/llvm/test/MC/RISCV/lit.local.cfg --- 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 --- 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 --- 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 --- 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