[NFC] Update vec_extract builtin signatures to take signed int.

This patch updates the vec_extract builtins to take a signed int as the second
parameter, as defined by the Power Vector Intrinsics Programming Reference.
This patch is NFC and all existing tests pass.

Differential Revision: https://reviews.llvm.org/D110935
This commit is contained in:
Amy Kwan 2021-10-08 12:52:01 -05:00
parent e1a9c04435
commit 03bfddae50
1 changed files with 14 additions and 14 deletions
clang/lib/Headers

View File

@ -13455,74 +13455,74 @@ vec_vxor(vector bool long long __a, vector bool long long __b) {
/* vec_extract */
static __inline__ signed char __ATTRS_o_ai vec_extract(vector signed char __a,
unsigned int __b) {
signed int __b) {
return __a[__b & 0xf];
}
static __inline__ unsigned char __ATTRS_o_ai
vec_extract(vector unsigned char __a, unsigned int __b) {
vec_extract(vector unsigned char __a, signed int __b) {
return __a[__b & 0xf];
}
static __inline__ unsigned char __ATTRS_o_ai vec_extract(vector bool char __a,
unsigned int __b) {
signed int __b) {
return __a[__b & 0xf];
}
static __inline__ signed short __ATTRS_o_ai vec_extract(vector signed short __a,
unsigned int __b) {
signed int __b) {
return __a[__b & 0x7];
}
static __inline__ unsigned short __ATTRS_o_ai
vec_extract(vector unsigned short __a, unsigned int __b) {
vec_extract(vector unsigned short __a, signed int __b) {
return __a[__b & 0x7];
}
static __inline__ unsigned short __ATTRS_o_ai vec_extract(vector bool short __a,
unsigned int __b) {
signed int __b) {
return __a[__b & 0x7];
}
static __inline__ signed int __ATTRS_o_ai vec_extract(vector signed int __a,
unsigned int __b) {
signed int __b) {
return __a[__b & 0x3];
}
static __inline__ unsigned int __ATTRS_o_ai vec_extract(vector unsigned int __a,
unsigned int __b) {
signed int __b) {
return __a[__b & 0x3];
}
static __inline__ unsigned int __ATTRS_o_ai vec_extract(vector bool int __a,
unsigned int __b) {
signed int __b) {
return __a[__b & 0x3];
}
#ifdef __VSX__
static __inline__ signed long long __ATTRS_o_ai
vec_extract(vector signed long long __a, unsigned int __b) {
vec_extract(vector signed long long __a, signed int __b) {
return __a[__b & 0x1];
}
static __inline__ unsigned long long __ATTRS_o_ai
vec_extract(vector unsigned long long __a, unsigned int __b) {
vec_extract(vector unsigned long long __a, signed int __b) {
return __a[__b & 0x1];
}
static __inline__ unsigned long long __ATTRS_o_ai
vec_extract(vector bool long long __a, unsigned int __b) {
vec_extract(vector bool long long __a, signed int __b) {
return __a[__b & 0x1];
}
static __inline__ double __ATTRS_o_ai vec_extract(vector double __a,
unsigned int __b) {
signed int __b) {
return __a[__b & 0x1];
}
#endif
static __inline__ float __ATTRS_o_ai vec_extract(vector float __a,
unsigned int __b) {
signed int __b) {
return __a[__b & 0x3];
}