1 /* { dg-do run } */ 2 /* { dg-require-effective-target ultrasparc_vis2_hw } */ 3 /* { dg-options "-mcpu=ultrasparc3 -O" } */ 4 5 typedef unsigned int Vect __attribute__((vector_size(8))); 6 7 extern void abort (void); 8 9 Vect a, b, c, d; 10 test(void)11__attribute__((noinline, noclone)) void test (void) 12 { 13 Vect mask = { 2, 2 }; 14 int i; 15 16 c = __builtin_shuffle (a, mask); 17 d = __builtin_shuffle (a, b, mask); 18 19 __asm__ ("" : : "r" (&c), "r" (&d) : "memory"); 20 21 for (i = 0; i < 2; ++i) 22 if (c[i] != a[mask[i] & 1]) 23 abort (); 24 else if (mask[i] & 2) 25 { 26 if (d[i] != b[mask[i] & 1]) 27 abort (); 28 } 29 } 30 main(void)31int main (void) 32 { 33 int i; 34 for (i = 0; i < 2; ++i) 35 { 36 a[i] = i + 2; 37 b[i] = 2 + i + 2; 38 } 39 40 test (); 41 return 0; 42 } 43