Fixes from testing on an avx512f-capable machine
Some checks failed
Tests / Clang total: 1039, passed: 1039
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / SIMD fallback total: 1039, passed: 1039
Tests / 32-bit versions total: 1039, passed: 1039
Tests / Release [gcc] total: 1039, passed: 1039
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 775, passed: 775
Tests / Coverage total: 780, passed: 780
weaselab/conflict-set/pipeline/head There was a failure building this commit

This commit is contained in:
2024-06-29 22:41:39 -07:00
parent fd3ea2c2a8
commit daa8e02d4f

View File

@@ -1786,8 +1786,8 @@ compare16_32bit(const InternalVersionT *vs, InternalVersionT rv) {
const auto rvVec = _mm_set1_epi32(r); const auto rvVec = _mm_set1_epi32(r);
const auto zero = _mm_setzero_si128(); const auto zero = _mm_setzero_si128();
for (int i = 0; i < 4; ++i) { for (int i = 0; i < 4; ++i) {
compared |= compared |= _mm_movemask_ps(
_mm_movemask_ps(_mm_cmpgt_epi32(_mm_sub_epi32(w[i], rvVec), zero)) __m128(_mm_cmpgt_epi32(_mm_sub_epi32(w[i], rvVec), zero)))
<< (i * 4); << (i * 4);
} }
return compared; return compared;
@@ -1801,7 +1801,7 @@ compare16_32bit(const InternalVersionT *vs, InternalVersionT rv) {
uint32_t r; uint32_t r;
memcpy(&r, &rv, sizeof(r)); memcpy(&r, &rv, sizeof(r));
return _mm512_cmpgt_epi32_mask(_mm512_sub_epi32(w, _mm512_set1_epi32(r)), return _mm512_cmpgt_epi32_mask(_mm512_sub_epi32(w, _mm512_set1_epi32(r)),
_mm512_setzero()); _mm512_setzero_epi32());
} }
#endif #endif
#endif #endif
@@ -1926,18 +1926,7 @@ inline __attribute((always_inline)) bool scan16(const InternalVersionT *vs,
conflict >>= begin << 2; conflict >>= begin << 2;
return !conflict; return !conflict;
#elif INTERNAL_VERSION_32_BIT && defined(HAS_AVX) #elif INTERNAL_VERSION_32_BIT && defined(HAS_AVX)
__m128i w4[4]; uint32_t conflict = compare16_32bit(vs, readVersion);
memcpy(w4, vs, sizeof(w4));
uint32_t rv;
memcpy(&rv, &readVersion, sizeof(rv));
const auto rvVec = _mm_set1_epi32(rv);
const auto zero = _mm_setzero_si128();
uint32_t conflict = 0;
for (int i = 0; i < 4; ++i) {
conflict |=
_mm_movemask_ps(_mm_cmpgt_epi32(_mm_sub_epi32(w4[i], rvVec), zero))
<< (i * 4);
}
conflict &= (1 << end) - 1; conflict &= (1 << end) - 1;
conflict >>= begin; conflict >>= begin;
return !conflict; return !conflict;