[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)
Theodoros Theodoridis via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 22 05:32:24 PDT 2025
================
@@ -1444,15 +1444,16 @@ void clang::emitBackendOutput(CompilerInstance &CI, CodeGenOptions &CGOpts,
// Verify clang's TargetInfo DataLayout against the LLVM TargetMachine's
// DataLayout.
- if (AsmHelper.TM) {
- std::string DLDesc = M->getDataLayout().getStringRepresentation();
- if (DLDesc != TDesc) {
+ if (AsmHelper.TM)
+ if (!AsmHelper.TM->isCompatibleDataLayout(M->getDataLayout()) ||
+ !AsmHelper.TM->isCompatibleDataLayout(DataLayout(TDesc))) {
+ std::string DLDesc = M->getDataLayout().getStringRepresentation();
----------------
thetheodor wrote:
Several tests were failing because of this. clang checks if the module's layout is the same as the original.
I modified this to use `isCompatibleDataLayout` but I'm not sure if this a good solution
https://github.com/llvm/llvm-project/pull/154814
More information about the llvm-commits
mailing list