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

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 20 Apr 2016, amker at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66646
> 
> --- Comment #3 from amker at gcc dot gnu.org ---
> BTW, shall we version the loop in ldist pass if # of iterations can't be
> computed at compilation time.  We can check the target dependent value when
> deciding which version should be executed.  It doesn't make sense to turn 
> loops
> into memory functions, while trying to inline small memory functions at the
> same time.

Well, the idea is that the _target_ knows how to inline it (and whether
to inline it) best.  A stupid memset loop using chars can be very
well expanded faster like with a rep; movb;

Of course the issue here is that memmove doesn't have a target specific
expansion way.  That's something we should eventually fix.

That said - heuristics are hard - w/o transforming into a call we
completely peel / jump-thread the whole thing which is obviously
better.

Reply via email to