aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
diff options
context:
space:
mode:
authorPengcheng Wang <wangpengcheng.pp@bytedance.com>2024-06-11 14:06:23 +0800
committerGitHub <noreply@github.com>2024-06-11 14:06:23 +0800
commit1bebb99324a1cd85e18e1907c7afdde5d2bc4593 (patch)
treecfd2e4c0913d90a0cd83a04f4ea4ef8ddde33f4e /llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
parent607afa0b6375e4837fef298a798f5534e783d777 (diff)
downloadllvm-1bebb99324a1cd85e18e1907c7afdde5d2bc4593.zip
llvm-1bebb99324a1cd85e18e1907c7afdde5d2bc4593.tar.gz
llvm-1bebb99324a1cd85e18e1907c7afdde5d2bc4593.tar.bz2
[RISCV] Add B extension (#76893)
It seems that we have `B` extension again: https://github.com/riscv/riscv-b According to the spec, `B` extension represents the collection of the `Zba`, `Zbb`, `Zbs` extensions. Though it hasn't been ratified, I set its version to `1.0`.
Diffstat (limited to 'llvm/unittests/TargetParser/RISCVISAInfoTest.cpp')
-rw-r--r--llvm/unittests/TargetParser/RISCVISAInfoTest.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp b/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
index 22a8a05..128321f 100644
--- a/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
+++ b/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
@@ -312,8 +312,6 @@ TEST(ParseArchString, AcceptsSupportedBaseISAsAndSetsXLenAndFLen) {
}
TEST(ParseArchString, RejectsUnrecognizedExtensionNamesByDefault) {
- EXPECT_EQ(toString(RISCVISAInfo::parseArchString("rv64ib", true).takeError()),
- "unsupported standard user-level extension 'b'");
EXPECT_EQ(
toString(
RISCVISAInfo::parseArchString("rv32i_zmadeup", true).takeError()),
@@ -327,9 +325,6 @@ TEST(ParseArchString, RejectsUnrecognizedExtensionNamesByDefault) {
RISCVISAInfo::parseArchString("rv64g_xmadeup", true).takeError()),
"unsupported non-standard user-level extension 'xmadeup'");
EXPECT_EQ(
- toString(RISCVISAInfo::parseArchString("rv64ib1p0", true).takeError()),
- "unsupported standard user-level extension 'b'");
- EXPECT_EQ(
toString(
RISCVISAInfo::parseArchString("rv32i_zmadeup1p0", true).takeError()),
"unsupported standard user-level extension 'zmadeup'");
@@ -344,8 +339,7 @@ TEST(ParseArchString, RejectsUnrecognizedExtensionNamesByDefault) {
}
TEST(ParseArchString, IgnoresUnrecognizedExtensionNamesWithIgnoreUnknown) {
- for (StringRef Input : {"rv32ib", "rv32i_zmadeup",
- "rv64i_smadeup", "rv64i_xmadeup"}) {
+ for (StringRef Input : {"rv32i_zmadeup", "rv64i_smadeup", "rv64i_xmadeup"}) {
auto MaybeISAInfo = RISCVISAInfo::parseArchString(Input, true, false, true);
ASSERT_THAT_EXPECTED(MaybeISAInfo, Succeeded());
RISCVISAInfo &Info = **MaybeISAInfo;
@@ -913,6 +907,7 @@ R"(All available -march extensions for RISC-V
f 2.2
d 2.2
c 2.0
+ b 1.0
v 1.0
h 1.0
zic64b 1.0