[llvm] [SPIR-V] Add overload of getConstraintType for inline asm lowering (PR #185422)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 03:47:33 PDT 2026
MrSidims wrote:
> @MrSidims just for my education, could you share where the crash happens without this fix (aka "default" path)?
`TargetLowering::getConstraintType()` checks for the first character of the instruction in inline asm to get the constraints. It doesn't recognize AMD's VGPR (starts with "v") resulting in C_Unknown constraint which is causing InlineAsmLowering's lowerInlineAsm to do nothing and causing an assertion somewhere later.
Most of the backends have their overload for getConstraintType to handle different target-specific constraints.
https://github.com/llvm/llvm-project/pull/185422
More information about the llvm-commits
mailing list