<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63634>63634</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
wrong code with clang-trunk, still worked with clang-16.0
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
m9710797
</td>
</tr>
</table>
<pre>
I managed to reduce the testcase to:
https://godbolt.org/z/8T7h1Pb8M
As far as I can tell, there's no undefined behavior in this testcase.
Both clang-16 and gcc-13 produce the code that I was expecting.
But clang-trunk produces different (wrong?) x86 code.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxckU1u2zAQhU9DbQYWKOqH0oILp4EALwp00QtQ5EhiQ5MGOYrTnr6QHbtFNvwB3rz55o3O2S0BUbH2hbWvhd5ojUmdB1lxOchiiva3OsFZB72gBYqQ0G4GgVYEwkxGZwSKrD4y_sr4cSW65P0nRibGJdopeipjWpgY_zAx9j_lWv2Y-u93-f08Zph1Ap3hBEYHIPSeiW97k4RMyAwhwhYszi6ghQlX_e5iAheAVpefIOXd7iXSCsbrsByqDnSwsBhzqGq4pPiEN9HuD01wgqvOgB8XNOTC8jDZ6NOD0hbeHrUZrJtnTBgImOivKYaF1SMTA3z03c21LKyq7VAPukBVdX1fDVLyoViVbEVfcWnmrtWTFe2sm7aZOJe6G7qpnQunBBc1l7zisunFUPJWSKsN8rafpal71nA8a-dL79_Pe6yFy3lD1dVd3RReT-jzY5dJ7aLDtC2ZNdy7TPlfGTnyqG749yiu7hnabeA9_0zOe7jG9Ib2f0HVlbzYkldftu1o3abSxDMT497p8zpcUvyFhpgYb7SZifEG_DcAAP__9m_MYg">