@@ -798,6 +798,21 @@ static_assert(__builtin_reduce_xor((vector4long){(long long)0x1111111111111111L,
798798static_assert (__builtin_reduce_xor((vector4uint){0x11111111U , 0x22222222U , 0x44444444U , 0x88888888U }) == 0xFFFFFFFFU );
799799static_assert (__builtin_reduce_xor((vector4ulong){0x1111111111111111UL , 0x2222222222222222UL , 0x4444444444444444UL , 0x8888888888888888UL }) == 0xFFFFFFFFFFFFFFFFUL );
800800
801+ static_assert (__builtin_reduce_min((vector4char){}) == 0 );
802+ static_assert (__builtin_reduce_min((vector4char){(char )0x11 , (char )0x22 , (char )0x44 , (char )0x88 }) == (char )0x88 );
803+ static_assert (__builtin_reduce_min((vector4short){(short )0x1111 , (short )0x2222 , (short )0x4444 , (short )0x8888 }) == (short )0x8888 );
804+ static_assert (__builtin_reduce_min((vector4int){(int )0x11111111 , (int )0x22222222 , (int )0x44444444 , (int )0x88888888 }) == (int )0x88888888 );
805+ static_assert (__builtin_reduce_min((vector4long){(long long )0x1111111111111111L , (long long )0x2222222222222222L , (long long )0x4444444444444444L , (long long )0x8888888888888888L }) == (long long )0x8888888888888888L );
806+ static_assert (__builtin_reduce_min((vector4uint){0x11111111U , 0x22222222U , 0x44444444U , 0x88888888U }) == 0x11111111U );
807+ static_assert (__builtin_reduce_min((vector4ulong){0x1111111111111111UL , 0x2222222222222222UL , 0x4444444444444444UL , 0x8888888888888888UL }) == 0x1111111111111111UL );
808+ static_assert (__builtin_reduce_max((vector4char){}) == 0 );
809+ static_assert (__builtin_reduce_max((vector4char){(char )0x11 , (char )0x22 , (char )0x44 , (char )0x88 }) == (char )0x44 );
810+ static_assert (__builtin_reduce_max((vector4short){(short )0x1111 , (short )0x2222 , (short )0x4444 , (short )0x8888 }) == (short )0x4444 );
811+ static_assert (__builtin_reduce_max((vector4int){(int )0x11111111 , (int )0x22222222 , (int )0x44444444 , (int )0x88888888 }) == (int )0x44444444 );
812+ static_assert (__builtin_reduce_max((vector4long){(long long )0x1111111111111111L , (long long )0x2222222222222222L , (long long )0x4444444444444444L , (long long )0x8888888888888888L }) == (long long )0x4444444444444444L );
813+ static_assert (__builtin_reduce_max((vector4uint){0x11111111U , 0x22222222U , 0x44444444U , 0x88888888U }) == 0x88888888U );
814+ static_assert (__builtin_reduce_max((vector4ulong){0x1111111111111111UL , 0x2222222222222222UL , 0x4444444444444444UL , 0x8888888888888888UL }) == 0x8888888888888888UL );
815+
801816static_assert (__builtin_bit_cast(unsigned , __builtin_elementwise_popcount((vector4char){1 , 2 , 3 , 4 })) == (LITTLE_END ? 0x01020101 : 0x01010201 ));
802817static_assert (__builtin_bit_cast(unsigned long long , __builtin_elementwise_popcount((vector4short){0 , 0x0F0F , ~0 , ~0x0F0F })) == (LITTLE_END ? 0x0008001000080000 : 0x0000000800100008 ));
803818static_assert (__builtin_reduce_add(__builtin_elementwise_popcount((vector4int){1 , 2 , 3 , 4 })) == 5 );
@@ -838,18 +853,3 @@ static_assert(__builtin_elementwise_sub_sat((1 << 31), 42) == (1 << 31));
838853static_assert (__builtin_elementwise_sub_sat(0U , 1U ) == 0U );
839854static_assert (__builtin_bit_cast(unsigned , __builtin_elementwise_sub_sat((vector4char){5 , 4 , 3 , 2 }, (vector4char){1 , 1 , 1 , 1 })) == (LITTLE_END ? 0x01020304 : 0x04030201 ));
840855static_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 )));
841-
842- static_assert (__builtin_reduce_min((vector4char){}) == 0 );
843- static_assert (__builtin_reduce_min((vector4char){(char )0x11 , (char )0x22 , (char )0x44 , (char )0x88 }) == (char )0x88 );
844- static_assert (__builtin_reduce_min((vector4short){(short )0x1111 , (short )0x2222 , (short )0x4444 , (short )0x8888 }) == (short )0x8888 );
845- static_assert (__builtin_reduce_min((vector4int){(int )0x11111111 , (int )0x22222222 , (int )0x44444444 , (int )0x88888888 }) == (int )0x88888888 );
846- static_assert (__builtin_reduce_min((vector4long){(long long )0x1111111111111111L , (long long )0x2222222222222222L , (long long )0x4444444444444444L , (long long )0x8888888888888888L }) == (long long )0x8888888888888888L );
847- static_assert (__builtin_reduce_min((vector4uint){0x11111111U , 0x22222222U , 0x44444444U , 0x88888888U }) == 0x11111111U );
848- static_assert (__builtin_reduce_min((vector4ulong){0x1111111111111111UL , 0x2222222222222222UL , 0x4444444444444444UL , 0x8888888888888888UL }) == 0x1111111111111111UL );
849- static_assert (__builtin_reduce_max((vector4char){}) == 0 );
850- static_assert (__builtin_reduce_max((vector4char){(char )0x11 , (char )0x22 , (char )0x44 , (char )0x88 }) == (char )0x44 );
851- static_assert (__builtin_reduce_max((vector4short){(short )0x1111 , (short )0x2222 , (short )0x4444 , (short )0x8888 }) == (short )0x4444 );
852- static_assert (__builtin_reduce_max((vector4int){(int )0x11111111 , (int )0x22222222 , (int )0x44444444 , (int )0x88888888 }) == (int )0x44444444 );
853- static_assert (__builtin_reduce_max((vector4long){(long long )0x1111111111111111L , (long long )0x2222222222222222L , (long long )0x4444444444444444L , (long long )0x8888888888888888L }) == (long long )0x4444444444444444L );
854- static_assert (__builtin_reduce_max((vector4uint){0x11111111U , 0x22222222U , 0x44444444U , 0x88888888U }) == 0x88888888U );
855- static_assert (__builtin_reduce_max((vector4ulong){0x1111111111111111UL , 0x2222222222222222UL , 0x4444444444444444UL , 0x8888888888888888UL }) == 0x8888888888888888UL );
0 commit comments