Use the faster unvectorized implementation for Node3
Some checks failed
Tests / Clang total: 1039, passed: 1039
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / SIMD fallback total: 1039, passed: 1039
Tests / 32-bit versions total: 1039, passed: 1039
Tests / Release [gcc] total: 1039, passed: 1039
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 775, passed: 775
Tests / Coverage total: 780, passed: 780
weaselab/conflict-set/pipeline/head There was a failure building this commit

This commit is contained in:
2024-06-28 22:52:39 -07:00
parent 4958a4cced
commit 45da8fb996

View File

@@ -1923,29 +1923,34 @@ bool checkMaxBetweenExclusive(Node *n, int begin, int end,
// [begin, end) is now the half-open interval of children we're interested in.
assert(begin < end);
const unsigned shiftUpperBound = end - begin;
const unsigned shiftAmount = begin;
auto inBounds = [&](unsigned c) { return c - shiftAmount < shiftUpperBound; };
switch (n->getType()) {
case Type_Node0: // GCOVR_EXCL_LINE
// We would have returned above, after not finding a child
__builtin_unreachable(); // GCOVR_EXCL_LINE
case Type_Node3: {
auto *self = static_cast<Node3 *>(n);
bool result = true;
for (int i = 0; i < 3; ++i) {
result &= !((self->childMaxVersion[i] > readVersion) &&
inBounds(self->index[i]));
const unsigned shiftUpperBound = end - begin;
const unsigned shiftAmount = begin;
auto inBounds = [&](unsigned c) {
return c - shiftAmount < shiftUpperBound;
};
uint32_t compared = 0;
for (int i = 0; i < Node3::kMaxNodes; ++i) {
compared |= (self->childMaxVersion[i] > readVersion) << i;
}
return result;
} break;
uint32_t mask = 0;
for (int i = 0; i < Node3::kMaxNodes; ++i) {
mask |= inBounds(self->index[i]) << i;
}
return !(compared & mask);
}
case Type_Node16: {
auto *self = static_cast<Node16 *>(n);
return scan16(self->childMaxVersion, self->index, begin, end, readVersion);
} break;
}
case Type_Node48: {
auto *self = static_cast<Node48 *>(n);
// Check all pages