Fixes for symbol multi-versioning with avx512f
Some checks failed
weaselab/conflict-set/pipeline/head There was a failure building this commit
Some checks failed
weaselab/conflict-set/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -38,6 +38,12 @@ limitations under the License.
|
|||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__has_feature)
|
||||||
|
# if __has_feature(thread_sanitizer)
|
||||||
|
#define __SANITIZE_THREAD__
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memcheck.h>
|
#include <memcheck.h>
|
||||||
|
|
||||||
using namespace weaselab;
|
using namespace weaselab;
|
||||||
@@ -1767,11 +1773,17 @@ downLeftSpine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAS_AVX
|
#ifdef HAS_AVX
|
||||||
__attribute__((target("default"))) uint32_t compare16_32bit(const uint32_t *vs,
|
#ifndef __SANITIZE_THREAD__
|
||||||
uint32_t rv) {
|
__attribute__((target("default")))
|
||||||
|
#endif
|
||||||
|
uint32_t compare16_32bit(const InternalVersionT *vs,
|
||||||
|
InternalVersionT rv) {
|
||||||
|
uint32_t compared = 0;
|
||||||
__m128i w[4];
|
__m128i w[4];
|
||||||
memcpy(w, vs, sizeof(w));
|
memcpy(w, vs, sizeof(w));
|
||||||
const auto rvVec = _mm_set1_epi32(rv);
|
uint32_t r;
|
||||||
|
memcpy(&r, &rv, sizeof(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 |=
|
||||||
@@ -1781,14 +1793,18 @@ __attribute__((target("default"))) uint32_t compare16_32bit(const uint32_t *vs,
|
|||||||
return compared;
|
return compared;
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((target("avx512f"))) uint32_t compare16_32bit(const uint32_t *vs,
|
#ifndef __SANITIZE_THREAD__
|
||||||
uint32_t rv) {
|
__attribute__((target("avx512f"))) uint32_t compare16_32bit(const InternalVersionT *vs,
|
||||||
__mm512i w;
|
InternalVersionT rv) {
|
||||||
|
__m512i w;
|
||||||
memcpy(&w, vs, sizeof(w));
|
memcpy(&w, vs, sizeof(w));
|
||||||
return _mm512_cmpgt_epi32_mask(_mm512_sub_epi32(w, _mm512_set1_epi32(rv)),
|
uint32_t r;
|
||||||
|
memcpy(&r, &rv, sizeof(r));
|
||||||
|
return _mm512_cmpgt_epi32_mask(_mm512_sub_epi32(w, _mm512_set1_epi32(r)),
|
||||||
_mm512_setzero());
|
_mm512_setzero());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// Returns true if v[i] <= readVersion for all i such that begin <= is[i] < end
|
// Returns true if v[i] <= readVersion for all i such that begin <= is[i] < end
|
||||||
// Preconditions: begin <= end, end - begin < 256
|
// Preconditions: begin <= end, end - begin < 256
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
_GLOBAL_OFFSET_TABLE_
|
_GLOBAL_OFFSET_TABLE_
|
||||||
|
__cpu_indicator_init
|
||||||
|
__cpu_model
|
||||||
__stack_chk_fail@GLIBC_2.4
|
__stack_chk_fail@GLIBC_2.4
|
||||||
__tls_get_addr@GLIBC_2.3
|
__tls_get_addr@GLIBC_2.3
|
||||||
abort@GLIBC_2.2.5
|
abort@GLIBC_2.2.5
|
||||||
|
Reference in New Issue
Block a user