[clang] [llvm] RFC: Implementing new mechanism for hard register operands to inline asm as a constraint. (PR #85846)
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 10 13:22:31 PST 2025
jyknight wrote:
A register-asm variable declaration passed to an asm statement should definitely override the constraints listed on the asm statement itself, forcing the use of the specified register. Doing otherwise is extremely surprising behavior! That said, it'd (probably) be OK to report a compiler error if the constraints listed on the asm statement would not otherwise permit the listed register. (But such a behavior change is pretty much unrelated to this PR)
Agreed that we should support multiple hard register constraints, or mixed hard and other register constraints specified on the asm statement. And, yes, we should support that at the same level as we support multiple constraints today (which is to say "we adhere to the specified constraints, but don't necessarily make GOOD choices").
https://github.com/llvm/llvm-project/pull/85846
More information about the llvm-commits
mailing list