Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missed vzeroupper in mismatch and replace #4584

Merged
merged 1 commit into from
Apr 19, 2024
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
6 changes: 6 additions & 0 deletions stl/src/vector_algorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2202,6 +2202,8 @@ namespace {
const auto _First2_ch = static_cast<const char*>(_First2);

if (_Use_avx2()) {
_Zeroupper_on_exit _Guard; // TRANSITION, DevCom-10331414

const size_t _Count_bytes = _Count * sizeof(_Ty);
const size_t _Count_bytes_avx_full = _Count_bytes & ~size_t{0x1F};

Expand Down Expand Up @@ -2405,6 +2407,8 @@ __declspec(noalias) void __stdcall __std_replace_4(
const __m256i _Mask = _mm256_and_si256(_mm256_cmpeq_epi32(_Comparand, _Data), _Tail_mask);
_mm256_maskstore_epi32(reinterpret_cast<int*>(_First), _Mask, _Replacement);
}

_mm256_zeroupper(); // TRANSITION, DevCom-10331414
} else
#endif // !defined(_M_ARM64EC)
{
Expand Down Expand Up @@ -2446,6 +2450,8 @@ __declspec(noalias) void __stdcall __std_replace_8(
const __m256i _Mask = _mm256_and_si256(_mm256_cmpeq_epi64(_Comparand, _Data), _Tail_mask);
_mm256_maskstore_epi64(reinterpret_cast<long long*>(_First), _Mask, _Replacement);
}

_mm256_zeroupper(); // TRANSITION, DevCom-10331414
} else
#endif // !defined(_M_ARM64EC)
{
Expand Down