[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 06:10:40 PDT 2024
================
@@ -5461,6 +5461,13 @@ std::string llvm::UpgradeDataLayoutString(StringRef DL, StringRef TT) {
return Res;
}
+ if (T.isSPARC()) {
+ // Add "-i128:128"
+ if (!DL.empty() && !DL.contains("-i128:128"))
+ Res.append("-i128:128");
+ return Res;
+ }
----------------
nikic wrote:
Could you please also add a test for this in llvm/unittests/Bitcode/DataLayoutUpgradeTest.cpp?
I also believe that this needs to be inserted at the correct position, not just appended, so that the string would exactly match the new one. I think there will be assertion failures somewhere otherwise, but I'm not entirely sure.
https://github.com/llvm/llvm-project/pull/106951
More information about the cfe-commits
mailing list