Comments

On Fri, Oct 28, 2011 at 06:50:49PM +0200, Jakub Jelinek wrote:
> On Fri, Oct 28, 2011 at 09:07:31AM -0700, Richard Henderson wrote:> > I think this is the same problem as Jakub is attacking here:> > > > http://gcc.gnu.org/ml/gcc-patches/2011-10/msg02503.html> > It has been checked in already. But my patch only deals> with the vector << vector case, vector << scalar (including> vector << scalar implemented using vector << vector) supposedly still> needs fold_const somewhere if the type sizes disagree.
A wild guess, though untested, because I don't have a reproducer:
2011-10-28 Jakub Jelinek <jakub@redhat.com>
* tree-vect-stmts.c (vectorizable_shift): If op1 is vect_external_def
and has different type from op0, cast it to op0's type before the
loop first.
Jakub

On 10/28/2011 11:41 AM, Jakub Jelinek wrote:
> On Fri, Oct 28, 2011 at 06:50:49PM +0200, Jakub Jelinek wrote:>> On Fri, Oct 28, 2011 at 09:07:31AM -0700, Richard Henderson wrote:>>> I think this is the same problem as Jakub is attacking here:>>>>>> http://gcc.gnu.org/ml/gcc-patches/2011-10/msg02503.html>>>> It has been checked in already. But my patch only deals>> with the vector << vector case, vector << scalar (including>> vector << scalar implemented using vector << vector) supposedly still>> needs fold_const somewhere if the type sizes disagree.> > A wild guess, though untested, because I don't have a reproducer:> > 2011-10-28 Jakub Jelinek <jakub@redhat.com>> > * tree-vect-stmts.c (vectorizable_shift): If op1 is vect_external_def> and has different type from op0, cast it to op0's type before the> loop first.
I suspect the problem is in optabs.c, not here.
I'll try to look at it later today.
r~