[PPC64][VSX] Add a couple of new data types for vec_vsx_ld and vec_vsx_st intrinsics and fix incorrect testcases with minor refactoring
New added data types:
vector double vec_vsx_ld (int, const double *);
vector float vec_vsx_ld (int, const float *);
vector bool short vec_vsx_ld (int, const vector bool short *);
vector bool int vec_vsx_ld (int, const vector bool int *);
vector signed int vec_vsx_ld (int, const signed int *);
vector unsigned int vec_vsx_ld (int, const unsigned int *);
void vec_vsx_st (vector double, int, double *);
void vec_vsx_st (vector float, int, float *);
void vec_vsx_st (vector bool short, int, vector bool short *);
void vec_vsx_st (vector bool short, int, signed short *);
void vec_vsx_st (vector bool short, int, unsigned short *);
void vec_vsx_st (vector bool int, int, vector bool int *);
void vec_vsx_st (vector bool int, int, signed int *);
void vec_vsx_st (vector bool int, int, unsigned int *);
Also fix testcases which use non-vector argument version of vec_vsx_ld or
vec_vsx_st, but pass incorrect parameter.
llvm-svn: 266166
diff --git a/clang/lib/Headers/altivec.h b/clang/lib/Headers/altivec.h
index 179fcdf..77bc928 100644
--- a/clang/lib/Headers/altivec.h
+++ b/clang/lib/Headers/altivec.h
@@ -10268,16 +10268,31 @@
#ifdef __VSX__
+static __inline__ vector bool int __ATTRS_o_ai
+vec_vsx_ld(int __a, const vector bool int *__b) {
+ return (vector bool int)__builtin_vsx_lxvw4x(__a, __b);
+}
+
static __inline__ vector signed int __ATTRS_o_ai
vec_vsx_ld(int __a, const vector signed int *__b) {
return (vector signed int)__builtin_vsx_lxvw4x(__a, __b);
}
+static __inline__ vector signed int __ATTRS_o_ai
+vec_vsx_ld(int __a, const signed int *__b) {
+ return (vector signed int)__builtin_vsx_lxvw4x(__a, __b);
+}
+
static __inline__ vector unsigned int __ATTRS_o_ai
vec_vsx_ld(int __a, const vector unsigned int *__b) {
return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b);
}
+static __inline__ vector unsigned int __ATTRS_o_ai
+vec_vsx_ld(int __a, const unsigned int *__b) {
+ return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b);
+}
+
static __inline__ vector float __ATTRS_o_ai
vec_vsx_ld(int __a, const vector float *__b) {
return (vector float)__builtin_vsx_lxvw4x(__a, __b);
@@ -10303,6 +10318,16 @@
return (vector double)__builtin_vsx_lxvd2x(__a, __b);
}
+static __inline__ vector double __ATTRS_o_ai
+vec_vsx_ld(int __a, const double *__b) {
+ return (vector double)__builtin_vsx_lxvd2x(__a, __b);
+}
+
+static __inline__ vector bool short __ATTRS_o_ai
+vec_vsx_ld(int __a, const vector bool short *__b) {
+ return (vector bool short)__builtin_vsx_lxvw4x(__a, __b);
+}
+
static __inline__ vector signed short __ATTRS_o_ai
vec_vsx_ld(int __a, const vector signed short *__b) {
return (vector signed short)__builtin_vsx_lxvw4x(__a, __b);
@@ -10354,6 +10379,21 @@
#ifdef __VSX__
+static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool int __a, int __b,
+ vector bool int *__c) {
+ __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
+}
+
+static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool int __a, int __b,
+ signed int *__c) {
+ __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
+}
+
+static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool int __a, int __b,
+ unsigned int *__c) {
+ __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
+}
+
static __inline__ void __ATTRS_o_ai vec_vsx_st(vector signed int __a, int __b,
vector signed int *__c) {
__builtin_vsx_stxvw4x((vector int)__a, __b, __c);
@@ -10401,6 +10441,25 @@
__builtin_vsx_stxvd2x((vector double)__a, __b, __c);
}
+static __inline__ void __ATTRS_o_ai vec_vsx_st(vector double __a, int __b,
+ double *__c) {
+ __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
+}
+
+static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool short __a, int __b,
+ vector bool short *__c) {
+ __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
+}
+
+static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool short __a, int __b,
+ signed short *__c) {
+ __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
+}
+
+static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool short __a, int __b,
+ unsigned short *__c) {
+ __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
+}
static __inline__ void __ATTRS_o_ai vec_vsx_st(vector signed short __a, int __b,
vector signed short *__c) {
__builtin_vsx_stxvw4x((vector int)__a, __b, __c);
@@ -10422,6 +10481,21 @@
__builtin_vsx_stxvw4x((vector int)__a, __b, __c);
}
+static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool char __a, int __b,
+ vector bool char *__c) {
+ __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
+}
+
+static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool char __a, int __b,
+ signed char *__c) {
+ __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
+}
+
+static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool char __a, int __b,
+ unsigned char *__c) {
+ __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
+}
+
static __inline__ void __ATTRS_o_ai vec_vsx_st(vector signed char __a, int __b,
vector signed char *__c) {
__builtin_vsx_stxvw4x((vector int)__a, __b, __c);
@@ -10443,21 +10517,6 @@
__builtin_vsx_stxvw4x((vector int)__a, __b, __c);
}
-static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool char __a, int __b,
- vector bool char *__c) {
- __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
-}
-
-static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool char __a, int __b,
- signed char *__c) {
- __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
-}
-
-static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool char __a, int __b,
- unsigned char *__c) {
- __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
-}
-
#endif
/* vec_xor */