------- Comment #2 from rguenth at gcc dot gnu dot org  2010-07-30 14:24 -------
Created an attachment (id=21360)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21360&action=view)
required patch

Together with attached patch (from the vector-enhancement GSoC project).

#define vector(elcount, type)  \
__attribute__((vector_size((elcount)*sizeof(type)))) type

#define vidx(type, vec, idx) (*(((type *) &(vec)) + idx))

int main (int argc, char **argv)
{
   vector (4, int) i0 = {argc, 1,2,3};
   vector(4,int) i2;
   vector (4, int) imask = {0,3,2,1};
   int a, b, c;

   if (argc > 4)
       __builtin_abort ();

   i2 = __builtin_shuffle (imask, i0);

   b = 0;
   if (vidx (int,imask,b) == vidx (int, i2, b))
      __builtin_abort ();

   return 0;
}

ICEs at -O2 on x86_64.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45142

Reply via email to