[clang] [llvm] RFC: Implementing new mechanism for hard register operands to inline asm as a constraint. (PR #85846)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 10 12:56:34 PST 2025
efriedma-quic wrote:
> Modify the current register asm implementation in Clang to append any constraints to the register asm register. This follows the GCC implementation. One caveat is there's no type checking in Clang for constraints, so we have no way of excluding the register asm register if there's a mismatch. However, because TargetLowering::C_RegisterClass has higher priority than TargetLowering::C_Register, we will pick the register class constraint instead of the register asm constraint in TargetLowering.
I'm not sure I follow what you mean here; does this mean that if you have a register asm variable, it might not end up in that register? That seems like a regression for existing code.
-----
Other bits seem fine.
https://github.com/llvm/llvm-project/pull/85846
More information about the llvm-commits
mailing list