[llvm] [GlobalISel][AMDGPU] Emit proper diagnostic when inline asm register allocation fails (PR #201380)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 08:17:09 PDT 2026


================
@@ -347,9 +358,12 @@ bool InlineAsmLowering::lowerInlineAsm(
 
         // Find a register that we can use.
         if (OpInfo.Regs.empty()) {
-          LLVM_DEBUG(dbgs()
-                     << "Couldn't allocate output register for constraint\n");
-          return false;
+          emitInlineAsmError(MIRBuilder, Call,
----------------
arsenm wrote:

The reason matters for why this failed. If it failed because of missing handling, it should return false and use the fallback. I'm not sure if this is reachable due to missing inline asm support. 

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


More information about the llvm-commits mailing list