[Bug target/81907] memset called when it does not need to be; -mtune=cortex-a9
rearnsha at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 22 13:54:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81907
--- Comment #14 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to dongkyun.s from comment #13)
> > Confirmed the call on 6.4.1 but GCC 7 and trunk don't generate the call for -mcpu=cortex-a9 .
>
> I also verified memset call is not generated with GCC 7.1 + "-mcpu=cortex-a9
> or -mtune=cortex-a9" or lower.
>
> It seems interesting that
> in GCC6,
> - don't generate the memset call for -mcpu=cortex-a12 or higer(e.g,
> cortex-a15, V7 big.LITTLE)
> - always generate the memset call for -mcpu=cortex-a9 or lower(e.g,
> cortex-a7, cotex-a5)
>
> in GCC7.1
> - always don't generate the memset call (even with V3 Architecture
> Processors. e.g, -mcpu=arm7)
There's nothing in the compiler that explicitly says: use memset for these
cores and not for others. The choice will be down to available instructions
and their relative costs.
More information about the Gcc-bugs
mailing list