[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 22 00:48:59 PDT 2024


================
@@ -5461,6 +5461,18 @@ std::string llvm::UpgradeDataLayoutString(StringRef DL, StringRef TT) {
     return Res;
   }
 
+  if (T.isSPARC()) {
+    // Add "-i128:128"
+    std::string I128 = "-i128:128";
+    if (StringRef Ref = Res; !Ref.contains(I128)) {
+      SmallVector<StringRef, 4> Groups;
+      Regex R("^([Ee](-[mpi][^-]*)*)((-[^mpi][^-]*)*)$");
----------------
nikic wrote:

I think it would be easier to match for `-i64:64-` here? It looks like that part doesn't vary across subtargets, so we don't need more generic matching.

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


More information about the cfe-commits mailing list