Open
Description
#include <algorithm>
bool f(char* a, char* b) {
return std::equal(a, a+16, b, b+16);
}
bool g(std::byte* a, std::byte* b) {
return std::equal(a, a+16, b, b+16);
}
f
generates pcmpeqb
. g
generates a loop. std::equal
should be aware that std::byte
is functionally the same as char
.
#89820 could relate.
Metadata
Metadata
Assignees
Labels
Language frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"