================
@@ -1195,6 +1195,19 @@ bool MicrosoftCXXABI::classifyReturnType(CGFunctionInfo 
&FI) const {
   // MSVC always returns structs indirectly from C++ instance methods.
   bool isIndirectReturn = !isTrivialForABI || FI.isInstanceMethod();
 
+  // With __vectorcall on x86, HVAs (including HFAs) that can be passed in
+  // registers are returned in vector registers, even if they are not C++14
+  // aggregates and even when returned from instance methods.
+  if (isIndirectReturn &&
+      FI.getCallingConvention() == llvm::CallingConv::X86_VectorCall &&
----------------
efriedma-quic wrote:

This is assuming X86_VectorCall implies the target is x86.  Which is a 
reasonable assumption; other targets shouldn't allow it.

https://github.com/llvm/llvm-project/pull/113104
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to