[Bug target/109527] redundant register assignment
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Apr 15 19:43:47 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109527
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Last reconfirmed| |2023-04-15
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Take:
```
short test(int t, short* a)
{
*a = 1;
return *a;
}
```
This produces decent code for aarch64:
```
mov w0, 1
strh w0, [x1]
ret
```
Note I suspect this is really does not show up that often either and only
happens with return values.
More information about the Gcc-bugs
mailing list