On Wed, Jul 03, 2019 at 12:49:34PM +0200, Richard Biener wrote: > 2019-07-03 Richard Biener <rguent...@suse.de> > > PR middle-end/91069 > * match.pd (vec_perm -> bit_insert): Fix element read from > first vector. > > * gcc.dg/pr91069.c: New testcase.
I've noticed the testcase FAILs on ia32, the problem is that long is 32-bit and so v2di type isn't v2di we are expecting, but v4si and mismatches the v2df in number of elements and element precision. Fixed thusly, regtested on x86_64-linux and i686-linux, committed to trunk. Note, still not truly portable, if double and long long have different sizes on some target, this will still fail. 2019-07-04 Jakub Jelinek <ja...@redhat.com> PR middle-end/91069 * gcc.dg/pr91069.c (v2df): Use 2 * sizeof (double) instead of hardcoded 16 for better portability. (v2di): Change from long vector to long long vector. Use 2 * sizeof (long long) instead of hardcoded 16. --- gcc/testsuite/gcc.dg/pr91069.c.jj 2019-07-04 00:18:31.510099301 +0200 +++ gcc/testsuite/gcc.dg/pr91069.c 2019-07-04 07:08:24.944046933 +0200 @@ -1,8 +1,8 @@ /* { dg-do run } */ /* { dg-options "-std=gnu11" } */ -typedef double v2df __attribute__((vector_size(16))); -typedef long v2di __attribute__((vector_size(16))); +typedef double v2df __attribute__((vector_size(2 * sizeof (double)))); +typedef long long v2di __attribute__((vector_size(2 * sizeof (long long)))); void foo (v2df *res, v2df *src) { Jakub