rs6000-c.c (altivec_overloaded_builtins): Change behavior of vec_packsu (vector unsig...
authorKelvin Nilsen <kelvin@gcc.gnu.org>
Wed, 20 Jun 2018 20:06:51 +0000 (20:06 +0000)
committerKelvin Nilsen <kelvin@gcc.gnu.org>
Wed, 20 Jun 2018 20:06:51 +0000 (20:06 +0000)
gcc/ChangeLog:

2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
behavior of vec_packsu (vector unsigned long long, vector unsigned
long long) to match behavior of vec_packs with same signature.

gcc/testsuite/ChangeLog:

2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/builtins-1.c: Adjust dg directives to scan
for vpkudus in place of vpksdus.
* gcc.target/powerpc/builtins-3-p8.c: Likewise.

From-SVN: r261819

gcc/ChangeLog
gcc/config/rs6000/rs6000-c.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/builtins-1.c
gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c

index 37fc7daf9b22bf4f7700b1b3629abd22af34dac4..46633a59bb34084bdef629acd49454f985c7928a 100644 (file)
@@ -1,3 +1,9 @@
+2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
+
+       * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
+       behavior of vec_packsu (vector unsigned long long, vector unsigned
+       long long) to match behavior of vec_packs with same signature.
+
 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
            Thomas Schwinge <thomas@codesourcery.com>
            Cesar Philippidis  <cesar@codesourcery.com>
index 73be09b4e544e95e453aa23e308d1648cb651ba9..06332f05d0a860ac13e14b5a74fd285630175d61 100644 (file)
@@ -2544,7 +2544,7 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
     RS6000_BTI_unsigned_V8HI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
   { ALTIVEC_BUILTIN_VEC_PACKSU, P8V_BUILTIN_VPKSDUS,
     RS6000_BTI_unsigned_V4SI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
-  { ALTIVEC_BUILTIN_VEC_PACKSU, P8V_BUILTIN_VPKSDUS,
+  { ALTIVEC_BUILTIN_VEC_PACKSU, P8V_BUILTIN_VPKUDUS,
     RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
   { ALTIVEC_BUILTIN_VEC_VPKSWUS, ALTIVEC_BUILTIN_VPKSWUS,
     RS6000_BTI_unsigned_V8HI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
index 271ac3de75009772efd11945524b69016fc1a59d..0343e8e532490e282f0d01b4c113ebb4210e9fe6 100644 (file)
@@ -1,3 +1,9 @@
+2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
+
+       * gcc.target/powerpc/builtins-1.c: Adjust dg directives to scan
+       for vpkudus in place of vpksdus.
+       * gcc.target/powerpc/builtins-3-p8.c: Likewise.
+
 2018-06-20  Nathan Sidwell  <nathan@acm.org>
 
        PR c++/85634
index 45727b965b43b15c317adfe948dc805c4cea629d..8baa8029bd3911e8597a6a4dadf818593155c474 100644 (file)
@@ -297,7 +297,7 @@ int main ()
    vec_mul             mulld | mullw, mulhwu
    vec_nor             xxlnor
    vec_or              xxlor
-   vec_packsu          vpksdus
+   vec_packsu          vpkudus (matches twice due to -dp option)
    vec_                perm vperm
    vec_                round xvrdpi
    vec_sel             xxsel
@@ -335,7 +335,7 @@ int main ()
 /* { dg-final { scan-assembler-times "xxlnor" 6 } } */
 /* { dg-final { scan-assembler-times "xxlor" 11 { target { ilp32 } } } } */
 /* { dg-final { scan-assembler-times "xxlor" 7  { target { lp64 } } } } */
-/* { dg-final { scan-assembler-times "vpksdus" 2 } } */
+/* { dg-final { scan-assembler-times {\mvpkudus\M} 1 } } */
 /* { dg-final { scan-assembler-times "vperm" 4 } } */
 /* { dg-final { scan-assembler-times "xvrdpi" 2 } } */
 /* { dg-final { scan-assembler-times "xxsel" 10 } } */
index f7f31073e83d8896b71740ccda1222b30c03188b..94021818868146ab62e251225bef5d9d5181d609 100644 (file)
@@ -219,6 +219,8 @@ test_neg_double (vector double x)
      test_vui_packs_vull_vull                  1 vpkudus
      test_vui_packs_vssi_vssi                  1 vpkshss
      test_vsi_packsu_vssi_vssi                 1 vpkshus
+     test_vsi_packsu_vsll_vsll                 1 vpksdus
+     test_vsi_packsu_vull_vull                 1 vpkudus
      test_unsigned_char_popcnt_signed_char     1 vpopcntb
      test_unsigned_char_popcnt_unsigned_char   1 vpopcntb
      test_unsigned_short_popcnt_signed_short   1 vpopcnth
@@ -241,11 +243,11 @@ test_neg_double (vector double x)
 /* { dg-final { scan-assembler-times "vcmpequd" 1 } } */
 /* { dg-final { scan-assembler-times "vpkudum"  1 } } */
 /* { dg-final { scan-assembler-times "vpksdss"  1 } } */
-/* { dg-final { scan-assembler-times "vpkudus"  1 } } */  
+/* { dg-final { scan-assembler-times "vpkudus"  2 } } */  
 /* { dg-final { scan-assembler-times "vpkuhus"  2 } } */
 /* { dg-final { scan-assembler-times "vpkshss"  1 } } */  
 /* { dg-final { scan-assembler-times "vpkshus"  1 } } */  
-/* { dg-final { scan-assembler-times "vpksdus"  2 } } */  
+/* { dg-final { scan-assembler-times "vpksdus"  1 } } */  
 /* { dg-final { scan-assembler-times "vpkuwus"  2 } } */  
 /* { dg-final { scan-assembler-times "vpopcntb" 2 } } */
 /* { dg-final { scan-assembler-times "vpopcnth" 2 } } */