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

vectorize replace 🎭 #4554

Merged
merged 18 commits into from
Apr 9, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
less lines
AlexGuteniev committed Apr 2, 2024
commit ba828cb417075b38d4442cc8077d72115b9cd707
5 changes: 1 addition & 4 deletions stl/src/vector_algorithms.cpp
Original file line number Diff line number Diff line change
@@ -2327,8 +2327,7 @@ __declspec(noalias) void __stdcall __std_replace_trivial_4(
if (_Use_avx2()) {
const __m256i _Comparand = _mm256_broadcastd_epi32(_mm_cvtsi32_si128(_Old_val));
const __m256i _Replacement = _mm256_broadcastd_epi32(_mm_cvtsi32_si128(_New_val));

const size_t _Full_length = _Byte_length(_First, _Last);
const size_t _Full_length = _Byte_length(_First, _Last);

void* _Stop_at = _First;
_Advance_bytes(_Stop_at, _Full_length & ~size_t{0x1F});
@@ -2366,8 +2365,6 @@ __declspec(noalias) void __stdcall __std_replace_trivial_8(
const __m256i _Comparand = _mm256_set1_epi64x(_Old_val);
const __m256i _Replacement = _mm256_set1_epi64x(_New_val);
#endif // ^^^ !defined(_WIN64) ^^^


const size_t _Full_length = _Byte_length(_First, _Last);

void* _Stop_at = _First;