Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/xsimd/arch/common/xsimd_common_math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1904,8 +1904,9 @@ namespace xsimd
// to v. That's not what we want, so prevent compiler optimization here.
// FIXME: it may be better to emit a memory barrier here (?).
#ifdef __FAST_MATH__
volatile batch_type d0 = v + t2n;
batch_type d = *(batch_type*)(void*)(&d0) - t2n;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only cosmetics, but should this use a more modern cast?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, it's removed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, I misread :-)

batch_type d0 = v + t2n;
asm volatile("" ::"r"(&d0) : "memory");
batch_type d = d0 - t2n;
#else
batch_type d0 = v + t2n;
batch_type d = d0 - t2n;
Expand Down
Loading