[llvm] 5c5f669 - [RISCV] Add ISAInfoTest tests for a few XQCI extensions (#120060)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 07:10:54 PST 2024


Author: Sudharsan Veeravalli
Date: 2024-12-16T20:40:50+05:30
New Revision: 5c5f66937fa7fbc6721ba2203b0874966640a05f

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

LOG: [RISCV] Add ISAInfoTest tests for a few XQCI extensions (#120060)

Missed out adding rv32 only support test checks for a few of the
extensions.

Added: 
    

Modified: 
    llvm/unittests/TargetParser/RISCVISAInfoTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp b/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
index bef3f571b174d3..ed334f00eb93a4 100644
--- a/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
+++ b/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
@@ -653,14 +653,12 @@ TEST(ParseArchString, RejectsConflictingExtensions) {
               "'xwchc' and 'zcb' extensions are incompatible");
   }
 
-  for (StringRef Input : {"rv64i_xqcisls0p2"}) {
-    EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
-              "'xqcisls' is only supported for 'rv32'");
-  }
-
-  for (StringRef Input : {"rv64i_xqcia0p2"}) {
-    EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
-              "'xqcia' is only supported for 'rv32'");
+  for (StringRef Input :
+       {"rv64i_xqcisls0p2", "rv64i_xqcia0p2", "rv64i_xqcicsr0p2",
+        "rv64i_xqcilsm0p2", "rv64i_xqcics0p2"}) {
+    EXPECT_THAT(
+        toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
+        ::testing::EndsWith(" is only supported for 'rv32'"));
   }
 }
 


        


More information about the llvm-commits mailing list