[llvm] 371f936 - [RISCV] Make extension names lower case in RISCVISAInfo::checkDependency() error messages.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 00:22:43 PDT 2024


Author: Craig Topper
Date: 2024-08-19T00:22:28-07:00
New Revision: 371f936c456bca2b2af52f0d7fb9e7c9d1c0a1b7

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

LOG: [RISCV] Make extension names lower case in RISCVISAInfo::checkDependency() error messages.

Added: 
    

Modified: 
    llvm/lib/TargetParser/RISCVISAInfo.cpp
    llvm/unittests/TargetParser/RISCVISAInfoTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/TargetParser/RISCVISAInfo.cpp b/llvm/lib/TargetParser/RISCVISAInfo.cpp
index ac0bf8c5cec9df..d82501ebf8d2fb 100644
--- a/llvm/lib/TargetParser/RISCVISAInfo.cpp
+++ b/llvm/lib/TargetParser/RISCVISAInfo.cpp
@@ -743,7 +743,7 @@ Error RISCVISAInfo::checkDependency() {
   bool HasZcmt = Exts.count("zcmt") != 0;
 
   if (HasI && HasE)
-    return getIncompatibleError("I", "E");
+    return getIncompatibleError("i", "e");
 
   if (HasF && HasZfinx)
     return getIncompatibleError("f", "zfinx");
@@ -778,13 +778,13 @@ Error RISCVISAInfo::checkDependency() {
 
   if (Exts.count("xwchc") != 0) {
     if (XLen != 32)
-      return getError("'Xwchc' is only supported for 'rv32'");
+      return getError("'xwchc' is only supported for 'rv32'");
 
     if (HasD)
-      return getIncompatibleError("D", "Xwchc");
+      return getIncompatibleError("d", "xwchc");
 
     if (Exts.count("zcb") != 0)
-      return getIncompatibleError("Xwchc", "Zcb");
+      return getIncompatibleError("xwchc", "zcb");
   }
 
   return Error::success();

diff  --git a/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp b/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
index 0d6a354101a345..d1de96477a5ca0 100644
--- a/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
+++ b/llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
@@ -623,17 +623,17 @@ TEST(ParseArchString, RejectsConflictingExtensions) {
 
   for (StringRef Input : {"rv64i_xwchc"}) {
     EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
-              "'Xwchc' is only supported for 'rv32'");
+              "'xwchc' is only supported for 'rv32'");
   }
 
   for (StringRef Input : {"rv32id_xwchc"}) {
     EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
-              "'D' and 'Xwchc' extensions are incompatible");
+              "'d' and 'xwchc' extensions are incompatible");
   }
 
   for (StringRef Input : {"rv32i_zcb_xwchc"}) {
     EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
-              "'Xwchc' and 'Zcb' extensions are incompatible");
+              "'xwchc' and 'zcb' extensions are incompatible");
   }
 }
 


        


More information about the llvm-commits mailing list