w.r.t. #129316
libc++ generates memset for specific std::fill patterns but we can do better with stosq. gcc generates stosq in some cases.
https://godbolt.org/z/T357Kqqee
Repro
#include <algorithm>
#include <vector>
#include <array>
int fill_v(std::vector<int> &v)
{
std::fill(v.begin(), v.end(), SETVAL);
return 0;
}
int fill_a(std::array<int, 100> &v)
{
std::fill(v.begin(), v.end(), SETVAL);
return 0;
}