https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66013
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |121364
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2025-10-19
Summary|Missed optimization after |Missed optimization after
|inlining va_list parameter, |inlining va_list parameter
|-m32 case |
Target| |aarch64
Severity|trivial |normal
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. You can see the code difference with aarch64.
```
__builtin_va_start (&ap, 0);
res_4 = .VA_ARG (&ap, 0B, 0B);
__builtin_va_end (&ap);
```
vs
```
__builtin_va_start (&ap, 0);
ap1 = ap;
_5 = .VA_ARG (&ap1, 0B, 0B);
ap1 ={v} {CLOBBER};
__builtin_va_end (&ap);
ap ={v} {CLOBBER};
```
I am not sure the patch will fix up aarch64. For aarch64 va_list is a struct.
Which means afterwards you need to do a `copy prop for aggregates` after the
removal of the address.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121364
[Bug 121364] [meta-bug] copy prop for aggregates