Patchwork __builtin_shuffle testsuite

login
register
mail settings
Submitter Jakub Jelinek
Date Oct. 17, 2011, 7:21 p.m.
Message ID <20111017192135.GM2210@tyan-ft48-01.lab.bos.redhat.com>
Download mbox | patch
Permalink /patch/120292/
State New
Headers show

Comments

Jakub Jelinek - Oct. 17, 2011, 7:21 p.m.
Hi!

This patch adds some further __builtin_shuffle tests with constant masks.
As the full tests are quite expensive (even when I've cut it down from 512
generated masks to 128), I've split the masks into TESTS (currently 16, plus
I plan to add a few permutation masks based on gcov coverage testing of i386 code)
and EXPTESTS that are only run with GCC_TEST_RUN_EXPENSIVE=1.  Similarly,
by default it will only run the tests at -O2, with the above env var
will fully cycle through options.
The generic vectors (e.g. vshuf-v8si etc. when not -mavx2) seem to currently
fail at -Os on the broadcast permutation (all zeros mask), most likely some
middle-end bug, but this doesn't fail unless GCC_TEST_RUN_EXPENSIVE=1
and thus doesn't need to be a show stopper for this patch.

Ok for trunk?

2011-10-17  Jakub Jelinek  <jakub@redhat.com>

	* gcc.c-torture/execute/vshuf-v16hi.c: New test.
	* gcc.dg/torture/vshuf-16.inc: New file.
	* gcc.dg/torture/vshuf-2.inc: New file.
	* gcc.dg/torture/vshuf-32.inc: New file.
	* gcc.dg/torture/vshuf-4.inc: New file.
	* gcc.dg/torture/vshuf-8.inc: New file.
	* gcc.dg/torture/vshuf-main.inc: New file.
	* gcc.dg/torture/vshuf-v16hi.c: New test.
	* gcc.dg/torture/vshuf-v16qi.c: New test.
	* gcc.dg/torture/vshuf-v2df.c: New test.
	* gcc.dg/torture/vshuf-v2di.c: New test.
	* gcc.dg/torture/vshuf-v2sf.c: New test.
	* gcc.dg/torture/vshuf-v2si.c: New test.
	* gcc.dg/torture/vshuf-v32qi.c: New test.
	* gcc.dg/torture/vshuf-v4df.c: New test.
	* gcc.dg/torture/vshuf-v4di.c: New test.
	* gcc.dg/torture/vshuf-v4hi.c: New test.
	* gcc.dg/torture/vshuf-v4sf.c: New test.
	* gcc.dg/torture/vshuf-v4si.c: New test.
	* gcc.dg/torture/vshuf-v8hi.c: New test.
	* gcc.dg/torture/vshuf-v8qi.c: New test.
	* gcc.dg/torture/vshuf-v8sf.c: New test.
	* gcc.dg/torture/vshuf-v8si.c: New test.


	Jakub
Richard Henderson - Oct. 17, 2011, 8:17 p.m.
On 10/17/2011 12:21 PM, Jakub Jelinek wrote:
> 2011-10-17  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* gcc.c-torture/execute/vshuf-v16hi.c: New test.
> 	* gcc.dg/torture/vshuf-16.inc: New file.
> 	* gcc.dg/torture/vshuf-2.inc: New file.
> 	* gcc.dg/torture/vshuf-32.inc: New file.
> 	* gcc.dg/torture/vshuf-4.inc: New file.
> 	* gcc.dg/torture/vshuf-8.inc: New file.
> 	* gcc.dg/torture/vshuf-main.inc: New file.
> 	* gcc.dg/torture/vshuf-v16hi.c: New test.
> 	* gcc.dg/torture/vshuf-v16qi.c: New test.
> 	* gcc.dg/torture/vshuf-v2df.c: New test.
> 	* gcc.dg/torture/vshuf-v2di.c: New test.
> 	* gcc.dg/torture/vshuf-v2sf.c: New test.
> 	* gcc.dg/torture/vshuf-v2si.c: New test.
> 	* gcc.dg/torture/vshuf-v32qi.c: New test.
> 	* gcc.dg/torture/vshuf-v4df.c: New test.
> 	* gcc.dg/torture/vshuf-v4di.c: New test.
> 	* gcc.dg/torture/vshuf-v4hi.c: New test.
> 	* gcc.dg/torture/vshuf-v4sf.c: New test.
> 	* gcc.dg/torture/vshuf-v4si.c: New test.
> 	* gcc.dg/torture/vshuf-v8hi.c: New test.
> 	* gcc.dg/torture/vshuf-v8qi.c: New test.
> 	* gcc.dg/torture/vshuf-v8sf.c: New test.
> 	* gcc.dg/torture/vshuf-v8si.c: New test.

Ok.


r~

Patch

--- gcc/testsuite/gcc.c-torture/execute/vshuf-v16hi.c.jj	2011-10-17 19:11:00.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/execute/vshuf-v16hi.c	2011-10-17 19:11:08.000000000 +0200
@@ -0,0 +1,5 @@ 
+typedef unsigned short V __attribute__((vector_size(32)));
+typedef V VI;
+
+#include "vshuf-16.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-v8qi.c.jj	2011-10-17 19:02:43.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v8qi.c	2011-10-17 20:59:44.000000000 +0200
@@ -0,0 +1,10 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+typedef unsigned char V __attribute__((vector_size(8)));
+typedef V VI;
+
+#include "vshuf-8.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-v2df.c.jj	2011-10-17 19:08:20.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v2df.c	2011-10-17 21:00:22.000000000 +0200
@@ -0,0 +1,14 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+#if __SIZEOF_DOUBLE__ == 8 && __SIZEOF_LONG_LONG__ == 8
+typedef double V __attribute__((vector_size(16)));
+typedef unsigned long long VI __attribute__((vector_size(16)));
+#else
+#define UNSUPPORTED
+#endif
+
+#include "vshuf-2.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-v4hi.c.jj	2011-10-17 19:06:29.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v4hi.c	2011-10-17 20:59:53.000000000 +0200
@@ -0,0 +1,10 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+typedef unsigned short V __attribute__((vector_size(8)));
+typedef V VI;
+
+#include "vshuf-4.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-8.inc.jj	2011-10-17 18:32:17.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-8.inc	2011-10-17 21:01:59.000000000 +0200
@@ -0,0 +1,131 @@ 
+#define N 8
+#define TESTS \
+T (0,	0, 1, 2, 3, 4, 5, 6, 7) \
+T (1,	0, 0, 0, 0, 0, 0, 0, 0) \
+T (2,	0, 1, 2, 3, 0, 1, 2, 3) \
+T (3,	0, 10, 3, 8, 1, 11, 10, 2) \
+T (4,	0, 1, 2, 3, 3, 0, 2, 1) \
+T (5,	12, 5, 14, 9, 8, 15, 1, 7) \
+T (6,	9, 10, 11, 8, 4, 15, 14, 12) \
+T (7,	4, 10, 14, 9, 11, 1, 12, 11) \
+T (8,	15, 3, 3, 8, 5, 11, 2, 10) \
+T (9,	13, 11, 10, 15, 8, 5, 14, 8) \
+T (10,	9, 13, 12, 14, 10, 1, 5, 14) \
+T (11,	5, 11, 12, 6, 3, 2, 4, 15) \
+T (12,	5, 13, 14, 8, 4, 10, 4, 12) \
+T (13,	14, 8, 12, 3, 13, 9, 5, 4) \
+T (14,	15, 3, 13, 6, 14, 12, 10, 0) \
+T (15,	0, 5, 11, 7, 4, 6, 14, 1)
+#define EXPTESTS \
+T (116,	9, 3, 9, 4, 7, 0, 0, 6) \
+T (117,	4, 14, 12, 8, 9, 6, 0, 10) \
+T (118,	10, 12, 1, 3, 4, 11, 9, 2) \
+T (119,	4, 11, 9, 5, 8, 14, 0, 2) \
+T (120,	0, 10, 8, 6, 4, 9, 7, 5) \
+T (121,	10, 15, 0, 4, 12, 9, 7, 3) \
+T (122,	13, 6, 0, 7, 5, 12, 12, 2) \
+T (123,	4, 10, 11, 15, 12, 7, 3, 8) \
+T (124,	1, 13, 15, 9, 6, 5, 7, 4) \
+T (125,	7, 13, 2, 5, 2, 8, 1, 6) \
+T (126,	4, 5, 2, 12, 14, 13, 8, 6) \
+T (127,	4, 10, 2, 7, 11, 15, 9, 0) \
+T (128,	14, 8, 12, 10, 13, 3, 11, 2) \
+T (129,	10, 8, 14, 9, 5, 1, 15, 7) \
+T (130,	12, 2, 9, 13, 5, 14, 1, 15) \
+T (131,	10, 4, 1, 14, 11, 15, 9, 2) \
+T (132,	9, 12, 7, 4, 2, 1, 0, 9) \
+T (133,	11, 15, 4, 10, 3, 12, 13, 5) \
+T (134,	1, 5, 6, 13, 14, 15, 3, 10) \
+T (135,	0, 14, 6, 10, 1, 13, 3, 2) \
+T (136,	2, 11, 1, 5, 12, 13, 3, 5) \
+T (137,	7, 11, 4, 1, 12, 10, 14, 10) \
+T (138,	3, 6, 7, 13, 11, 15, 10, 0) \
+T (139,	10, 8, 7, 14, 1, 11, 0, 13) \
+T (140,	5, 3, 13, 11, 8, 5, 12, 6) \
+T (141,	15, 2, 12, 13, 10, 8, 5, 0) \
+T (142,	13, 9, 10, 2, 11, 3, 4, 1) \
+T (143,	2, 14, 6, 5, 1, 8, 15, 0) \
+T (144,	12, 9, 14, 10, 1, 3, 11, 13) \
+T (145,	12, 13, 11, 2, 5, 6, 4, 8) \
+T (146,	5, 0, 2, 1, 6, 8, 15, 13) \
+T (147,	8, 7, 1, 3, 5, 11, 14, 15) \
+T (148,	0, 9, 2, 15, 3, 1, 8, 10) \
+T (149,	4, 14, 11, 6, 8, 5, 12, 7) \
+T (150,	5, 9, 10, 12, 14, 15, 2, 7) \
+T (151,	11, 6, 5, 7, 11, 14, 2, 1) \
+T (152,	13, 1, 7, 4, 6, 8, 15, 9) \
+T (153,	10, 12, 9, 1, 6, 7, 8, 15) \
+T (154,	8, 4, 5, 1, 3, 0, 7, 13) \
+T (155,	13, 9, 3, 4, 10, 1, 15, 7) \
+T (156,	13, 8, 2, 7, 0, 6, 3, 6) \
+T (157,	15, 15, 13, 6, 0, 5, 14, 4) \
+T (158,	13, 1, 2, 2, 7, 9, 2, 6) \
+T (159,	5, 12, 10, 13, 6, 1, 4, 7) \
+T (160,	0, 2, 9, 1, 5, 11, 14, 11) \
+T (161,	14, 6, 5, 10, 3, 2, 15, 4) \
+T (162,	3, 10, 0, 1, 13, 14, 11, 15) \
+T (163,	13, 7, 5, 9, 5, 0, 11, 4) \
+T (164,	2, 11, 1, 12, 3, 13, 4, 9) \
+T (165,	1, 0, 10, 11, 5, 13, 4, 3) \
+T (166,	3, 9, 1, 12, 15, 14, 10, 5) \
+T (167,	3, 10, 11, 14, 5, 1, 8, 12) \
+T (168,	10, 15, 5, 14, 4, 13, 6, 3) \
+T (169,	1, 8, 6, 4, 11, 13, 7, 10) \
+T (170,	8, 7, 1, 15, 11, 9, 0, 3) \
+T (171,	4, 0, 11, 7, 1, 15, 3, 13) \
+T (172,	14, 7, 3, 4, 9, 11, 0, 6) \
+T (173,	7, 3, 11, 4, 8, 2, 10, 15) \
+T (174,	7, 9, 14, 2, 0, 5, 13, 3) \
+T (175,	4, 8, 5, 9, 3, 11, 1, 14) \
+T (176,	13, 12, 3, 3, 1, 4, 8, 5) \
+T (177,	7, 12, 9, 13, 10, 4, 5, 8) \
+T (178,	14, 3, 12, 7, 2, 6, 5, 5) \
+T (179,	7, 0, 8, 6, 2, 14, 12, 15) \
+T (180,	2, 12, 0, 4, 1, 15, 11, 10) \
+T (181,	0, 7, 5, 12, 15, 10, 14, 3) \
+T (182,	3, 10, 2, 5, 11, 6, 13, 14) \
+T (183,	3, 2, 7, 11, 0, 13, 8, 10) \
+T (184,	0, 12, 15, 1, 9, 2, 11, 4) \
+T (185,	11, 15, 8, 10, 9, 1, 13, 3) \
+T (186,	12, 13, 15, 12, 3, 9, 5, 7) \
+T (187,	4, 10, 5, 6, 1, 11, 0, 11) \
+T (188,	11, 6, 7, 9, 0, 8, 14, 8) \
+T (189,	1, 15, 6, 9, 12, 6, 7, 14) \
+T (190,	1, 5, 6, 11, 12, 13, 3, 0) \
+T (191,	0, 8, 15, 13, 12, 6, 1, 4) \
+T (192,	12, 15, 8, 4, 2, 0, 9, 5) \
+T (193,	14, 5, 13, 10, 12, 11, 0, 1) \
+T (194,	12, 1, 9, 8, 10, 9, 0, 2) \
+T (195,	11, 0, 13, 4, 6, 2, 14, 15) \
+T (196,	0, 10, 6, 2, 12, 4, 9, 13) \
+T (197,	7, 12, 8, 10, 1, 0, 5, 0) \
+T (198,	12, 13, 0, 5, 3, 14, 11, 4) \
+T (199,	9, 1, 4, 14, 10, 12, 15, 6) \
+T (200,	3, 12, 13, 6, 14, 2, 1, 6) \
+T (201,	5, 14, 8, 10, 1, 12, 2, 0) \
+T (202,	5, 8, 2, 7, 4, 15, 14, 2) \
+T (203,	14, 13, 10, 9, 11, 15, 7, 8) \
+T (204,	12, 13, 14, 2, 4, 9, 5, 7) \
+T (205,	0, 7, 5, 4, 7, 13, 6, 8) \
+T (206,	7, 0, 15, 6, 12, 2, 5, 4) \
+T (207,	8, 6, 0, 1, 1, 11, 1, 9) \
+T (208,	11, 6, 14, 9, 5, 3, 7, 13) \
+T (209,	12, 3, 15, 9, 1, 0, 8, 13) \
+T (210,	11, 1, 9, 8, 7, 6, 12, 2) \
+T (211,	10, 9, 2, 6, 8, 11, 0, 4) \
+T (212,	10, 13, 15, 9, 6, 15, 14, 10) \
+T (213,	9, 5, 8, 3, 4, 7, 11, 4) \
+T (214,	1, 2, 13, 5, 8, 4, 3, 6) \
+T (215,	8, 3, 2, 4, 9, 14, 12, 13) \
+T (216,	5, 7, 8, 15, 3, 1, 10, 4) \
+T (217,	2, 9, 3, 2, 14, 11, 5, 7) \
+T (218,	15, 6, 4, 10, 14, 3, 13, 2) \
+T (219,	0, 8, 14, 5, 15, 7, 10, 1) \
+T (220,	14, 0, 6, 10, 8, 2, 7, 4) \
+T (221,	15, 13, 3, 14, 11, 2, 14, 6) \
+T (222,	8, 2, 10, 13, 1, 0, 4, 11) \
+T (223,	7, 15, 2, 9, 1, 12, 11, 3) \
+T (224,	13, 15, 3, 12, 15, 7, 0, 8) \
+T (225,	0, 2, 1, 11, 14, 3, 9, 14) \
+T (226,	12, 14, 3, 15, 8, 5, 1, 7) \
+T (227,	0, 5, 13, 8, 4, 2, 1, 3)
--- gcc/testsuite/gcc.dg/torture/vshuf-v4di.c.jj	2011-10-17 19:06:29.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v4di.c	2011-10-17 20:59:56.000000000 +0200
@@ -0,0 +1,14 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+#if __SIZEOF_LONG_LONG__ == 8
+typedef unsigned long long V __attribute__((vector_size(32)));
+typedef V VI;
+#else
+#define UNSUPPORTED
+#endif
+
+#include "vshuf-4.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-4.inc.jj	2011-10-17 18:57:46.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-4.inc	2011-10-17 21:01:37.000000000 +0200
@@ -0,0 +1,131 @@ 
+#define N 4
+#define TESTS \
+T (0,	0, 1, 2, 3) \
+T (1,	0, 0, 0, 0) \
+T (2,	6, 3, 1, 5) \
+T (3,	1, 3, 5, 0) \
+T (4,	6, 3, 5, 4) \
+T (5,	6, 4, 1, 0) \
+T (6,	6, 1, 4, 2) \
+T (7,	3, 7, 4, 4) \
+T (8,	3, 2, 4, 4) \
+T (9,	3, 2, 6, 1) \
+T (10,	5, 4, 5, 6) \
+T (11,	1, 4, 0, 7) \
+T (12,	1, 5, 7, 2) \
+T (13,	2, 3, 0, 4) \
+T (14,	7, 6, 4, 2) \
+T (15,	6, 1, 3, 4)
+#define EXPTESTS \
+T (116,	1, 2, 4, 3) \
+T (117,	7, 3, 3, 0) \
+T (118,	5, 3, 2, 7) \
+T (119,	0, 3, 5, 6) \
+T (120,	0, 0, 1, 5) \
+T (121,	4, 6, 2, 1) \
+T (122,	2, 5, 6, 3) \
+T (123,	4, 6, 3, 2) \
+T (124,	4, 7, 5, 6) \
+T (125,	0, 4, 2, 4) \
+T (126,	2, 4, 6, 0) \
+T (127,	4, 3, 5, 1) \
+T (128,	5, 4, 7, 3) \
+T (129,	7, 5, 6, 4) \
+T (130,	2, 0, 5, 3) \
+T (131,	7, 4, 3, 0) \
+T (132,	6, 1, 3, 1) \
+T (133,	3, 4, 1, 7) \
+T (134,	0, 0, 6, 4) \
+T (135,	6, 4, 0, 1) \
+T (136,	6, 0, 2, 4) \
+T (137,	1, 3, 4, 2) \
+T (138,	3, 1, 2, 4) \
+T (139,	3, 1, 5, 0) \
+T (140,	1, 6, 0, 2) \
+T (141,	0, 2, 6, 4) \
+T (142,	1, 7, 5, 2) \
+T (143,	7, 0, 4, 1) \
+T (144,	7, 3, 5, 6) \
+T (145,	0, 7, 5, 4) \
+T (146,	6, 4, 2, 3) \
+T (147,	1, 5, 7, 6) \
+T (148,	5, 7, 4, 7) \
+T (149,	5, 2, 2, 0) \
+T (150,	7, 1, 6, 4) \
+T (151,	5, 2, 4, 6) \
+T (152,	5, 0, 4, 6) \
+T (153,	4, 2, 7, 3) \
+T (154,	7, 1, 0, 6) \
+T (155,	0, 4, 2, 5) \
+T (156,	3, 4, 3, 2) \
+T (157,	2, 0, 6, 1) \
+T (158,	5, 1, 7, 4) \
+T (159,	2, 1, 5, 6) \
+T (160,	1, 6, 5, 7) \
+T (161,	2, 4, 1, 6) \
+T (162,	3, 7, 1, 6) \
+T (163,	2, 1, 4, 7) \
+T (164,	4, 2, 1, 0) \
+T (165,	0, 7, 1, 3) \
+T (166,	7, 4, 2, 3) \
+T (167,	4, 5, 3, 5) \
+T (168,	1, 5, 6, 7) \
+T (169,	6, 3, 2, 0) \
+T (170,	6, 2, 1, 5) \
+T (171,	5, 6, 1, 3) \
+T (172,	2, 2, 3, 1) \
+T (173,	5, 4, 3, 5) \
+T (174,	7, 3, 4, 1) \
+T (175,	4, 2, 3, 6) \
+T (176,	7, 6, 5, 3) \
+T (177,	7, 2, 0, 6) \
+T (178,	1, 3, 0, 2) \
+T (179,	5, 3, 0, 5) \
+T (180,	4, 6, 7, 2) \
+T (181,	4, 5, 2, 0) \
+T (182,	5, 0, 1, 2) \
+T (183,	2, 3, 4, 1) \
+T (184,	2, 6, 5, 1) \
+T (185,	0, 6, 7, 4) \
+T (186,	4, 1, 6, 2) \
+T (187,	1, 3, 2, 3) \
+T (188,	2, 5, 4, 3) \
+T (189,	2, 5, 6, 4) \
+T (190,	4, 0, 5, 0) \
+T (191,	2, 1, 6, 0) \
+T (192,	7, 5, 0, 1) \
+T (193,	3, 5, 6, 7) \
+T (194,	0, 1, 2, 7) \
+T (195,	3, 1, 0, 2) \
+T (196,	2, 4, 6, 3) \
+T (197,	6, 0, 5, 4) \
+T (198,	6, 5, 7, 1) \
+T (199,	2, 5, 4, 6) \
+T (200,	7, 2, 3, 6) \
+T (201,	3, 5, 7, 3) \
+T (202,	1, 7, 4, 6) \
+T (203,	4, 0, 7, 1) \
+T (204,	7, 1, 0, 4) \
+T (205,	5, 1, 3, 4) \
+T (206,	0, 7, 3, 5) \
+T (207,	3, 2, 1, 5) \
+T (208,	7, 5, 0, 2) \
+T (209,	7, 0, 6, 3) \
+T (210,	6, 6, 7, 7) \
+T (211,	5, 6, 0, 4) \
+T (212,	5, 1, 2, 2) \
+T (213,	7, 1, 2, 6) \
+T (214,	5, 4, 2, 6) \
+T (215,	1, 5, 6, 4) \
+T (216,	7, 0, 2, 1) \
+T (217,	1, 5, 3, 6) \
+T (218,	3, 3, 6, 5) \
+T (219,	2, 3, 5, 7) \
+T (220,	2, 4, 3, 0) \
+T (221,	1, 5, 6, 3) \
+T (222,	7, 5, 1, 5) \
+T (223,	0, 5, 3, 4) \
+T (224,	2, 3, 1, 4) \
+T (225,	2, 3, 5, 1) \
+T (226,	4, 3, 1, 0) \
+T (227,	2, 3, 5, 5)
--- gcc/testsuite/gcc.dg/torture/vshuf-v16qi.c.jj	2011-10-17 18:20:27.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v16qi.c	2011-10-17 21:00:25.000000000 +0200
@@ -0,0 +1,10 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+typedef unsigned char V __attribute__((vector_size(16)));
+typedef V VI;
+
+#include "vshuf-16.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-v32qi.c.jj	2011-10-17 18:31:08.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v32qi.c	2011-10-17 21:00:14.000000000 +0200
@@ -0,0 +1,10 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+typedef unsigned char V __attribute__((vector_size(32)));
+typedef V VI;
+
+#include "vshuf-32.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-v4si.c.jj	2011-10-17 19:06:29.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v4si.c	2011-10-17 20:59:49.000000000 +0200
@@ -0,0 +1,17 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+#if __SIZEOF_INT__ == 4
+typedef unsigned int V __attribute__((vector_size(16)));
+typedef V VI;
+#elif __SIZEOF_LONG__ == 4
+typedef unsigned long V __attribute__((vector_size(16)));
+typedef V VI;
+#else
+# define UNSUPPORTED
+#endif
+
+#include "vshuf-4.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-main.inc.jj	2011-10-17 18:16:53.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-main.inc	2011-10-17 19:12:57.000000000 +0200
@@ -0,0 +1,55 @@ 
+/* Driver fragment for __builtin_shuffle of any vector shape.  */
+
+extern void abort (void);
+
+#ifndef UNSUPPORTED
+V a, b, c, d;
+
+#define T(num, msk...) \
+__attribute__((noinline, noclone)) void		\
+test_##num (void)				\
+{						\
+  VI mask = { msk };				\
+  int i;					\
+  c = __builtin_shuffle (a, mask);		\
+  d = __builtin_shuffle (a, b, mask);		\
+  __asm ("" : : "r" (&c), "r" (&d) : "memory");	\
+  for (i = 0; i < N; ++i)			\
+    if (c[i] != a[mask[i] & (N - 1)])		\
+      abort ();					\
+    else if ((mask[i] & N))			\
+      {						\
+	if (d[i] != b[mask[i] & (N - 1)])	\
+	  abort ();				\
+      }						\
+    else if (d[i] != a[mask[i] & (N - 1)])	\
+      abort ();					\
+}
+TESTS
+#ifdef EXPENSIVE
+EXPTESTS
+#endif
+#endif
+
+int
+main ()
+{
+#ifndef UNSUPPORTED
+  int i;
+  for (i = 0; i < N; ++i)
+    {
+      a[i] = i + 2;
+      b[i] = N + i + 2;
+    }
+
+#undef T
+#define T(num, msk...) \
+  test_##num ();
+  TESTS
+#ifdef EXPENSIVE
+  EXPTESTS
+#endif
+#endif
+
+  return 0;
+}
--- gcc/testsuite/gcc.dg/torture/vshuf-2.inc.jj	2011-10-17 18:59:50.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-2.inc	2011-10-17 21:02:14.000000000 +0200
@@ -0,0 +1,19 @@ 
+#define N 2
+#define TESTS \
+T (0,	0, 0) \
+T (1,	0, 1) \
+T (2,	0, 2) \
+T (3,	0, 3) \
+T (4,	1, 0) \
+T (5,	1, 1) \
+T (6,	1, 2) \
+T (7,	1, 3) \
+T (8,	2, 0) \
+T (9,	2, 1) \
+T (10,	2, 2) \
+T (11,	2, 3) \
+T (12,	3, 0) \
+T (13,	3, 1) \
+T (14,	3, 2) \
+T (15,	3, 3)
+#define EXPTESTS
--- gcc/testsuite/gcc.dg/torture/vshuf-v16hi.c.jj	2011-10-17 18:21:07.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v16hi.c	2011-10-17 21:00:27.000000000 +0200
@@ -0,0 +1,10 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+typedef unsigned short V __attribute__((vector_size(32)));
+typedef V VI;
+
+#include "vshuf-16.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-v8si.c.jj	2011-10-17 19:02:46.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v8si.c	2011-10-17 20:56:50.000000000 +0200
@@ -0,0 +1,17 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+#if __SIZEOF_INT__ == 4
+typedef unsigned int V __attribute__((vector_size(32)));
+typedef V VI;
+#elif __SIZEOF_LONG__ == 4
+typedef unsigned long V __attribute__((vector_size(32)));
+typedef V VI;
+#else
+# define UNSUPPORTED
+#endif
+
+#include "vshuf-8.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-16.inc.jj	2011-10-17 18:16:50.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-16.inc	2011-10-17 21:02:46.000000000 +0200
@@ -0,0 +1,131 @@ 
+#define N 16
+#define TESTS \
+T (0,	0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15) \
+T (1,	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
+T (2,	0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7) \
+T (3,	0, 18, 7, 16, 23, 5, 4, 22, 1, 6, 21, 20, 19, 3, 17, 2) \
+T (4,	0, 1, 2, 3, 4, 5, 6, 7, 7, 1, 2, 0, 4, 5, 6, 3) \
+T (5,	0, 19, 16, 3, 2, 17, 18, 1, 24, 8, 11, 10, 27, 26, 25, 9) \
+T (6,	4, 23, 20, 7, 6, 21, 22, 5, 28, 12, 15, 14, 31, 30, 29, 13) \
+T (7,	7, 1, 2, 0, 4, 5, 6, 3, 7, 1, 2, 0, 4, 5, 6, 3) \
+T (8,	7, 3, 0, 5, 4, 1, 6, 2, 31, 27, 24, 29, 28, 25, 30, 26) \
+T (9,	7, 1, 2, 0, 4, 5, 6, 3, 15, 9, 14, 10, 8, 12, 13, 11) \
+T (10,	15, 0, 3, 12, 14, 2, 1, 13, 4, 11, 9, 6, 5, 10, 7, 8) \
+T (11,	15, 9, 14, 10, 8, 12, 13, 11, 7, 1, 2, 0, 4, 5, 6, 3) \
+T (12,	2, 5, 24, 23, 17, 22, 20, 21, 12, 14, 13, 8, 6, 20, 10, 18) \
+T (13,	23, 11, 15, 9, 0, 14, 8, 12, 10, 13, 19, 11, 2, 26, 24, 30) \
+T (14,	25, 5, 17, 1, 9, 15, 21, 7, 28, 2, 18, 13, 30, 14, 10, 4) \
+T (15,	1, 30, 27, 31, 9, 18, 25, 12, 7, 4, 2, 16, 25, 20, 10, 3)
+#define EXPTESTS \
+T (116,	28, 13, 27, 11, 21, 1, 5, 22, 29, 14, 15, 6, 3, 10, 16, 30) \
+T (117,	22, 26, 1, 13, 29, 3, 18, 18, 11, 21, 12, 28, 19, 5, 7, 4) \
+T (118,	1, 28, 26, 11, 4, 27, 30, 12, 10, 19, 6, 7, 13, 31, 0, 24) \
+T (119,	7, 30, 17, 27, 0, 10, 13, 21, 3, 29, 24, 21, 12, 6, 15, 18) \
+T (120,	28, 13, 26, 24, 21, 16, 29, 9, 10, 2, 27, 19, 20, 17, 18, 14) \
+T (121,	22, 21, 1, 8, 14, 15, 0, 28, 25, 30, 10, 17, 19, 27, 26, 13) \
+T (122,	28, 13, 27, 2, 21, 29, 22, 4, 8, 0, 18, 1, 31, 7, 19, 14) \
+T (123,	15, 0, 9, 2, 31, 3, 17, 24, 1, 8, 26, 20, 30, 11, 22, 5) \
+T (124,	28, 14, 5, 7, 9, 10, 21, 31, 2, 11, 22, 27, 7, 27, 30, 2) \
+T (125,	17, 13, 1, 7, 20, 22, 8, 15, 4, 25, 10, 28, 23, 24, 9, 21) \
+T (126,	17, 5, 3, 4, 0, 7, 19, 13, 29, 25, 26, 1, 15, 8, 2, 7) \
+T (127,	16, 6, 3, 22, 31, 15, 13, 21, 14, 20, 29, 17, 18, 2, 23, 25) \
+T (128,	18, 22, 21, 28, 10, 13, 6, 17, 29, 20, 7, 16, 2, 9, 1, 11) \
+T (129,	30, 11, 11, 22, 21, 10, 3, 18, 15, 26, 20, 16, 17, 13, 29, 7) \
+T (130,	5, 9, 21, 16, 29, 11, 4, 2, 17, 28, 3, 19, 9, 10, 13, 20) \
+T (131,	13, 3, 19, 25, 1, 28, 31, 30, 10, 12, 21, 26, 27, 14, 5, 17) \
+T (132,	8, 28, 26, 31, 5, 14, 4, 13, 6, 15, 3, 17, 6, 20, 27, 29) \
+T (133,	7, 26, 8, 17, 31, 11, 25, 16, 19, 4, 0, 27, 7, 20, 19, 13) \
+T (134,	14, 23, 19, 4, 9, 11, 16, 6, 7, 3, 27, 20, 24, 18, 26, 31) \
+T (135,	7, 25, 14, 2, 16, 5, 29, 3, 4, 24, 21, 9, 20, 19, 27, 1) \
+T (136,	5, 14, 29, 12, 3, 3, 1, 4, 8, 7, 9, 13, 10, 4, 12, 23) \
+T (137,	2, 6, 21, 28, 5, 23, 16, 24, 22, 18, 30, 12, 31, 16, 4, 1) \
+T (138,	4, 31, 11, 26, 16, 23, 5, 12, 15, 14, 19, 3, 18, 21, 27, 6) \
+T (139,	29, 14, 19, 18, 23, 27, 16, 7, 8, 26, 0, 12, 15, 17, 9, 1) \
+T (140,	18, 27, 20, 31, 8, 10, 9, 17, 13, 19, 12, 15, 28, 3, 25, 5) \
+T (141,	28, 13, 23, 20, 10, 5, 22, 17, 27, 0, 21, 27, 11, 25, 24, 30) \
+T (142,	24, 17, 31, 22, 9, 15, 28, 6, 12, 23, 30, 1, 21, 5, 27, 29) \
+T (143,	12, 19, 16, 0, 8, 15, 13, 22, 17, 4, 31, 20, 2, 9, 21, 30) \
+T (144,	5, 13, 26, 12, 27, 0, 17, 1, 25, 8, 10, 25, 18, 11, 29, 4) \
+T (145,	6, 18, 13, 29, 14, 31, 16, 10, 2, 12, 20, 25, 23, 28, 24, 10) \
+T (146,	17, 0, 21, 0, 12, 13, 16, 5, 19, 29, 30, 27, 4, 9, 1, 20) \
+T (147,	14, 26, 28, 17, 31, 10, 6, 3, 29, 22, 18, 1, 6, 5, 30, 8) \
+T (148,	10, 17, 12, 18, 26, 16, 5, 24, 2, 7, 20, 15, 30, 2, 29, 25) \
+T (149,	30, 27, 15, 23, 8, 12, 29, 2, 4, 9, 25, 13, 21, 7, 16, 20) \
+T (150,	7, 13, 4, 22, 24, 0, 31, 28, 18, 5, 2, 16, 17, 1, 1, 6) \
+T (151,	24, 27, 17, 25, 27, 6, 14, 30, 21, 19, 23, 29, 12, 19, 15, 9) \
+T (152,	1, 16, 24, 19, 29, 27, 17, 9, 8, 23, 22, 12, 11, 2, 26, 25) \
+T (153,	2, 25, 22, 8, 11, 16, 20, 26, 29, 15, 6, 15, 30, 10, 21, 24) \
+T (154,	19, 20, 23, 11, 20, 1, 18, 29, 21, 24, 6, 8, 19, 2, 4, 9) \
+T (155,	30, 12, 29, 21, 7, 8, 31, 15, 3, 1, 10, 4, 2, 9, 19, 2) \
+T (156,	14, 27, 5, 23, 15, 22, 4, 26, 30, 19, 29, 18, 16, 24, 21, 7) \
+T (157,	14, 15, 26, 17, 30, 16, 6, 0, 10, 8, 2, 23, 20, 13, 3, 27) \
+T (158,	2, 14, 13, 22, 24, 26, 17, 16, 4, 27, 7, 31, 9, 1, 28, 3) \
+T (159,	13, 15, 19, 12, 31, 23, 16, 8, 0, 2, 17, 27, 30, 14, 18, 1) \
+T (160,	3, 9, 30, 28, 31, 24, 5, 1, 23, 0, 13, 24, 20, 18, 3, 26) \
+T (161,	6, 10, 28, 8, 15, 14, 17, 26, 9, 0, 11, 2, 16, 2, 27, 24) \
+T (162,	20, 29, 7, 11, 5, 21, 0, 8, 12, 28, 13, 4, 26, 10, 28, 23) \
+T (163,	31, 25, 24, 10, 18, 3, 5, 12, 18, 2, 17, 22, 30, 16, 8, 6) \
+T (164,	0, 5, 22, 3, 21, 28, 31, 20, 12, 14, 18, 4, 13, 2, 0, 29) \
+T (165,	26, 18, 25, 20, 2, 0, 10, 30, 27, 11, 9, 3, 31, 4, 29, 21) \
+T (166,	15, 21, 3, 9, 22, 6, 29, 13, 24, 30, 31, 5, 26, 17, 0, 12) \
+T (167,	3, 28, 19, 27, 26, 14, 5, 10, 16, 24, 12, 30, 23, 13, 18, 26) \
+T (168,	0, 13, 10, 16, 23, 17, 8, 24, 20, 25, 21, 3, 12, 22, 6, 1) \
+T (169,	11, 18, 7, 26, 23, 6, 24, 21, 29, 18, 7, 19, 12, 31, 15, 28) \
+T (170,	14, 5, 21, 6, 9, 11, 12, 4, 0, 8, 30, 10, 24, 19, 18, 3) \
+T (171,	6, 3, 5, 13, 10, 2, 24, 31, 23, 2, 29, 4, 22, 7, 19, 20) \
+T (172,	12, 26, 13, 18, 19, 9, 1, 27, 14, 7, 20, 31, 11, 8, 30, 4) \
+T (173,	1, 23, 10, 31, 12, 26, 6, 13, 7, 30, 18, 4, 0, 27, 21, 19) \
+T (174,	20, 15, 13, 22, 10, 14, 5, 3, 31, 8, 0, 11, 4, 9, 1, 0) \
+T (175,	12, 29, 23, 28, 8, 20, 19, 7, 20, 24, 6, 26, 11, 17, 2, 5) \
+T (176,	19, 0, 31, 26, 30, 16, 17, 14, 5, 7, 3, 27, 1, 22, 29, 9) \
+T (177,	17, 15, 4, 1, 7, 13, 23, 28, 2, 8, 26, 12, 21, 24, 3, 19) \
+T (178,	17, 23, 21, 2, 12, 27, 8, 15, 6, 25, 7, 28, 4, 26, 1, 23) \
+T (179,	17, 25, 19, 4, 7, 20, 13, 30, 18, 3, 25, 21, 24, 26, 16, 31) \
+T (180,	7, 20, 18, 9, 3, 16, 12, 22, 0, 30, 10, 25, 17, 29, 19, 5) \
+T (181,	4, 17, 23, 1, 16, 22, 12, 31, 25, 9, 8, 21, 26, 15, 29, 29) \
+T (182,	31, 25, 14, 17, 8, 24, 4, 29, 27, 0, 20, 5, 13, 12, 5, 30) \
+T (183,	29, 26, 3, 22, 24, 30, 0, 15, 19, 7, 18, 6, 25, 14, 3, 3) \
+T (184,	23, 22, 7, 18, 10, 30, 29, 6, 16, 13, 11, 28, 5, 26, 4, 24) \
+T (185,	27, 15, 8, 29, 21, 23, 12, 11, 26, 22, 21, 6, 10, 23, 20, 27) \
+T (186,	19, 23, 20, 7, 8, 14, 6, 17, 20, 1, 5, 12, 25, 18, 10, 29) \
+T (187,	12, 14, 2, 5, 31, 21, 30, 18, 2, 6, 17, 22, 22, 28, 0, 18) \
+T (188,	10, 8, 13, 29, 20, 18, 8, 5, 4, 3, 26, 19, 24, 29, 6, 30) \
+T (189,	23, 19, 8, 2, 21, 18, 26, 1, 27, 12, 10, 4, 3, 20, 10, 17) \
+T (190,	31, 30, 21, 8, 15, 9, 3, 22, 7, 17, 25, 5, 13, 6, 1, 11) \
+T (191,	0, 5, 26, 6, 18, 1, 9, 31, 11, 3, 10, 23, 30, 27, 17, 14) \
+T (192,	19, 7, 29, 27, 8, 17, 22, 20, 10, 22, 2, 11, 9, 14, 31, 23) \
+T (193,	3, 23, 10, 18, 14, 9, 4, 24, 8, 30, 9, 13, 16, 17, 4, 22) \
+T (194,	13, 22, 8, 3, 9, 24, 9, 7, 15, 17, 26, 19, 11, 5, 18, 24) \
+T (195,	1, 18, 17, 13, 14, 0, 6, 15, 31, 22, 9, 2, 23, 19, 20, 3) \
+T (196,	9, 8, 17, 4, 28, 20, 6, 1, 11, 12, 23, 0, 15, 27, 31, 18) \
+T (197,	11, 2, 16, 1, 29, 21, 14, 9, 23, 30, 22, 8, 27, 9, 18, 10) \
+T (198,	10, 6, 26, 22, 13, 28, 18, 31, 4, 17, 27, 5, 7, 25, 20, 21) \
+T (199,	9, 8, 0, 0, 10, 7, 4, 24, 16, 3, 20, 1, 31, 11, 17, 26) \
+T (200,	19, 24, 31, 25, 7, 4, 14, 4, 9, 21, 29, 30, 10, 16, 6, 13) \
+T (201,	27, 4, 25, 12, 11, 3, 29, 1, 16, 6, 12, 5, 26, 25, 10, 15) \
+T (202,	11, 28, 9, 3, 20, 30, 18, 6, 13, 12, 25, 24, 5, 26, 0, 31) \
+T (203,	7, 23, 14, 16, 1, 31, 3, 0, 18, 6, 4, 10, 11, 15, 13, 29) \
+T (204,	28, 15, 6, 4, 21, 18, 22, 29, 13, 3, 18, 27, 21, 7, 31, 26) \
+T (205,	2, 13, 7, 22, 21, 9, 24, 15, 6, 20, 14, 29, 16, 27, 31, 0) \
+T (206,	23, 3, 13, 0, 18, 19, 10, 29, 16, 22, 21, 30, 17, 5, 6, 31) \
+T (207,	0, 3, 6, 29, 7, 10, 20, 17, 5, 8, 27, 18, 12, 4, 30, 28) \
+T (208,	5, 31, 20, 6, 14, 11, 28, 19, 7, 25, 27, 26, 10, 8, 22, 4) \
+T (209,	26, 22, 12, 9, 25, 0, 21, 14, 4, 7, 17, 30, 29, 24, 13, 31) \
+T (210,	15, 1, 6, 10, 26, 12, 8, 25, 3, 31, 23, 5, 30, 2, 0, 27) \
+T (211,	2, 11, 1, 27, 4, 17, 28, 22, 5, 28, 16, 20, 6, 3, 0, 15) \
+T (212,	25, 2, 6, 18, 16, 12, 4, 27, 1, 29, 7, 3, 21, 20, 17, 19) \
+T (213,	16, 0, 19, 21, 29, 23, 18, 31, 24, 12, 4, 20, 2, 8, 27, 30) \
+T (214,	20, 28, 9, 28, 22, 13, 2, 0, 8, 26, 10, 23, 24, 12, 31, 11) \
+T (215,	27, 22, 12, 15, 10, 20, 4, 25, 29, 9, 17, 3, 28, 21, 31, 23) \
+T (216,	16, 29, 20, 19, 16, 6, 18, 28, 3, 15, 29, 30, 1, 22, 10, 0) \
+T (217,	24, 14, 27, 3, 16, 30, 6, 0, 13, 12, 19, 7, 11, 20, 5, 26) \
+T (218,	19, 30, 26, 17, 13, 5, 10, 15, 16, 28, 24, 20, 0, 25, 9, 14) \
+T (219,	11, 0, 29, 5, 16, 30, 22, 19, 25, 4, 17, 7, 18, 2, 14, 13) \
+T (220,	27, 9, 16, 10, 19, 23, 12, 21, 3, 30, 18, 4, 15, 6, 29, 13) \
+T (221,	26, 12, 25, 22, 11, 18, 1, 7, 0, 19, 29, 31, 8, 4, 9, 15) \
+T (222,	18, 23, 31, 7, 26, 5, 15, 11, 25, 4, 22, 21, 14, 10, 20, 8) \
+T (223,	2, 18, 4, 24, 6, 20, 9, 25, 16, 3, 5, 22, 10, 7, 23, 30) \
+T (224,	4, 13, 6, 8, 22, 2, 12, 24, 31, 29, 20, 23, 0, 10, 1, 3) \
+T (225,	26, 3, 30, 18, 4, 19, 22, 31, 28, 24, 15, 14, 1, 23, 27, 7) \
+T (226,	18, 6, 23, 16, 25, 26, 17, 5, 28, 10, 30, 24, 12, 14, 15, 20) \
+T (227,	5, 19, 23, 22, 1, 7, 26, 12, 30, 17, 0, 0, 10, 6, 18, 4)
--- gcc/testsuite/gcc.dg/torture/vshuf-v2di.c.jj	2011-10-17 19:08:20.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v2di.c	2011-10-17 21:00:20.000000000 +0200
@@ -0,0 +1,14 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+#if __SIZEOF_LONG_LONG__ == 8
+typedef unsigned long long V __attribute__((vector_size(16)));
+typedef V VI;
+#else
+#define UNSUPPORTED
+#endif
+
+#include "vshuf-2.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-v2sf.c.jj	2011-10-17 19:08:20.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v2sf.c	2011-10-17 21:00:18.000000000 +0200
@@ -0,0 +1,20 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+#if __SIZEOF_FLOAT__ == 4
+typedef float V __attribute__((vector_size(8)));
+# if __SIZEOF_INT__ == 4
+typedef unsigned int VI __attribute__((vector_size(8)));
+# elif __SIZEOF_LONG__ == 4
+typedef unsigned long VI __attribute__((vector_size(8)));
+# else
+#  define UNSUPPORTED
+# endif
+#else
+# define UNSUPPORTED
+#endif
+
+#include "vshuf-2.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-v4sf.c.jj	2011-10-17 19:06:29.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v4sf.c	2011-10-17 20:59:51.000000000 +0200
@@ -0,0 +1,20 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+#if __SIZEOF_FLOAT__ == 4
+typedef float V __attribute__((vector_size(16)));
+# if __SIZEOF_INT__ == 4
+typedef unsigned int VI __attribute__((vector_size(16)));
+# elif __SIZEOF_LONG__ == 4
+typedef unsigned long VI __attribute__((vector_size(16)));
+# else
+#  define UNSUPPORTED
+# endif
+#else
+# define UNSUPPORTED
+#endif
+
+#include "vshuf-4.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-32.inc.jj	2011-10-17 18:28:02.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-32.inc	2011-10-17 21:02:56.000000000 +0200
@@ -0,0 +1,131 @@ 
+#define N 32
+#define TESTS \
+T (0,	0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31) \
+T (1,	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
+T (2,	0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15) \
+T (3,	26, 60, 14, 40, 44, 51, 12, 45, 9, 37, 4, 47, 35, 63, 54, 30, 28, 10, 48, 32, 5, 59, 7, 52, 11, 6, 62, 49, 25, 25, 20, 55) \
+T (4,	32, 16, 54, 20, 62, 60, 56, 9, 38, 26, 42, 12, 17, 51, 4, 58, 59, 25, 50, 27, 41, 37, 8, 30, 18, 24, 40, 36, 25, 7, 37, 63) \
+T (5,	0, 4, 60, 9, 23, 19, 45, 6, 5, 12, 38, 60, 34, 36, 26, 11, 47, 52, 63, 39, 7, 56, 17, 54, 53, 39, 18, 2, 37, 55, 22, 21) \
+T (6,	2, 44, 46, 13, 40, 38, 52, 10, 50, 55, 11, 15, 9, 0, 12, 42, 45, 19, 11, 34, 26, 24, 62, 25, 5, 17, 1, 47, 21, 7, 60, 41) \
+T (7,	50, 13, 37, 62, 9, 49, 14, 53, 15, 42, 36, 1, 33, 27, 63, 41, 57, 12, 7, 2, 44, 48, 16, 39, 25, 31, 20, 10, 3, 60, 43, 21) \
+T (8,	1, 37, 22, 61, 5, 14, 46, 47, 6, 35, 10, 48, 30, 26, 33, 13, 18, 18, 11, 21, 44, 29, 60, 45, 19, 37, 7, 43, 36, 1, 28, 59) \
+T (9,	30, 44, 42, 51, 6, 7, 38, 13, 43, 31, 58, 0, 56, 17, 27, 32, 10, 53, 3, 29, 21, 12, 15, 50, 28, 24, 16, 61, 9, 34, 59, 19) \
+T (10,	20, 49, 50, 14, 54, 53, 33, 40, 46, 15, 0, 28, 25, 30, 10, 17, 51, 59, 26, 13, 45, 27, 2, 61, 4, 36, 8, 0, 18, 33, 22, 63) \
+T (11,	13, 40, 7, 33, 51, 21, 59, 46, 47, 32, 9, 34, 63, 35, 41, 17, 24, 1, 8, 26, 52, 62, 11, 22, 37, 28, 5, 39, 10, 53, 60, 2) \
+T (12,	39, 43, 54, 27, 53, 39, 27, 30, 2, 17, 13, 33, 7, 52, 40, 15, 36, 57, 10, 28, 22, 23, 25, 24, 41, 47, 8, 20, 5, 3, 4, 0) \
+T (13,	7, 51, 13, 61, 25, 4, 19, 58, 35, 33, 29, 15, 40, 2, 39, 16, 38, 3, 54, 63, 15, 6, 48, 21, 14, 52, 17, 50, 34, 55, 57, 50) \
+T (14,	22, 53, 28, 42, 45, 38, 49, 13, 54, 61, 21, 52, 7, 16, 34, 9, 1, 43, 62, 43, 35, 50, 47, 58, 20, 3, 30, 15, 37, 53, 43, 36) \
+T (15,	2, 43, 49, 34, 28, 35, 29, 36, 51, 9, 17, 48, 10, 37, 45, 21, 52, 19, 25, 33, 60, 31, 30, 42, 12, 26, 27, 46, 5, 40, 14, 36)
+#define EXPTESTS \
+T (116,	13, 38, 47, 3, 17, 8, 38, 20, 59, 61, 39, 26, 7, 49, 63, 43, 57, 16, 40, 19, 4, 32, 27, 7, 52, 19, 46, 55, 36, 41, 48, 6) \
+T (117,	39, 35, 59, 20, 56, 18, 58, 63, 57, 14, 2, 16, 5, 61, 35, 4, 53, 9, 52, 51, 27, 33, 61, 12, 3, 35, 36, 40, 37, 7, 45, 42) \
+T (118,	4, 5, 8, 14, 35, 12, 55, 34, 6, 53, 60, 5, 48, 56, 22, 18, 62, 44, 38, 31, 28, 16, 33, 36, 43, 26, 16, 23, 37, 47, 51, 3) \
+T (119,	26, 50, 53, 27, 6, 29, 14, 19, 23, 48, 39, 8, 58, 0, 12, 15, 17, 41, 33, 18, 52, 31, 10, 9, 49, 13, 51, 45, 47, 60, 35, 57) \
+T (120,	37, 60, 13, 55, 52, 42, 5, 22, 17, 59, 0, 21, 59, 11, 25, 56, 62, 56, 31, 54, 9, 47, 28, 6, 44, 33, 61, 12, 19, 16, 8, 40) \
+T (121,	47, 45, 44, 40, 22, 17, 4, 31, 8, 52, 34, 32, 41, 21, 62, 37, 5, 13, 58, 27, 0, 17, 33, 57, 42, 57, 18, 43, 61, 36, 38, 14) \
+T (122,	31, 16, 42, 6, 34, 2, 12, 20, 57, 29, 23, 60, 24, 10, 17, 0, 21, 32, 45, 5, 19, 30, 59, 4, 9, 1, 46, 14, 26, 63, 3, 22) \
+T (123,	46, 61, 50, 1, 38, 37, 62, 40, 10, 49, 44, 26, 16, 24, 5, 2, 39, 20, 15, 30, 34, 29, 57, 27, 47, 55, 8, 44, 36, 4, 9, 25) \
+T (124,	45, 53, 7, 48, 23, 21, 20, 7, 13, 4, 22, 24, 39, 0, 63, 60, 18, 37, 34, 36, 54, 49, 1, 1, 38, 27, 17, 57, 27, 14, 59, 62) \
+T (125,	30, 57, 46, 21, 51, 23, 25, 62, 29, 12, 51, 15, 41, 33, 16, 56, 19, 61, 27, 49, 41, 40, 55, 54, 44, 43, 2, 26, 34, 22, 11, 20) \
+T (126,	26, 29, 15, 57, 6, 15, 30, 10, 53, 24, 19, 52, 23, 43, 20, 1, 18, 29, 56, 51, 38, 8, 51, 2, 4, 41, 62, 12, 7, 63, 3, 33) \
+T (127,	42, 10, 36, 2, 41, 34, 19, 2, 46, 27, 5, 55, 15, 22, 36, 26, 30, 58, 51, 61, 18, 48, 24, 21, 56, 7, 14, 47, 17, 6, 0, 8) \
+T (128,	34, 23, 16, 20, 15, 13, 3, 30, 59, 46, 54, 24, 26, 45, 17, 48, 4, 27, 7, 31, 2, 41, 1, 28, 51, 12, 63, 8, 32, 19, 18, 33) \
+T (129,	3, 41, 62, 28, 30, 63, 24, 5, 33, 60, 55, 32, 37, 45, 56, 52, 50, 35, 26, 38, 10, 40, 15, 14, 17, 58, 46, 41, 11, 34, 48, 2) \
+T (130,	59, 60, 24, 20, 61, 39, 43, 37, 53, 32, 8, 44, 28, 13, 36, 58, 0, 42, 60, 55, 31, 57, 56, 10, 18, 3, 5, 12, 18, 34, 49, 54) \
+T (131,	3, 62, 16, 40, 38, 32, 5, 54, 53, 28, 63, 20, 12, 14, 50, 4, 13, 34, 32, 29, 26, 18, 25, 52, 2, 42, 30, 59, 43, 41, 27, 10) \
+T (132,	35, 31, 57, 52, 4, 0, 61, 21, 15, 3, 9, 54, 38, 13, 24, 30, 37, 58, 41, 6, 49, 32, 12, 28, 19, 59, 14, 42, 16, 48, 56, 23) \
+T (133,	62, 12, 13, 50, 26, 32, 45, 10, 48, 55, 49, 8, 24, 42, 52, 57, 53, 3, 54, 38, 33, 43, 7, 26, 23, 6, 21, 61, 18, 7, 51, 44) \
+T (134,	31, 15, 38, 39, 60, 14, 5, 21, 53, 6, 9, 43, 12, 36, 32, 40, 30, 10, 56, 51, 50, 35, 38, 3, 37, 13, 2, 24, 63, 34, 55, 34) \
+T (135,	29, 36, 22, 7, 63, 23, 19, 20, 12, 58, 13, 50, 41, 1, 59, 33, 46, 39, 52, 11, 8, 51, 62, 42, 31, 10, 58, 38, 45, 4, 32, 53) \
+T (136,	19, 20, 47, 13, 22, 10, 14, 37, 35, 31, 8, 15, 32, 54, 43, 40, 4, 9, 1, 32, 12, 29, 23, 60, 52, 51, 39, 52, 56, 6, 26, 11) \
+T (137,	39, 11, 49, 34, 37, 51, 32, 63, 26, 62, 16, 49, 14, 5, 7, 3, 59, 33, 54, 58, 61, 9, 47, 36, 13, 23, 28, 2, 40, 4, 44, 1) \
+T (138,	53, 24, 33, 35, 19, 49, 55, 34, 44, 27, 40, 47, 38, 17, 25, 39, 60, 4, 26, 15, 7, 36, 55, 51, 39, 20, 45, 62, 57, 50, 57, 21) \
+T (139,	24, 58, 16, 63, 7, 20, 18, 9, 35, 48, 12, 54, 0, 62, 41, 42, 25, 50, 17, 61, 51, 37, 4, 55, 33, 22, 12, 40, 53, 26, 47, 29) \
+T (140,	55, 53, 40, 61, 63, 57, 46, 17, 8, 56, 4, 29, 27, 32, 24, 52, 5, 13, 12, 5, 44, 30, 26, 3, 22, 0, 47, 19, 39, 50, 38, 15) \
+T (141,	15, 46, 3, 18, 3, 55, 22, 39, 10, 62, 61, 38, 48, 16, 6, 45, 11, 60, 5, 26, 4, 50, 24, 59, 47, 8, 29, 53, 12, 21, 43, 58) \
+T (142,	22, 8, 21, 6, 55, 10, 55, 20, 59, 19, 55, 23, 52, 39, 46, 49, 20, 1, 40, 5, 12, 14, 57, 50, 29, 2, 37, 31, 62, 18, 34, 54) \
+T (143,	54, 28, 50, 0, 62, 18, 10, 8, 13, 29, 52, 8, 5, 36, 35, 4, 58, 19, 56, 29, 38, 30, 55, 51, 40, 34, 53, 26, 33, 59, 12, 27) \
+T (144,	42, 4, 35, 20, 52, 3, 10, 21, 17, 63, 62, 40, 15, 41, 54, 39, 8, 57, 5, 45, 37, 38, 1, 43, 32, 58, 6, 50, 33, 3, 55, 9) \
+T (145,	27, 62, 49, 14, 19, 39, 61, 40, 22, 20, 10, 22, 34, 43, 9, 46, 31, 42, 54, 23, 35, 50, 4, 3, 41, 24, 8, 30, 9, 45, 48, 17) \
+T (146,	4, 40, 22, 45, 8, 35, 9, 24, 9, 41, 7, 47, 49, 58, 51, 43, 54, 37, 18, 39, 56, 1, 46, 0, 33, 38, 15, 13, 17, 31, 54, 2) \
+T (147,	55, 19, 20, 3, 41, 8, 49, 36, 28, 38, 1, 11, 44, 55, 32, 15, 59, 0, 63, 50, 2, 16, 61, 21, 14, 23, 30, 22, 33, 46, 48, 62) \
+T (148,	30, 40, 59, 11, 9, 8, 50, 42, 10, 6, 58, 22, 45, 60, 63, 4, 49, 31, 5, 7, 25, 18, 52, 13, 53, 0, 0, 39, 24, 48, 3, 20) \
+T (149,	41, 1, 63, 11, 49, 24, 26, 51, 31, 57, 7, 36, 46, 4, 53, 19, 29, 21, 30, 14, 10, 48, 38, 13, 59, 25, 44, 43, 35, 61, 33, 16) \
+T (150,	38, 44, 5, 26, 25, 42, 16, 15, 43, 28, 41, 3, 52, 62, 50, 11, 6, 35, 13, 12, 57, 24, 32, 31, 39, 55, 46, 33, 0, 18, 4, 47) \
+T (151,	45, 29, 60, 15, 6, 36, 53, 18, 54, 47, 61, 13, 3, 50, 21, 27, 28, 21, 7, 63, 26, 34, 9, 24, 52, 46, 38, 56, 48, 59, 31, 2) \
+T (152,	32, 23, 3, 13, 35, 55, 18, 19, 42, 29, 48, 54, 53, 30, 17, 62, 37, 38, 31, 32, 6, 61, 7, 10, 52, 8, 27, 12, 59, 50, 36, 28) \
+T (153,	37, 63, 52, 6, 46, 43, 28, 51, 7, 25, 59, 26, 42, 40, 22, 5, 4, 58, 54, 44, 41, 32, 53, 14, 39, 17, 30, 61, 24, 45, 31, 47) \
+T (154,	33, 38, 42, 58, 12, 10, 8, 25, 3, 63, 55, 37, 31, 30, 2, 0, 59, 34, 43, 11, 36, 27, 49, 28, 22, 60, 48, 20, 1, 6, 35, 47) \
+T (155,	57, 2, 6, 50, 16, 12, 36, 59, 1, 61, 39, 35, 21, 20, 17, 51, 48, 32, 19, 53, 29, 23, 18, 31, 24, 4, 52, 8, 27, 62, 60, 9) \
+T (156,	60, 54, 13, 2, 32, 8, 58, 42, 23, 24, 12, 63, 43, 59, 22, 44, 15, 20, 4, 57, 61, 27, 47, 9, 49, 35, 28, 21, 48, 52, 19, 48) \
+T (157,	61, 38, 50, 28, 35, 15, 29, 51, 30, 20, 1, 54, 10, 0, 24, 46, 59, 3, 16, 32, 45, 12, 7, 11, 48, 37, 26, 19, 62, 49, 13, 5) \
+T (158,	10, 15, 16, 60, 24, 52, 19, 0, 25, 41, 46, 11, 29, 5, 62, 22, 43, 36, 17, 7, 18, 34, 49, 45, 59, 9, 42, 51, 55, 44, 21, 3) \
+T (159,	30, 18, 51, 36, 21, 15, 6, 61, 13, 58, 44, 25, 57, 22, 11, 54, 33, 39, 43, 0, 26, 19, 29, 63, 8, 4, 41, 23, 31, 58, 5, 47) \
+T (160,	43, 57, 36, 22, 21, 46, 53, 50, 63, 10, 20, 52, 8, 34, 18, 4, 56, 38, 41, 48, 35, 5, 39, 23, 54, 30, 4, 13, 40, 45, 2, 12) \
+T (161,	24, 31, 61, 52, 55, 36, 32, 10, 33, 3, 58, 35, 62, 50, 51, 54, 63, 30, 28, 4, 26, 47, 14, 56, 23, 59, 39, 38, 16, 25, 17, 37) \
+T (162,	60, 17, 42, 30, 56, 12, 14, 47, 6, 20, 5, 19, 55, 54, 33, 39, 58, 30, 22, 32, 0, 7, 18, 4, 63, 48, 36, 10, 3, 21, 28, 35) \
+T (163,	11, 12, 21, 42, 0, 50, 48, 35, 20, 48, 38, 46, 52, 36, 43, 31, 28, 52, 48, 27, 1, 13, 60, 58, 39, 16, 32, 37, 57, 53, 24, 41) \
+T (164,	10, 17, 45, 30, 36, 24, 55, 59, 5, 50, 15, 56, 13, 38, 25, 29, 53, 20, 6, 1, 26, 51, 36, 32, 23, 35, 62, 3, 34, 10, 12, 52) \
+T (165,	15, 0, 34, 40, 12, 13, 28, 39, 39, 20, 48, 14, 22, 27, 51, 34, 11, 18, 16, 38, 62, 58, 6, 41, 44, 42, 36, 7, 33, 37, 37, 5) \
+T (166,	35, 44, 35, 56, 39, 57, 11, 35, 1, 0, 61, 31, 52, 32, 33, 24, 37, 49, 18, 29, 24, 12, 5, 43, 55, 25, 60, 40, 4, 30, 38, 3) \
+T (167,	25, 2, 53, 19, 62, 59, 49, 43, 15, 12, 15, 28, 22, 35, 40, 31, 47, 11, 16, 10, 41, 5, 7, 23, 48, 24, 60, 52, 30, 50, 55, 7) \
+T (168,	49, 27, 41, 40, 42, 20, 39, 50, 17, 58, 9, 54, 2, 38, 48, 16, 62, 43, 18, 59, 22, 63, 29, 61, 60, 6, 33, 24, 14, 57, 4, 28) \
+T (169,	13, 41, 9, 55, 51, 0, 46, 18, 42, 53, 37, 5, 7, 39, 15, 36, 30, 50, 11, 20, 52, 47, 1, 44, 63, 43, 6, 60, 2, 34, 31, 54) \
+T (170,	49, 35, 62, 17, 55, 14, 30, 11, 8, 29, 2, 54, 31, 44, 36, 46, 37, 21, 15, 28, 27, 23, 57, 53, 51, 37, 34, 19, 47, 16, 43, 59) \
+T (171,	50, 37, 40, 26, 46, 58, 54, 59, 17, 30, 23, 11, 43, 61, 31, 8, 60, 34, 25, 63, 4, 41, 39, 48, 51, 13, 49, 22, 52, 57, 29, 13) \
+T (172,	42, 47, 27, 36, 47, 41, 45, 24, 8, 20, 35, 22, 38, 50, 57, 52, 28, 46, 53, 54, 37, 2, 48, 33, 32, 5, 60, 17, 19, 34, 55, 43) \
+T (173,	19, 12, 42, 37, 36, 13, 0, 1, 62, 53, 54, 50, 44, 0, 24, 59, 2, 6, 10, 29, 3, 63, 34, 28, 13, 61, 46, 33, 7, 26, 27, 5) \
+T (174,	32, 5, 30, 54, 15, 26, 25, 28, 1, 51, 11, 39, 2, 30, 27, 13, 43, 6, 7, 25, 31, 8, 3, 16, 41, 29, 26, 5, 19, 58, 42, 59) \
+T (175,	48, 5, 7, 28, 40, 56, 49, 42, 47, 61, 24, 13, 44, 18, 38, 53, 30, 10, 21, 6, 29, 2, 33, 22, 14, 59, 42, 21, 45, 31, 27, 54) \
+T (176,	56, 39, 62, 32, 46, 48, 36, 27, 3, 53, 22, 42, 31, 9, 40, 0, 19, 58, 16, 26, 1, 10, 16, 21, 63, 54, 23, 2, 15, 6, 7, 47) \
+T (177,	31, 18, 57, 52, 5, 32, 56, 7, 11, 6, 9, 20, 30, 56, 46, 23, 42, 38, 3, 34, 19, 45, 21, 55, 0, 8, 53, 24, 29, 60, 25, 49) \
+T (178,	32, 2, 48, 34, 7, 57, 1, 58, 39, 16, 53, 33, 31, 12, 21, 6, 4, 62, 50, 46, 61, 23, 5, 40, 44, 9, 28, 11, 11, 37, 25, 13) \
+T (179,	47, 40, 12, 47, 26, 3, 33, 30, 46, 61, 33, 10, 19, 1, 20, 5, 37, 9, 28, 27, 25, 63, 15, 23, 43, 54, 11, 30, 6, 24, 57, 18) \
+T (180,	16, 27, 2, 62, 63, 52, 26, 21, 37, 18, 41, 45, 15, 9, 51, 46, 28, 38, 60, 30, 35, 20, 7, 52, 53, 24, 42, 56, 33, 22, 48, 31) \
+T (181,	0, 40, 54, 27, 2, 3, 21, 10, 32, 31, 55, 31, 34, 53, 36, 22, 59, 41, 1, 20, 13, 42, 46, 17, 52, 49, 28, 41, 37, 40, 4, 43) \
+T (182,	35, 7, 38, 12, 27, 41, 8, 17, 1, 23, 46, 3, 28, 24, 61, 60, 21, 19, 48, 33, 26, 29, 45, 51, 48, 56, 34, 22, 10, 62, 25, 39) \
+T (183,	61, 14, 56, 62, 44, 59, 54, 26, 61, 27, 52, 24, 3, 33, 12, 16, 48, 47, 28, 9, 21, 38, 23, 0, 55, 5, 22, 39, 9, 35, 59, 63) \
+T (184,	41, 27, 35, 53, 49, 26, 12, 14, 3, 39, 19, 2, 16, 46, 47, 52, 24, 59, 6, 51, 52, 34, 4, 50, 32, 13, 63, 20, 45, 10, 28, 40) \
+T (185,	14, 7, 4, 53, 23, 11, 9, 41, 26, 20, 46, 51, 3, 8, 18, 56, 31, 48, 38, 15, 12, 46, 42, 59, 40, 57, 16, 2, 21, 33, 37, 11) \
+T (186,	46, 10, 6, 33, 7, 2, 37, 4, 11, 32, 59, 60, 2, 4, 12, 47, 26, 39, 27, 52, 5, 58, 30, 24, 36, 55, 63, 28, 62, 25, 43, 25) \
+T (187,	6, 60, 15, 13, 18, 56, 39, 43, 61, 20, 63, 26, 37, 53, 23, 33, 44, 10, 14, 58, 35, 2, 17, 37, 41, 12, 1, 22, 10, 16, 5, 55) \
+T (188,	31, 62, 49, 57, 22, 42, 61, 6, 34, 35, 3, 13, 16, 56, 2, 28, 38, 49, 22, 49, 0, 29, 17, 57, 59, 27, 5, 22, 26, 24, 40, 30) \
+T (189,	3, 24, 42, 30, 19, 13, 9, 57, 6, 46, 36, 52, 16, 55, 60, 4, 2, 50, 32, 33, 58, 15, 22, 33, 21, 39, 20, 37, 27, 0, 1, 53) \
+T (190,	19, 62, 32, 12, 18, 61, 31, 60, 14, 6, 15, 17, 22, 39, 30, 56, 49, 48, 16, 63, 42, 43, 1, 11, 20, 59, 27, 25, 63, 29, 37, 2) \
+T (191,	0, 15, 16, 7, 56, 54, 8, 63, 39, 18, 32, 46, 12, 35, 17, 38, 41, 34, 36, 40, 51, 21, 61, 26, 43, 57, 53, 4, 45, 6, 57, 2) \
+T (192,	52, 12, 62, 8, 60, 56, 29, 5, 6, 7, 9, 21, 44, 47, 48, 53, 58, 54, 45, 40, 15, 17, 1, 28, 4, 55, 22, 57, 32, 19, 33, 10) \
+T (193,	14, 48, 58, 51, 60, 30, 42, 4, 3, 17, 44, 36, 34, 9, 8, 16, 46, 43, 32, 24, 47, 21, 2, 49, 59, 55, 10, 62, 11, 25, 29, 57) \
+T (194,	35, 0, 38, 57, 14, 16, 12, 7, 10, 40, 20, 44, 42, 40, 22, 47, 31, 5, 54, 8, 13, 26, 62, 28, 32, 37, 48, 34, 41, 39, 60, 4) \
+T (195,	30, 15, 1, 38, 55, 58, 7, 14, 13, 12, 11, 35, 17, 22, 39, 32, 50, 13, 5, 62, 51, 63, 46, 10, 8, 61, 9, 49, 59, 4, 0, 34) \
+T (196,	37, 31, 6, 15, 23, 0, 30, 35, 4, 54, 56, 63, 3, 20, 44, 27, 43, 25, 4, 41, 5, 1, 38, 51, 59, 26, 42, 48, 58, 50, 5, 2) \
+T (197,	3, 21, 28, 5, 22, 62, 16, 17, 56, 45, 46, 33, 41, 24, 25, 31, 10, 54, 19, 14, 0, 59, 42, 34, 12, 23, 53, 35, 55, 30, 18, 8) \
+T (198,	3, 56, 16, 31, 45, 6, 37, 26, 34, 41, 36, 52, 21, 48, 13, 27, 22, 51, 62, 60, 59, 0, 25, 62, 44, 9, 23, 42, 11, 33, 39, 57) \
+T (199,	59, 20, 31, 41, 24, 27, 26, 54, 7, 42, 30, 5, 25, 37, 53, 11, 21, 42, 39, 3, 2, 28, 47, 59, 32, 10, 57, 61, 52, 22, 19, 15) \
+T (200,	3, 57, 34, 47, 8, 31, 63, 39, 34, 19, 52, 42, 51, 28, 50, 44, 59, 27, 21, 24, 30, 61, 28, 20, 56, 20, 37, 32, 12, 22, 14, 4) \
+T (201,	1, 61, 23, 43, 21, 38, 13, 42, 45, 40, 24, 16, 59, 4, 46, 11, 43, 10, 30, 55, 20, 5, 49, 62, 22, 31, 54, 21, 53, 36, 17, 8) \
+T (202,	49, 56, 60, 30, 24, 23, 40, 15, 32, 61, 37, 13, 56, 5, 57, 0, 28, 39, 27, 59, 60, 42, 3, 6, 51, 36, 8, 53, 34, 22, 35, 10) \
+T (203,	27, 13, 16, 12, 30, 31, 15, 47, 23, 22, 37, 29, 40, 55, 6, 44, 11, 4, 49, 9, 50, 1, 25, 38, 59, 61, 2, 18, 28, 8, 17, 57) \
+T (204,	5, 62, 5, 37, 27, 2, 31, 25, 9, 40, 58, 34, 60, 17, 14, 0, 8, 47, 44, 43, 21, 54, 15, 20, 57, 35, 30, 61, 36, 7, 16, 32) \
+T (205,	55, 22, 9, 29, 54, 52, 0, 13, 39, 36, 63, 12, 43, 56, 58, 0, 10, 18, 48, 1, 20, 60, 4, 62, 2, 51, 41, 61, 1, 26, 24, 21) \
+T (206,	29, 14, 52, 20, 49, 59, 31, 55, 61, 15, 20, 11, 1, 16, 39, 43, 53, 13, 35, 7, 38, 28, 41, 10, 63, 56, 2, 23, 0, 57, 30, 26) \
+T (207,	31, 45, 56, 4, 19, 1, 32, 44, 20, 50, 8, 39, 58, 33, 59, 29, 62, 3, 55, 11, 28, 6, 32, 29, 43, 41, 7, 5, 18, 15, 21, 14) \
+T (208,	29, 1, 31, 17, 10, 58, 27, 5, 63, 27, 23, 49, 60, 4, 33, 3, 9, 51, 28, 37, 35, 61, 42, 19, 18, 39, 34, 15, 21, 14, 7, 36) \
+T (209,	47, 2, 8, 51, 56, 61, 12, 0, 37, 49, 24, 29, 44, 60, 30, 63, 33, 55, 5, 4, 27, 45, 50, 13, 59, 14, 39, 46, 40, 28, 19, 11) \
+T (210,	50, 2, 52, 36, 3, 59, 4, 24, 20, 41, 8, 49, 48, 5, 28, 37, 22, 18, 26, 16, 61, 38, 43, 33, 30, 16, 6, 42, 55, 54, 14, 32) \
+T (211,	56, 57, 33, 0, 47, 43, 50, 22, 15, 53, 1, 17, 60, 20, 63, 2, 27, 18, 51, 45, 23, 7, 31, 47, 4, 38, 34, 35, 49, 10, 9, 32) \
+T (212,	42, 54, 63, 4, 20, 3, 48, 34, 28, 10, 6, 60, 33, 29, 37, 14, 35, 13, 11, 57, 43, 44, 24, 39, 7, 56, 37, 22, 41, 31, 49, 32) \
+T (213,	40, 25, 61, 33, 60, 4, 1, 28, 29, 63, 47, 56, 9, 6, 22, 39, 7, 16, 38, 55, 18, 10, 34, 3, 24, 59, 9, 51, 44, 35, 14, 47) \
+T (214,	14, 11, 0, 4, 25, 6, 13, 60, 2, 26, 11, 27, 31, 30, 41, 58, 48, 24, 35, 44, 32, 49, 17, 8, 3, 1, 54, 16, 61, 15, 10, 18) \
+T (215,	7, 30, 38, 10, 26, 20, 54, 1, 28, 41, 0, 0, 5, 32, 56, 61, 48, 42, 14, 4, 34, 55, 39, 53, 46, 13, 62, 31, 53, 37, 24, 11) \
+T (216,	43, 36, 2, 21, 0, 28, 16, 53, 23, 7, 47, 30, 37, 28, 6, 35, 40, 60, 50, 32, 60, 9, 32, 46, 55, 49, 29, 13, 22, 14, 8, 62) \
+T (217,	15, 53, 9, 63, 0, 6, 29, 26, 35, 55, 38, 23, 50, 45, 2, 25, 16, 7, 53, 48, 47, 4, 18, 34, 28, 22, 43, 8, 60, 61, 21, 1) \
+T (218,	60, 32, 56, 46, 28, 61, 35, 57, 2, 11, 44, 34, 13, 23, 39, 50, 18, 5, 1, 40, 59, 3, 51, 49, 43, 14, 12, 27, 43, 31, 1, 25) \
+T (219,	4, 10, 19, 21, 46, 37, 30, 61, 45, 45, 40, 59, 39, 18, 42, 50, 2, 3, 23, 15, 32, 26, 52, 31, 35, 38, 48, 53, 20, 6, 12, 57) \
+T (220,	37, 43, 11, 32, 25, 41, 42, 54, 19, 27, 46, 12, 35, 16, 58, 48, 38, 21, 52, 56, 13, 22, 24, 1, 30, 24, 51, 50, 59, 20, 15, 31) \
+T (221,	31, 52, 23, 52, 42, 57, 3, 59, 56, 34, 35, 50, 25, 2, 45, 8, 11, 16, 62, 21, 25, 0, 15, 28, 18, 7, 24, 33, 1, 4, 20, 48) \
+T (222,	2, 37, 10, 34, 16, 28, 56, 57, 42, 11, 0, 27, 60, 25, 23, 61, 44, 36, 55, 53, 62, 41, 13, 27, 24, 20, 14, 39, 19, 8, 50, 56) \
+T (223,	47, 23, 30, 12, 48, 20, 63, 38, 60, 46, 43, 54, 1, 53, 6, 62, 2, 0, 37, 55, 39, 33, 19, 28, 26, 5, 41, 35, 44, 31, 9, 33) \
+T (224,	8, 3, 25, 48, 57, 1, 24, 23, 32, 22, 12, 10, 5, 43, 46, 39, 56, 19, 33, 27, 0, 56, 13, 2, 38, 51, 60, 35, 15, 59, 23, 28) \
+T (225,	15, 40, 34, 53, 58, 22, 7, 47, 54, 5, 33, 13, 60, 17, 52, 45, 24, 20, 36, 16, 61, 21, 46, 56, 23, 2, 42, 63, 43, 59, 57, 9) \
+T (226,	43, 21, 31, 3, 24, 2, 53, 41, 25, 12, 47, 19, 48, 28, 36, 45, 29, 23, 9, 50, 63, 20, 1, 61, 7, 6, 37, 26, 10, 55, 60, 58) \
+T (227,	59, 13, 48, 58, 52, 5, 16, 39, 7, 36, 37, 41, 47, 26, 40, 42, 25, 54, 6, 51, 63, 27, 12, 56, 28, 19, 49, 62, 38, 44, 61, 9)
--- gcc/testsuite/gcc.dg/torture/vshuf-v2si.c.jj	2011-10-17 19:08:20.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v2si.c	2011-10-17 21:00:16.000000000 +0200
@@ -0,0 +1,17 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+#if __SIZEOF_INT__ == 4
+typedef unsigned int V __attribute__((vector_size(8)));
+typedef V VI;
+#elif __SIZEOF_LONG__ == 4
+typedef unsigned long V __attribute__((vector_size(8)));
+typedef V VI;
+#else
+#define UNSUPPORTED
+#endif
+
+#include "vshuf-2.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-v8hi.c.jj	2011-10-17 19:02:40.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v8hi.c	2011-10-17 20:59:46.000000000 +0200
@@ -0,0 +1,10 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+typedef unsigned short V __attribute__((vector_size(16)));
+typedef V VI;
+
+#include "vshuf-8.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-v4df.c.jj	2011-10-17 19:06:29.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v4df.c	2011-10-17 20:59:59.000000000 +0200
@@ -0,0 +1,14 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+#if __SIZEOF_DOUBLE__ == 8 && __SIZEOF_LONG_LONG__ == 8
+typedef double V __attribute__((vector_size(32)));
+typedef unsigned long long VI __attribute__((vector_size(32)));
+#else
+#define UNSUPPORTED
+#endif
+
+#include "vshuf-4.inc"
+#include "vshuf-main.inc"
--- gcc/testsuite/gcc.dg/torture/vshuf-v8sf.c.jj	2011-10-17 19:04:31.000000000 +0200
+++ gcc/testsuite/gcc.dg/torture/vshuf-v8sf.c	2011-10-17 20:59:40.000000000 +0200
@@ -0,0 +1,20 @@ 
+/* { dg-do run } */
+/* { dg-options "-DEXPENSIVE" { target run_expensive_tests } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+#if __SIZEOF_FLOAT__ == 4
+typedef float V __attribute__((vector_size(32)));
+# if __SIZEOF_INT__ == 4
+typedef unsigned int VI __attribute__((vector_size(32)));
+# elif __SIZEOF_LONG__ == 4
+typedef unsigned long VI __attribute__((vector_size(32)));
+# else
+#  define UNSUPPORTED
+# endif
+#else
+# define UNSUPPORTED
+#endif
+
+#include "vshuf-8.inc"
+#include "vshuf-main.inc"