neon/min: add SSE2 vqsubq_u32 implementation
@@ -615,7 +615,24 @@ simde_vqsubq_u32(simde_uint32x4_t a, simde_uint32x4_t b) {
a_ = simde_uint32x4_to_private(a),
b_ = simde_uint32x4_to_private(b);
- #if defined(SIMDE_VECTOR_SUBSCRIPT_SCALAR)
+ #if defined(SIMDE_X86_SSE2_NATIVE)
+ const __m128i i32_min = _mm_set1_epi32(INT32_MIN);
+ const __m128i difference = _mm_sub_epi32(a_.m128i, b_.m128i);
+ r_.m128i =
+ _mm_and_si128(
+ difference,
+ _mm_xor_si128(
+ _mm_cmpgt_epi32(
+ _mm_xor_si128(difference, i32_min),
+ _mm_xor_si128(a_.m128i, i32_min)
+ ),
+ _mm_set1_epi32(~INT32_C(0))
+ )
+ );
+ #elif defined(SIMDE_VECTOR_SUBSCRIPT_SCALAR)
+ r_.values = a_.values - b_.values;
+ r_.values = r_.values & (r_.values <= a_.values);
+ #elif defined(SIMDE_VECTOR_SUBSCRIPT_SCALAR)
r_.values = a_.values - b_.values;
r_.values &= (r_.values <= a_.values);
#else
