On Wed, Aug 15, 2012 at 2:29 PM, Jakub Jelinek <ja...@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. Richard. > Jakub