uweigand wrote:
> IMO, this goes against the intended use of hard registers, so I think we
> should disallow this in the front end, and error out if it detects `{}` in
> the constraint string with other constraints. But I'm open to other ideas.
Not sure why we have to fully reject this. In GCC, using a register asm in an
operand with hard register constraints is allowed if the register asm is
compatible with the constraint. When there are multiple constraints, I think
it could work the same way - if the register asm is compatible with at least
one of the constraints, it is OK (and we effectively force the register from
the register asm), otherwise we should error out.
@stefan-sf-ibm , the GCC docs do not specifically go into this case. Can you
confirm how GCC handles register asm in combination with multiple constraints
including hard register constraints?
https://github.com/llvm/llvm-project/pull/85846
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits