On Fri, Oct 28, 2011 at 11:44:17AM -0700, Richard Henderson wrote: > > A wild guess, though untested, because I don't have a reproducer: > > > > 2011-10-28 Jakub Jelinek <ja...@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.
Possible. Though, if I disable all "ashl<mode>3", "lshr<mode>3" and "ashr<mode>3" expanders in sse.md, I get without the above patch ICEs on e.g. long long d[64], e, j[64]; void f4 (void) { int i; for (i = 0; i < 64; i++) j[i] = d[i] << e; } with -O3 -mxop and -O3 -mavx2 and the patch fixes those. Jakub