Skip to content

Commit

Permalink
missed vzeroupper in mismatch and replace (#4584)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexGuteniev authored Apr 19, 2024
1 parent 1955118 commit 68338e0
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 68338e0

Please sign in to comment.