This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/86471] GCC/libstdc++ outputs inferior code for std::fill and std::fill_n vs std::memset on c-style arrays


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86471

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
There have been questions before about enabling (parts of) ldist at -O2.

(In reply to Matt Bentley from comment #3)
> I thought I should note that there is also a missing optimization
> opportunity in the code. Clang optimizes the code I've listed to remove the
> benchmark loops entirely since it detects that the arrays aren't actually
> being used for anything. 

Indeed, I am surprised gcc didn't optimize out all those useless writes (ints
is local and doesn't escape). Seems worth investigating a bit.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]