We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1857e72 commit 90da351Copy full SHA for 90da351
include/xsimd/arch/common/xsimd_common_math.hpp
@@ -1904,8 +1904,9 @@ namespace xsimd
1904
// to v. That's not what we want, so prevent compiler optimization here.
1905
// FIXME: it may be better to emit a memory barrier here (?).
1906
#ifdef __FAST_MATH__
1907
- volatile batch_type d0 = v + t2n;
1908
- batch_type d = *(batch_type*)(void*)(&d0) - t2n;
+ batch_type d0 = v + t2n;
+ asm volatile("" ::"r"(&d0) : "memory");
1909
+ batch_type d = d0 - t2n;
1910
#else
1911
batch_type d0 = v + t2n;
1912
batch_type d = d0 - t2n;
0 commit comments