[clang] 2071ce9 - [Altivec] Use signed comparison for vec_all_* and vec_any_* interfaces

Bardia Mahjour via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 12 08:47:10 PDT 2021


Author: Bardia Mahjour
Date: 2021-07-12T11:41:16-04:00
New Revision: 2071ce9d4559d444a065d78248a7381bf121b766

URL: https://github.com/llvm/llvm-project/commit/2071ce9d4559d444a065d78248a7381bf121b766
DIFF: https://github.com/llvm/llvm-project/commit/2071ce9d4559d444a065d78248a7381bf121b766.diff

LOG: [Altivec] Use signed comparison for vec_all_* and vec_any_* interfaces

We are currently being inconsistent in using signed vs unsigned comparisons for
vec_all_* and vec_any_* interfaces that use vector bool types. For example we
use signed comparison for vec_all_ge(vector signed char, vector bool char) but
unsigned comparison for when the arguments are swapped. GCC and XL use signed
comparison instead. This patch makes clang consistent with itself and with XL
and GCC.

Reviewed By: nemanjai

Differential Revision: https://reviews.llvm.org/D105666

Added: 
    

Modified: 
    clang/lib/Headers/altivec.h
    clang/test/CodeGen/builtins-ppc-altivec.c
    clang/test/CodeGen/builtins-ppc-vsx.c

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/altivec.h b/clang/lib/Headers/altivec.h
index 35dde8203b7f..862ec290e1c9 100644
--- a/clang/lib/Headers/altivec.h
+++ b/clang/lib/Headers/altivec.h
@@ -14894,8 +14894,7 @@ static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned char __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool char __a,
                                               vector signed char __b) {
-  return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b,
-                                      (vector unsigned char)__a);
+  return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, (vector signed char)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool char __a,
@@ -14932,8 +14931,7 @@ static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned short __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool short __a,
                                               vector short __b) {
-  return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
-                                      (vector unsigned short)__a);
+  return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, (vector signed short)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool short __a,
@@ -14969,8 +14967,7 @@ static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned int __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool int __a,
                                               vector int __b) {
-  return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b,
-                                      (vector unsigned int)__a);
+  return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, (vector signed int)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool int __a,
@@ -15008,8 +15005,8 @@ static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
                                               vector signed long long __b) {
-  return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
-                                      (vector unsigned long long)__a);
+  return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b,
+                                      (vector signed long long)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
@@ -15077,8 +15074,7 @@ static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned char __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool char __a,
                                               vector signed char __b) {
-  return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a,
-                                      (vector unsigned char)__b);
+  return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__a, __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool char __a,
@@ -15115,8 +15111,7 @@ static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned short __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool short __a,
                                               vector short __b) {
-  return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
-                                      (vector unsigned short)__b);
+  return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector signed short)__a, __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool short __a,
@@ -15152,8 +15147,7 @@ static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned int __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool int __a,
                                               vector int __b) {
-  return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a,
-                                      (vector unsigned int)__b);
+  return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector signed int)__a, __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool int __a,
@@ -15191,8 +15185,8 @@ static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
                                               vector signed long long __b) {
-  return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
-                                      (vector unsigned long long)__b);
+  return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector signed long long)__a,
+                                      __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
@@ -15267,8 +15261,7 @@ static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned char __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_le(vector bool char __a,
                                               vector signed char __b) {
-  return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a,
-                                      (vector unsigned char)__b);
+  return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__a, __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_le(vector bool char __a,
@@ -15305,8 +15298,7 @@ static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned short __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_le(vector bool short __a,
                                               vector short __b) {
-  return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
-                                      (vector unsigned short)__b);
+  return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector signed short)__a, __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_le(vector bool short __a,
@@ -15342,8 +15334,7 @@ static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned int __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_le(vector bool int __a,
                                               vector int __b) {
-  return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a,
-                                      (vector unsigned int)__b);
+  return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector signed int)__a, __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_le(vector bool int __a,
@@ -15382,8 +15373,8 @@ static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned long long __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_le(vector bool long long __a,
                                               vector signed long long __b) {
-  return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
-                                      (vector unsigned long long)__b);
+  return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector signed long long)__a,
+                                      __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_le(vector bool long long __a,
@@ -15451,8 +15442,7 @@ static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned char __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool char __a,
                                               vector signed char __b) {
-  return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b,
-                                      (vector unsigned char)__a);
+  return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, (vector signed char)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool char __a,
@@ -15489,8 +15479,7 @@ static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned short __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool short __a,
                                               vector short __b) {
-  return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
-                                      (vector unsigned short)__a);
+  return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, (vector signed short)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool short __a,
@@ -15526,8 +15515,7 @@ static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned int __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool int __a,
                                               vector int __b) {
-  return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b,
-                                      (vector unsigned int)__a);
+  return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, (vector signed int)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool int __a,
@@ -15566,8 +15554,8 @@ static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a,
 
 static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
                                               vector signed long long __b) {
-  return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
-                                      (vector unsigned long long)__a);
+  return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b,
+                                      (vector signed long long)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
@@ -16142,8 +16130,8 @@ static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned char __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool char __a,
                                               vector signed char __b) {
-  return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
-                                      (vector unsigned char)__a);
+  return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b,
+                                      (vector signed char)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool char __a,
@@ -16181,8 +16169,8 @@ static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned short __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool short __a,
                                               vector short __b) {
-  return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
-                                      (vector unsigned short)__a);
+  return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b,
+                                      (vector signed short)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool short __a,
@@ -16219,8 +16207,8 @@ static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned int __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool int __a,
                                               vector int __b) {
-  return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
-                                      (vector unsigned int)__a);
+  return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b,
+                                      (vector signed int)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool int __a,
@@ -16260,9 +16248,8 @@ static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
                                               vector signed long long __b) {
-  return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
-                                      (vector unsigned long long)__b,
-                                      (vector unsigned long long)__a);
+  return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b,
+                                      (vector signed long long)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
@@ -16333,8 +16320,8 @@ static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned char __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool char __a,
                                               vector signed char __b) {
-  return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
-                                      (vector unsigned char)__b);
+  return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__a,
+                                      __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool char __a,
@@ -16372,8 +16359,8 @@ static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned short __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool short __a,
                                               vector short __b) {
-  return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
-                                      (vector unsigned short)__b);
+  return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector signed short)__a,
+                                      __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool short __a,
@@ -16410,8 +16397,8 @@ static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned int __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool int __a,
                                               vector int __b) {
-  return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
-                                      (vector unsigned int)__b);
+  return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector signed int)__a,
+                                      __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool int __a,
@@ -16451,9 +16438,8 @@ static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
                                               vector signed long long __b) {
-  return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
-                                      (vector unsigned long long)__a,
-                                      (vector unsigned long long)__b);
+  return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV,
+                                      (vector signed long long)__a, __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
@@ -16524,8 +16510,8 @@ static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned char __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_le(vector bool char __a,
                                               vector signed char __b) {
-  return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
-                                      (vector unsigned char)__b);
+  return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__a,
+                                      __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_le(vector bool char __a,
@@ -16563,8 +16549,8 @@ static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned short __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_le(vector bool short __a,
                                               vector short __b) {
-  return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
-                                      (vector unsigned short)__b);
+  return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector signed short)__a,
+                                      __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_le(vector bool short __a,
@@ -16601,8 +16587,8 @@ static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned int __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_le(vector bool int __a,
                                               vector int __b) {
-  return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
-                                      (vector unsigned int)__b);
+  return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector signed int)__a,
+                                      __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_le(vector bool int __a,
@@ -16642,9 +16628,8 @@ static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned long long __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_le(vector bool long long __a,
                                               vector signed long long __b) {
-  return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
-                                      (vector unsigned long long)__a,
-                                      (vector unsigned long long)__b);
+  return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV,
+                                      (vector signed long long)__a, __b);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_le(vector bool long long __a,
@@ -16715,8 +16700,8 @@ static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned char __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool char __a,
                                               vector signed char __b) {
-  return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
-                                      (vector unsigned char)__a);
+  return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b,
+                                      (vector signed char)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool char __a,
@@ -16754,8 +16739,8 @@ static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned short __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool short __a,
                                               vector short __b) {
-  return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
-                                      (vector unsigned short)__a);
+  return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b,
+                                      (vector signed short)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool short __a,
@@ -16792,8 +16777,8 @@ static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned int __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool int __a,
                                               vector int __b) {
-  return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
-                                      (vector unsigned int)__a);
+  return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b,
+                                      (vector signed int)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool int __a,
@@ -16833,9 +16818,8 @@ static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a,
 
 static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
                                               vector signed long long __b) {
-  return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
-                                      (vector unsigned long long)__b,
-                                      (vector unsigned long long)__a);
+  return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b,
+                                      (vector signed long long)__a);
 }
 
 static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool long long __a,

diff  --git a/clang/test/CodeGen/builtins-ppc-altivec.c b/clang/test/CodeGen/builtins-ppc-altivec.c
index 8edef9806af2..8aefafb61993 100644
--- a/clang/test/CodeGen/builtins-ppc-altivec.c
+++ b/clang/test/CodeGen/builtins-ppc-altivec.c
@@ -8097,8 +8097,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
 
   res_i = vec_all_ge(vbc, vsc);
-// CHECK: @llvm.ppc.altivec.vcmpgtub.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
 
   res_i = vec_all_ge(vbc, vuc);
 // CHECK: @llvm.ppc.altivec.vcmpgtub.p
@@ -8125,8 +8125,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
 
   res_i = vec_all_ge(vbs, vs);
-// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
 
   res_i = vec_all_ge(vbs, vus);
 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
@@ -8153,8 +8153,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
 
   res_i = vec_all_ge(vbi, vi);
-// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
 
   res_i = vec_all_ge(vbi, vui);
 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
@@ -8186,8 +8186,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
 
   res_i = vec_all_gt(vbc, vsc);
-// CHECK: @llvm.ppc.altivec.vcmpgtub.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
 
   res_i = vec_all_gt(vbc, vuc);
 // CHECK: @llvm.ppc.altivec.vcmpgtub.p
@@ -8214,8 +8214,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
 
   res_i = vec_all_gt(vbs, vs);
-// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
 
   res_i = vec_all_gt(vbs, vus);
 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
@@ -8242,8 +8242,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
 
   res_i = vec_all_gt(vbi, vi);
-// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
 
   res_i = vec_all_gt(vbi, vui);
 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
@@ -8280,8 +8280,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
 
   res_i = vec_all_le(vbc, vsc);
-// CHECK: @llvm.ppc.altivec.vcmpgtub.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
 
   res_i = vec_all_le(vbc, vuc);
 // CHECK: @llvm.ppc.altivec.vcmpgtub.p
@@ -8308,8 +8308,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
 
   res_i = vec_all_le(vbs, vs);
-// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
 
   res_i = vec_all_le(vbs, vus);
 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
@@ -8336,8 +8336,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
 
   res_i = vec_all_le(vbi, vi);
-// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
 
   res_i = vec_all_le(vbi, vui);
 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
@@ -8369,8 +8369,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
 
   res_i = vec_all_lt(vbc, vsc);
-// CHECK: @llvm.ppc.altivec.vcmpgtub.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
 
   res_i = vec_all_lt(vbc, vuc);
 // CHECK: @llvm.ppc.altivec.vcmpgtub.p
@@ -8397,8 +8397,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
 
   res_i = vec_all_lt(vbs, vs);
-// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
 
   res_i = vec_all_lt(vbs, vus);
 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
@@ -8425,8 +8425,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
 
   res_i = vec_all_lt(vbi, vi);
-// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
 
   res_i = vec_all_lt(vbi, vui);
 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
@@ -8674,8 +8674,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
 
   res_i = vec_any_ge(vbc, vsc);
-// CHECK: @llvm.ppc.altivec.vcmpgtub.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
 
   res_i = vec_any_ge(vbc, vuc);
 // CHECK: @llvm.ppc.altivec.vcmpgtub.p
@@ -8702,8 +8702,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
 
   res_i = vec_any_ge(vbs, vs);
-// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
 
   res_i = vec_any_ge(vbs, vus);
 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
@@ -8730,8 +8730,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
 
   res_i = vec_any_ge(vbi, vi);
-// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
 
   res_i = vec_any_ge(vbi, vui);
 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
@@ -8763,8 +8763,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
 
   res_i = vec_any_gt(vbc, vsc);
-// CHECK: @llvm.ppc.altivec.vcmpgtub.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
 
   res_i = vec_any_gt(vbc, vuc);
 // CHECK: @llvm.ppc.altivec.vcmpgtub.p
@@ -8791,8 +8791,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
 
   res_i = vec_any_gt(vbs, vs);
-// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
 
   res_i = vec_any_gt(vbs, vus);
 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
@@ -8819,8 +8819,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
 
   res_i = vec_any_gt(vbi, vi);
-// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
 
   res_i = vec_any_gt(vbi, vui);
 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
@@ -8852,8 +8852,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
 
   res_i = vec_any_le(vbc, vsc);
-// CHECK: @llvm.ppc.altivec.vcmpgtub.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
 
   res_i = vec_any_le(vbc, vuc);
 // CHECK: @llvm.ppc.altivec.vcmpgtub.p
@@ -8880,8 +8880,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
 
   res_i = vec_any_le(vbs, vs);
-// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
 
   res_i = vec_any_le(vbs, vus);
 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
@@ -8908,8 +8908,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
 
   res_i = vec_any_le(vbi, vi);
-// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
 
   res_i = vec_any_le(vbi, vui);
 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
@@ -8941,8 +8941,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
 
   res_i = vec_any_lt(vbc, vsc);
-// CHECK: @llvm.ppc.altivec.vcmpgtub.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
 
   res_i = vec_any_lt(vbc, vuc);
 // CHECK: @llvm.ppc.altivec.vcmpgtub.p
@@ -8969,8 +8969,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
 
   res_i = vec_any_lt(vbs, vs);
-// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
 
   res_i = vec_any_lt(vbs, vus);
 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
@@ -8997,8 +8997,8 @@ void test6() {
 // CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
 
   res_i = vec_any_lt(vbi, vi);
-// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
 
   res_i = vec_any_lt(vbi, vui);
 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p

diff  --git a/clang/test/CodeGen/builtins-ppc-vsx.c b/clang/test/CodeGen/builtins-ppc-vsx.c
index e1341dc589c5..0cbcdae504c9 100644
--- a/clang/test/CodeGen/builtins-ppc-vsx.c
+++ b/clang/test/CodeGen/builtins-ppc-vsx.c
@@ -2724,8 +2724,8 @@ void test_p8overloads_backwards_compat() {
   // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
 
   res_i = vec_all_ge(vbll, vsll);
-  // CHECK: @llvm.ppc.altivec.vcmpgtud.p
-  // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+  // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+  // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
 
   res_i = vec_all_ge(vbll, vull);
   // CHECK: @llvm.ppc.altivec.vcmpgtud.p
@@ -2753,8 +2753,8 @@ void test_p8overloads_backwards_compat() {
   // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
 
   res_i = vec_all_gt(vbll, vsll);
-  // CHECK: @llvm.ppc.altivec.vcmpgtud.p
-  // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+  // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+  // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
 
   res_i = vec_all_gt(vbll, vull);
   // CHECK: @llvm.ppc.altivec.vcmpgtud.p
@@ -2782,8 +2782,8 @@ void test_p8overloads_backwards_compat() {
   // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
 
   res_i = vec_all_le(vbll, vsll);
-  // CHECK: @llvm.ppc.altivec.vcmpgtud.p
-  // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+  // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+  // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
 
   res_i = vec_all_le(vbll, vull);
   // CHECK: @llvm.ppc.altivec.vcmpgtud.p
@@ -2811,8 +2811,8 @@ void test_p8overloads_backwards_compat() {
   // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
 
   res_i = vec_all_lt(vbll, vsll);
-  // CHECK: @llvm.ppc.altivec.vcmpgtud.p
-  // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+  // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+  // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
 
   res_i = vec_all_lt(vbll, vull);
   // CHECK: @llvm.ppc.altivec.vcmpgtud.p
@@ -2840,8 +2840,8 @@ void test_p8overloads_backwards_compat() {
   // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
 
   res_i = vec_any_ge(vbll, vsll);
-  // CHECK: @llvm.ppc.altivec.vcmpgtud.p
-  // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+  // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+  // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
 
   res_i = vec_any_ge(vbll, vull);
   // CHECK: @llvm.ppc.altivec.vcmpgtud.p
@@ -2869,8 +2869,8 @@ void test_p8overloads_backwards_compat() {
   // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
 
   res_i = vec_any_gt(vbll, vsll);
-  // CHECK: @llvm.ppc.altivec.vcmpgtud.p
-  // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+  // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+  // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
 
   res_i = vec_any_gt(vbll, vull);
   // CHECK: @llvm.ppc.altivec.vcmpgtud.p
@@ -2898,8 +2898,8 @@ void test_p8overloads_backwards_compat() {
   // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
 
   res_i = vec_any_le(vbll, vsll);
-  // CHECK: @llvm.ppc.altivec.vcmpgtud.p
-  // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+  // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+  // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
 
   res_i = vec_any_le(vbll, vull);
   // CHECK: @llvm.ppc.altivec.vcmpgtud.p
@@ -2927,8 +2927,8 @@ void test_p8overloads_backwards_compat() {
   // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
 
   res_i = vec_any_lt(vbll, vsll);
-  // CHECK: @llvm.ppc.altivec.vcmpgtud.p
-  // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+  // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+  // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
 
   res_i = vec_any_lt(vbll, vull);
   // CHECK: @llvm.ppc.altivec.vcmpgtud.p


        


More information about the cfe-commits mailing list