[Bug target/80861] ARM (VFPv3): Inefficient float-to-char conversion goes through memory
wilco at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 23 15:26:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80861
Wilco <wilco at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-05-23
CC| |wilco at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Gergö Barany from comment #0)
> Created attachment 41407 [details]
> Input C file for triggering the bug
>
> Consider the attached code:
>
> $ cat tst.c
> char fn1(float p1) {
> return (char) p1;
> }
Confirmed. This is due to the extend patterns allowing memory, but they aren't
marked as having a higher cost, so it decides the spill given register move
cost is larger than memory move cost. A quick workaround would be to add ??m to
the various extend patterns.
More information about the Gcc-bugs
mailing list