[lld] [llvm] [RISCV] Do not re-validate target ABI in AsmParser if already resolved by streamer (PR #223606)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 22:14:31 PDT 2026


lenary wrote:

> When inline assembly was subsequently parsed, AsmPrinter::emitInlineAsm instantiated RISCVAsmParser with a subtarget lacking "+d"

I don't understand how this could happen. Either all the global inline assembly fragments have `+d` because they were compiled with `-march=*d*`, or there's one without. The call to `emitInlineAsm` in `AsmPrinter::doInitialization` should correctly be picking up target-features, and tracing that through, everywhere seems to use the `STI` passed into `AsmPrinter::emitInlineAsm`.

If there's one without, then surely the error message is correct? Or maybe we shouldn't care because target-abi doesn't matter for assembly in the same way.

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


More information about the llvm-commits mailing list