@@ -1064,6 +1064,22 @@ namespace ReduceMul {
10641064 static_assert (__builtin_reduce_mul((vector4ulong){~0ULL , 1 , 1 , 2 }) == ~0ULL - 1 );
10651065}
10661066
1067+ namespace ReduceAnd {
1068+ static_assert (__builtin_reduce_and((vector4char){}) == 0 );
1069+ static_assert (__builtin_reduce_and((vector4char){(char )0x11 , (char )0x22 , (char )0x44 , (char )0x88 }) == 0 );
1070+ static_assert (__builtin_reduce_and((vector4short){(short )0x1111 , (short )0x2222 , (short )0x4444 , (short )0x8888 }) == 0 );
1071+ static_assert (__builtin_reduce_and((vector4int){(int )0x11111111 , (int )0x22222222 , (int )0x44444444 , (int )0x88888888 }) == 0 );
1072+ #if __INT_WIDTH__ == 32
1073+ static_assert (__builtin_reduce_and((vector4long){(long long )0x1111111111111111L , (long long )0x2222222222222222L , (long long )0x4444444444444444L , (long long )0x8888888888888888L }) == 0L );
1074+ static_assert (__builtin_reduce_and((vector4char){(char )-1 , (char )~0x22 , (char )~0x44 , (char )~0x88 }) == 0x11 );
1075+ static_assert (__builtin_reduce_and((vector4short){(short )~0x1111 , (short )-1 , (short )~0x4444 , (short )~0x8888 }) == 0x2222 );
1076+ static_assert (__builtin_reduce_and((vector4int){(int )~0x11111111 , (int )~0x22222222 , (int )-1 , (int )~0x88888888 }) == 0x44444444 );
1077+ static_assert (__builtin_reduce_and((vector4long){(long long )~0x1111111111111111L , (long long )~0x2222222222222222L , (long long )~0x4444444444444444L , (long long )-1 }) == 0x8888888888888888L );
1078+ static_assert (__builtin_reduce_and((vector4uint){0x11111111U , 0x22222222U , 0x44444444U , 0x88888888U }) == 0U );
1079+ static_assert (__builtin_reduce_and((vector4ulong){0x1111111111111111UL , 0x2222222222222222UL , 0x4444444444444444UL , 0x8888888888888888UL }) == 0L );
1080+ #endif
1081+ }
1082+
10671083namespace BuiltinMemcpy {
10681084 constexpr int simple () {
10691085 int a = 12 ;
0 commit comments