combine permutations in gimple
Jakub Jelinek
jakub@redhat.com
Wed Aug 15 12:59:00 GMT 2012
On Wed, Aug 15, 2012 at 02:36:54PM +0200, Richard Guenther wrote:
> On Wed, Aug 15, 2012 at 2:29 PM, Jakub Jelinek <jakub@redhat.com> 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.
Jakub
More information about the Gcc-patches
mailing list