<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59189>59189</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[AArch64] Redundant stack offset adjustment instructions compare to gcc
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vfdff
</td>
</tr>
</table>
<pre>
* the case is initial from https://github.com/llvm/llvm-project/issues/59116,
but there is different issue base on Arm8 targets, https://godbolt.org/z/vYxeYvjE7
* llvm have extra sub/add instrunction to adjust the stack offset compare to gcc version.
```
struct U {
unsigned long a[2];
};
void swap(U& x, U& y)
{
auto t = x;
x = y;
y = t;
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylUs2O2yAQfhp8GTWy8V84-ODdtA9QaQ97HBuwSR0TAfYmffqOSbZN9loJ4xkY-H6Gzsprw3gLYVTQo1dgPJjZBIMTaGdPMIZw9ixvGf9BYzBhXLpdb0-UTNP6-ft2dvao-kCp8X5RnoJSZFnF-CtLDyxtAaBbwobjIog0WlM4B4gHoNvA7QytO-0hoBtUoEtev-Jb2dkp7KwbKPtN3_p-Ue_r8Xt9g7nPpGijBSOuCtQlOAS_dFSOUpI-H9wy98EQXrCA8rj4SA18wP4XWK29CkAqz0hsqWToe1iV83Rid4eo0vuI6XZjH-ANWP3yVzAsszfDrCRMdh4AWfnCWXlg-b2E1Q9xnFdrJPgPPDO-f2O8gsvmQYyujIvPYw8QuBC9ACw_UG3-sHGJa9entWtcC08EntUkqsmqSnBRZmWZyCaXIheYBBMm1RD_tnX9WBWkAn4qucwSqYNPrt3cPMXOzjdbyDX_xc1kcVPzX29rL5KxQbEviG6hO9GrUmNVKCEkYleoLkfcJxN2avIbc8b5rD5ur41iUpCYhqecZxkvsjwtC7HTdZrXZV7qolaV0CUrUnVCM-02HtujS1wTKXXL4GlzMj74f5voY7ujUdv91JvRumbVUuskAjeR-B_F0g6Y">