[PATCH] D155673: [RISCV] Replace zihintntl with zicond in ISAInfo unittest

Piyou Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 23:03:29 PDT 2023


BeMg created this revision.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, arichardson.
Herald added a project: All.
BeMg requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, eopXD, MaskRay.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155673

Files:
  llvm/unittests/Support/RISCVISAInfoTest.cpp


Index: llvm/unittests/Support/RISCVISAInfoTest.cpp
===================================================================
--- llvm/unittests/Support/RISCVISAInfoTest.cpp
+++ llvm/unittests/Support/RISCVISAInfoTest.cpp
@@ -356,54 +356,54 @@
      RejectsExperimentalExtensionsIfNotEnableExperimentalExtension) {
   EXPECT_EQ(
       toString(
-          RISCVISAInfo::parseArchString("rv64izihintntl", false).takeError()),
+          RISCVISAInfo::parseArchString("rv64izicond", false).takeError()),
       "requires '-menable-experimental-extensions' for experimental extension "
-      "'zihintntl'");
+      "'zicond'");
 }
 
 TEST(ParseArchString,
      AcceptsExperimentalExtensionsIfEnableExperimentalExtension) {
-  // Note: If zihintntl becomes none-experimental, this test will need
+  // Note: If zicond becomes none-experimental, this test will need
   // updating (and unfortunately, it will still pass). The failure of
   // RejectsExperimentalExtensionsIfNotEnableExperimentalExtension will
   // hopefully serve as a reminder to update.
   auto MaybeISAInfo =
-      RISCVISAInfo::parseArchString("rv64izihintntl", true, false);
+      RISCVISAInfo::parseArchString("rv64izicond", true, false);
   ASSERT_THAT_EXPECTED(MaybeISAInfo, Succeeded());
   RISCVISAInfo::OrderedExtensionMap Exts = (*MaybeISAInfo)->getExtensions();
   EXPECT_EQ(Exts.size(), 2UL);
-  EXPECT_EQ(Exts.count("zihintntl"), 1U);
-  auto MaybeISAInfo2 = RISCVISAInfo::parseArchString("rv64izihintntl0p2", true);
+  EXPECT_EQ(Exts.count("zicond"), 1U);
+  auto MaybeISAInfo2 = RISCVISAInfo::parseArchString("rv64izicond1p0", true);
   ASSERT_THAT_EXPECTED(MaybeISAInfo2, Succeeded());
   RISCVISAInfo::OrderedExtensionMap Exts2 = (*MaybeISAInfo2)->getExtensions();
   EXPECT_EQ(Exts2.size(), 2UL);
-  EXPECT_EQ(Exts2.count("zihintntl"), 1U);
+  EXPECT_EQ(Exts2.count("zicond"), 1U);
 }
 
 TEST(ParseArchString,
      RequiresExplicitVersionNumberForExperimentalExtensionByDefault) {
   EXPECT_EQ(
       toString(
-          RISCVISAInfo::parseArchString("rv64izihintntl", true).takeError()),
-      "experimental extension requires explicit version number `zihintntl`");
+          RISCVISAInfo::parseArchString("rv64izicond", true).takeError()),
+      "experimental extension requires explicit version number `zicond`");
 }
 
 TEST(ParseArchString,
      AcceptsUnrecognizedVersionIfNotExperimentalExtensionVersionCheck) {
   auto MaybeISAInfo =
-      RISCVISAInfo::parseArchString("rv64izihintntl9p9", true, false);
+      RISCVISAInfo::parseArchString("rv64izicond9p9", true, false);
   ASSERT_THAT_EXPECTED(MaybeISAInfo, Succeeded());
   RISCVISAInfo::OrderedExtensionMap Exts = (*MaybeISAInfo)->getExtensions();
   EXPECT_EQ(Exts.size(), 2UL);
-  EXPECT_TRUE(Exts.at("zihintntl") == (RISCVExtensionInfo{9, 9}));
+  EXPECT_TRUE(Exts.at("zicond") == (RISCVExtensionInfo{9, 9}));
 }
 
 TEST(ParseArchString, RejectsUnrecognizedVersionForExperimentalExtension) {
   EXPECT_EQ(
       toString(
-          RISCVISAInfo::parseArchString("rv64izihintntl9p9", true).takeError()),
-      "unsupported version number 9.9 for experimental extension 'zihintntl' "
-      "(this compiler supports 0.2)");
+          RISCVISAInfo::parseArchString("rv64izicond9p9", true).takeError()),
+      "unsupported version number 9.9 for experimental extension 'zicond' "
+      "(this compiler supports 1.0)");
 }
 
 TEST(ParseArchString, RejectsExtensionVersionForG) {
@@ -478,16 +478,16 @@
 
 TEST(ToFeatureVector, IIsDroppedAndExperimentalExtensionsArePrefixed) {
   auto MaybeISAInfo1 =
-      RISCVISAInfo::parseArchString("rv64im_zihintntl", true, false);
+      RISCVISAInfo::parseArchString("rv64im_zicond", true, false);
   ASSERT_THAT_EXPECTED(MaybeISAInfo1, Succeeded());
   EXPECT_THAT((*MaybeISAInfo1)->toFeatureVector(),
-              ElementsAre("+m", "+experimental-zihintntl"));
+              ElementsAre("+m", "+experimental-zicond"));
 
   auto MaybeISAInfo2 = RISCVISAInfo::parseArchString(
-      "rv32e_zihintntl_xventanacondops", true, false);
+      "rv32e_zicond_xventanacondops", true, false);
   ASSERT_THAT_EXPECTED(MaybeISAInfo2, Succeeded());
   EXPECT_THAT((*MaybeISAInfo2)->toFeatureVector(),
-              ElementsAre("+e", "+experimental-zihintntl", "+xventanacondops"));
+              ElementsAre("+e", "+experimental-zicond", "+xventanacondops"));
 }
 
 TEST(ToFeatureVector, UnsupportedExtensionsAreDropped) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155673.541844.patch
Type: text/x-patch
Size: 4416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230719/66f50476/attachment-0001.bin>


More information about the llvm-commits mailing list