On Thu, Jan 31, 2013 at 05:31:12PM +0100, Richard Biener wrote: > 2013-01-31 Richard Biener <rguent...@suse.de> > > PR tree-optimization/ > * tree-vect-slp.c (vect_get_slp_defs): More thoroughly try to > match up operand with SLP child. > > * gcc.dg/torture/pr56157.c: New testcase.
Ok, thanks. > *** gcc/testsuite/gcc.dg/torture/pr56157.c (revision 0) > --- gcc/testsuite/gcc.dg/torture/pr56157.c (working copy) I'd perhaps remove some more cruft from the testcase, /* { dg-do compile } */ /* { dg-options "-ftree-vectorize" } */ struct Pixel { unsigned short r, g, b, a; }; void fn (unsigned char * __restrict dst, const unsigned char * __restrict src) { unsigned x; for (x = 0; x < 1024; x++) { struct Pixel pixel; pixel.r = src[0] * 0xffffU / 0xff; pixel.g = src[1] * 0xffffU / 0xff; pixel.b = src[2] * 0xffffU / 0xff; pixel.a = src[3] * 0xffffU / 0xff; __builtin_memcpy (dst, &pixel, sizeof pixel); src += 4; dst += 8; } } is less obfuscated and still does the same thing, but your call. Jakub