================
@@ -399,6 +400,32 @@ static bool CC_RISCV_Impl(unsigned ValNo, MVT ValVT, MVT
LocVT,
}
}
+ // Swift calling convention special registers. Use callee-saved s-registers
+ // so they survive across call boundaries without extra save/restore
overhead.
+ // X18(s2)=SwiftSelf, X19(s3)=SwiftError, X20(s4)=SwiftAsync,
+ // X18-X20 exceed the 16-register limit of RVE; fall
+ // through to normal allocation on E-variant ABIs.
+ if (LocVT == XLenVT && !IsEABI) {
----------------
jrtc27 wrote:
What if LocVT != XLenVT but isSwiftSelf/Error/Async return true? Is that valid
input, or should that be treated as an error?
https://github.com/llvm/llvm-project/pull/205469
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits