diff mbox

Vector shuffling

Message ID 4E8D9527.1010305@gjlay.de
State New
Headers show

Commit Message

Georg-Johann Lay Oct. 6, 2011, 11:46 a.m. UTC
Richard Guenther schrieb:
> On Thu, Oct 6, 2011 at 1:03 PM, Georg-Johann Lay <avr@gjlay.de> wrote:
>> Richard Guenther schrieb:
>>> On Thu, Oct 6, 2011 at 12:51 PM, Georg-Johann Lay <avr@gjlay.de> wrote:
>>>> Artem Shinkarov schrieb:
>>>>> Hi, Richard
>>>>>
>>>>> There is a problem with the testcases of the patch you have committed
>>>>> for me. The code in every test-case is doubled. Could you please,
>>>>> apply the following patch, otherwise it would fail all the tests from
>>>>> the vector-shuffle-patch would fail.
>>>>>
>>>>> Also, if it is possible, could you change my name from in the
>>>>> ChangeLog from "Artem Shinkarov" to "Artjoms Sinkarovs". The last
>>>>> version is the way I am spelled in the passport, and the name I use in
>>>>> the ChangeLog.
>>>>>
>>>>> Thanks,
>>>>> Artem.
>>>>>
>>>>> On Mon, Oct 3, 2011 at 4:13 PM, Richard Henderson <rth@redhat.com> wrote:
>>>>>> On 10/03/2011 05:14 AM, Artem Shinkarov wrote:
>>>>>>> Hi, can anyone commit it please?
>>>>>>>
>>>>>>> Richard?
>>>>>>> Or may be Richard?
>>>>>> Committed.
>>>>>>
>>>>>> r~
>>>>>>
>>>>> Hi, Richard
>>>>>
>>>>> There is a problem with the testcases of the patch you have committed
>>>>> for me. The code in every test-case is doubled. Could you please,
>>>>> apply the following patch, otherwise it would fail all the tests from
>>>>> the vector-shuffle-patch would fail.
>>>>>
>>>>> Also, if it is possible, could you change my name from in the
>>>>> ChangeLog from "Artem Shinkarov" to "Artjoms Sinkarovs". The last
>>>>> version is the way I am spelled in the passport, and the name I use in
>>>>> the ChangeLog.
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Artem.
>>>>>
>>>> The following test cases cause FAILs because main cannot be found by the linker
>>>>  because if __SIZEOF_INT__ != 4 you are trying to compile and run an empty file.
>>>>
>>>>> Index: gcc/testsuite/gcc.c-torture/execute/vect-shuffle-1.c
>>>>> Index: gcc/testsuite/gcc.c-torture/execute/vect-shuffle-5.c
>>>> The following patch avoids __SIZEOF_INT__.
>>>>
>>>> Ok by some maintainer to commit?
>>> On a general note, if you need to add .x files, consider moving the
>>> test to gcc.dg/torture instead.
>> So should I move all vect-shuffle-*.c files so that they are kept together?
> 
> Yes.

So here it is.  Lightly tested on my target: All tests either PASS or are
UNSUPPORTED now.

Ok?

Johann

testsuite/
	* lib/target-supports.exp (check_effective_target_int32): New
	function.
	(check_effective_target_short16): New function.
	(check_effective_target_longlong64): New function.
	
	* gcc.c-torture/execute/vect-shuffle-1.c: Move to gcc.dg/torture.
	* gcc.c-torture/execute/vect-shuffle-2.c: Move to gcc.dg/torture.
	* gcc.c-torture/execute/vect-shuffle-3.c: Move to gcc.dg/torture.
	* gcc.c-torture/execute/vect-shuffle-4.c: Move to gcc.dg/torture.
	* gcc.c-torture/execute/vect-shuffle-5.c: Move to gcc.dg/torture.
	* gcc.c-torture/execute/vect-shuffle-6.c: Move to gcc.dg/torture.
	* gcc.c-torture/execute/vect-shuffle-7.c: Move to gcc.dg/torture.
	* gcc.c-torture/execute/vect-shuffle-8.c: Move to gcc.dg/torture.
	* gcc.dg/torture/vect-shuffle-1.c: Use dg-require-effective-target
	int32 instead of __SIZEOF_INT__ == 4.
	* gcc.dg/torture/vect-shuffle-5.c: Ditto.
	* gcc.dg/torture/vect-shuffle-2.c: Use dg-require-effective-target
	short16 instead of __SIZEOF_SHORT__ == 2.
	* gcc.dg/torture/vect-shuffle-6.c: Ditto.
	* gcc.dg/torture/vect-shuffle-3.c: Use dg-require-effective-target
	longlong64 instead of __SIZEOF_LONG_LONG__ == 8.
	* gcc.dg/torture/vect-shuffle-7.c: Ditto.

Comments

Richard Henderson Oct. 6, 2011, 3:40 p.m. UTC | #1
On 10/06/2011 04:46 AM, Georg-Johann Lay wrote:
> So here it is.  Lightly tested on my target: All tests either PASS or are
> UNSUPPORTED now.
> 
> Ok?

Not ok, but only because I've completely restructured the tests again.
Patch coming very shortly...


r~
Georg-Johann Lay Oct. 6, 2011, 6:03 p.m. UTC | #2
Richard Henderson schrieb:
> On 10/06/2011 04:46 AM, Georg-Johann Lay wrote:
> 
>>So here it is.  Lightly tested on my target: All tests either PASS or are
>>UNSUPPORTED now.
>>
>>Ok?
> 
> Not ok, but only because I've completely restructured the tests again.
> Patch coming very shortly...

Thanks, I hope your patch fixed the issues addressed in my patch :-)

Johann

> 
> r~
>
diff mbox

Patch

Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp	(revision 179599)
+++ lib/target-supports.exp	(working copy)
@@ -1583,6 +1583,33 @@  proc check_effective_target_int16 { } {
     }]
 }
 
+# Returns 1 if we're generating 32-bit integers with the
+# default options, 0 otherwise.
+
+proc check_effective_target_int32 { } {
+    return [check_no_compiler_messages int32 object {
+	int dummy[sizeof (int) == 4 ? 1 : -1];
+    }]
+}
+
+# Returns 1 if we're generating 64-bit long long integers with the
+# default options, 0 otherwise.
+
+proc check_effective_target_longlong64 { } {
+    return [check_no_compiler_messages longlong64 object {
+	int dummy[sizeof (long long ) == 8 ? 1 : -1];
+    }]
+}
+
+# Returns 1 if we're generating 16-bit short integers with the
+# default options, 0 otherwise.
+
+proc check_effective_target_short16 { } {
+    return [check_no_compiler_messages short16 object {
+	int dummy[sizeof (short) == 2 ? 1 : -1];
+    }]
+}
+
 # Return 1 if we're generating 64-bit code using default options, 0
 # otherwise.
 
Index: gcc.c-torture/execute/vect-shuffle-2.c
===================================================================
--- gcc.c-torture/execute/vect-shuffle-2.c	(revision 179599)
+++ gcc.c-torture/execute/vect-shuffle-2.c	(working copy)
@@ -1,68 +0,0 @@ 
-#if __SIZEOF_SHORT__ == 2
-typedef unsigned short V __attribute__((vector_size(16), may_alias));
-
-struct S
-{
-  V in, mask, out;
-};
-
-struct S tests[] = {
-  {
-    { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 },
-    { 0, 1, 2, 3, 4, 5, 6, 7 },
-    { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 },
-  },
-  {
-    { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 },
-    { 0x10, 0x21, 0x32, 0x43, 0x54, 0x65, 0x76, 0x87 },
-    { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 },
-  },
-  {
-    { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 },
-    { 7, 6, 5, 4, 3, 2, 1, 0 },
-    { 0x8888, 0x7777, 0x6666, 0x5555, 0x4444, 0x3333, 0x2222, 0x1111 },
-  },
-  {
-    { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 },
-    { 7, 0, 5, 3, 2, 4, 1, 6 },
-    { 0x8888, 0x1111, 0x6666, 0x4444, 0x3333, 0x5555, 0x2222, 0x7777 },
-  },
-  {
-    { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 },
-    { 0, 2, 1, 3, 4, 6, 5, 7 },
-    { 0x1111, 0x3333, 0x2222, 0x4444, 0x5555, 0x7777, 0x6666, 0x8888 },
-  },
-  {
-    { 0x1122, 0x3344, 0x5566, 0x7788, 0x99aa, 0xbbcc, 0xddee, 0xff00 },
-    { 3, 1, 2, 0, 7, 5, 6, 4 },
-    { 0x7788, 0x3344, 0x5566, 0x1122, 0xff00, 0xbbcc, 0xddee, 0x99aa },
-  },
-  {
-    { 0x1122, 0x3344, 0x5566, 0x7788, 0x99aa, 0xbbcc, 0xddee, 0xff00 },
-    { 0, 0, 0, 0 },
-    { 0x1122, 0x1122, 0x1122, 0x1122, 0x1122, 0x1122, 0x1122, 0x1122 },
-  },
-  {
-    { 0x1122, 0x3344, 0x5566, 0x7788, 0x99aa, 0xbbcc, 0xddee, 0xff00 },
-    { 1, 6, 1, 6, 1, 6, 1, 6 }, 
-    { 0x3344, 0xddee, 0x3344, 0xddee, 0x3344, 0xddee, 0x3344, 0xddee },
-  }
-};
-
-extern void abort(void);
-
-int main()
-{
-  int i;
-
-  for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i)
-    {
-      V r = __builtin_shuffle(tests[i].in, tests[i].mask);
-      if (memcmp(&r, &tests[i].out, sizeof(V)) != 0)
-	abort();
-    }
-
-  return 0;
-}
-
-#endif /* SIZEOF_SHORT */
Index: gcc.c-torture/execute/vect-shuffle-4.c
===================================================================
--- gcc.c-torture/execute/vect-shuffle-4.c	(revision 179599)
+++ gcc.c-torture/execute/vect-shuffle-4.c	(working copy)
@@ -1,51 +0,0 @@ 
-typedef unsigned char V __attribute__((vector_size(16), may_alias));
-
-struct S
-{
-  V in, mask, out;
-};
-
-struct S tests[] = {
-  {
-    { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
-    { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, },
-    { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
-  },
-  {
-    { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
-    { 0x10, 0x21, 0x32, 0x43, 0x54, 0x65, 0x76, 0x87,
-      0x98, 0xa9, 0xba, 0xcb, 0xdc, 0xed, 0xfe, 0xff },
-    { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
-  },
-  {
-    { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
-    { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
-    { 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 },
-  },
-  {
-    { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
-    { 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15 },
-    { 1, 3, 5, 7, 9, 11, 13, 15, 2, 4, 6, 8, 10, 12, 14, 16 },
-  },
-  {
-    { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
-    { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }, 
-    { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, 
-  },
-};
-
-extern void abort(void);
-
-int main()
-{
-  int i;
-
-  for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i)
-    {
-      V r = __builtin_shuffle(tests[i].in, tests[i].mask);
-      if (memcmp(&r, &tests[i].out, sizeof(V)) != 0)
-	abort();
-    }
-
-  return 0;
-}
Index: gcc.c-torture/execute/vect-shuffle-6.c
===================================================================
--- gcc.c-torture/execute/vect-shuffle-6.c	(revision 179599)
+++ gcc.c-torture/execute/vect-shuffle-6.c	(working copy)
@@ -1,64 +0,0 @@ 
-#if __SIZEOF_SHORT__ == 2
-typedef unsigned short V __attribute__((vector_size(16), may_alias));
-
-struct S
-{
-  V in1, in2, mask, out;
-};
-
-struct S tests[] = {
-  {
-    { 0x1010, 0x2121, 0x3232, 0x4343, 0x5454, 0x6565, 0x7676, 0x8787 },
-    { 0x9898, 0xa9a9, 0xbaba, 0xcbcb, 0xdcdc, 0xeded, 0xfefe, 0x0f0f },
-    { 0, 1, 2, 3, 4, 5, 6, 7 },
-    { 0x1010, 0x2121, 0x3232, 0x4343, 0x5454, 0x6565, 0x7676, 0x8787 },
-  },
-  {
-    { 0x1010, 0x2121, 0x3232, 0x4343, 0x5454, 0x6565, 0x7676, 0x8787 },
-    { 0x9898, 0xa9a9, 0xbaba, 0xcbcb, 0xdcdc, 0xeded, 0xfefe, 0x0f0f },
-    { 8, 9, 10, 11, 12, 13, 14, 15 },
-    { 0x9898, 0xa9a9, 0xbaba, 0xcbcb, 0xdcdc, 0xeded, 0xfefe, 0x0f0f },
-  },
-  {
-    { 0x1010, 0x2121, 0x3232, 0x4343, 0x5454, 0x6565, 0x7676, 0x8787 },
-    { 0x9898, 0xa9a9, 0xbaba, 0xcbcb, 0xdcdc, 0xeded, 0xfefe, 0x0f0f },
-    { 0, 8, 1, 9, 2, 10, 3, 11 },
-    { 0x1010, 0x9898, 0x2121, 0xa9a9, 0x3232, 0xbaba, 0x4343, 0xcbcb },
-  },
-  {
-    { 0x1010, 0x2121, 0x3232, 0x4343, 0x5454, 0x6565, 0x7676, 0x8787 },
-    { 0x9898, 0xa9a9, 0xbaba, 0xcbcb, 0xdcdc, 0xeded, 0xfefe, 0x0f0f },
-    { 0, 15, 4, 11, 12, 3, 7, 8 },
-    { 0x1010, 0x0f0f, 0x5454, 0xcbcb, 0xdcdc, 0x4343, 0x8787, 0x9898 },
-  },
-  {
-    { 0x1010, 0x2121, 0x3232, 0x4343, 0x5454, 0x6565, 0x7676, 0x8787 },
-    { 0x9898, 0xa9a9, 0xbaba, 0xcbcb, 0xdcdc, 0xeded, 0xfefe, 0x0f0f },
-    { 0, 0, 0, 0, 0, 0, 0, 0 },
-    { 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010 },
-  },
-  {
-    { 0x1010, 0x2121, 0x3232, 0x4343, 0x5454, 0x6565, 0x7676, 0x8787 },
-    { 0x9898, 0xa9a9, 0xbaba, 0xcbcb, 0xdcdc, 0xeded, 0xfefe, 0x0f0f },
-    { 14, 14, 14, 14, 14, 14, 14, 14 },
-    { 0xfefe, 0xfefe, 0xfefe, 0xfefe, 0xfefe, 0xfefe, 0xfefe, 0xfefe },
-  },
-};
-
-extern void abort(void);
-
-int main()
-{
-  int i;
-
-  for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i)
-    {
-      V r = __builtin_shuffle(tests[i].in1, tests[i].in2, tests[i].mask);
-      if (__builtin_memcmp(&r, &tests[i].out, sizeof(V)) != 0)
-	abort();
-    }
-
-  return 0;
-}
-
-#endif /* SIZEOF_SHORT */
Index: gcc.c-torture/execute/vect-shuffle-8.c
===================================================================
--- gcc.c-torture/execute/vect-shuffle-8.c	(revision 179599)
+++ gcc.c-torture/execute/vect-shuffle-8.c	(working copy)
@@ -1,55 +0,0 @@ 
-typedef unsigned char V __attribute__((vector_size(16), may_alias));
-
-struct S
-{
-  V in1, in2, mask, out;
-};
-
-struct S tests[] = {
-  {
-    { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
-    { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 },
-    { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
-    { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
-  },
-  {
-    { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
-    { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 },
-    { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
-    { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 },
-  },
-  {
-    { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
-    { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 },
-    { 7, 6, 5, 4, 16, 17, 18, 19, 31, 30, 29, 28, 3, 2, 1, 0 },
-    { 17, 16, 15, 14, 30, 31, 32, 33, 45, 44, 43, 42, 13, 12, 11, 10 },
-  },
-  {
-    { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
-    { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 },
-    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
-    { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 },
-  },
-  {
-    { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
-    { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 },
-    { 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 },
-    { 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45 },
-  },
-};
-
-extern void abort(void);
-
-int main()
-{
-  int i;
-
-  for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i)
-    {
-      V r = __builtin_shuffle(tests[i].in1, tests[i].in2, tests[i].mask);
-      if (__builtin_memcmp(&r, &tests[i].out, sizeof(V)) != 0)
-	abort();
-    }
-
-  return 0;
-}
Index: gcc.c-torture/execute/vect-shuffle-1.c
===================================================================
--- gcc.c-torture/execute/vect-shuffle-1.c	(revision 179599)
+++ gcc.c-torture/execute/vect-shuffle-1.c	(working copy)
@@ -1,68 +0,0 @@ 
-#if __SIZEOF_INT__ == 4
-typedef unsigned int V __attribute__((vector_size(16), may_alias));
-
-struct S
-{
-  V in, mask, out;
-};
-
-struct S tests[] = {
-  {
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-    { 0, 1, 2, 3 },
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-  },
-  {
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-    { 0+1*4, 1+2*4, 2+3*4, 3+4*4 },
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-  },
-  {
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-    { 3, 2, 1, 0 },
-    { 0x44444444, 0x33333333, 0x22222222, 0x11111111 },
-  },
-  {
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-    { 0, 3, 2, 1 },
-    { 0x11111111, 0x44444444, 0x33333333, 0x22222222 },
-  },
-  {
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-    { 0, 2, 1, 3 },
-    { 0x11111111, 0x33333333, 0x22222222, 0x44444444 },
-  },
-  {
-    { 0x11223344, 0x55667788, 0x99aabbcc, 0xddeeff00 },
-    { 3, 1, 2, 0 },
-    { 0xddeeff00, 0x55667788, 0x99aabbcc, 0x11223344 },
-  },
-  {
-    { 0x11223344, 0x55667788, 0x99aabbcc, 0xddeeff00 },
-    { 0, 0, 0, 0 },
-    { 0x11223344, 0x11223344, 0x11223344, 0x11223344 },
-  },
-  {
-    { 0x11223344, 0x55667788, 0x99aabbcc, 0xddeeff00 },
-    { 1, 2, 1, 2 },
-    { 0x55667788, 0x99aabbcc, 0x55667788, 0x99aabbcc },
-  }
-};
-
-extern void abort(void);
-
-int main()
-{
-  int i;
-
-  for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i)
-    {
-      V r = __builtin_shuffle(tests[i].in, tests[i].mask);
-      if (__builtin_memcmp(&r, &tests[i].out, sizeof(V)) != 0)
-	abort();
-    }
-
-  return 0;
-}
-
-#endif /* SIZEOF_INT */
Index: gcc.c-torture/execute/vect-shuffle-3.c
===================================================================
--- gcc.c-torture/execute/vect-shuffle-3.c	(revision 179599)
+++ gcc.c-torture/execute/vect-shuffle-3.c	(working copy)
@@ -1,58 +0,0 @@ 
-#if __SIZEOF_LONG_LONG__ == 8
-typedef unsigned long long V __attribute__((vector_size(16), may_alias));
-
-struct S
-{
-  V in, mask, out;
-};
-
-struct S tests[] = {
-  {
-    { 0x1111111111111111, 0x2222222222222222 },
-    { 0, 1 },
-    { 0x1111111111111111, 0x2222222222222222 },
-  },
-  {
-    { 0x1111111111111111, 0x2222222222222222 },
-    { 0x0102030405060700, 0xffeeddccbbaa99f1 },
-    { 0x1111111111111111, 0x2222222222222222 },
-  },
-  {
-    { 0x1111111111111111, 0x2222222222222222 },
-    { 1, 0 },
-    { 0x2222222222222222, 0x1111111111111111 },
-  },
-  {
-    { 0x1111111111111111, 0x2222222222222222 },
-    { 0, 0 },
-    { 0x1111111111111111, 0x1111111111111111 },
-  },
-  {
-    { 0x1122334455667788, 0x99aabbccddeeff00 },
-    { 1, 1 },
-    { 0x99aabbccddeeff00, 0x99aabbccddeeff00 },
-  },
-  {
-    { 0x1122334455667788, 0x99aabbccddeeff00 },
-    { 1, 0 },
-    { 0x99aabbccddeeff00, 0x1122334455667788 },
-  },
-};
-
-extern void abort(void);
-
-int main()
-{
-  int i;
-
-  for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i)
-    {
-      V r = __builtin_shuffle(tests[i].in, tests[i].mask);
-      if (__builtin_memcmp(&r, &tests[i].out, sizeof(V)) != 0)
-	abort();
-    }
-
-  return 0;
-}
-
-#endif /* SIZEOF_LONG_LONG */
Index: gcc.c-torture/execute/vect-shuffle-5.c
===================================================================
--- gcc.c-torture/execute/vect-shuffle-5.c	(revision 179599)
+++ gcc.c-torture/execute/vect-shuffle-5.c	(working copy)
@@ -1,64 +0,0 @@ 
-#if __SIZEOF_INT__ == 4
-typedef unsigned int V __attribute__((vector_size(16), may_alias));
-
-struct S
-{
-  V in1, in2, mask, out;
-};
-
-struct S tests[] = {
-  {
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-    { 0x55555555, 0x66666666, 0x77777777, 0x88888888 },
-    { 0, 1, 2, 3 },
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-  },
-  {
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-    { 0x55555555, 0x66666666, 0x77777777, 0x88888888 },
-    { 4, 5, 6, 7 },
-    { 0x55555555, 0x66666666, 0x77777777, 0x88888888 },
-  },
-  {
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-    { 0x55555555, 0x66666666, 0x77777777, 0x88888888 },
-    { 0, 4, 1, 5 },
-    { 0x11111111, 0x55555555, 0x22222222, 0x66666666 },
-  },
-  {
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-    { 0x55555555, 0x66666666, 0x77777777, 0x88888888 },
-    { 0, 7, 4, 3 },
-    { 0x11111111, 0x88888888, 0x55555555, 0x44444444 },
-  },
-  {
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-    { 0x55555555, 0x66666666, 0x77777777, 0x88888888 },
-    { 0, 0, 0, 0 },
-    { 0x11111111, 0x11111111, 0x11111111, 0x11111111 },
-  },
-  {
-    { 0x11111111, 0x22222222, 0x33333333, 0x44444444 },
-    { 0x55555555, 0x66666666, 0x77777777, 0x88888888 },
-    { 7, 7, 7, 7 },
-    { 0x88888888, 0x88888888, 0x88888888, 0x88888888 },
-  },
-};
-
-extern void abort(void);
-
-int main()
-{
-  int i;
-
-  for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i)
-    {
-      V r = __builtin_shuffle(tests[i].in1, tests[i].in2, tests[i].mask);
-      if (__builtin_memcmp(&r, &tests[i].out, sizeof(V)) != 0)
-	abort();
-    }
-
-  return 0;
-}
-
-#endif /* SIZEOF_INT */
Index: gcc.c-torture/execute/vect-shuffle-7.c
===================================================================
--- gcc.c-torture/execute/vect-shuffle-7.c	(revision 179599)
+++ gcc.c-torture/execute/vect-shuffle-7.c	(working copy)
@@ -1,70 +0,0 @@ 
-#if __SIZEOF_LONG_LONG__ == 8
-typedef unsigned long long V __attribute__((vector_size(16), may_alias));
-
-struct S
-{
-  V in1, in2, mask, out;
-};
-
-struct S tests[] = {
-  {
-    { 0x1112131415161718, 0x2122232425262728 },
-    { 0x3132333435363738, 0x4142434445464748 },
-    { 0, 1 },
-    { 0x1112131415161718, 0x2122232425262728 },
-  },
-  {
-    { 0x1112131415161718, 0x2122232425262728 },
-    { 0x3132333435363738, 0x4142434445464748 },
-    { 2, 3 },
-    { 0x3132333435363738, 0x4142434445464748 },
-  },
-  {
-    { 0x1112131415161718, 0x2122232425262728 },
-    { 0x3132333435363738, 0x4142434445464748 },
-    { 0, 2 },
-    { 0x1112131415161718, 0x3132333435363738 },
-  },
-  {
-    { 0x1112131415161718, 0x2122232425262728 },
-    { 0x3132333435363738, 0x4142434445464748 },
-    { 2, 1 },
-    { 0x3132333435363738, 0x2122232425262728 },
-  },
-  {
-    { 0x1112131415161718, 0x2122232425262728 },
-    { 0x3132333435363738, 0x4142434445464748 },
-    { 3, 0 },
-    { 0x4142434445464748, 0x1112131415161718 },
-  },
-  {
-    { 0x1112131415161718, 0x2122232425262728 },
-    { 0x3132333435363738, 0x4142434445464748 },
-    { 0, 0 },
-    { 0x1112131415161718, 0x1112131415161718 },
-  },
-  {
-    { 0x1112131415161718, 0x2122232425262728 },
-    { 0x3132333435363738, 0x4142434445464748 },
-    { 3, 3 },
-    { 0x4142434445464748, 0x4142434445464748 },
-  },
-};
-
-extern void abort(void);
-
-int main()
-{
-  int i;
-
-  for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i)
-    {
-      V r = __builtin_shuffle(tests[i].in1, tests[i].in2, tests[i].mask);
-      if (__builtin_memcmp(&r, &tests[i].out, sizeof(V)) != 0)
-	abort();
-    }
-
-  return 0;
-}
-
-#endif /* SIZEOF_LONG_LONG */
Index: gcc.dg/torture/vect-shuffle-6.c
===================================================================
--- gcc.dg/torture/vect-shuffle-6.c	(revision 179599)
+++ gcc.dg/torture/vect-shuffle-6.c	(working copy)
@@ -1,4 +1,6 @@ 
-#if __SIZEOF_SHORT__ == 2
+/* { dg-do run } */
+/* { dg-require-effective-target short16 } */
+
 typedef unsigned short V __attribute__((vector_size(16), may_alias));
 
 struct S
@@ -60,5 +62,3 @@  int main()
 
   return 0;
 }
-
-#endif /* SIZEOF_SHORT */
Index: gcc.dg/torture/vect-shuffle-7.c
===================================================================
--- gcc.dg/torture/vect-shuffle-7.c	(revision 179599)
+++ gcc.dg/torture/vect-shuffle-7.c	(working copy)
@@ -1,4 +1,6 @@ 
-#if __SIZEOF_LONG_LONG__ == 8
+/* { dg-do run } */
+/* { dg-require-effective-target longlong64 } */
+
 typedef unsigned long long V __attribute__((vector_size(16), may_alias));
 
 struct S
@@ -66,5 +68,3 @@  int main()
 
   return 0;
 }
-
-#endif /* SIZEOF_LONG_LONG */
Index: gcc.dg/torture/vect-shuffle-1.c
===================================================================
--- gcc.dg/torture/vect-shuffle-1.c	(revision 179599)
+++ gcc.dg/torture/vect-shuffle-1.c	(working copy)
@@ -1,4 +1,6 @@ 
-#if __SIZEOF_INT__ == 4
+/* { dg-do run } */
+/* { dg-require-effective-target int32 } */
+
 typedef unsigned int V __attribute__((vector_size(16), may_alias));
 
 struct S
@@ -64,5 +66,3 @@  int main()
 
   return 0;
 }
-
-#endif /* SIZEOF_INT */
Index: gcc.dg/torture/vect-shuffle-2.c
===================================================================
--- gcc.dg/torture/vect-shuffle-2.c	(revision 179599)
+++ gcc.dg/torture/vect-shuffle-2.c	(working copy)
@@ -1,4 +1,6 @@ 
-#if __SIZEOF_SHORT__ == 2
+/* { dg-do run } */
+/* { dg-require-effective-target short16 } */
+
 typedef unsigned short V __attribute__((vector_size(16), may_alias));
 
 struct S
@@ -64,5 +66,3 @@  int main()
 
   return 0;
 }
-
-#endif /* SIZEOF_SHORT */
Index: gcc.dg/torture/vect-shuffle-3.c
===================================================================
--- gcc.dg/torture/vect-shuffle-3.c	(revision 179599)
+++ gcc.dg/torture/vect-shuffle-3.c	(working copy)
@@ -1,4 +1,6 @@ 
-#if __SIZEOF_LONG_LONG__ == 8
+/* { dg-do run } */
+/* { dg-require-effective-target longlong64 } */
+
 typedef unsigned long long V __attribute__((vector_size(16), may_alias));
 
 struct S
@@ -54,5 +56,3 @@  int main()
 
   return 0;
 }
-
-#endif /* SIZEOF_LONG_LONG */
Index: gcc.dg/torture/vect-shuffle-5.c
===================================================================
--- gcc.dg/torture/vect-shuffle-5.c	(revision 179599)
+++ gcc.dg/torture/vect-shuffle-5.c	(working copy)
@@ -1,4 +1,6 @@ 
-#if __SIZEOF_INT__ == 4
+/* { dg-do run } */
+/* { dg-require-effective-target int32 } */
+
 typedef unsigned int V __attribute__((vector_size(16), may_alias));
 
 struct S
@@ -60,5 +62,3 @@  int main()
 
   return 0;
 }
-
-#endif /* SIZEOF_INT */