[Mlir-commits] [clang] [llvm] [mlir] [IR] Explicitly specify target feature for module asm (PR #204548)

Nikita Popov llvmlistbot at llvm.org
Mon Jun 22 03:46:36 PDT 2026


================
@@ -1562,8 +1562,11 @@ Error IRLinker::run() {
 
   if (!IsPerformingImport && !SrcM->getModuleInlineAsm().empty()) {
     // Append the module inline asm string.
-    DstM.appendModuleInlineAsm(adjustInlineAsm(SrcM->getModuleInlineAsm(),
-                                               SrcTriple));
+    for (const Module::GlobalAsmFragment &Frag : SrcM->getModuleInlineAsm()) {
+      Module::GlobalAsmFragment NewFrag(Frag);
+      NewFrag.Asm = adjustInlineAsm(NewFrag.Asm, SrcTriple);
----------------
nikic wrote:

That should be possible by implementing emitTargetFeaturePush/emitTargetFeaturePop for ARM. I think that should be a separate change though.

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


More information about the Mlir-commits mailing list