@@ -27,6 +27,7 @@ typedef unsigned long long vector4ulong __attribute__((__vector_size__(32)));
27
27
typedef unsigned int vector4uint __attribute__ ((__vector_size__(16 )));
28
28
typedef short vector4short __attribute__ ((__vector_size__(8 )));
29
29
typedef char vector4char __attribute__ ((__vector_size__(4 )));
30
+ typedef unsigned char vector4uchar __attribute__ ((__vector_size__(4 )));
30
31
typedef BitInt8 vector4BitInt8 __attribute__ ((__vector_size__(4 )));
31
32
typedef BitInt32 vector4BitInt32 __attribute__ ((__vector_size__(16 )));
32
33
typedef BitInt128 vector4BitInt128 __attribute__ ((__vector_size__(64 )));
@@ -848,6 +849,7 @@ static_assert(__builtin_elementwise_add_sat(~(1 << 31), 42) == ~(1 << 31));
848
849
static_assert (__builtin_elementwise_add_sat((1 << 31 ), -42) == (1 << 31 ));
849
850
static_assert (__builtin_elementwise_add_sat(~0U , 1U ) == ~0U);
850
851
static_assert (__builtin_bit_cast(unsigned , __builtin_elementwise_add_sat((vector4char){1 , 2 , 3 , 4 }, (vector4char){1 , 2 , 3 , 4 })) == (LITTLE_END ? 0x08060402 : 0x02040608 ));
852
+ static_assert (__builtin_bit_cast(unsigned , __builtin_elementwise_add_sat((vector4uchar){1 , 2 , 3 , 4 }, (vector4uchar){0 , 1 , 2 , 3 })) == (LITTLE_END ? 0x07050301U : 0x01030507U ));
851
853
static_assert (__builtin_bit_cast(unsigned long long , __builtin_elementwise_add_sat((vector4short){(short )0x8000 , (short )0x8001 , (short )0x8002 , (short )0x8003 }, (vector4short){-7 , -8 , -9 , -10 }) == (LITTLE_END ? 0x8000800080008000 : 0x8000800080008000 )));
852
854
853
855
static_assert (__builtin_elementwise_sub_sat(1 , 2 ) == -1);
@@ -856,4 +858,5 @@ static_assert(__builtin_elementwise_sub_sat(~(1 << 31), -42) == ~(1 << 31));
856
858
static_assert (__builtin_elementwise_sub_sat((1 << 31 ), 42) == (1 << 31 ));
857
859
static_assert (__builtin_elementwise_sub_sat(0U , 1U ) == 0U);
858
860
static_assert (__builtin_bit_cast(unsigned , __builtin_elementwise_sub_sat((vector4char){5 , 4 , 3 , 2 }, (vector4char){1 , 1 , 1 , 1 })) == (LITTLE_END ? 0x01020304 : 0x04030201 ));
861
+ static_assert (__builtin_bit_cast(unsigned , __builtin_elementwise_sub_sat((vector4uchar){5 , 4 , 3 , 2 }, (vector4uchar){1 , 1 , 1 , 1 })) == (LITTLE_END ? 0x01020304U : 0x04030201U ));
859
862
static_assert (__builtin_bit_cast(unsigned long long , __builtin_elementwise_sub_sat((vector4short){(short )0x8000 , (short )0x8001 , (short )0x8002 , (short )0x8003 }, (vector4short){7 , 8 , 9 , 10 }) == (LITTLE_END ? 0x8000800080008000 : 0x8000800080008000 )));
0 commit comments