diff --git a/clang/test/Driver/riscv-arch.c b/clang/test/Driver/riscv-arch.c --- a/clang/test/Driver/riscv-arch.c +++ b/clang/test/Driver/riscv-arch.c @@ -231,17 +231,17 @@ // RUN: %clang --target=riscv32-unknown-elf -march=rv32izve32f -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZVE32F-ER %s // RV32-ZVE32F-ER: error: invalid arch name 'rv32izve32f', -// RV32-ZVE32F-ER: zve32f requires f or zfinx extension to also be specified +// RV32-ZVE32F-ER: 'zve32f' requires 'f' or 'zfinx' extension to also be specified // RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzve64d -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZVE64D-ER %s // RV32-ZVE64D-ER: error: invalid arch name 'rv32ifzve64d', -// RV32-ZVE64D-ER: zve64d requires d or zdinx extension to also be specified +// RV32-ZVE64D-ER: 'zve64d' requires 'd' or 'zdinx' extension to also be specified // RUN: %clang --target=riscv32-unknown-elf -march=rv32izvl64b -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZVL64B-ER %s // RV32-ZVL64B-ER: error: invalid arch name 'rv32izvl64b', -// RV32-ZVL64B-ER: zvl*b requires v or zve* extension to also be specified +// RV32-ZVL64B-ER: 'zvl*b' requires 'v' or 'zve*' extension to also be specified // RUN: %clang --target=riscv32-unknown-elf -march=rv32imw -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-STD-INVAL %s @@ -528,7 +528,7 @@ // RUN: %clang --target=riscv32-unknown-elf -march=rv32izve32f -### %s -c 2>&1 | \ // RUN: FileCheck -check-prefix=RV32-ZVE32F-REQUIRE-F %s -// RV32-ZVE32F-REQUIRE-F: error: invalid arch name 'rv32izve32f', zve32f requires f or zfinx extension to also be specified +// RV32-ZVE32F-REQUIRE-F: error: invalid arch name 'rv32izve32f', 'zve32f' requires 'f' or 'zfinx' extension to also be specified // RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzve32f -### %s -c 2>&1 | \ // RUN: FileCheck -check-prefix=RV32-ZVE32F-GOOD %s @@ -540,7 +540,7 @@ // RUN: %clang --target=riscv32-unknown-elf -march=rv32izve64f -### %s -c 2>&1 | \ // RUN: FileCheck -check-prefix=RV32-ZVE64F-REQUIRE-F %s -// RV32-ZVE64F-REQUIRE-F: error: invalid arch name 'rv32izve64f', zve32f requires f or zfinx extension to also be specified +// RV32-ZVE64F-REQUIRE-F: error: invalid arch name 'rv32izve64f', 'zve32f' requires 'f' or 'zfinx' extension to also be specified // RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzve64f -### %s -c 2>&1 | \ // RUN: FileCheck -check-prefix=RV32-ZVE64F-GOOD %s @@ -548,7 +548,7 @@ // RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzve64d -### %s -c 2>&1 | \ // RUN: FileCheck -check-prefix=RV32-ZVE64D-REQUIRE-D %s -// RV32-ZVE64D-REQUIRE-D: error: invalid arch name 'rv32ifzve64d', zve64d requires d or zdinx extension to also be specified +// RV32-ZVE64D-REQUIRE-D: error: invalid arch name 'rv32ifzve64d', 'zve64d' requires 'd' or 'zdinx' extension to also be specified // RUN: %clang --target=riscv32-unknown-elf -march=rv32ifdzve64d -### %s -c 2>&1 | \ // RUN: FileCheck -check-prefix=RV32-ZVE64D-GOOD %s diff --git a/llvm/lib/Support/RISCVISAInfo.cpp b/llvm/lib/Support/RISCVISAInfo.cpp --- a/llvm/lib/Support/RISCVISAInfo.cpp +++ b/llvm/lib/Support/RISCVISAInfo.cpp @@ -842,24 +842,24 @@ if (HasZve32f && !HasF && !HasZfinx) return createStringError( errc::invalid_argument, - "zve32f requires f or zfinx extension to also be specified"); + "'zve32f' requires 'f' or 'zfinx' extension to also be specified"); if (HasZve64d && !HasD && !HasZdinx) return createStringError( errc::invalid_argument, - "zve64d requires d or zdinx extension to also be specified"); + "'zve64d' requires 'd' or 'zdinx' extension to also be specified"); if (Exts.count("zvfh") && !Exts.count("zfh") && !Exts.count("zfhmin") && !Exts.count("zhinx") && !Exts.count("zhinxmin")) return createStringError( errc::invalid_argument, - "zvfh requires zfh, zfhmin, zhinx or zhinxmin extension to also be " - "specified"); + "'zvfh' requires 'zfh', 'zfhmin', 'zhinx' or 'zhinxmin' extension to " + "also be specified"); if (HasZvl && !HasVector) return createStringError( errc::invalid_argument, - "zvl*b requires v or zve* extension to also be specified"); + "'zvl*b' requires 'v' or 'zve*' extension to also be specified"); // Additional dependency checks. // TODO: The 'q' extension requires rv64.