[PATCH] Fix PR60505

Richard Biener rguenther@suse.de
Fri Mar 14 09:25:00 GMT 2014


On Fri, 14 Mar 2014, Jakub Jelinek wrote:

> On Fri, Mar 14, 2014 at 08:52:07AM +0100, Richard Biener wrote:
> > > Consider this fact and if there are alias checks, we can safely remove
> > > the epilogue if the maximum trip count of the loop is less than or
> > > equal to the calculated threshold.
> > 
> > You have to consider n % vf != 0, so an argument on only maximum
> > trip count or threshold cannot work.
> 
> Well, if you only check if maximum trip count is <= vf and you know
> that for n < vf the vectorized loop + it's epilogue path will not be taken,
> then perhaps you could, but it is a very special case.
> Now, the question is when we are guaranteed we enter the scalar versioned
> loop instead for n < vf, is that in case of versioning for alias or
> versioning for alignment?

I think neither - I have plans to do the cost model check together
with the versioning condition but didn't get around to implement that.
That would allow stronger max bounds for the epilogue loop.

Richard.



More information about the Gcc-patches mailing list