[llvm] [RISCV] Update the canonical extension order (PR #192392)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 15:54:23 PDT 2026


================
@@ -404,6 +404,16 @@ TEST(ParseArchString, AcceptsSupportedBaseISAsAndSetsXLenAndFLen) {
   EXPECT_EQ(InfoRV64GCV.getMaxELenFp(), 64U);
 }
 
+TEST(RISCVISAInfoTest, CanonicalExtensionOrderVP) {
+  auto MaybeISAInfo = RISCVISAInfo::parseArchString("rv64ipv", true);
+  ASSERT_THAT_EXPECTED(MaybeISAInfo, Succeeded());
+
+  RISCVISAInfo &Info = **MaybeISAInfo;
+
+  // The canonical string should place 'v' before 'p'
+  EXPECT_EQ(Info.toString(), "rv64ivp");
----------------
topperc wrote:

did you test this locally. the string returned should have a version number of 'p' and a bunch of implied extensions.

https://github.com/llvm/llvm-project/pull/192392


More information about the llvm-commits mailing list