tltao wrote: Thanks for all the comments. I think from @stefan-sf-ibm's response, it sounds like the GCC side is not fully decided on what to do with multiple constraints involving hard registers, so we can wait for the details to be hashed out further there.
In the meantime, I plan on making a few changes: - 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`. - Allow Clang to accept multiple constraints involving hard registers. However, there is no real logic in `TargetLowering` to pick the "best" choice. It simply selects based on a fixed priority given to the different constraint types, and if all the constraints are the same priority, then it just picks the first one. I think it's outside the scope of this PR to do any work here, so I want to leave it as is. - Add tests for these scenarios. Does this sound reasonable? https://github.com/llvm/llvm-project/pull/85846 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
