This is the mail archive of the
mailing list for the GCC project.
Re: combine permutations in gimple
On Wed, Aug 15, 2012 at 02:36:54PM +0200, Richard Guenther wrote:
> On Wed, Aug 15, 2012 at 2:29 PM, Jakub Jelinek <firstname.lastname@example.org> wrote:
> > On Wed, Aug 15, 2012 at 02:15:03PM +0200, Richard Guenther wrote:
> >> Ok. That would still leave us with the issue Ramana brought up - the
> >> target hook returning true unconditionally if a generic permute is implemented.
> >> We just avoid generic expansion by tree-vect-generic.c that way.
> > Yeah, if there is a generic permute, can_vec_perm_p will return true always
> > for the modes for which it is available. Which is why I've been suggesting
> > also the target hook which should return false if only generic permute is
> > going to be used.
> Well. What about returning a cost instead? We don't want to transform
> two insns to four either.
That could work, it would just be a lot of work to change it (and more
costly). E.g. on i386 for 16-byte vectors with certain ISAs we return true
right away, when returning cost we'd need to go the slow path always
even when the caller is just interested in a boolean flag whether it is
possible or not.
CCing rth as the author of the hooks.