llvm / llvm/llvm-project

[x86] Vectorization of `std::replace` and its hand-written equivalent is not very useful and is often even somewhat harmful

Open
#169,935 0 comments 0 reactions 0 assignees View on GitHub
vectorizers
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

In the following example:
```C++
const char s[] = "....1.......1......1.......1....1......1...1.....1......1.....11....."
"......1.....1..........1.......1.........1..........1......1...........1.........1.."
".......1.........1....1...........1......1........1.....1.......1....1....1..1.....";

static void a(benchmark::State& state) {
char x[sizeof(s)];

for (auto _ : state) {
memcpy(x, s, sizeof(s));
benchmark::DoNotOptimize(x);
for (int i=0;i

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.