<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63417>63417</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
msvc abi incompatibility: x86 __vectorcall changes rules for returning C++ HFA/HVA classes
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
efriedma-quic
</td>
</tr>
</table>
<pre>
Testcase for x86-64 Windows:
```
#include <immintrin.h>
typedef __m128 V;
struct base { V v; };
struct test : base { test(double); protected: V v2;};
test __vectorcall f(test *x) { return *x; }
```
https://c.godbolt.org/z/9Wq7nozjM
clang returns in memory; MSVC returns in XMM0/XMM1. As far as I can tell, the general rule here here is similar to #62223: we skip checking if the returned value is a C++14 aggregate. Unlike the AArch64 issue, this also appears to apply to HFAs.
CC @rnk
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU8GOozgQ_RpzKTUiZQLhwCFJL5o95LS7mbm1jCnA08ZmbJPuzNevDBlN92olZMCu917VK5fwXg2GqGb7E9s_J2IJo3U19U5RN4mnH4uSSWu7e_03-SCFJ-itg_dD8VTk8FWZzr55xo8se2bZr7XIHs_2i1wZqZeOgPGzmiZlglMmHRn_Y4sI95k66uHlZdrhAa6Mn7YDH9wiA7RRlpUnuMKN8ROw8vm_IYF8AMaPv2PjDsNDZ5dWE8MqAmdnA8lAXYy8wg0jzQeyleXl5UYyWCeF1tAzPGzceHxnWK3UjsLizLb1SOd_C1_XMYR5dQgbho1MB9u1VofUuoFh85NhU339URr78_vlI0xqYYaHkgdlYKLJunvUu_x1PX88-Xa5ZAybb5fLLgU4euiFA-HhT5DCQCCtGZ4hjAQDGXJCg1s0wUjusSgPXk1KCwfBAkNeICKPHr0R-Fc1gxxJviozgOpXok2dOrgJvawEAs4MTwxPuxzEMDgaRKAU4B-j1SutoOPRybHIQXm_0JZSBGpvQcwzCeejvJhnfY8fX5qjTz9acj4DyzNnXiHpat5VvBIJ1bviUGJVZFWejLVsK9plnLqykj3y8tCWfU69lFnVdYeyS1SNGfKswAx3uzLL0pZ3ot2XnHOBvdzvWZ7RJJROtb5NsUnJmm5d8HxXJlq0pP06LIiG3n7VgnF2XB0xT-0yeJZnWvngf7MEFTTVk79JEK0CZaSdZhFUq7QK9-j1-6H4fPfkKMxAfu2WX8dusz324WF2NIlh8-V6BKmF9-STxen6850bVBiXNpV2YtjEhB6vp9nZ7yQDw2YtwzNs1jL_DQAA__-vbkRi">