rs6000: Built-in cleanups for vec_clzm, vec_ctzm, and vec_gnb
authorKelvin Nilsen <kelvin@gcc.gnu.org>
Tue, 12 May 2020 02:37:41 +0000 (21:37 -0500)
committerBill Schmidt <wschmidt@linux.ibm.com>
Tue, 12 May 2020 02:37:41 +0000 (21:37 -0500)
Changes to the built-in specification occurred after early patches
added support for these.  The name of vec_clzm became vec_cntlzm,
and vec_ctzm became vec_cnttzm.  Four of the overloaded forms of
vec_gnb were removed, and the fourth argument redefined as an
unsigned int, not an unsigned char.  This patch reflects those
changes in the code and test cases.  Eight of the vec_gnb test
cases are removed as a result.

[gcc]

2020-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/altivec.h (vec_clzm): Rename to vec_cntlzm.
(vec_ctzm): Rename to vec_cnttzm.
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
Change fourth operand for vec_ternarylogic to require
compatibility with unsigned SImode rather than unsigned QImode.
* config/rs6000/rs6000-call.c (altivec_overloaded_builtins):
Remove overloaded forms of vec_gnb that are no longer needed.
* doc/extend.texi (PowerPC AltiVec Built-in Functions Available
for a Future Architecture): Replace vec_clzm with vec_cntlzm;
replace vec_ctzm with vec_cntlzm; remove four unwanted forms of
vec_gnb; move vec_ternarylogic documentation into this section
and replace const unsigned char with const unsigned int as its
fourth argument.

[gcc/testsuite]

2020-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/vec-clzm-0.c: Rename to...
* gcc.target/powerpc/vec-cntlzm-0.c: ...this.
* gcc.target/powerpc/vec-clzm-1.c: Rename to...
* gcc.target/powerpc/vec-cntlzm-1.c: ...this.
* gcc.target/powerpc/vec-ctzm-0.c: Rename to...
* gcc.target/powerpc/vec-cnttzm-0.c: ...this.
* gcc.target/powerpc/vec-ctzm-1.c: Rename to...
* gcc.target/powerpc/vec-cnttzm-1.c: ...this.
* gcc.target/powerpc/vec-gnb-8.c: Rename to...
* gcc.target/powerpc/vec-gnb-0.c: ...this, deleting the old file.
* gcc.target/powerpc/vec-gnb-9.c: Rename to...
* gcc.target/powerpc/vec-gnb-1.c: ...this, deleting the old file.
* gcc.target/powerpc/vec-gnb-10.c: Rename to...
* gcc.target/powerpc/vec-gnb-2.c: ...this, deleting the old file.
* gcc.target/powerpc/vec-gnb-3.c: Delete.
* gcc.target/powerpc/vec-gnb-4.c: Delete.
* gcc.target/powerpc/vec-gnb-5.c: Delete.
* gcc.target/powerpc/vec-gnb-6.c: Delete.
* gcc.target/powerpc/vec-gnb-7.c: Delete.

21 files changed:
gcc/ChangeLog
gcc/config/rs6000/altivec.h
gcc/config/rs6000/rs6000-c.c
gcc/config/rs6000/rs6000-call.c
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/vec-cntlzm-0.c [moved from gcc/testsuite/gcc.target/powerpc/vec-clzm-0.c with 79% similarity]
gcc/testsuite/gcc.target/powerpc/vec-cntlzm-1.c [moved from gcc/testsuite/gcc.target/powerpc/vec-clzm-1.c with 79% similarity]
gcc/testsuite/gcc.target/powerpc/vec-cnttzm-0.c [moved from gcc/testsuite/gcc.target/powerpc/vec-ctzm-0.c with 79% similarity]
gcc/testsuite/gcc.target/powerpc/vec-cnttzm-1.c [moved from gcc/testsuite/gcc.target/powerpc/vec-ctzm-1.c with 79% similarity]
gcc/testsuite/gcc.target/powerpc/vec-gnb-0.c
gcc/testsuite/gcc.target/powerpc/vec-gnb-1.c
gcc/testsuite/gcc.target/powerpc/vec-gnb-10.c [deleted file]
gcc/testsuite/gcc.target/powerpc/vec-gnb-2.c
gcc/testsuite/gcc.target/powerpc/vec-gnb-3.c [deleted file]
gcc/testsuite/gcc.target/powerpc/vec-gnb-4.c [deleted file]
gcc/testsuite/gcc.target/powerpc/vec-gnb-5.c [deleted file]
gcc/testsuite/gcc.target/powerpc/vec-gnb-6.c [deleted file]
gcc/testsuite/gcc.target/powerpc/vec-gnb-7.c [deleted file]
gcc/testsuite/gcc.target/powerpc/vec-gnb-8.c [deleted file]
gcc/testsuite/gcc.target/powerpc/vec-gnb-9.c [deleted file]

index 0edf580..ef68675 100644 (file)
@@ -1,3 +1,19 @@
+2020-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
+
+       * config/rs6000/altivec.h (vec_clzm): Rename to vec_cntlzm.
+       (vec_ctzm): Rename to vec_cnttzm.
+       * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
+       Change fourth operand for vec_ternarylogic to require
+       compatibility with unsigned SImode rather than unsigned QImode.
+       * config/rs6000/rs6000-call.c (altivec_overloaded_builtins):
+       Remove overloaded forms of vec_gnb that are no longer needed.
+       * doc/extend.texi (PowerPC AltiVec Built-in Functions Available
+       for a Future Architecture): Replace vec_clzm with vec_cntlzm;
+       replace vec_ctzm with vec_cntlzm; remove four unwanted forms of
+       vec_gnb; move vec_ternarylogic documentation into this section
+       and replace const unsigned char with const unsigned int as its
+       fourth argument.
+
 2020-05-11  Carl Love  <cel@us.ibm.com>
 
        * config/rs6000/altivec.h (vec_genpcvm): New #define.
index 3729cea..85c5626 100644 (file)
@@ -689,8 +689,8 @@ __altivec_scalar_pred(vec_any_nle,
 #ifdef _ARCH_PWR_FUTURE
 /* May modify these macro definitions if future capabilities overload
    with support for different vector argument and result types.  */
-#define vec_clzm(a, b) __builtin_altivec_vclzdm (a, b)
-#define vec_ctzm(a, b) __builtin_altivec_vctzdm (a, b)
+#define vec_cntlzm(a, b)       __builtin_altivec_vclzdm (a, b)
+#define vec_cnttzm(a, b)       __builtin_altivec_vctzdm (a, b)
 #define vec_pdep(a, b) __builtin_altivec_vpdepd (a, b)
 #define vec_pext(a, b) __builtin_altivec_vpextd (a, b)
 #define vec_cfuge(a, b)        __builtin_altivec_vcfuged (a, b)
index cacaea0..07ca33a 100644 (file)
@@ -1813,7 +1813,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
                && rs6000_builtin_type_compatible (types[1], desc->op2)
                && rs6000_builtin_type_compatible (types[2], desc->op3)
                && rs6000_builtin_type_compatible (types[3],
-                                                  RS6000_BTI_UINTQI))
+                                                  RS6000_BTI_UINTSI))
              {
                if (rs6000_builtin_decls[desc->overloaded_code] == NULL_TREE)
                  unsupported_builtin = true;
index d4dffc5..04189ea 100644 (file)
@@ -5523,14 +5523,6 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
     RS6000_BTI_UINTSI, 0 },
 
   { FUTURE_BUILTIN_VEC_GNB, FUTURE_BUILTIN_VGNB, RS6000_BTI_unsigned_long_long,
-    RS6000_BTI_unsigned_V16QI, RS6000_BTI_UINTQI, 0 },
-  { FUTURE_BUILTIN_VEC_GNB, FUTURE_BUILTIN_VGNB, RS6000_BTI_unsigned_long_long,
-    RS6000_BTI_unsigned_V8HI, RS6000_BTI_UINTQI, 0 },
-  { FUTURE_BUILTIN_VEC_GNB, FUTURE_BUILTIN_VGNB, RS6000_BTI_unsigned_long_long,
-    RS6000_BTI_unsigned_V4SI, RS6000_BTI_UINTQI, 0 },
-  { FUTURE_BUILTIN_VEC_GNB, FUTURE_BUILTIN_VGNB, RS6000_BTI_unsigned_long_long,
-    RS6000_BTI_unsigned_V2DI, RS6000_BTI_UINTQI, 0 },
-  { FUTURE_BUILTIN_VEC_GNB, FUTURE_BUILTIN_VGNB, RS6000_BTI_unsigned_long_long,
     RS6000_BTI_unsigned_V1TI, RS6000_BTI_UINTQI, 0 },
   { FUTURE_BUILTIN_VEC_XXGENPCVM, FUTURE_BUILTIN_XXGENPCVM_V2DI,
     RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, 0 },
index c352c51..4c5ed3f 100644 (file)
@@ -20762,19 +20762,19 @@ Perform a vector centrifuge operation, as if implemented by the Future
 
 @smallexample
 @exdent vector unsigned long long int
-@exdent vec_clzm (vector unsigned long long int, vector unsigned long long int)
+@exdent vec_cntlzm (vector unsigned long long int, vector unsigned long long int)
 @end smallexample
 Perform a vector count leading zeros under bit mask operation, as if
 implemented by the Future @code{vclzdm} instruction.
-@findex vec_clzm
+@findex vec_cntlzm
 
 @smallexample
 @exdent vector unsigned long long int
-@exdent vec_ctzm (vector unsigned long long int, vector unsigned long long int)
+@exdent vec_cnttzm (vector unsigned long long int, vector unsigned long long int)
 @end smallexample
 Perform a vector count trailing zeros under bit mask operation, as if
 implemented by the Future @code{vctzdm} instruction.
-@findex vec_ctzm
+@findex vec_cnttzm
 
 @smallexample
 @exdent vector signed char
@@ -20802,14 +20802,6 @@ value of @code{n} that is greater than 16 is treated as if it equaled 16.
 
 @smallexample
 @exdent vector unsigned long long int
-@exdent vec_gnb (vector unsigned char, const unsigned char)
-@exdent vector unsigned long long int
-@exdent vec_gnb (vector unsigned short, const unsigned char)
-@exdent vector unsigned long long int
-@exdent vec_gnb (vector unsigned int, const unsigned char)
-@exdent vector unsigned long long int
-@exdent vec_gnb (vector unsigned long long int, const unsigned char)
-@exdent vector unsigned long long int
 @exdent vec_gnb (vector unsigned __int128, const unsigned char)
 @end smallexample
 Perform a 128-bit vector gather  operation, as if implemented by the Future
@@ -20890,6 +20882,28 @@ zero element if the same argument is also passed to @code{vec_strir}.
 @findex vec_strir_p
 
 @smallexample
+@exdent vector unsigned char
+@exdent vec_ternarylogic (vector unsigned char, vector unsigned char,
+            vector unsigned char, const unsigned int)
+@exdent vector unsigned short
+@exdent vec_ternarylogic (vector unsigned short, vector unsigned short,
+            vector unsigned short, const unsigned int)
+@exdent vector unsigned int
+@exdent vec_ternarylogic (vector unsigned int, vector unsigned int,
+            vector unsigned int, const unsigned int)
+@exdent vector unsigned long long int
+@exdent vec_ternarylogic (vector unsigned long long int, vector unsigned long long int,
+            vector unsigned long long int, const unsigned int)
+@exdent vector unsigned __int128
+@exdent vec_ternarylogic (vector unsigned __int128, vector unsigned __int128,
+            vector unsigned __int128, const unsigned int)
+@end smallexample
+Perform a 128-bit vector evaluate operation, as if implemented by the
+Future @code{xxeval} instruction.  The fourth argument must be a literal
+integer value between 0 and 255 inclusive.
+@findex vec_ternarylogic
+
+@smallexample
 @exdent vector unsigned char vec_genpcvm (vector unsigned char, const int)
 @exdent vector unsigned short vec_genpcvm (vector unsigned short, const int)
 @exdent vector unsigned int vec_genpcvm (vector unsigned int, const int)
@@ -22123,28 +22137,6 @@ else
 @end smallexample
 @end deftypefn
 
-@smallexample
-@exdent vector unsigned char
-@exdent vec_ternarylogic (vector unsigned char, vector unsigned char,
-            vector unsigned char, const unsigned char)
-@exdent vector unsigned short
-@exdent vec_ternarylogic (vector unsigned short, vector unsigned short,
-            vector unsigned short, const unsigned char)
-@exdent vector unsigned int
-@exdent vec_ternarylogic (vector unsigned int, vector unsigned int,
-            vector unsigned int, const unsigned char)
-@exdent vector unsigned long long int
-@exdent vec_ternarylogic (vector unsigned long long int, vector unsigned long long int,
-            vector unsigned long long int, const unsigned char)
-@exdent vector unsigned __int128
-@exdent vec_ternarylogic (vector unsigned __int128, vector unsigned __int128,
-            vector unsigned __int128, const unsigned char)
-@end smallexample
-Perform a 128-bit vector evaluate operation, as if implemented by the
-Future @code{xxeval} instruction.  The fourth argument must be a literal
-integer value between 0 and 255 inclusive.
-@findex vec_ternarylogic
-
 The following built-in functions are made available by @option{-mmmx}.
 All of them generate the machine instruction that is part of the name.
 
index 960dff0..5064e68 100644 (file)
@@ -1,3 +1,25 @@
+2020-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
+
+       * gcc.target/powerpc/vec-clzm-0.c: Rename to...
+       * gcc.target/powerpc/vec-cntlzm-0.c: ...this.
+       * gcc.target/powerpc/vec-clzm-1.c: Rename to...
+       * gcc.target/powerpc/vec-cntlzm-1.c: ...this.
+       * gcc.target/powerpc/vec-ctzm-0.c: Rename to...
+       * gcc.target/powerpc/vec-cnttzm-0.c: ...this.
+       * gcc.target/powerpc/vec-ctzm-1.c: Rename to...
+       * gcc.target/powerpc/vec-cnttzm-1.c: ...this.
+       * gcc.target/powerpc/vec-gnb-8.c: Rename to...
+       * gcc.target/powerpc/vec-gnb-0.c: ...this, deleting the old file.
+       * gcc.target/powerpc/vec-gnb-9.c: Rename to...
+       * gcc.target/powerpc/vec-gnb-1.c: ...this, deleting the old file.
+       * gcc.target/powerpc/vec-gnb-10.c: Rename to...
+       * gcc.target/powerpc/vec-gnb-2.c: ...this, deleting the old file.
+       * gcc.target/powerpc/vec-gnb-3.c: Delete.
+       * gcc.target/powerpc/vec-gnb-4.c: Delete.
+       * gcc.target/powerpc/vec-gnb-5.c: Delete.
+       * gcc.target/powerpc/vec-gnb-6.c: Delete.
+       * gcc.target/powerpc/vec-gnb-7.c: Delete.
+
 2020-05-11  Carl Love  <cel@us.ibm.com>
 
        * gcc.target/powerpc/xxgenpc-runnable.c: New.
@@ -6,10 +6,10 @@
 extern void abort (void);
 
 vector unsigned long long int
-do_vec_clzm (vector unsigned long long int source,
+do_vec_cntlzm (vector unsigned long long int source,
             vector unsigned long long int mask)
 {
-  return vec_clzm (source, mask);
+  return vec_cntlzm (source, mask);
 }
 
 int main (int argc, char *argv [])
@@ -39,13 +39,13 @@ int main (int argc, char *argv [])
   vector unsigned long long int result_ba = { 2, 0 };
   vector unsigned long long int result_bb = { 0, 1 };
 
-  if (!vec_all_eq (do_vec_clzm (source_a, mask_a), result_aa))
+  if (!vec_all_eq (do_vec_cntlzm (source_a, mask_a), result_aa))
     abort ();
-  if (!vec_all_eq (do_vec_clzm (source_a, mask_b), result_ab))
+  if (!vec_all_eq (do_vec_cntlzm (source_a, mask_b), result_ab))
     abort ();
-  if (!vec_all_eq (do_vec_clzm (source_b, mask_a), result_ba))
+  if (!vec_all_eq (do_vec_cntlzm (source_b, mask_a), result_ba))
     abort ();
-  if (!vec_all_eq (do_vec_clzm (source_b, mask_b), result_bb))
+  if (!vec_all_eq (do_vec_cntlzm (source_b, mask_b), result_bb))
     abort ();
 
   return 0;
@@ -7,10 +7,10 @@
 extern void abort (void);
 
 vector unsigned long long int
-do_vec_clzm (vector unsigned long long int source,
+do_vec_cntlzm (vector unsigned long long int source,
             vector unsigned long long int mask)
 {
-  return vec_clzm (source, mask);
+  return vec_cntlzm (source, mask);
 }
 
 int main (int argc, char *argv [])
@@ -40,13 +40,13 @@ int main (int argc, char *argv [])
   vector unsigned long long int result_ba = { 2, 0 };
   vector unsigned long long int result_bb = { 0, 1 };
 
-  if (!vec_all_eq (do_vec_clzm (source_a, mask_a), result_aa))
+  if (!vec_all_eq (do_vec_cntlzm (source_a, mask_a), result_aa))
     abort ();
-  if (!vec_all_eq (do_vec_clzm (source_a, mask_b), result_ab))
+  if (!vec_all_eq (do_vec_cntlzm (source_a, mask_b), result_ab))
     abort ();
-  if (!vec_all_eq (do_vec_clzm (source_b, mask_a), result_ba))
+  if (!vec_all_eq (do_vec_cntlzm (source_b, mask_a), result_ba))
     abort ();
-  if (!vec_all_eq (do_vec_clzm (source_b, mask_b), result_bb))
+  if (!vec_all_eq (do_vec_cntlzm (source_b, mask_b), result_bb))
     abort ();
 
   return 0;
@@ -6,10 +6,10 @@
 extern void abort (void);
 
 vector unsigned long long int
-do_vec_ctzm (vector unsigned long long int source,
+do_vec_cnttzm (vector unsigned long long int source,
             vector unsigned long long int mask)
 {
-  return vec_ctzm (source, mask);
+  return vec_cnttzm (source, mask);
 }
 
 int main (int argc, char *argv [])
@@ -39,13 +39,13 @@ int main (int argc, char *argv [])
   vector unsigned long long int result_ba = { 0, 0 };
   vector unsigned long long int result_bb = { 1, 2 };
 
-  if (!vec_all_eq (do_vec_ctzm (source_a, mask_a), result_aa))
+  if (!vec_all_eq (do_vec_cnttzm (source_a, mask_a), result_aa))
     abort ();
-  if (!vec_all_eq (do_vec_ctzm (source_a, mask_b), result_ab))
+  if (!vec_all_eq (do_vec_cnttzm (source_a, mask_b), result_ab))
     abort ();
-  if (!vec_all_eq (do_vec_ctzm (source_b, mask_a),result_ba))
+  if (!vec_all_eq (do_vec_cnttzm (source_b, mask_a),result_ba))
     abort ();
-  if (!vec_all_eq (do_vec_ctzm (source_b, mask_b), result_bb))
+  if (!vec_all_eq (do_vec_cnttzm (source_b, mask_b), result_bb))
     abort ();
 
   return 0;
@@ -7,10 +7,10 @@
 extern void abort (void);
 
 vector unsigned long long int
-do_vec_ctzm (vector unsigned long long int source,
+do_vec_cnttzm (vector unsigned long long int source,
             vector unsigned long long int mask)
 {
-  return vec_ctzm (source, mask);
+  return vec_cnttzm (source, mask);
 }
 
 int main (int argc, char *argv [])
@@ -40,13 +40,13 @@ int main (int argc, char *argv [])
   vector unsigned long long int result_ba = { 0, 0 };
   vector unsigned long long int result_bb = { 1, 2 };
 
-  if (!vec_all_eq (do_vec_ctzm (source_a, mask_a), result_aa))
+  if (!vec_all_eq (do_vec_cnttzm (source_a, mask_a), result_aa))
     abort ();
-  if (!vec_all_eq (do_vec_ctzm (source_a, mask_b), result_ab))
+  if (!vec_all_eq (do_vec_cnttzm (source_a, mask_b), result_ab))
     abort ();
-  if (!vec_all_eq (do_vec_ctzm (source_b, mask_a),result_ba))
+  if (!vec_all_eq (do_vec_cnttzm (source_b, mask_a),result_ba))
     abort ();
-  if (!vec_all_eq (do_vec_ctzm (source_b, mask_b), result_bb))
+  if (!vec_all_eq (do_vec_cnttzm (source_b, mask_b), result_bb))
     abort ();
 
   return 0;
index a95c29c..f18bb16 100644 (file)
@@ -5,10 +5,8 @@
 
 extern void abort (void);
 
-/* This test is replicated for every different vector type since
-   vec_gnb is polymorphic.  */
 unsigned long long int
-do_vec_gnb (vector unsigned char source, int stride)
+do_vec_gnb (vector unsigned __int128 source, int stride)
 {
   switch (stride)
     {
@@ -46,15 +44,15 @@ main (int argc, char *argv [])
 
   /* The last array element appears in the left-most (first) bit
      positions of the vector register.  */
-  vector unsigned char source_a = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x88, 0x88, 0x88, 0x88 };
-  vector unsigned char source_b = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 };
-  vector unsigned char source_c = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88 };
-  vector unsigned char source_d = {
-    0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
-    0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 };
+  vector unsigned __int128 source_a =
+    { ((unsigned __int128) 0x8888888800000000ull) << 64 };
+  vector unsigned __int128 source_b =
+    { ((unsigned __int128) 0x8080808080808080ull) << 64 };
+  vector unsigned __int128 source_c =
+    { ((unsigned __int128) 0x8888888888888888ull) << 64 };
+  vector unsigned __int128 source_d =
+    { 0x8080808080808080ull |
+      ((unsigned __int128) 0x8080808080808080ull) << 64 };
 
   unsigned long long int results [] =
     { 0xaaaa000000000000ull, 0xaaaa000000000000ull,
index e8ceed5..ee9c44f 100644 (file)
@@ -6,10 +6,8 @@
 
 extern void abort (void);
 
-/* This test is replicated for every different vector type since
-   vec_gnb is polymorphic.  */
 unsigned long long int
-do_vec_gnb (vector unsigned char source, int stride)
+do_vec_gnb (vector unsigned __int128 source, int stride)
 {
   switch (stride)
     {
@@ -47,15 +45,15 @@ main (int argc, char *argv [])
 
   /* The last array element appears in the left-most (first) bit
      positions of the vector register.  */
-  vector unsigned char source_a = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x88, 0x88, 0x88, 0x88 };
-  vector unsigned char source_b = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 };
-  vector unsigned char source_c = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88 };
-  vector unsigned char source_d = {
-    0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
-    0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 };
+  vector unsigned __int128 source_a =
+    { ((unsigned __int128) 0x8888888800000000ull) << 64 };
+  vector unsigned __int128 source_b =
+    { ((unsigned __int128) 0x8080808080808080ull) << 64 };
+  vector unsigned __int128 source_c =
+    { ((unsigned __int128) 0x8888888888888888ull) << 64 };
+  vector unsigned __int128 source_d =
+    { 0x8080808080808080ull |
+      ((unsigned __int128) 0x8080808080808080ull) << 64 };
 
   unsigned long long int results [] =
     { 0xaaaa000000000000ull, 0xaaaa000000000000ull,
@@ -72,4 +70,3 @@ main (int argc, char *argv [])
 
   return 0;
 }
-
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-gnb-10.c b/gcc/testsuite/gcc.target/powerpc/vec-gnb-10.c
deleted file mode 100644 (file)
index 73ff0d9..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mdejagnu-cpu=future" } */
-
-#include <altivec.h>
-
-extern void abort (void);
-
-unsigned long long int
-do_vec_gnb (vector unsigned char source, unsigned char stride)
-{
-  switch (stride)
-    {
-    case 2:
-      return vec_gnb (source, 0);      /* { dg-error "between 2 and 7" } */
-    case 3:
-      return vec_gnb (source, -1);     /* { dg-error "between 2 and 7" } */
-    case 4:
-      return vec_gnb (source, 8);      /* { dg-error "between 2 and 7" } */
-    case 5:
-      return vec_gnb (source, 1);      /* { dg-error "between 2 and 7" } */
-    case 6:
-      return vec_gnb (source, stride); /* { dg-error "unsigned literal" } */
-    case 7:
-      return vec_gnb (source, 7);
-
-    default:
-      /* Illegal value of stride */
-      abort ();
-      return 0;
-    }
-}
-
-int
-main (int argc, char *argv [])
-{
-  /* For result = 0xaaaa_0000_0000_0000, use:
-      stride = 2: binary 1x0x_1x0x_1x0x_... = 0x8888_8888_0000_0000, 0
-      stride = 4: binary 1xxx_0xxx_1xxx_0xxxx = 0x8080_8080_8080_8080, 0
-
-     For result = 0xaaaa_aaaa_0000_0000, use:
-      stride = 2: source = 0x8888_8888_8888_8888, 0x0 }
-      stride = 4: source = { 0x8080_8080_8080_8080, 0x8080_8080_8080_8080 }
-  */
-
-  /* The last array element appears in the left-most (first) bit
-     positions of the vector register.  */
-  vector unsigned char source_a = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x88, 0x88, 0x88, 0x88 };
-  vector unsigned char source_b = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 };
-  vector unsigned char source_c = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88 };
-  vector unsigned char source_d = {
-    0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
-    0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 };
-
-  unsigned long long int results [] =
-    { 0xaaaa000000000000ull, 0xaaaa000000000000ull,
-      0xaaaaaaaa00000000ull, 0xaaaaaaaa00000000ull };
-
-  if (do_vec_gnb (source_a, 2) != results [0])
-    abort ();
-  if (do_vec_gnb (source_b, 4) != results [1])
-    abort ();
-  if (do_vec_gnb (source_c, 2) != results [2])
-    abort ();
-  if (do_vec_gnb (source_d, 4) != results [3])
-    abort ();
-
-  return 0;
-}
-
index eb51a8d..591f701 100644 (file)
@@ -5,23 +5,21 @@
 
 extern void abort (void);
 
-/* This test is replicated for every different vector type since
-   vec_gnb is polymorphic.  */
 unsigned long long int
-do_vec_gnb (vector unsigned short int source, int stride)
+do_vec_gnb (vector unsigned __int128 source, int stride)
 {
   switch (stride)
     {
     case 2:
-      return vec_gnb (source, 2);
+      return vec_gnb (source, 0);      /* { dg-error "between 2 and 7" } */
     case 3:
-      return vec_gnb (source, 3);
+      return vec_gnb (source, -1);     /* { dg-error "between 2 and 7" } */
     case 4:
-      return vec_gnb (source, 4);
+      return vec_gnb (source, 8);      /* { dg-error "between 2 and 7" } */
     case 5:
-      return vec_gnb (source, 5);
+      return vec_gnb (source, 1);      /* { dg-error "between 2 and 7" } */
     case 6:
-      return vec_gnb (source, 6);
+      return vec_gnb (source, stride); /* { dg-error "unsigned literal" } */
     case 7:
       return vec_gnb (source, 7);
 
@@ -46,13 +44,15 @@ main (int argc, char *argv [])
 
   /* The last array element appears in the left-most (first) bit
      positions of the vector register.  */
-  vector unsigned short int source_a = { 0, 0, 0, 0, 0, 0, 0x8888, 0x8888 };
-  vector unsigned short int source_b = {
-    0, 0, 0, 0, 0x8080, 0x8080, 0x8080, 0x8080 };
-  vector unsigned short int source_c = {
-    0, 0, 0, 0, 0x8888, 0x8888, 0x8888, 0x8888 };
-  vector unsigned short int source_d = {
-    0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080 };
+  vector unsigned __int128 source_a =
+    { ((unsigned __int128) 0x8888888800000000ull) << 64 };
+  vector unsigned __int128 source_b =
+    { ((unsigned __int128) 0x8080808080808080ull) << 64 };
+  vector unsigned __int128 source_c =
+    { ((unsigned __int128) 0x8888888888888888ull) << 64 };
+  vector unsigned __int128 source_d =
+    { 0x8080808080808080ull |
+      ((unsigned __int128) 0x8080808080808080ull) << 64 };
 
   unsigned long long int results [] =
     { 0xaaaa000000000000ull, 0xaaaa000000000000ull,
@@ -70,4 +70,3 @@ main (int argc, char *argv [])
   return 0;
 }
 
-/* { dg-final { scan-assembler {\mvgnb\M} } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-gnb-3.c b/gcc/testsuite/gcc.target/powerpc/vec-gnb-3.c
deleted file mode 100644 (file)
index f36b91a..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/* { dg-do run } */
-/* { dg-require-effective-target powerpc_future_hw } */
-/* { dg-options "-mdejagnu-cpu=future" } */
-
-#include <altivec.h>
-
-extern void abort (void);
-
-/* This test is replicated for every different vector type since
-   vec_gnb is polymorphic.  */
-unsigned long long int
-do_vec_gnb (vector unsigned short int source, int stride)
-{
-  switch (stride)
-    {
-    case 2:
-      return vec_gnb (source, 2);
-    case 3:
-      return vec_gnb (source, 3);
-    case 4:
-      return vec_gnb (source, 4);
-    case 5:
-      return vec_gnb (source, 5);
-    case 6:
-      return vec_gnb (source, 6);
-    case 7:
-      return vec_gnb (source, 7);
-
-    default:
-      /* Illegal value of stride */
-      abort ();
-      return 0;
-    }
-}
-
-int
-main (int argc, char *argv [])
-{
-  /* For result = 0xaaaa_0000_0000_0000, use:
-      stride = 2: binary 1x0x_1x0x_1x0x_... = 0x8888_8888_0000_0000, 0
-      stride = 4: binary 1xxx_0xxx_1xxx_0xxxx = 0x8080_8080_8080_8080, 0
-
-     For result = 0xaaaa_aaaa_0000_0000, use:
-      stride = 2: source = 0x8888_8888_8888_8888, 0x0 }
-      stride = 4: source = { 0x8080_8080_8080_8080, 0x8080_8080_8080_8080 }
-  */
-
-  /* The last array element appears in the left-most (first) bit
-     positions of the vector register.  */
-  vector unsigned short int source_a = { 0, 0, 0, 0, 0, 0, 0x8888, 0x8888 };
-  vector unsigned short int source_b = {
-    0, 0, 0, 0, 0x8080, 0x8080, 0x8080, 0x8080 };
-  vector unsigned short int source_c = {
-    0, 0, 0, 0, 0x8888, 0x8888, 0x8888, 0x8888 };
-  vector unsigned short int source_d = {
-    0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080 };
-
-  unsigned long long int results [] =
-    { 0xaaaa000000000000ull, 0xaaaa000000000000ull,
-      0xaaaaaaaa00000000ull, 0xaaaaaaaa00000000ull };
-
-  if (do_vec_gnb (source_a, 2) != results [0])
-    abort ();
-  if (do_vec_gnb (source_b, 4) != results [1])
-    abort ();
-  if (do_vec_gnb (source_c, 2) != results [2])
-    abort ();
-  if (do_vec_gnb (source_d, 4) != results [3])
-    abort ();
-
-  return 0;
-}
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-gnb-4.c b/gcc/testsuite/gcc.target/powerpc/vec-gnb-4.c
deleted file mode 100644 (file)
index df312ae..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mdejagnu-cpu=future" } */
-
-#include <altivec.h>
-
-extern void abort (void);
-
-/* This test is replicated for every different vector type since
-   vec_gnb is polymorphic.  */
-unsigned long long int
-do_vec_gnb (vector unsigned int source, int stride)
-{
-  switch (stride)
-    {
-    case 2:
-      return vec_gnb (source, 2);
-    case 3:
-      return vec_gnb (source, 3);
-    case 4:
-      return vec_gnb (source, 4);
-    case 5:
-      return vec_gnb (source, 5);
-    case 6:
-      return vec_gnb (source, 6);
-    case 7:
-      return vec_gnb (source, 7);
-
-    default:
-      /* Illegal value of stride */
-      abort ();
-      return 0;
-    }
-}
-
-int
-main (int argc, char *argv [])
-{
-  /* For result = 0xaaaa_0000_0000_0000, use:
-      stride = 2: binary 1x0x_1x0x_1x0x_... = 0x8888_8888_0000_0000, 0
-      stride = 4: binary 1xxx_0xxx_1xxx_0xxxx = 0x8080_8080_8080_8080, 0
-
-     For result = 0xaaaa_aaaa_0000_0000, use:
-      stride = 2: source = 0x8888_8888_8888_8888, 0x0 }
-      stride = 4: source = { 0x8080_8080_8080_8080, 0x8080_8080_8080_8080 }
-  */
-
-  /* The last array element appears in the left-most (first) bit
-     positions of the vector register.  */
-  vector unsigned int source_a = { 0, 0, 0, 0x88888888 };
-  vector unsigned int source_b = { 0, 0, 0x80808080, 0x80808080 };
-  vector unsigned int source_c = { 0, 0, 0x88888888, 0x88888888 };
-  vector unsigned int source_d =
-    { 0x80808080, 0x80808080, 0x80808080, 0x80808080 };
-
-  unsigned long long int results [] =
-    { 0xaaaa000000000000ull, 0xaaaa000000000000ull,
-      0xaaaaaaaa00000000ull, 0xaaaaaaaa00000000ull };
-
-  if (do_vec_gnb (source_a, 2) != results [0])
-    abort ();
-  if (do_vec_gnb (source_b, 4) != results [1])
-    abort ();
-  if (do_vec_gnb (source_c, 2) != results [2])
-    abort ();
-  if (do_vec_gnb (source_d, 4) != results [3])
-    abort ();
-
-  return 0;
-}
-
-/* { dg-final { scan-assembler {\mvgnb\M} } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-gnb-5.c b/gcc/testsuite/gcc.target/powerpc/vec-gnb-5.c
deleted file mode 100644 (file)
index 1c3c3fa..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/* { dg-do run } */
-/* { dg-require-effective-target powerpc_future_hw } */
-/* { dg-options "-mdejagnu-cpu=future" } */
-
-#include <altivec.h>
-
-extern void abort (void);
-
-/* This test is replicated for every different vector type since
-   vec_gnb is polymorphic.  */
-unsigned long long int
-do_vec_gnb (vector unsigned int source, int stride)
-{
-  switch (stride)
-    {
-    case 2:
-      return vec_gnb (source, 2);
-    case 3:
-      return vec_gnb (source, 3);
-    case 4:
-      return vec_gnb (source, 4);
-    case 5:
-      return vec_gnb (source, 5);
-    case 6:
-      return vec_gnb (source, 6);
-    case 7:
-      return vec_gnb (source, 7);
-
-    default:
-      /* Illegal value of stride */
-      abort ();
-      return 0;
-    }
-}
-
-int
-main (int argc, char *argv [])
-{
-  /* For result = 0xaaaa_0000_0000_0000, use:
-      stride = 2: binary 1x0x_1x0x_1x0x_... = 0x8888_8888_0000_0000, 0
-      stride = 4: binary 1xxx_0xxx_1xxx_0xxxx = 0x8080_8080_8080_8080, 0
-
-     For result = 0xaaaa_aaaa_0000_0000, use:
-      stride = 2: source = 0x8888_8888_8888_8888, 0x0 }
-      stride = 4: source = { 0x8080_8080_8080_8080, 0x8080_8080_8080_8080 }
-  */
-
-  /* The last array element appears in the left-most (first) bit
-     positions of the vector register.  */
-  vector unsigned int source_a = { 0, 0, 0, 0x88888888 };
-  vector unsigned int source_b = { 0, 0, 0x80808080, 0x80808080 };
-  vector unsigned int source_c = { 0, 0, 0x88888888, 0x88888888 };
-  vector unsigned int source_d =
-    { 0x80808080, 0x80808080, 0x80808080, 0x80808080 };
-
-  unsigned long long int results [] =
-    { 0xaaaa000000000000ull, 0xaaaa000000000000ull,
-      0xaaaaaaaa00000000ull, 0xaaaaaaaa00000000ull };
-
-  if (do_vec_gnb (source_a, 2) != results [0])
-    abort ();
-  if (do_vec_gnb (source_b, 4) != results [1])
-    abort ();
-  if (do_vec_gnb (source_c, 2) != results [2])
-    abort ();
-  if (do_vec_gnb (source_d, 4) != results [3])
-    abort ();
-
-  return 0;
-}
-
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-gnb-6.c b/gcc/testsuite/gcc.target/powerpc/vec-gnb-6.c
deleted file mode 100644 (file)
index a6dc78a..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mdejagnu-cpu=future" } */
-
-#include <altivec.h>
-
-extern void abort (void);
-
-/* This test is replicated for every different vector type since
-   vec_gnb is polymorphic.  */
-unsigned long long int
-do_vec_gnb (vector unsigned long long int source, int stride)
-{
-  switch (stride)
-    {
-    case 2:
-      return vec_gnb (source, 2);
-    case 3:
-      return vec_gnb (source, 3);
-    case 4:
-      return vec_gnb (source, 4);
-    case 5:
-      return vec_gnb (source, 5);
-    case 6:
-      return vec_gnb (source, 6);
-    case 7:
-      return vec_gnb (source, 7);
-
-    default:
-      /* Illegal value of stride */
-      abort ();
-      return 0;
-    }
-}
-
-int
-main (int argc, char *argv [])
-{
-  /* For result = 0xaaaa_0000_0000_0000, use:
-      stride = 2: binary 1x0x_1x0x_1x0x_... = 0x8888_8888_0000_0000, 0
-      stride = 4: binary 1xxx_0xxx_1xxx_0xxxx = 0x8080_8080_8080_8080, 0
-
-     For result = 0xaaaa_aaaa_0000_0000, use:
-      stride = 2: source = 0x8888_8888_8888_8888, 0x0 }
-      stride = 4: source = { 0x8080_8080_8080_8080, 0x8080_8080_8080_8080 }
-  */
-
-  /* The last array element appears in the left-most (first) bit
-     positions of the vector register.  */
-  vector unsigned long long int source_a = { 0, 0x8888888800000000ull };
-  vector unsigned long long int source_b = { 0, 0x8080808080808080ull };
-  vector unsigned long long int source_c = { 0, 0x8888888888888888ull };
-  vector unsigned long long int source_d = { 0x8080808080808080ull,
-                                            0x8080808080808080ull };
-
-  unsigned long long int results [] =
-    { 0xaaaa000000000000ull, 0xaaaa000000000000ull,
-      0xaaaaaaaa00000000ull, 0xaaaaaaaa00000000ull };
-
-  if (do_vec_gnb (source_a, 2) != results [0])
-    abort ();
-  if (do_vec_gnb (source_b, 4) != results [1])
-    abort ();
-  if (do_vec_gnb (source_c, 2) != results [2])
-    abort ();
-  if (do_vec_gnb (source_d, 4) != results [3])
-    abort ();
-
-  return 0;
-}
-
-/* { dg-final { scan-assembler {\mvgnb\M} } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-gnb-7.c b/gcc/testsuite/gcc.target/powerpc/vec-gnb-7.c
deleted file mode 100644 (file)
index bbacff9..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/* { dg-do run } */
-/* { dg-require-effective-target powerpc_future_hw } */
-/* { dg-options "-mdejagnu-cpu=future" } */
-
-#include <altivec.h>
-
-extern void abort (void);
-
-/* This test is replicated for every different vector type since
-   vec_gnb is polymorphic.  */
-unsigned long long int
-do_vec_gnb (vector unsigned long long int source, int stride)
-{
-  switch (stride)
-    {
-    case 2:
-      return vec_gnb (source, 2);
-    case 3:
-      return vec_gnb (source, 3);
-    case 4:
-      return vec_gnb (source, 4);
-    case 5:
-      return vec_gnb (source, 5);
-    case 6:
-      return vec_gnb (source, 6);
-    case 7:
-      return vec_gnb (source, 7);
-
-    default:
-      /* Illegal value of stride */
-      abort ();
-      return 0;
-    }
-}
-
-int
-main (int argc, char *argv [])
-{
-  /* For result = 0xaaaa_0000_0000_0000, use:
-      stride = 2: binary 1x0x_1x0x_1x0x_... = 0x8888_8888_0000_0000, 0
-      stride = 4: binary 1xxx_0xxx_1xxx_0xxxx = 0x8080_8080_8080_8080, 0
-
-     For result = 0xaaaa_aaaa_0000_0000, use:
-      stride = 2: source = 0x8888_8888_8888_8888, 0x0 }
-      stride = 4: source = { 0x8080_8080_8080_8080, 0x8080_8080_8080_8080 }
-  */
-
-  /* The last array element appears in the left-most (first) bit
-     positions of the vector register.  */
-  vector unsigned long long int source_a = { 0, 0x8888888800000000ull };
-  vector unsigned long long int source_b = { 0, 0x8080808080808080ull };
-  vector unsigned long long int source_c = { 0, 0x8888888888888888ull };
-  vector unsigned long long int source_d = { 0x8080808080808080ull,
-                                            0x8080808080808080ull };
-
-  unsigned long long int results [] =
-    { 0xaaaa000000000000ull, 0xaaaa000000000000ull,
-      0xaaaaaaaa00000000ull, 0xaaaaaaaa00000000ull };
-
-  if (do_vec_gnb (source_a, 2) != results [0])
-    abort ();
-  if (do_vec_gnb (source_b, 4) != results [1])
-    abort ();
-  if (do_vec_gnb (source_c, 2) != results [2])
-    abort ();
-  if (do_vec_gnb (source_d, 4) != results [3])
-    abort ();
-
-  return 0;
-}
-
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-gnb-8.c b/gcc/testsuite/gcc.target/powerpc/vec-gnb-8.c
deleted file mode 100644 (file)
index 23c16e5..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mdejagnu-cpu=future" } */
-
-#include <altivec.h>
-
-extern void abort (void);
-
-/* This test is replicated for every different vector type since
-   vec_gnb is polymorphic.  */
-unsigned long long int
-do_vec_gnb (vector unsigned __int128 source, int stride)
-{
-  switch (stride)
-    {
-    case 2:
-      return vec_gnb (source, 2);
-    case 3:
-      return vec_gnb (source, 3);
-    case 4:
-      return vec_gnb (source, 4);
-    case 5:
-      return vec_gnb (source, 5);
-    case 6:
-      return vec_gnb (source, 6);
-    case 7:
-      return vec_gnb (source, 7);
-
-    default:
-      /* Illegal value of stride */
-      abort ();
-      return 0;
-    }
-}
-
-int
-main (int argc, char *argv [])
-{
-  /* For result = 0xaaaa_0000_0000_0000, use:
-      stride = 2: binary 1x0x_1x0x_1x0x_... = 0x8888_8888_0000_0000, 0
-      stride = 4: binary 1xxx_0xxx_1xxx_0xxxx = 0x8080_8080_8080_8080, 0
-
-     For result = 0xaaaa_aaaa_0000_0000, use:
-      stride = 2: source = 0x8888_8888_8888_8888, 0x0 }
-      stride = 4: source = { 0x8080_8080_8080_8080, 0x8080_8080_8080_8080 }
-  */
-
-  /* The last array element appears in the left-most (first) bit
-     positions of the vector register.  */
-  vector unsigned __int128 source_a =
-    { ((unsigned __int128) 0x8888888800000000ull) << 64 };
-  vector unsigned __int128 source_b =
-    { ((unsigned __int128) 0x8080808080808080ull) << 64 };
-  vector unsigned __int128 source_c =
-    { ((unsigned __int128) 0x8888888888888888ull) << 64 };
-  vector unsigned __int128 source_d =
-    { 0x8080808080808080ull |
-      ((unsigned __int128) 0x8080808080808080ull) << 64 };
-
-  unsigned long long int results [] =
-    { 0xaaaa000000000000ull, 0xaaaa000000000000ull,
-      0xaaaaaaaa00000000ull, 0xaaaaaaaa00000000ull };
-
-  if (do_vec_gnb (source_a, 2) != results [0])
-    abort ();
-  if (do_vec_gnb (source_b, 4) != results [1])
-    abort ();
-  if (do_vec_gnb (source_c, 2) != results [2])
-    abort ();
-  if (do_vec_gnb (source_d, 4) != results [3])
-    abort ();
-
-  return 0;
-}
-
-/* { dg-final { scan-assembler {\mvgnb\M} } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-gnb-9.c b/gcc/testsuite/gcc.target/powerpc/vec-gnb-9.c
deleted file mode 100644 (file)
index 659e802..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/* { dg-do run } */
-/* { dg-require-effective-target powerpc_future_hw } */
-/* { dg-options "-mdejagnu-cpu=future" } */
-
-#include <altivec.h>
-
-extern void abort (void);
-
-/* This test is replicated for every different vector type since
-   vec_gnb is polymorphic.  */
-unsigned long long int
-do_vec_gnb (vector unsigned __int128 source, int stride)
-{
-  switch (stride)
-    {
-    case 2:
-      return vec_gnb (source, 2);
-    case 3:
-      return vec_gnb (source, 3);
-    case 4:
-      return vec_gnb (source, 4);
-    case 5:
-      return vec_gnb (source, 5);
-    case 6:
-      return vec_gnb (source, 6);
-    case 7:
-      return vec_gnb (source, 7);
-
-    default:
-      /* Illegal value of stride */
-      abort ();
-      return 0;
-    }
-}
-
-int
-main (int argc, char *argv [])
-{
-  /* For result = 0xaaaa_0000_0000_0000, use:
-      stride = 2: binary 1x0x_1x0x_1x0x_... = 0x8888_8888_0000_0000, 0
-      stride = 4: binary 1xxx_0xxx_1xxx_0xxxx = 0x8080_8080_8080_8080, 0
-
-     For result = 0xaaaa_aaaa_0000_0000, use:
-      stride = 2: source = 0x8888_8888_8888_8888, 0x0 }
-      stride = 4: source = { 0x8080_8080_8080_8080, 0x8080_8080_8080_8080 }
-  */
-
-  /* The last array element appears in the left-most (first) bit
-     positions of the vector register.  */
-  vector unsigned __int128 source_a =
-    { ((unsigned __int128) 0x8888888800000000ull) << 64 };
-  vector unsigned __int128 source_b =
-    { ((unsigned __int128) 0x8080808080808080ull) << 64 };
-  vector unsigned __int128 source_c =
-    { ((unsigned __int128) 0x8888888888888888ull) << 64 };
-  vector unsigned __int128 source_d =
-    { 0x8080808080808080ull |
-      ((unsigned __int128) 0x8080808080808080ull) << 64 };
-
-  unsigned long long int results [] =
-    { 0xaaaa000000000000ull, 0xaaaa000000000000ull,
-      0xaaaaaaaa00000000ull, 0xaaaaaaaa00000000ull };
-
-  if (do_vec_gnb (source_a, 2) != results [0])
-    abort ();
-  if (do_vec_gnb (source_b, 4) != results [1])
-    abort ();
-  if (do_vec_gnb (source_c, 2) != results [2])
-    abort ();
-  if (do_vec_gnb (source_d, 4) != results [3])
-    abort ();
-
-  return 0;
-}