[llvm] [X86] Clear regcall arg aliases in dynamic CSR masks (PR #225262)

Aochang Liu via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 18:54:01 PDT 2026


================
@@ -1167,8 +1167,9 @@ SDValue X86TargetLowering::LowerCallResult(
     // In some calling conventions we need to remove the used registers
     // from the register mask.
     if (RegMask) {
-      for (MCPhysReg SubReg : TRI->subregs_inclusive(VA.getLocReg()))
-        RegMask[SubReg / 32] &= ~(1u << (SubReg % 32));
+      for (MCRegAliasIterator Alias(VA.getLocReg(), TRI, true); Alias.isValid();
+           ++Alias)
----------------
HelloWorldU wrote:

The new test covers the argument mask, but `@callee` returns void. Is there a return-register case that exercises this change?

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


More information about the llvm-commits mailing list